From 70acdb56ecbf72eb8440de3c0d55a9f35b6b0ec5 Mon Sep 17 00:00:00 2001 From: shinchiro Date: Tue, 17 Sep 2024 21:45:01 +0800 Subject: [PATCH] llvm-wrapper: cleanup --- cmake/toolchain_check.cmake | 3 +++ toolchain/llvm/llvm-wrapper.cmake | 7 ------- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/cmake/toolchain_check.cmake b/cmake/toolchain_check.cmake index 3230a5844..00b866d2f 100644 --- a/cmake/toolchain_check.cmake +++ b/cmake/toolchain_check.cmake @@ -24,6 +24,7 @@ elseif(COMPILER_TOOLCHAIN STREQUAL "clang") endif() if(TARGET_CPU STREQUAL "x86_64") + set(ld_m_flag "i386pep") set(crt_lib "--disable-lib32 --enable-lib64") set(LIBOMP_ASMFLAGS_M64 "-DLIBOMP_ASMFLAGS=-m64") set(M_TUNE "generic") @@ -33,10 +34,12 @@ if(TARGET_CPU STREQUAL "x86_64") unset(opt) endif() elseif(TARGET_CPU STREQUAL "i686") + set(ld_m_flag "i386pe") set(crt_lib "--enable-lib32 --disable-lib64") set(M_TUNE "generic") unset(opt) elseif(TARGET_CPU STREQUAL "aarch64") + set(ld_m_flag "arm64pe") set(crt_lib "--disable-lib32 --disable-lib64 --enable-libarm64") set(M_TUNE "generic") set(cfi "-mguard=cf") diff --git a/toolchain/llvm/llvm-wrapper.cmake b/toolchain/llvm/llvm-wrapper.cmake index 3ed7eec1b..c8964bf9e 100644 --- a/toolchain/llvm/llvm-wrapper.cmake +++ b/toolchain/llvm/llvm-wrapper.cmake @@ -48,13 +48,6 @@ foreach(compiler clang++ g++ c++ clang gcc as) @ONLY) endforeach() -if(TARGET_CPU STREQUAL "i686") - set(ld_m_flag "i386pe") -elseif(TARGET_CPU STREQUAL "x86_64") - set(ld_m_flag "i386pep") -elseif(TARGET_CPU STREQUAL "aarch64") - set(ld_m_flag "arm64pe") -endif() configure_file(${CMAKE_CURRENT_SOURCE_DIR}/llvm/llvm-ld.in ${CMAKE_INSTALL_PREFIX}/bin/${TARGET_ARCH}-ld FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE