]> git.lizzy.rs Git - rust.git/blobdiff - src/bootstrap/compile.rs
Change implementation of `-Z gcc-ld` and `lld-wrapper` again
[rust.git] / src / bootstrap / compile.rs
index aa7cda46bda69460406d134031c535bef05acc15..0d89e0a4f25c9036df7f3ed44eb30b8deb1118fe 100644 (file)
@@ -111,6 +111,11 @@ fn run(self, builder: &Builder<'_>) {
 
         builder.update_submodule(&Path::new("library").join("stdarch"));
 
+        // Profiler information requires LLVM's compiler-rt
+        if builder.config.profiler {
+            builder.update_submodule(&Path::new("src/llvm-project"));
+        }
+
         let mut target_deps = builder.ensure(StartupObjects { compiler, target });
 
         let compiler_to_use = builder.compiler_for(compiler.stage, compiler.host, target);
@@ -1271,7 +1276,9 @@ fn run(self, builder: &Builder<'_>) -> Compiler {
                 compiler: build_compiler,
                 target: target_compiler.host,
             });
-            builder.copy(&lld_wrapper_exe, &gcc_ld_dir.join(exe("ld", target_compiler.host)));
+            for name in crate::LLD_FILE_NAMES {
+                builder.copy(&lld_wrapper_exe, &gcc_ld_dir.join(exe(name, target_compiler.host)));
+            }
         }
 
         if builder.config.rust_codegen_backends.contains(&INTERNER.intern_str("llvm")) {