[compiler-rt] aaa93ce - compiler-rt: Fix FLOAT16 feature detection
Sam James via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 24 07:09:30 PST 2024
Author: Tom Stellard
Date: 2024-01-24T15:09:15Z
New Revision: aaa93ce7323332d8290b8f563d4d71689c1094c5
URL: https://github.com/llvm/llvm-project/commit/aaa93ce7323332d8290b8f563d4d71689c1094c5
DIFF: https://github.com/llvm/llvm-project/commit/aaa93ce7323332d8290b8f563d4d71689c1094c5.diff
LOG: compiler-rt: Fix FLOAT16 feature detection
CMAKE_TRY_COMPILE_TARGET_TYPE defaults to EXECUTABLE, which causes
any feature detection code snippet without a main function to fail,
so we need to make sure it gets explicitly set to STATIC_LIBRARY.
Bug: https://github.com/ROCm/rocFFT/issues/439
Bug: https://github.com/ROCm/rocBLAS/issues/1350
Bug: https://bugs.gentoo.org/916069
Closes: https://github.com/llvm/llvm-project/pull/69842
Reviewed by: thesamesam, mgorny
Added:
Modified:
compiler-rt/lib/builtins/CMakeLists.txt
Removed:
################################################################################
diff --git a/compiler-rt/lib/builtins/CMakeLists.txt b/compiler-rt/lib/builtins/CMakeLists.txt
index 28ded8766f2533..8b6dc7ce0c378e 100644
--- a/compiler-rt/lib/builtins/CMakeLists.txt
+++ b/compiler-rt/lib/builtins/CMakeLists.txt
@@ -5,7 +5,6 @@
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
cmake_minimum_required(VERSION 3.20.0)
- set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
project(CompilerRTBuiltins C ASM)
set(COMPILER_RT_STANDALONE_BUILD TRUE)
set(COMPILER_RT_BUILTINS_STANDALONE_BUILD TRUE)
@@ -57,6 +56,8 @@ if (COMPILER_RT_STANDALONE_BUILD)
ON)
endif()
+set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
+
include(builtin-config-ix)
include(CMakeDependentOption)
include(CMakePushCheckState)
More information about the llvm-commits
mailing list