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

shims/super/cc: fix linker flag parsing #18309

Merged
merged 1 commit into from
Sep 11, 2024
Merged

Conversation

carlocab
Copy link
Member

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

Our parsing of linker flags can be easily confused by, e.g.,

-Wl,-undefined -Wl,dynamic_lookup,-dead_strip_dylibs

The current code that tries to detect these flags will erroneously
conclude that they were not passed.

This change fixes that.

Our parsing of linker flags can be easily confused by, e.g.,

    -Wl,-undefined -Wl,dynamic_lookup,-dead_strip_dylibs

The current code that tries to detect these flags will erroneously
conclude that they were not passed.

This change fixes that.
@Bo98
Copy link
Member

Bo98 commented Sep 11, 2024

-Wl,-undefined -Wl,dynamic_lookup,-dead_strip_dylibs

Weird sequence but technically valid

@carlocab
Copy link
Member Author

I guess there's also a simpler flag that tricks the existing parsing:

-Wl,-undefined,dynamic_lookup,-dead_strip_dylibs

@MikeMcQuaid MikeMcQuaid merged commit 491b9d4 into master Sep 11, 2024
27 checks passed
@MikeMcQuaid MikeMcQuaid deleted the linker-flag-parsing branch September 11, 2024 16:12
@MikeMcQuaid
Copy link
Member

Thanks @carlocab!

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 this pull request may close these issues.

4 participants