Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ormandi opened this issue Oct 29, 2024 · 0 comments · Fixed by #409
Closed

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

ormandi opened this issue Oct 29, 2024 · 0 comments · Fixed by #409

Comments

@ormandi
Copy link
Contributor

ormandi commented Oct 29, 2024

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")
@ormandi ormandi changed the title Paths with @relpath prefix does not seem to handled properly Paths with @rpath prefix does not seem to handled properly Oct 29, 2024
@fmeum fmeum closed this as completed in #409 Nov 1, 2024
@fmeum fmeum closed this as completed in 17b9c6f Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant