@@ -256,6 +256,7 @@ def create_compile_cmds(
256
256
args = src_args ,
257
257
index = src .index ,
258
258
is_header = src .is_header ,
259
+ uses_experimental_content_based_path_hashing = False ,
259
260
index_store_factory = impl_params .index_store_factory ,
260
261
error_handler = impl_params .error_handler ,
261
262
)
@@ -315,10 +316,13 @@ def _compile_single_cxx(
315
316
filename_base = "{}.{}" .format (filename_base , flavor .value )
316
317
identifier = "{} ({})" .format (identifier , flavor .value )
317
318
319
+ content_based = src_compile_cmd .uses_experimental_content_based_path_hashing
320
+
318
321
folder_name = "__objects__"
319
322
object = ctx .actions .declare_output (
320
323
folder_name ,
321
324
"{}.{}" .format (filename_base , toolchain .linker_info .object_file_extension ),
325
+ uses_experimental_content_based_path_hashing = content_based ,
322
326
)
323
327
324
328
compiler_type = src_compile_cmd .cxx_compile_cmd .compiler_type
@@ -357,13 +361,15 @@ def _compile_single_cxx(
357
361
cmd .add (["-fsave-optimization-record" , "-fdiagnostics-show-hotness" , "-foptimization-record-passes=" + toolchain .clang_remarks ])
358
362
clang_remarks = ctx .actions .declare_output (
359
363
paths .join ("__objects__" , "{}.opt.yaml" .format (filename_base )),
364
+ uses_experimental_content_based_path_hashing = content_based ,
360
365
)
361
366
cmd .add (cmd_args (hidden = clang_remarks .as_output ()))
362
367
363
368
clang_llvm_statistics = None
364
369
if toolchain .clang_llvm_statistics and compiler_type == "clang" :
365
370
clang_llvm_statistics = ctx .actions .declare_output (
366
371
paths .join ("__objects__" , "{}.stats" .format (filename_base )),
372
+ uses_experimental_content_based_path_hashing = content_based ,
367
373
)
368
374
369
375
# Use stderr_to_file to capture clang statistics output
@@ -379,6 +385,7 @@ def _compile_single_cxx(
379
385
cmd .add (["-ftime-trace" ])
380
386
clang_trace = ctx .actions .declare_output (
381
387
paths .join ("__objects__" , "{}.json" .format (filename_base )),
388
+ uses_experimental_content_based_path_hashing = content_based ,
382
389
)
383
390
cmd .add (cmd_args (hidden = clang_trace .as_output ()))
384
391
@@ -387,6 +394,7 @@ def _compile_single_cxx(
387
394
cmd .add (["--coverage" ])
388
395
gcno_file = ctx .actions .declare_output (
389
396
paths .join ("__objects__" , "{}.gcno" .format (filename_base )),
397
+ uses_experimental_content_based_path_hashing = content_based ,
390
398
)
391
399
cmd .add (cmd_args (hidden = gcno_file .as_output ()))
392
400
@@ -397,6 +405,7 @@ def _compile_single_cxx(
397
405
external_debug_info = ctx .actions .declare_output (
398
406
folder_name ,
399
407
"{}.{}" .format (filename_base , "dwo" ),
408
+ uses_experimental_content_based_path_hashing = content_based ,
400
409
)
401
410
cmd .add (cmd_args (external_debug_info .as_output (), format = "--fbcc-create-external-debug-info={}" ))
402
411
0 commit comments