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

Try #2: De-dup rpath arguments on apple clang #13963

Merged
merged 2 commits into from
Dec 27, 2024

Conversation

nirbheek
Copy link
Member

Continuation of #13819.

CC: @eli-schwartz

This was already done for dedup2_prefixes, also do it for
dedup1_prefixes, and move export-dynamic to dedup1_args, where it
belongs.

Also modify some comments around this to clearly distinguish
standalone argument matching and argument-prefix matching.
When followed by a comma, we can be absolutely sure that these are
argument prefixes, and will not consume the next argument to form
a single argument. Fixes spammy warnings on apple clang:

`ld: warning: duplicate -rpath 'build/dist/darwin_universal/arm64/lib/pkgconfig/../../lib' ignored`

Continuation from mesonbuild#13819
@nirbheek nirbheek added this to the 1.7 milestone Nov 26, 2024
@nirbheek
Copy link
Member Author

Basically, this is a more restricted version of the previous PR, and will only de-dup when:

  1. There's a comma at the end
  2. There's something after the comma

In these cases it is not supposed to (and will not) slurp the next argument. I looked into adding more advanced de-dup that looks at the next argument, but it made argument construction very slow.

@eli-schwartz eli-schwartz merged commit a004672 into mesonbuild:master Dec 27, 2024
32 of 33 checks passed
@eli-schwartz
Copy link
Member

I looked into adding more advanced de-dup that looks at the next argument, but it made argument construction very slow.

Yeah that makes sense I guess. Disappointing but hopefully most people are using the version with , especially given that was the Apple reproducer. It's definitely better than nothing.

@nirbheek nirbheek deleted the dedup-fixes branch December 28, 2024 18:38
@nirbheek
Copy link
Member Author

We can probably make it happen if we rewrite CompilerArgs in C.

@eli-schwartz
Copy link
Member

I'm not necessarily opposed but it would have to be 100% optional to avoid breaking the use case of running meson directly from the git repository... that might make it less of an interesting change to make. :)

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.

3 participants