Skip to content

Commit aaa93ce

Browse files
tstellarthesamesam
authored andcommitted
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: ROCm/rocFFT#439 Bug: ROCm/rocBLAS#1350 Bug: https://bugs.gentoo.org/916069 Closes: #69842 Reviewed by: thesamesam, mgorny
1 parent 70fc970 commit aaa93ce

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler-rt/lib/builtins/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
66
cmake_minimum_required(VERSION 3.20.0)
77

8-
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
98
project(CompilerRTBuiltins C ASM)
109
set(COMPILER_RT_STANDALONE_BUILD TRUE)
1110
set(COMPILER_RT_BUILTINS_STANDALONE_BUILD TRUE)
@@ -57,6 +56,8 @@ if (COMPILER_RT_STANDALONE_BUILD)
5756
ON)
5857
endif()
5958

59+
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
60+
6061
include(builtin-config-ix)
6162
include(CMakeDependentOption)
6263
include(CMakePushCheckState)

0 commit comments

Comments
 (0)