aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Stellard <tstellar@redhat.com>2023-08-29 15:49:55 -0700
committerSam James <sam@gentoo.org>2024-01-24 15:09:15 +0000
commitaaa93ce7323332d8290b8f563d4d71689c1094c5 (patch)
treeacad6253fe7730aa774651f4157441008c0d23d1
parent70fc9703788e8965813c5b677a85cb84b66671b6 (diff)
downloadllvm-aaa93ce7323332d8290b8f563d4d71689c1094c5.zip
llvm-aaa93ce7323332d8290b8f563d4d71689c1094c5.tar.gz
llvm-aaa93ce7323332d8290b8f563d4d71689c1094c5.tar.bz2
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
-rw-r--r--compiler-rt/lib/builtins/CMakeLists.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler-rt/lib/builtins/CMakeLists.txt b/compiler-rt/lib/builtins/CMakeLists.txt
index 28ded87..8b6dc7c 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)