diff --git a/toolchain/osx_cc_wrapper.sh.tpl b/toolchain/osx_cc_wrapper.sh.tpl index 056ebbe6..31122784 100755 --- a/toolchain/osx_cc_wrapper.sh.tpl +++ b/toolchain/osx_cc_wrapper.sh.tpl @@ -86,7 +86,7 @@ function sanitize_option() { cmd=() for ((i = 0; i <= $#; i++)); do - if [[ ${!i} == @* ]]; then + if [[ ${!i} == @* && -r "${i:1}" ]]; then while IFS= read -r opt; do if [[ ${opt} == "-fuse-ld=ld64.lld" ]]; then cmd+=("-fuse-ld=lld")