File tree 3 files changed +10
-1
lines changed
3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -113,11 +113,12 @@ def cc_toolchain_config(
113
113
unfiltered_compile_flags = [
114
114
# Do not resolve our symlinked resource prefixes to real paths.
115
115
"-no-canonical-prefixes" ,
116
- # Reproducibility
116
+ # Reproducibility.
117
117
"-Wno-builtin-macro-redefined" ,
118
118
"-D__DATE__=\" redacted\" " ,
119
119
"-D__TIMESTAMP__=\" redacted\" " ,
120
120
"-D__TIME__=\" redacted\" " ,
121
+ "-ffile-prefix-map=${{pwd}}=__bazel_toolchain_llvm_repo__" ,
121
122
]
122
123
123
124
is_xcompile = not (exec_os == target_os and exec_arch == target_arch )
@@ -150,6 +151,8 @@ def cc_toolchain_config(
150
151
link_flags = [
151
152
"--target=" + target_system_name ,
152
153
"-no-canonical-prefixes" ,
154
+ # Reproducibility.
155
+ "-ffile-prefix-map=${{pwd}}=__bazel_toolchain_llvm_repo__" ,
153
156
]
154
157
155
158
stdlib = compiler_configuration ["stdlib" ]
Original file line number Diff line number Diff line change @@ -53,6 +53,9 @@ function sanitize_option() {
53
53
# shellcheck disable=SC2206
54
54
parts=(${opt/ =/ } ) # Split flag name and value into array.
55
55
printf " %s" " ${parts[0]} =${execroot_path}${parts[1]} "
56
+ elif [[ ${opt} == * " \$ {{pwd}}" * ]]; then
57
+ # Replace the literal string '${{pwd}}' with the execroot.
58
+ printf " %s" " ${opt// \$\{\{ pwd\}\} / ${execroot_abs_path%/ } } "
56
59
else
57
60
printf " %s" " ${opt} "
58
61
fi
Original file line number Diff line number Diff line change @@ -79,6 +79,9 @@ function sanitize_option() {
79
79
# shellcheck disable=SC2206
80
80
parts=(${opt/ =/ } ) # Split flag name and value into array.
81
81
printf " %s" " ${parts[0]} =${execroot_path}${parts[1]} "
82
+ elif [[ ${opt} == * " \$ {{pwd}}" * ]]; then
83
+ # Replace the literal string '${{pwd}}' with the execroot.
84
+ printf " %s" " ${opt// \$\{\{ pwd\}\} / ${execroot_abs_path%/ } } "
82
85
else
83
86
printf " %s" " ${opt} "
84
87
fi
You can’t perform that action at this time.
0 commit comments