mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-12 01:18:53 +00:00
[compiler-rt] Removes CMake work-arounds.
CMake older than 3.20.0 is no longer supported. This removes work-arounds for no longer supported versions. Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D152102
This commit is contained in:
parent
617e6012c6
commit
42478d1473
@ -123,17 +123,6 @@ function(add_compiler_rt_component name)
|
||||
add_dependencies(compiler-rt ${name})
|
||||
endfunction()
|
||||
|
||||
function(add_asm_sources output)
|
||||
set(${output} ${ARGN} PARENT_SCOPE)
|
||||
# CMake doesn't pass the correct architecture for Apple prior to CMake 3.19. https://gitlab.kitware.com/cmake/cmake/-/issues/20771
|
||||
# MinGW didn't work correctly with assembly prior to CMake 3.17. https://gitlab.kitware.com/cmake/cmake/-/merge_requests/4287 and https://reviews.llvm.org/rGb780df052dd2b246a760d00e00f7de9ebdab9d09
|
||||
# Workaround these two issues by compiling as C.
|
||||
# Same workaround used in libunwind. Also update there if changed here.
|
||||
if((APPLE AND CMAKE_VERSION VERSION_LESS 3.19) OR (MINGW AND CMAKE_VERSION VERSION_LESS 3.17))
|
||||
set_source_files_properties(${ARGN} PROPERTIES LANGUAGE C)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
macro(set_output_name output name arch)
|
||||
if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR)
|
||||
set(${output} ${name})
|
||||
|
@ -10,18 +10,12 @@ set(linkopts
|
||||
# Add `-Wl,-G`. Quoted from release notes of cmake-3.16.0
|
||||
# > On AIX, runtime linking is no longer enabled by default.
|
||||
# See https://cmake.org/cmake/help/latest/release/3.16.html
|
||||
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.16.0")
|
||||
set(linkopts -Wl,-G ${linkopts})
|
||||
endif()
|
||||
set(linkopts -Wl,-G ${linkopts})
|
||||
set(${link_flags} ${linkopts} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(get_aix_libatomic_type type)
|
||||
if(${CMAKE_VERSION} VERSION_LESS "3.16.0")
|
||||
set(${type} SHARED PARENT_SCOPE)
|
||||
else()
|
||||
set(${type} MODULE PARENT_SCOPE)
|
||||
endif()
|
||||
set(${type} MODULE PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
macro(archive_aix_libatomic name libname)
|
||||
|
@ -83,7 +83,7 @@ if (TARGET cxx-headers OR HAVE_LIBCXX)
|
||||
endif()
|
||||
|
||||
if (APPLE)
|
||||
add_asm_sources(ORC_ASM_SOURCES
|
||||
set(ORC_ASM_SOURCES
|
||||
macho_tlv.x86-64.S
|
||||
macho_tlv.arm64.S
|
||||
)
|
||||
@ -146,7 +146,7 @@ else() # not Apple
|
||||
elfnix_platform.cpp
|
||||
)
|
||||
|
||||
add_asm_sources(ORC_ASM_SOURCES
|
||||
set(ORC_ASM_SOURCES
|
||||
elfnix_tls.x86-64.S
|
||||
elfnix_tls.aarch64.S
|
||||
)
|
||||
|
@ -124,7 +124,7 @@ if(APPLE)
|
||||
message(FATAL_ERROR "Building the TSan runtime requires at least macOS SDK 10.12 (or aligned SDK on other platforms)")
|
||||
endif()
|
||||
|
||||
add_asm_sources(TSAN_ASM_SOURCES
|
||||
set(TSAN_ASM_SOURCES
|
||||
tsan_rtl_amd64.S
|
||||
tsan_rtl_aarch64.S
|
||||
)
|
||||
@ -171,7 +171,7 @@ if(APPLE)
|
||||
else()
|
||||
foreach(arch ${TSAN_SUPPORTED_ARCH})
|
||||
if(arch STREQUAL "x86_64")
|
||||
add_asm_sources(TSAN_ASM_SOURCES
|
||||
set(TSAN_ASM_SOURCES
|
||||
tsan_rtl_amd64.S
|
||||
)
|
||||
# Check for Go runtime.
|
||||
@ -185,7 +185,7 @@ else()
|
||||
COMMENT "Checking TSan Go runtime..."
|
||||
VERBATIM)
|
||||
elseif(arch STREQUAL "aarch64")
|
||||
add_asm_sources(TSAN_ASM_SOURCES
|
||||
set(TSAN_ASM_SOURCES
|
||||
tsan_rtl_aarch64.S
|
||||
)
|
||||
# Check for Go runtime.
|
||||
@ -199,7 +199,7 @@ else()
|
||||
COMMENT "Checking TSan Go runtime..."
|
||||
VERBATIM)
|
||||
elseif(arch MATCHES "powerpc64|powerpc64le")
|
||||
add_asm_sources(TSAN_ASM_SOURCES
|
||||
set(TSAN_ASM_SOURCES
|
||||
tsan_rtl_ppc64.S
|
||||
)
|
||||
# Check for Go runtime.
|
||||
@ -213,15 +213,15 @@ else()
|
||||
COMMENT "Checking TSan Go runtime..."
|
||||
VERBATIM)
|
||||
elseif(arch MATCHES "loongarch64")
|
||||
add_asm_sources(TSAN_ASM_SOURCES
|
||||
set(TSAN_ASM_SOURCES
|
||||
tsan_rtl_loongarch64.S
|
||||
)
|
||||
elseif(arch MATCHES "mips64|mips64le")
|
||||
add_asm_sources(TSAN_ASM_SOURCES
|
||||
set(TSAN_ASM_SOURCES
|
||||
tsan_rtl_mips64.S
|
||||
)
|
||||
elseif(arch MATCHES "s390x")
|
||||
add_asm_sources(TSAN_ASM_SOURCES
|
||||
set(TSAN_ASM_SOURCES
|
||||
tsan_rtl_s390x.S
|
||||
)
|
||||
# Check for Go runtime.
|
||||
|
Loading…
Reference in New Issue
Block a user