about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChris Wailes <chriswailes@google.com>2023-02-02 16:10:43 -0800
committerChris Wailes <chriswailes@google.com>2023-02-02 16:10:43 -0800
commit134a5aea52641715dd1ea1e4ad0e6a5693fbedc6 (patch)
tree7b08de3bc7c92bf5e360d458657c34c8e7b4f5d5
parentba64ba8b0dfd57f7d6d7399d0df7ded37d2af18d (diff)
downloadrust-134a5aea52641715dd1ea1e4ad0e6a5693fbedc6.tar.gz
rust-134a5aea52641715dd1ea1e4ad0e6a5693fbedc6.zip
Add a linker argument back to boostrap.py
In https://github.com/rust-lang/rust/pull/101783 I accidentally removed
a load-bearing linker argument.  This PR adds it back in.
-rw-r--r--src/bootstrap/bootstrap.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
index 2d5018d934e..9cf43fc7a21 100644
--- a/src/bootstrap/bootstrap.py
+++ b/src/bootstrap/bootstrap.py
@@ -753,6 +753,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["RUSTFLAGS"] += " -Wrust_2018_idioms -Wunused_lifetimes"
         env["RUSTFLAGS"] += " -Wsemicolon_in_expressions_from_macros"
         if self.get_toml("deny-warnings", "rust") != "false":