This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Explicily disable comdat support for wasm output
ClosedPublic

Authored by sbc100 on Nov 9 2017, 3:24 PM.

Details

Summary

Disably comdat support in the same way we do the Mach-O. This
also causes clang not to generated comdats.

The hope is that we can support C++ without full comdat
support in the same that Mach-O is able to do this.

Event Timeline

sbc100 created this revision.Nov 9 2017, 3:24 PM
sbc100 added a subscriber: llvm-commits.
dschuff accepted this revision.Nov 9 2017, 3:46 PM

I'm fine with making this explicit for now. I'm not sure I'd yet go so far as to say that the goal is not to support comdats. We should definitely investigate how C++ and its debug info are supported in mach-o, but it may be that comdats are better than whatever they do. In general in the absence of good reasons (e.g. our 2-level namespace) I'd probably have a slight bias toward doing things the ELF way rather than the macho way; most people I've talked to who've worked a lot with macho don't speak too highly of it :)

This revision is now accepted and ready to land.Nov 9 2017, 3:46 PM
sunfish edited edge metadata.Nov 9 2017, 5:42 PM

If this is a temporary workaround, it's fine though we should add comments saying that. If this is meant as a permanent change, I don't currently know enough about MachO to know what to think about it.

This revision was automatically updated to reflect the committed changes.