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

linkers: fix LLD linker response file handling #12252

Merged

Conversation

benoit-pierre
Copy link
Contributor

When building with LLD as the linker, response files are never used.

It's because of an issue with the LLVMDynamicLinker class hierarchy:

python <<'EOF'
from mesonbuild.linkers.linkers import LLVMDynamicLinker
print(LLVMDynamicLinker(['lld'], '', '', []).get_accepts_rsp())
EOF
False

After correcting the base classes so GNU-like linkers all default to supporting response files:

python <<'EOF'
from mesonbuild.linkers.linkers import LLVMDynamicLinker
print(LLVMDynamicLinker(['lld'], '', '', []).get_accepts_rsp())
EOF
True

I added a test, but the CI would also need a build that actually use LLD as a linker.

@tristan957 tristan957 added this to the 1.3.0 milestone Sep 14, 2023
@xclaesse xclaesse modified the milestones: 1.3.0, 1.4.0 Oct 17, 2023
@bruchar1 bruchar1 removed this from the 1.4.0 milestone Aug 7, 2024
@thesamesam
Copy link
Collaborator

Could you rebase for a fresh CI run now #11715 is in?

Copy link
Member

@dcbaker dcbaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small nit, otherwise this looks good.

unittests/allplatformstests.py Outdated Show resolved Hide resolved
Correct base classes so GNU-like linkers all default to supporting response files.
@dcbaker dcbaker merged commit 8ef4e34 into mesonbuild:master Aug 9, 2024
33 checks passed
@benoit-pierre benoit-pierre deleted the pr/fix_response_files_handling branch August 10, 2024 00:36
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.

7 participants