Skip to content

Commit 477f6f7

Browse files
committed
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`.
2 parents c5e2238 + bc87c71 commit 477f6f7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/bootstrap/bootstrap.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,9 @@ def build_bootstrap(self):
632632
target_features += ["-crt-static"]
633633
if target_features:
634634
env["RUSTFLAGS"] += "-C target-feature=" + (",".join(target_features)) + " "
635+
target_linker = self.get_toml("linker", build_section)
636+
if target_linker is not None:
637+
env["RUSTFLAGS"] += "-C linker=" + target_linker + " "
635638

636639
env["PATH"] = os.path.join(self.bin_root(), "bin") + \
637640
os.pathsep + env["PATH"]

0 commit comments

Comments
 (0)