File tree Expand file tree Collapse file tree 5 files changed +21
-6
lines changed Expand file tree Collapse file tree 5 files changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -2022,6 +2022,7 @@ impl Step for Assemble {
2022
2022
2023
2023
let host_llvm_bin_dir = command ( & host_llvm_config)
2024
2024
. arg ( "--bindir" )
2025
+ . cached ( )
2025
2026
. run_capture_stdout ( builder)
2026
2027
. stdout ( )
2027
2028
. trim ( )
Original file line number Diff line number Diff line change @@ -2269,6 +2269,7 @@ fn maybe_install_llvm(
2269
2269
{
2270
2270
trace ! ( "LLVM already built, installing LLVM files" ) ;
2271
2271
let mut cmd = command ( host_llvm_config) ;
2272
+ cmd. cached ( ) ;
2272
2273
cmd. arg ( "--libfiles" ) ;
2273
2274
builder. verbose ( || println ! ( "running {cmd:?}" ) ) ;
2274
2275
let files = cmd. run_capture_stdout ( builder) . stdout ( ) ;
Original file line number Diff line number Diff line change @@ -486,8 +486,11 @@ impl Step for Llvm {
486
486
let LlvmResult { host_llvm_config, .. } =
487
487
builder. ensure ( Llvm { target : builder. config . host_target } ) ;
488
488
if !builder. config . dry_run ( ) {
489
- let llvm_bindir =
490
- command ( & host_llvm_config) . arg ( "--bindir" ) . run_capture_stdout ( builder) . stdout ( ) ;
489
+ let llvm_bindir = command ( & host_llvm_config)
490
+ . arg ( "--bindir" )
491
+ . cached ( )
492
+ . run_capture_stdout ( builder)
493
+ . stdout ( ) ;
491
494
let host_bin = Path :: new ( llvm_bindir. trim ( ) ) ;
492
495
cfg. define (
493
496
"LLVM_TABLEGEN" ,
@@ -593,7 +596,13 @@ impl Step for Llvm {
593
596
}
594
597
595
598
pub fn get_llvm_version ( builder : & Builder < ' _ > , llvm_config : & Path ) -> String {
596
- command ( llvm_config) . arg ( "--version" ) . run_capture_stdout ( builder) . stdout ( ) . trim ( ) . to_owned ( )
599
+ command ( llvm_config)
600
+ . arg ( "--version" )
601
+ . cached ( )
602
+ . run_capture_stdout ( builder)
603
+ . stdout ( )
604
+ . trim ( )
605
+ . to_owned ( )
597
606
}
598
607
599
608
pub fn get_llvm_version_major ( builder : & Builder < ' _ > , llvm_config : & Path ) -> u8 {
Original file line number Diff line number Diff line change @@ -2043,6 +2043,7 @@ HELP: You can add it into `bootstrap.toml` in `rust.codegen-backends = [{name:?}
2043
2043
if !builder. config . dry_run ( ) {
2044
2044
let llvm_version = get_llvm_version ( builder, & host_llvm_config) ;
2045
2045
let llvm_components = command ( & host_llvm_config)
2046
+ . cached ( )
2046
2047
. arg ( "--components" )
2047
2048
. run_capture_stdout ( builder)
2048
2049
. stdout ( ) ;
@@ -2062,8 +2063,11 @@ HELP: You can add it into `bootstrap.toml` in `rust.codegen-backends = [{name:?}
2062
2063
// separate compilations. We can add LLVM's library path to the
2063
2064
// rustc args as a workaround.
2064
2065
if !builder. config . dry_run ( ) && suite. ends_with ( "fulldeps" ) {
2065
- let llvm_libdir =
2066
- command ( & host_llvm_config) . arg ( "--libdir" ) . run_capture_stdout ( builder) . stdout ( ) ;
2066
+ let llvm_libdir = command ( & host_llvm_config)
2067
+ . cached ( )
2068
+ . arg ( "--libdir" )
2069
+ . run_capture_stdout ( builder)
2070
+ . stdout ( ) ;
2067
2071
let link_llvm = if target. is_msvc ( ) {
2068
2072
format ! ( "-Clink-arg=-LIBPATH:{llvm_libdir}" )
2069
2073
} else {
Original file line number Diff line number Diff line change @@ -1082,7 +1082,7 @@ impl Builder<'_> {
1082
1082
&& let Some ( llvm_config) = self . llvm_config ( target)
1083
1083
{
1084
1084
let llvm_libdir =
1085
- command ( llvm_config) . arg ( "--libdir" ) . run_capture_stdout ( self ) . stdout ( ) ;
1085
+ command ( llvm_config) . cached ( ) . arg ( "--libdir" ) . run_capture_stdout ( self ) . stdout ( ) ;
1086
1086
if target. is_msvc ( ) {
1087
1087
rustflags. arg ( & format ! ( "-Clink-arg=-LIBPATH:{llvm_libdir}" ) ) ;
1088
1088
} else {
You can’t perform that action at this time.
0 commit comments