diff options
| author | Pietro Albini <pietro.albini@ferrous-systems.com> | 2023-06-06 12:37:54 +0200 |
|---|---|---|
| committer | Pietro Albini <pietro.albini@ferrous-systems.com> | 2023-06-12 09:33:33 +0200 |
| commit | 68d458bb402b873b9ae80423710c2672967479df (patch) | |
| tree | 13450f59f911d5c3b3bb3534460cf3f09ce15f41 /src/bootstrap/compile.rs | |
| parent | 1b5143ae13c50aeb3d8a84d838e4db54a57e8a5b (diff) | |
| download | rust-68d458bb402b873b9ae80423710c2672967479df.tar.gz rust-68d458bb402b873b9ae80423710c2672967479df.zip | |
allow mutating the c compilers detected by bootstrap
This will be needed to create synthetic targets in future commits.
Diffstat (limited to 'src/bootstrap/compile.rs')
| -rw-r--r-- | src/bootstrap/compile.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index c28fe9022ec..12ca6c79b34 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -314,7 +314,7 @@ fn copy_self_contained_objects( } } else if target.ends_with("windows-gnu") { for obj in ["crt2.o", "dllcrt2.o"].iter() { - let src = compiler_file(builder, builder.cc(target), target, CLang::C, obj); + let src = compiler_file(builder, &builder.cc(target), target, CLang::C, obj); let target = libdir_self_contained.join(obj); builder.copy(&src, &target); target_deps.push((target, DependencyType::TargetSelfContained)); @@ -995,8 +995,13 @@ fn rustc_llvm_env(builder: &Builder<'_>, cargo: &mut Cargo, target: TargetSelect && !target.contains("apple") && !target.contains("solaris") { - let file = - compiler_file(builder, builder.cxx(target).unwrap(), target, CLang::Cxx, "libstdc++.a"); + let file = compiler_file( + builder, + &builder.cxx(target).unwrap(), + target, + CLang::Cxx, + "libstdc++.a", + ); cargo.env("LLVM_STATIC_STDCPP", file); } if builder.llvm_link_shared() { |
