Skip to content

Commit

Permalink
Fix linker wrapper -install_name vs argfile confusion
Browse files Browse the repository at this point in the history
Summary:
Another case of the linker wrapper seeing an prefixed argument and
treating it as an argfile instead of an rpath. Repeat the change
made in D56711257, but for -install_name.

Reviewed By: rmaz

Differential Revision: D57075105

fbshipit-source-id: 6aab33cba673989caccde7e3c338567f3ef6b1be
  • Loading branch information
NuriAmari authored and facebook-github-bot committed May 10, 2024
1 parent 1fd619a commit 1e6d843
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions prelude/apple/tools/linker_wrapper.py
Expand Up @@ -21,9 +21,13 @@ def _eprintln(msg: str) -> None:


def _is_argfile(index: int, args: List[str]) -> bool:
previous_argument = args[index - 1 : index]
previous_two_arguments = args[index - 2 : index]
if (
" ".join(args[index - 1 : index]) == "-rpath"
or " ".join(args[index - 2 : index]) == "-rpath -Xlinker"
previous_argument == ["-rpath"]
or previous_argument == ["-install_name"]
or previous_two_arguments == ["-rpath", "-Xlinker"]
or previous_two_arguments == ["-install_name", "-Xlinker"]
):
return False

Expand Down

0 comments on commit 1e6d843

Please sign in to comment.