File tree 1 file changed +13
-7
lines changed
src/bootstrap/src/core/build_steps
1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -1121,18 +1121,24 @@ impl Step for Sanitizers {
1121
1121
1122
1122
let out_dir = builder. native_dir ( self . target ) . join ( "sanitizers" ) ;
1123
1123
let runtimes = supported_sanitizers ( & out_dir, self . target , & builder. config . channel ) ;
1124
- if runtimes. is_empty ( ) {
1124
+
1125
+ if builder. config . dry_run ( ) || runtimes. is_empty ( ) {
1125
1126
return runtimes;
1126
1127
}
1127
1128
1128
1129
let LlvmResult { llvm_config, .. } = builder. ensure ( Llvm { target : builder. config . build } ) ;
1129
- if builder. config . dry_run ( ) {
1130
- return runtimes;
1131
- }
1132
1130
1133
- let stamp = BuildStamp :: new ( & out_dir)
1134
- . with_prefix ( "sanitizers" )
1135
- . with_stamp ( builder. in_tree_llvm_info . sha ( ) . map ( String :: from) . unwrap_or_default ( ) ) ;
1131
+ static STAMP_HASH_MEMO : OnceLock < String > = OnceLock :: new ( ) ;
1132
+ let smart_stamp_hash = STAMP_HASH_MEMO . get_or_init ( || {
1133
+ generate_smart_stamp_hash (
1134
+ builder,
1135
+ & builder. config . src . join ( "src/llvm-project/compiler-rt" ) ,
1136
+ builder. in_tree_llvm_info . sha ( ) . unwrap_or_default ( ) ,
1137
+ )
1138
+ } ) ;
1139
+
1140
+ let stamp =
1141
+ BuildStamp :: new ( & out_dir) . with_prefix ( "sanitizers" ) . with_stamp ( smart_stamp_hash) ;
1136
1142
1137
1143
if stamp. is_up_to_date ( ) {
1138
1144
if stamp. stamp . is_empty ( ) {
You can’t perform that action at this time.
0 commit comments