-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Emscripten support take 2 (with bonus i686-unknown-linux-musl). #30629
Conversation
llvm::LLVMWriteBitcodeToFile(llmod, out.as_ptr()); | ||
// Change what we write and cleanup based on whether obj files are | ||
// just llvm bitcode. In that case write bitcode, and possibly | ||
// delete the bitcode if it wasn't requisted. Don't generate the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
requested (sorry about the nit, my eyes just fell on it)
r=me with one minor nit, but otherwise this'll just need libc to land first as well |
☔ The latest upstream changes (presumably #30601) made this pull request unmergeable. Please resolve the merge conflicts. |
Rebasing this now. |
e1ced26
to
b9dd828
Compare
Well, I've rebased and addressed comments, and this builds, but testing against emscripten incoming it no longer produces working js. Still, I'm up for landing this for the wip. |
@bors r=alexcrichton |
📌 Commit b9dd828 has been approved by |
@bors r- I've got a commit that changes jemalloc in there. |
b9dd828
to
7afb56f
Compare
@bors r=alexcrichton |
📌 Commit 7afb56f has been approved by |
Backtraces, and the compilation of libbacktrace for asmjs, are disabled. This port doesn't use jemalloc so, like pnacl, it disables jemalloc *for all targets* in the configure file. It disables stack protection.
This tells trans::back::write not to LLVM codegen to create .o files but to put LLMV bitcode in .o files. Emscripten's emcc supports .o in this format, and this is, I think, slightly easier than making rlibs work without .o files.
⌛ Testing commit 7afb56f with merge 8c604dc... |
Here's another go at adding emscripten support. This needs to wait again on new [libc definitions](rust-lang/libc#122) landing. To get the libc definitions right I had to add support for i686-unknown-linux-musl, which are very similar to emscripten's, which are derived from arm/musl. This branch additionally removes the makefile dependency on the `EMSCRIPTEN` environment variable by not building the unused compiler-rt. Again, this is not sufficient for actually compiling to asmjs since it needs additional LLVM patches. r? @alexcrichton
@brson @alexcrichton a bit late to this party, but |
AFAIK that's just to tell the linker to emit a 32-bit executable in case it's default a 64-bit one |
Does that make it redundant with On Mon, May 2, 2016 at 1:10 AM, Alex Crichton notifications@github.com
|
In this case, probably yes |
@tamird Memory is hazy, but if I didn't write that it didn't work, and I don't know if it's redundant with |
Here's another go at adding emscripten support. This needs to wait again on new libc definitions landing. To get the libc definitions right I had to add support for i686-unknown-linux-musl, which are very similar to emscripten's, which are derived from arm/musl.
This branch additionally removes the makefile dependency on the
EMSCRIPTEN
environment variable by not building the unused compiler-rt.Again, this is not sufficient for actually compiling to asmjs since it needs additional LLVM patches.
r? @alexcrichton