-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Experimental MUSL target support for the compiler #24777
Commits on Apr 27, 2015
-
Configuration menu - View commit details
-
Copy full SHA for 681fc82 - Browse repository at this point
Copy the full SHA 681fc82View commit details -
rustc: Add target_env for triples by default
This adds a new `#[cfg]` matcher against the `target_env` property of the destination target triple. For example all windows triples today end with `-gnu` but we will also hopefully support non-`gnu` targets for Windows, at which point we'll need to differentiate between the two. This new `target_env` matches is provided and filled in with the target's environment name. Currently the only non-empty value of this name is `gnu`, but `musl` will be shortly added for the linux triples.
Configuration menu - View commit details
-
Copy full SHA for ba2380d - Browse repository at this point
Copy the full SHA ba2380dView commit details -
mk: Add support for musl-based builds
This commit adds support to the makefiles, configuration script, and build system to understand MUSL. This is broken up into a few parts: * Any target of the form `*-musl` requires the `--musl-root` option to `./configure` which will indicate the root of the MUSL installation. It is also expected that there is a libunwind build inside of that installation built against that MUSL. * Objects from MUSL are copied into the build tree for Rust to be statically linked into the appropriate Rust library. * Objects for binary startup and shutdown are included in each Rust installation by default for MUSL. This requires MUSL to only be installed on the machine compiling rust. Only a linker will be necessary for compiling against MUSL on a target machine. Eventually a MUSL and/or libunwind build may be integrated by default into the build but for now they are just always assumed to exist externally.
Configuration menu - View commit details
-
Copy full SHA for cd980b3 - Browse repository at this point
Copy the full SHA cd980b3View commit details -
rustc_back: Add x86_64-unknown-linux-musl as a target
This commit adds support for x86_64-unknown-linux-musl as a target of the compiler. There's some comments in the commit about some of the more flavorful flags passed to the linker as it's not quite as trivial as the normal specs.
Configuration menu - View commit details
-
Copy full SHA for 22da16a - Browse repository at this point
Copy the full SHA 22da16aView commit details -
rustc: Add support for linking arbitrary objects
MUSL for example provides its own start/end objects in place of the standard ones shipped by gcc.
Configuration menu - View commit details
-
Copy full SHA for d098517 - Browse repository at this point
Copy the full SHA d098517View commit details -
std: Prepare for linking to musl
This commit modifies the standard library and its dependencies to link correctly when built against MUSL. This primarily ensures that the right libraries are linked against and when they're linked against they're linked against statically.
Configuration menu - View commit details
-
Copy full SHA for 6c04872 - Browse repository at this point
Copy the full SHA 6c04872View commit details -
compiletest: Don't force dylibs on musl
MUSL support is currently only with static builds, so building a dylib will always fail.
Configuration menu - View commit details
-
Copy full SHA for 5f518ad - Browse repository at this point
Copy the full SHA 5f518adView commit details -
std: Don't assume dlopen() works on yourself
Statically linked executables do not succeed (aka MUSL-based executables).
Configuration menu - View commit details
-
Copy full SHA for 7dd6215 - Browse repository at this point
Copy the full SHA 7dd6215View commit details -
compiletest: Add support for
// ignore-musl
Add the ability to ignore a test based on the environment of the triple being used.
Configuration menu - View commit details
-
Copy full SHA for 60f8f6b - Browse repository at this point
Copy the full SHA 60f8f6bView commit details
Commits on Apr 28, 2015
-
test: Fix some tests to run with musl
There were a few test cases to fix: * Dynamic libraries are not supported with MUSL right now, so all of those related test which force or require dylibs are ignored. * Looks like the default stack for MUSL is smaller than glibc, so a few stack allocations in benchmarks were boxed up (shouldn't have a perf impact). * Some small linkage tweaks here and there * Out-of-stack detection does not currently work with MUSL
Configuration menu - View commit details
-
Copy full SHA for 247842b - Browse repository at this point
Copy the full SHA 247842bView commit details