Skip to content

Commit 17b9c6f

Browse files
authored
Make sure that only expands existing response files (#409)
Otherwise the parameter is more than likely a prefix of an `@rpath` so it is probably better off leaving as it is. This simply ports the following fix: bazelbuild/bazel#13148 Resolves #408
1 parent 1574832 commit 17b9c6f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

toolchain/osx_cc_wrapper.sh.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ function sanitize_option() {
8686

8787
cmd=()
8888
for ((i = 0; i <= $#; i++)); do
89-
if [[ ${!i} == @* ]]; then
89+
if [[ ${!i} == @* && -r "${i:1}" ]]; then
9090
while IFS= read -r opt; do
9191
if [[ ${opt} == "-fuse-ld=ld64.lld" ]]; then
9292
cmd+=("-fuse-ld=lld")

0 commit comments

Comments
 (0)