[all-commits] [llvm/llvm-project] 922809: TargetParser: Move triple to CMake system name map...
Matt Arsenault via All-commits
all-commits at lists.llvm.org
Tue Sep 22 05:04:53 PDT 2026
Branch: refs/heads/users/arsenm/cmake-triple-system-name-pure-cmake
Home: https://github.com/llvm/llvm-project
Commit: 922809a8a3c18f3375050983d15015dc2efdc561
https://github.com/llvm/llvm-project/commit/922809a8a3c18f3375050983d15015dc2efdc561
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2026-09-22 (Tue, 22 Sep 2026)
Changed paths:
M cmake/Modules/GetTripleCMakeSystemName.cmake
M llvm/include/llvm/TargetParser/TripleName.def
M llvm/lib/TargetParser/Triple.cpp
M llvm/test/lit.cfg.py
M llvm/test/lit.site.cfg.py.in
A llvm/test/tools/TargetParser/get-triple-cmake-system-name.cmake
M llvm/test/tools/TargetParser/get-triple-system-name.test
R llvm/test/tools/TargetParser/get_triple_system_name_test.py
R llvm/utils/get_triple_system_name.py
Log Message:
-----------
TargetParser: Move triple to CMake system name mapping into CMake
Reimplement the triple -> CMAKE_SYSTEM_NAME derivation added in #208773
entirely in CMake, dropping the Python script it introduced.
The previous mechanism widened TRIPLE_OS/TRIPLE_ENV in TripleName.def with
a CMake system name column and parsed it from a Python helper invoked by
CMake at configure time. Two problems motivated this rework:
- The CMake system name is a property of CMake (and can vary by CMake
version), not of llvm::Triple, so it does not belong in the shared
triple name table. The C++ never consumed the added column.
- Invoking Python from CMake at configure time is an unwanted build
dependency, and the Python-driven lit test broke Windows bots where the
interpreter path contains a space.
Revert the TripleName.def/Triple.cpp column back to the two-argument
macros, delete the Python script and its unittest, and reimplement the
mapping as a self-contained pure-CMake module. The classification still
mirrors Triple::normalize's permissiveness for unnormalized and legacy
triples. A cmake -P driven unit test replaces the Python unittest and adds
a drift guard asserting every OS/environment name in TripleName.def has a
mapping entry.
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