Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upEmscripten support take 2 (with bonus i686-unknown-linux-musl). #30629
Conversation
rust-highfive
assigned
alexcrichton
Dec 30, 2015
This was referenced Dec 30, 2015
aidanhs
reviewed
Jan 8, 2016
| 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 |
This comment has been minimized.
This comment has been minimized.
aidanhs
reviewed
Jan 8, 2016
| @@ -180,7 +182,7 @@ pub mod guard { | |||
| } | |||
|
|
|||
|
|
|||
| #[cfg(any(target_os = "linux", | |||
| #[cfg(any(all(target_os = "linux", not(target_env = "musl")), | |||
This comment has been minimized.
This comment has been minimized.
aidanhs
Jan 8, 2016
Member
Unfortunately I'm without the ability to build musl-rust right now, so I'm forced to ask rather than just trying - what about this won't work on musl?
This comment has been minimized.
This comment has been minimized.
brson
Jan 21, 2016
Author
Contributor
I haven't looked too deeply, but I was getting crashes in one of the pthread calls in this code path, and since it's some hairy code I just punted.
alexcrichton
reviewed
Jan 10, 2016
| // To deal with these circular dependencies we just force the compiler to | ||
| // link everything as a group, not stripping anything out until everything | ||
| // is processed. The linker will still perform a pass to strip out object | ||
| // files but it won't do so until all objects/archives have been processed. |
This comment has been minimized.
This comment has been minimized.
alexcrichton
Jan 10, 2016
Member
Could the comments in this file be deduplicated with the 64-bit MUSL? e.g. just leave pointers saying that an explanation of all the weird options are over there.
This comment has been minimized.
This comment has been minimized.
|
r=me with one minor nit, but otherwise this'll just need libc to land first as well |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
Rebasing this now. |
brson
force-pushed the
brson:emscripten-upstream
branch
2 times, most recently
from
e1ced26
to
b9dd828
Feb 6, 2016
This comment has been minimized.
This comment has been minimized.
|
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. |
This comment has been minimized.
This comment has been minimized.
|
@bors r=alexcrichton |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
@bors r- I've got a commit that changes jemalloc in there. |
This comment has been minimized.
This comment has been minimized.
brson
force-pushed the
brson:emscripten-upstream
branch
from
b9dd828
to
7afb56f
Feb 6, 2016
This comment has been minimized.
This comment has been minimized.
|
@bors r=alexcrichton |
This comment has been minimized.
This comment has been minimized.
|
|
brson
added some commits
Nov 26, 2015
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
Feb 6, 2016
This comment has been minimized.
This comment has been minimized.
bors
merged commit 7afb56f
into
rust-lang:master
Feb 6, 2016
This was referenced Feb 6, 2016
This comment has been minimized.
This comment has been minimized.
|
@brson @alexcrichton a bit late to this party, but |
This comment has been minimized.
This comment has been minimized.
|
AFAIK that's just to tell the linker to emit a 32-bit executable in case it's default a 64-bit one |
This comment has been minimized.
This comment has been minimized.
|
Does that make it redundant with On Mon, May 2, 2016 at 1:10 AM, Alex Crichton notifications@github.com
|
This comment has been minimized.
This comment has been minimized.
|
In this case, probably yes |
This comment has been minimized.
This comment has been minimized.
|
@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 |
brson commentedDec 30, 2015
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
EMSCRIPTENenvironment 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