Skip to content

Commit 0072d4d

Browse files
committed
[Darwin][CompilerRT] Set compiler ID to 'Clang' for Compiler RT Tests
This patch restores previous behavior we relied on. Even when the Compiler ID is set to AppleClang, we expect Compiler RT Tests to use Clang as the compiler ID. This impacts various make and lit commands. Caused by: https://github.com/llvm/llvm-project/pull/117812/files rdar://141548700
1 parent 8cd94e0 commit 0072d4d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

compiler-rt/cmake/base-config-ix.cmake

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,12 @@ endif()
7979

8080
get_filename_component(_test_compiler_name "${COMPILER_RT_TEST_COMPILER}" NAME)
8181
if("${COMPILER_RT_TEST_COMPILER}" STREQUAL "${CMAKE_C_COMPILER}")
82-
set(COMPILER_RT_TEST_COMPILER_ID "${CMAKE_C_COMPILER_ID}")
82+
if ("${CMAKE_C_COMPILER}" STREQUAL "AppleClang")
83+
# Compiler-rt tests expect compiler ID 'Clang' for AppleClang.
84+
set(COMPILER_RT_TEST_COMPILER_ID Clang)
85+
else()
86+
set(COMPILER_RT_TEST_COMPILER_ID "${CMAKE_C_COMPILER_ID}")
87+
endif()
8388
elseif("${_test_compiler_name}" MATCHES "clang.*")
8489
set(COMPILER_RT_TEST_COMPILER_ID Clang)
8590
elseif("${_test_compiler_name}" MATCHES "cl.exe$")

0 commit comments

Comments
 (0)