[llvm] ccea75d - [llvm][AIX][unit] skip AIXTargetVersionDetect when target env in effect (#178017)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 27 07:59:57 PST 2026
Author: David Tenty
Date: 2026-01-27T10:59:53-05:00
New Revision: ccea75dc12e9c8022e1fa07ebb4bfb686170f35a
URL: https://github.com/llvm/llvm-project/commit/ccea75dc12e9c8022e1fa07ebb4bfb686170f35a
DIFF: https://github.com/llvm/llvm-project/commit/ccea75dc12e9c8022e1fa07ebb4bfb686170f35a.diff
LOG: [llvm][AIX][unit] skip AIXTargetVersionDetect when target env in effect (#178017)
The unit tests expects OS levels in the default triple to match the
host, but if we are overriding the compiled in default with an
environment setting that may not be the case.
Added:
Modified:
llvm/unittests/TargetParser/Host.cpp
Removed:
################################################################################
diff --git a/llvm/unittests/TargetParser/Host.cpp b/llvm/unittests/TargetParser/Host.cpp
index bc1af8ae5ff54..08d7b95ca8465 100644
--- a/llvm/unittests/TargetParser/Host.cpp
+++ b/llvm/unittests/TargetParser/Host.cpp
@@ -605,6 +605,11 @@ TEST(HostTest, AIXTargetVersionDetect) {
if (ConfiguredTargetTriple.getOSMajorVersion())
GTEST_SKIP(); // The version was configured explicitly; skip.
+#ifdef LLVM_TARGET_TRIPLE_ENV
+ if (const char *EnvTriple = std::getenv(LLVM_TARGET_TRIPLE_ENV))
+ GTEST_SKIP(); // The target was configured by env; skip.
+#endif
+
VersionTuple SystemVersion;
getAIXSystemVersion(SystemVersion);
VersionTuple TargetVersion = TargetTriple.getOSVersion();
More information about the llvm-commits
mailing list