diff options
| author | kennytm <kennytm@gmail.com> | 2018-10-26 18:25:17 +0800 |
|---|---|---|
| committer | kennytm <kennytm@gmail.com> | 2018-10-26 23:07:00 +0800 |
| commit | 477f6f7577b701895083357d8d8dda9c7ee3e670 (patch) | |
| tree | ca81e585d9dba76aba88a0e1379d36124b85362a | |
| parent | c5e223852c392268b1a58f5dd56785b42e0af4ca (diff) | |
| parent | bc87c71d860d2b667a0981c059032240fd998955 (diff) | |
| download | rust-477f6f7577b701895083357d8d8dda9c7ee3e670.tar.gz rust-477f6f7577b701895083357d8d8dda9c7ee3e670.zip | |
Rollup merge of #55378 - Keruspe:bootstrap-linker, r=petrochenkov
rustbuild: use configured linker to build boostrap Currently, bootstrap uses it to compile everything, but x.py wasn't using it yet to build bootstrap itself. This fixes the build for systems where the linker isn't called `cc`.
| -rw-r--r-- | src/bootstrap/bootstrap.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index ffc5adbebb3..b5dc0090c8b 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -632,6 +632,9 @@ class RustBuild(object): target_features += ["-crt-static"] if target_features: env["RUSTFLAGS"] += "-C target-feature=" + (",".join(target_features)) + " " + target_linker = self.get_toml("linker", build_section) + if target_linker is not None: + env["RUSTFLAGS"] += "-C linker=" + target_linker + " " env["PATH"] = os.path.join(self.bin_root(), "bin") + \ os.pathsep + env["PATH"] |
