Skip to content

Commit 400fc86

Browse files
committed
WebAssembly: Disable Comdat for reflection metadata
1 parent 620784a commit 400fc86

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

include/swift/IRGen/Linking.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,6 +1147,11 @@ class ApplyIRLinkage {
11471147
// TODO: BFD and gold do not handle COMDATs properly
11481148
if (Triple.isOSBinFormatELF())
11491149
return;
1150+
// WebAssembly: hack: comdat + custom section = explosion
1151+
// the comdat code assumes section name would be unique for each comdat
1152+
// this doesn't happen for metadata.
1153+
if (Triple.isOSBinFormatWasm())
1154+
return;
11501155

11511156
if (IRL.Linkage == llvm::GlobalValue::LinkOnceODRLinkage ||
11521157
IRL.Linkage == llvm::GlobalValue::WeakODRLinkage)

0 commit comments

Comments
 (0)