Repository navigation
[TargetParser] Recognize legacy GNU/Hurd triples - #214765
RealBhupesh wants to merge 1 commit into
Conversation
Treat the legacy *-unknown-gnu and *-pc-gnu forms emitted by config.guess as GNU/Hurd triples while preserving ordinary Linux triples. Add coverage for both vendor spellings and versioned GNU/Hurd output. Assisted-by: OpenAI Codex
|
Hello @RealBhupesh 👋 Thank you for submitting a Pull Request (PR) to the LLVM Project. Since this is your first PR, here are a few useful links covering our main contribution policies and review practices.
Please reply to this message to confirm that you have read these policies, especially the LLVM AI Tool Use Policy, and that any AI tool usage has been noted in the PR description. Frequently asked questionsHow do I add reviewers? This PR will be automatically labeled, and the relevant teams will be notified. For some parts of the project, reviewers may also be added automatically. You can also add reviewers manually using the Reviewers section on this page. If you cannot use that section, it is probably because you do not have write permissions for the repository. In that case, you can request a review by tagging reviewers in a comment using What if there are no comments? If you have not received any comments on your PR after a week, you can request a review by pinging the PR with a comment such as “Ping”. The common courtesy ping rate is once a week. Please remember that you are asking for volunteer time from other developers. Are any special GitHub settings required to contribute to LLVM? We only require contributors to have a public email address associated with their GitHub commits, see this section of LLVM Developer Policy for details. If you have questions, feel free to leave a comment on this PR, or ask on LLVM Discord or LLVM Discourse. Thank you, |
|
Thanks for the guidance. I have read the LLVM AI Tool Use Policy, the Code-Review Policy and Practices, and the Developer Policy. I confirm that I reviewed the implementation, regression tests, and validation as the human contributor before requesting review and that I take responsibility for this contribution. The PR description discloses the use of OpenAI Codex, and the commit includes the |
|
Hi, I think this would also obsolete the special case in clang clang/lib/Driver/Driver.cpp as it is now in |
Fixes #214440
Summary
The bundled LLVM config.guess emits GNU/Hurd hosts using the legacy
*-unknown-gnuand*-pc-gnuspellings. Triple normalization currently treats those as an unknown OS with a GNU environment, which makesllvm-config --host-targetreport a freestanding target.Recognize only those legacy vendor forms as GNU/Hurd, preserve version suffixes such as
gnu0.9, and leave ordinary triples such asx86_64-unknown-linux-gnuunchanged.Validation
TargetParserTests --gtest_filter=TripleTest.NormalizationTargetParserTests: 689 passed, 4 host-specific tests skipped on macOSllvm-configwithLLVM_HOST_TRIPLE=x86_64-unknown-gnu;--host-targetreportsx86_64-unknown-hurd-gnugit diff --checkThis change was written with OpenAI Codex assistance. I reviewed the implementation, regression tests, and validation as the human contributor before submitting it; the commit includes the project
Assisted-by: OpenAI Codextrailer.