[all-commits] [llvm/llvm-project] 161dc1: cmake: Try to derive CMAKE_SYSTEM_NAME from unnorm...
Matt Arsenault via All-commits
all-commits at lists.llvm.org
Thu Jul 9 09:10:31 PDT 2026
Branch: refs/heads/users/arsenm/runtimes-triple-system-name-scan-components
Home: https://github.com/llvm/llvm-project
Commit: 161dc1dfd1e3e1edb8fbc199dbc0fa4f9b592113
https://github.com/llvm/llvm-project/commit/161dc1dfd1e3e1edb8fbc199dbc0fa4f9b592113
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2026-07-09 (Thu, 09 Jul 2026)
Changed paths:
M cmake/Modules/GetTripleCMakeSystemName.cmake
Log Message:
-----------
cmake: Try to derive CMAKE_SYSTEM_NAME from unnormalized triples
get_triple_cmake_system_name() assumed a fully-normalized triple of the form
arch-vendor-os[-env] and read the OS and environment from fixed positions.
Unnormalized triples often omit the vendor and/or environment
(e.g. "aarch64-linux-android21", "aarch64-linux-gnu", "wasm32-wasi"),
so those fixed positions are wrong, and the function returned
bogus results, e.g.. "aarch64-linux-android21" -> Generic.
This was expecting to get a normalized triple by running clang -print-target-triple,
but that may not always work.
Scan all triple components for the known OS and environment tokens instead of
reading fixed positions. Ideally we would have a full triple normalization
function in cmake that mirrors the normalization in Triple.
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