Skip to content

Paths with @rpath prefix does not seem to handled properly #408

@ormandi

Description

@ormandi

Run into the exact same issue described here: bazelbuild/bazel#13148 with toolchains_llvm and noticed that the fix mentioned there is not ported.

If I'm not mistaken this pretty much means merging the following change:

$ git diff
diff --git a/toolchain/osx_cc_wrapper.sh.tpl b/toolchain/osx_cc_wrapper.sh.tpl
index 056ebbe..3112278 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")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions