aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Stellard <tstellar@redhat.com>2023-08-29 15:49:55 -0700
committerMichał Górny <mgorny@gentoo.org>2023-10-23 14:55:08 +0200
commitd272f189d79583541b63bba0b985e83a156b2fca (patch)
tree1dbf77c69a38b7c983733d289f3ad1af20be9c92
parent[asan] Ensure __asan_register_elf_globals is called in COMDAT asan.module_cto... (diff)
downloadllvm-project-gentoo-17.0.3.tar.gz
llvm-project-gentoo-17.0.3.tar.bz2
llvm-project-gentoo-17.0.3.zip
compiler-rt: Fix FLOAT16 feature detectiongentoo-17.0.3
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. Taken from https://github.com/llvm/llvm-project/pull/69842. Gentoo-Component: compiler-rt
-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 d62fa0432e2a..5211fd7cc98c 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)
@@ -50,6 +49,8 @@ if (COMPILER_RT_STANDALONE_BUILD)
ON)
endif()
+set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
+
include(builtin-config-ix)
include(CMakeDependentOption)
include(CMakePushCheckState)