-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support lld
on pure wasm backend
#2
Comments
Awhile back I filed https://bugs.llvm.org/show_bug.cgi?id=35369 with at least one cause of "we can't use lld vanilla upstream". There's a whole lot more issues to solve here, but that's at least one concrete actionable one :) |
JFYI Experimental LLD support has been landed in Emscripten |
I've tested on top of the LLVM 6 upgrade (plus a bit farther on LLVM for a few more patches) with LLD master and everything looks to be working beautifully! Once https://reviews.llvm.org/D42511 lands we won't even need wasm-gc any more, yay! |
Ok I've now completed a test run of our entire test suite using LLD to link wasm binaries together. Specifically I was using llvm-mirror/lld@95a9b67 with https://reviews.llvm.org/D42511 applied manually (but that probably wasn't necessary), llvm-mirror/llvm@d14b8f6, and alexcrichton/rust@106657e. I believe the sequence of steps here are now:
I'd hope we can just switch the defaults overnight and not worry about maintaining the old "LTO everything" link mode. There'll proably be bugs but likely nothing that's too hard to backport! |
Ok I got a little excited and I've now implemented all of this -- alexcrichton/rust@cbf406f Once LLVM 6 lands I'll send that as a PR and we should be able to switch to LLD pronto. |
Landed! |
Wow that's a huge reduction. Shaving 40+ minutes off is not a trivial gain at all. |
Currently we avoid the need for any linked on
wasm32-unknown-unknown
, by combining all Rust code into a single compilation unit. This allows us to work around the immaturity of thelld
story for wasm, but at the cost of compile times. This issue tracks the status of thelld
readiness and rustc's ability to use it.The text was updated successfully, but these errors were encountered: