about summary refs log tree commit diff
path: root/src/bootstrap/bin
diff options
context:
space:
mode:
authorJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2020-01-28 19:21:22 +0100
committerJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2020-01-29 18:05:36 +0100
commitbfba6ef328bbba327cae8918e795c11b89217672 (patch)
tree916325d2ccc8535da3ffd03ff1899e9611dcb832 /src/bootstrap/bin
parenteed12bcd0cb281979c4c9ed956b9e41fda2bfaeb (diff)
Add an option to use LLD to link the compiler on Windows platforms
Diffstat (limited to 'src/bootstrap/bin')
-rw-r--r--src/bootstrap/bin/rustc.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs
index a34ec44566b..46e3e4ef6d1 100644
--- a/src/bootstrap/bin/rustc.rs
+++ b/src/bootstrap/bin/rustc.rs
@@ -134,6 +134,11 @@ fn main() {
             cmd.arg(format!("-Clinker={}", host_linker));
         }
 
+        // Override linker flavor if necessary.
+        if let Ok(host_linker_flavor) = env::var("RUSTC_HOST_LINKER_FLAVOR") {
+            cmd.arg(format!("-Clinker-flavor={}", host_linker_flavor));
+        }
+
         if let Ok(s) = env::var("RUSTC_HOST_CRT_STATIC") {
             if s == "true" {
                 cmd.arg("-C").arg("target-feature=+crt-static");