This is an archive of the discontinued LLVM Phabricator instance.

Pass through --undefined to Wasm LLD
ClosedPublic

Authored by ncw on Dec 1 2017, 10:41 AM.

Diff Detail

Repository
rC Clang

Event Timeline

ncw created this revision.Dec 1 2017, 10:41 AM
ncw updated this revision to Diff 125176.Dec 1 2017, 10:45 AM

(D'oh, more trouble with arcane commands getting diffs into phabricator... sorry for the spam.)

sbc100 edited edge metadata.Dec 1 2017, 11:00 AM

I'm a little confused by this. I was assuming you would do "-Wl,-u,foo" or "-Xlinker". I wasn't aware -u was a valid compiler flag itself. It doesn't show up in --help.

ncw added a comment.Dec 1 2017, 11:13 AM

I didn't know it existed either, and you're right it's odd that it doesn't appear in the help text... However it duly exists and is implemented in clang/lib/Driver/ToolChains/Gnu.cpp, without any note that it's deprecated. man gcc documents it.

Oh I see. lgtm. Do we need to update any tests? I see we won't have a wasm-ld.c test yet? We should add one?

By the way, thank you for all these wasm patches!

ncw added a comment.Dec 2 2017, 1:18 AM

I'm glad to be involved in a small way. Our company uses Emscripten in one of our products, and some of our employees were early contributors to Emscripten years ago, when they were trying to get C++ working. Now I've been allowed to spend a few weeks "investigating" Wasm, then I'll have to get back to my normal work on our product. I hope short-term contributors like me don't add too much burden.

I'm also really impressed with Wasm, the whole design, tooling and project is coming along really well and should provide an excellent foundation for web projects.

Regarding this patch - can we get away without a test...? I can confirm that I've just done a manual test, and the argument is correctly passed down to LLD. Plus the line was simply copied from the existing toolchains.

sbc100 added a comment.Dec 2 2017, 3:10 PM

Sure I'll land this now.

This revision was automatically updated to reflect the committed changes.