[llvm-branch-commits] [compiler-rt] 728030a - compiler-rt: test: Use the host instead of the target to select %expect_crash.
Tobias Hieta via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Jul 22 01:30:01 PDT 2025
Author: Peter Collingbourne
Date: 2025-07-22T10:29:54+02:00
New Revision: 728030a452804f2b79bdc2e61cc2505e304860b0
URL: https://github.com/llvm/llvm-project/commit/728030a452804f2b79bdc2e61cc2505e304860b0
DIFF: https://github.com/llvm/llvm-project/commit/728030a452804f2b79bdc2e61cc2505e304860b0.diff
LOG: compiler-rt: test: Use the host instead of the target to select %expect_crash.
When running tests in a cross-compiled build, %expect_crash is
run on the host, not the target, so we need to check the host
OS. config.host_os surprisingly refers to the target OS because it
is derived from CMAKE_SYSTEM_NAME which specifies the target. See:
https://cmake.org/cmake/help/latest/variable/CMAKE_SYSTEM_NAME.html
Another speculative fix for:
https://lab.llvm.org/buildbot/#/builders/193/builds/9070
(cherry picked from commit 968d38d1d7d9de2d5717457876bba2663b36f620)
Added:
Modified:
compiler-rt/test/lit.common.cfg.py
Removed:
################################################################################
diff --git a/compiler-rt/test/lit.common.cfg.py b/compiler-rt/test/lit.common.cfg.py
index 877718c703ba7..f5576ce0e013d 100644
--- a/compiler-rt/test/lit.common.cfg.py
+++ b/compiler-rt/test/lit.common.cfg.py
@@ -503,7 +503,7 @@ def get_ios_commands_dir():
# Define %arch to check for architecture-dependent output.
config.substitutions.append(("%arch", (config.host_arch)))
-if config.host_os == "Windows":
+if os.name == "nt":
# FIXME: This isn't quite right. Specifically, it will succeed if the program
# does not crash but exits with a non-zero exit code. We ought to merge
# KillTheDoctor and not --crash to make the latter more useful and remove the
More information about the llvm-branch-commits
mailing list