Skip to content

Commit 968d38d

Browse files
committed
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
1 parent 28e1473 commit 968d38d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler-rt/test/lit.common.cfg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ def get_ios_commands_dir():
503503
# Define %arch to check for architecture-dependent output.
504504
config.substitutions.append(("%arch", (config.host_arch)))
505505

506-
if config.host_os == "Windows":
506+
if os.name == "nt":
507507
# FIXME: This isn't quite right. Specifically, it will succeed if the program
508508
# does not crash but exits with a non-zero exit code. We ought to merge
509509
# KillTheDoctor and not --crash to make the latter more useful and remove the

0 commit comments

Comments
 (0)