-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Pass options to linker detection #6065
Merged
jpakkane
merged 4 commits into
mesonbuild:master
from
dcbaker:pass-options-to-linker-detection
Dec 17, 2019
Merged
Pass options to linker detection #6065
jpakkane
merged 4 commits into
mesonbuild:master
from
dcbaker:pass-options-to-linker-detection
Dec 17, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tests fail quite badly. CI should be fixed so getting these working should end up with a green checkmark. |
dcbaker
force-pushed
the
pass-options-to-linker-detection
branch
from
November 13, 2019 22:47
a831d00
to
71f520b
Compare
Notes for me or whoever: This is a whole mess of chicken and egg problems:
|
dcbaker
force-pushed
the
pass-options-to-linker-detection
branch
from
November 25, 2019 22:31
71f520b
to
fcee9c3
Compare
dcbaker
force-pushed
the
pass-options-to-linker-detection
branch
3 times, most recently
from
November 27, 2019 00:02
e6a6400
to
5536c4b
Compare
We know that if a compiler class inherits CCompiler it's language will be C, so doing this at the class level makes more sense.
Currently this is done at the instance level, but we need it at the class level to allow compiler "lang" args to be gotten early enough. This patch also removes a couple of instance of branch/leaf classes providing their own implementation that is identical to the Compiler version.
This is required to be able to pass compiler and linker arguments to the methods that try to guess what linker to use.
If a user passes -fuse-ld=gold to gcc or clang, they expect that they'll get ld.gold, not whatever the default is. Meson currently doesn't do that, because it doesn't pass these arguments to the linker detection logic. This patch fixes that. Another case that this is needed is with clang's --target option This is a bad solution, honestly, and it would be better to use $LD or a cross/native file but this is needed for backwards compatability. Fixes mesonbuild#6057
dcbaker
force-pushed
the
pass-options-to-linker-detection
branch
from
December 12, 2019 19:06
5536c4b
to
47dfe34
Compare
@jpakkane, I'm really hoping to get this merged for 0.53. |
Whoops, I forgot this since it was (I think) blocked by the dynamic linker change. Reviewing... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Here's a new version, built on top of #6207, because I need so much of the machinery to make this work anyway. It will have the same bugs as 6207 does for the moment but I have tested using both
-fuse-ld=gold
and--target
with clang and that works.