[all-commits] [llvm/llvm-project] 57b145: cmake: Derive CMake system name from a triple via ...
Matt Arsenault via All-commits
all-commits at lists.llvm.org
Fri Jul 31 11:22:02 PDT 2026
Branch: refs/heads/users/arsenm/triple-cmake-system-name
Home: https://github.com/llvm/llvm-project
Commit: 57b145d30ff719c9df36d6da03093f57b93c6d63
https://github.com/llvm/llvm-project/commit/57b145d30ff719c9df36d6da03093f57b93c6d63
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2026-07-31 (Fri, 31 Jul 2026)
Changed paths:
A cmake/Modules/GetTripleCMakeSystemName.cmake
M llvm/include/llvm/TargetParser/TripleName.def
M llvm/lib/TargetParser/Triple.cpp
A llvm/test/tools/TargetParser/get-triple-system-name.test
A llvm/test/tools/TargetParser/get_triple_system_name_test.py
A llvm/utils/get_triple_system_name.py
Log Message:
-----------
cmake: Derive CMake system name from a triple via new mechanism
This is a reimplementation of the cmake functionality first implemented in
6e4e181c83, which has now been reverted twice. Implement the raw cmake functionality
without introducing the uses yet.
The runtimes build needs to translate the build target (configured with a target
triple) to cmake's naming scheme, to use for CMAKE_SYSTEM_NAME. Use the OS/environment
list from TargetParser as the source of truth; add an additional entry for the
cmake name to ensure the build system and compiler always recognize the same set
of names.
Upgrade the previous cmake regexes to a new python script which parses the
authoritative def file. The new script logic should match Triple::normalize's
permissiveness for various legacy and malformed triple shapes. This should be
more maintainable than the previous cmake regexes, since there's now a unit test
mirroring the triple unit test.
Co-Authored-By: Claude (Opus 4.8) <noreply at anthropic.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list