Skip to content

Commit

Permalink
Rollup merge of rust-lang#55378 - Keruspe:bootstrap-linker, r=petroch…
Browse files Browse the repository at this point in the history
…enkov

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`.
  • Loading branch information
kennytm committed Oct 26, 2018
2 parents c5e2238 + bc87c71 commit 477f6f7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/bootstrap/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,9 @@ def build_bootstrap(self):
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"]
Expand Down

0 comments on commit 477f6f7

Please sign in to comment.