[compiler-rt] [Darwin][CompilerRT] Set compiler ID to 'Clang' for Compiler RT Tests for Apple Clang (PR #121858)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 6 15:59:21 PST 2025
https://github.com/thetruestblue created https://github.com/llvm/llvm-project/pull/121858
This patch restores previous behavior. 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
>From 0072d4d0aa5d96cf107720e2eab3881e3b33aaeb Mon Sep 17 00:00:00 2001
From: thetruestblue <bgaston2 at apple.com>
Date: Mon, 6 Jan 2025 15:49:02 -0800
Subject: [PATCH] [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
---
compiler-rt/cmake/base-config-ix.cmake | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/compiler-rt/cmake/base-config-ix.cmake b/compiler-rt/cmake/base-config-ix.cmake
index 9717c21d8977bd..f5a5195f7790da 100644
--- a/compiler-rt/cmake/base-config-ix.cmake
+++ b/compiler-rt/cmake/base-config-ix.cmake
@@ -79,7 +79,12 @@ endif()
get_filename_component(_test_compiler_name "${COMPILER_RT_TEST_COMPILER}" NAME)
if("${COMPILER_RT_TEST_COMPILER}" STREQUAL "${CMAKE_C_COMPILER}")
- set(COMPILER_RT_TEST_COMPILER_ID "${CMAKE_C_COMPILER_ID}")
+ if ("${CMAKE_C_COMPILER}" STREQUAL "AppleClang")
+ # Compiler-rt tests expect compiler ID 'Clang' for AppleClang.
+ set(COMPILER_RT_TEST_COMPILER_ID Clang)
+ else()
+ set(COMPILER_RT_TEST_COMPILER_ID "${CMAKE_C_COMPILER_ID}")
+ endif()
elseif("${_test_compiler_name}" MATCHES "clang.*")
set(COMPILER_RT_TEST_COMPILER_ID Clang)
elseif("${_test_compiler_name}" MATCHES "cl.exe$")
More information about the llvm-commits
mailing list