diff options
| author | jyn <github@jyn.dev> | 2023-04-12 21:17:08 -0500 |
|---|---|---|
| committer | jyn <github@jyn.dev> | 2023-04-12 21:17:08 -0500 |
| commit | 7d64c7cd024ac22e71df104577037d2e2fb42c49 (patch) | |
| tree | 9a5707976e5b302b87f17382850d49624b66f42e /src/bootstrap/compile.rs | |
| parent | 4087deaccd8bceb458c9610d29744d5f3504c5c0 (diff) | |
Add `libLLVM.so` to the target libdir when download-rustc is enabled
Previously, we would only add it to the host libdir, which meant it couldn't be loaded by `ui-fulldeps` tests that used rustc_private.
Diffstat (limited to 'src/bootstrap/compile.rs')
| -rw-r--r-- | src/bootstrap/compile.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index 85d1c12cc6a..aaed5cf2e32 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -1273,9 +1273,7 @@ impl Step for Sysroot { } // Copy the compiler into the correct sysroot. - let ci_rustc_dir = - builder.config.out.join(&*builder.config.build.triple).join("ci-rustc"); - builder.cp_r(&ci_rustc_dir, &sysroot); + builder.cp_r(&builder.ci_rustc_dir(builder.build.build), &sysroot); return INTERNER.intern_path(sysroot); } @@ -1377,7 +1375,10 @@ impl Step for Assemble { // If we're downloading a compiler from CI, we can use the same compiler for all stages other than 0. if builder.download_rustc() { - builder.ensure(Sysroot { compiler: target_compiler }); + let sysroot = builder.ensure(Sysroot { compiler: target_compiler }); + // Ensure that `libLLVM.so` ends up in the newly created target directory, + // so that tools using `rustc_private` can use it. + dist::maybe_install_llvm_target(builder, target_compiler.host, &sysroot); return target_compiler; } |
