diff options
| author | bors <bors@rust-lang.org> | 2016-09-07 15:45:14 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-09-07 15:45:14 -0700 |
| commit | a7b2232d20320dc3b4044a2aec1d51a129e7e17d (patch) | |
| tree | 1b04fa3fb7c69183e8254b76c089f4bff8803e1f /src/bootstrap/compile.rs | |
| parent | 9627e9ef6e0183e50b6a985143d31d82bda31cfe (diff) | |
| parent | 8cfc69ecea9874ad28253ecc47d50099f9e7001e (diff) | |
Auto merge of #36292 - japaric:musl-root, r=alexcrichton
rustbuild: per target musl-root
config.toml now accepts a target.$TARGET.musl-root key that lets you
override the "build" musl-root value, which is set via the --musl-root
flag or via the build.musl-root key.
With this change, it's now possible to compile std for several musl
targets at once. Here's are the sample commands to do such thing:
```
$ configure \
--enable-rustbuild \
--target=x86_64-unknown-linux-musl,arm-unknown-linux-musleabi \
--musl-root=/musl/x86_64-unknown-linux-musl/
$ edit config.toml && tail config.toml
[target.arm-unknown-linux-musleabi]
musl-root = "/x-tools/arm-unknown-linux-musleabi/arm-unknown-linux-musleabi/sysroot/usr"
$ make
```
r? @alexcrichton
With this we should be able to start producing releases of std for arm musl targets
Diffstat (limited to 'src/bootstrap/compile.rs')
| -rw-r--r-- | src/bootstrap/compile.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index 5ce106b4544..e87669ba08c 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -59,8 +59,8 @@ pub fn std<'a>(build: &'a Build, target: &str, compiler: &Compiler<'a>) { cargo.env("JEMALLOC_OVERRIDE", jemalloc); } } - if let Some(ref p) = build.config.musl_root { - if target.contains("musl") { + if target.contains("musl") { + if let Some(p) = build.musl_root(target) { cargo.env("MUSL_ROOT", p); } } |
