Skip to content

Commit

Permalink
compiler-rt: Fix FLOAT16 feature detection
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tstellar authored and thesamesam committed Jan 24, 2024
1 parent 70fc970 commit aaa93ce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compiler-rt/lib/builtins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit aaa93ce

Please sign in to comment.