This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] supports -stdlib=libc++ switch
ClosedPublic

Authored by patcheng on Jan 10 2018, 11:24 PM.

Details

Summary

Referenced implementation from Fuchsia and Darwin Toolchain.

Still only support CST_Libcxx.

Now checks that the argument is really '-stdlib=libc++', and display error.

Also, now will pass -lc++ and -lc++abi to the linker.

Diff Detail

Repository
rC Clang

Event Timeline

patcheng created this revision.Jan 10 2018, 11:24 PM
sbc100 accepted this revision.Jan 11 2018, 2:38 PM

Nice. I happened to just upload a similar (but orthogonal) patch: https://reviews.llvm.org/D41966

This revision is now accepted and ready to land.Jan 11 2018, 2:38 PM
dschuff accepted this revision.Jan 11 2018, 2:46 PM

LGTM, but does it need to be rebased after the -allow-undefined-file change?

sbc100 added inline comments.Jan 11 2018, 2:50 PM
lib/Driver/ToolChains/WebAssembly.cpp
149

Can you add -lc++abi too? Then I can drop D41966

patcheng added inline comments.Jan 11 2018, 3:05 PM
lib/Driver/ToolChains/WebAssembly.cpp
149

Sure, but I am not in front of a computer with the code at the moment.

I should be able to get this done later this evening (PST).

patcheng updated this revision to Diff 129572.Jan 11 2018, 7:05 PM
patcheng edited the summary of this revision. (Show Details)

Added -lc++abi per @sbc100 's suggestion

Thanks @sbc100.

BTW I don't have commit access. When it's ready to be committed, I would need help with that.

Thanks

This revision was automatically updated to reflect the committed changes.