summaryrefslogtreecommitdiff
path: root/Toolchain/CMake/ClangToolchain.txt.in
diff options
context:
space:
mode:
authorAndrew Kaster <akaster@serenityos.org>2022-02-19 12:51:19 -0700
committerAndreas Kling <kling@serenityos.org>2022-02-19 21:27:46 +0100
commit7b0f3b68119b09d7f8417aa29116aec3cc639c64 (patch)
tree797a27def2696f921690b810bbe2d42d313323b6 /Toolchain/CMake/ClangToolchain.txt.in
parent7dcfb82e16ef40bf636094a5fb7b37b8f395fa4d (diff)
downloadserenity-7b0f3b68119b09d7f8417aa29116aec3cc639c64.zip
Toolchain: Set CMAKE_NM for Clang and GNU toolchain files
Make sure that we set CMAKE_NM, it's possible that some version of CMake could choose a host nm binary instead of the ones we just built. It's unlikely that host nm will understand our .dyn.relr segments unless it's from binutils 2.38 or higher, so it might complain.
Diffstat (limited to 'Toolchain/CMake/ClangToolchain.txt.in')
-rw-r--r--Toolchain/CMake/ClangToolchain.txt.in5
1 files changed, 3 insertions, 2 deletions
diff --git a/Toolchain/CMake/ClangToolchain.txt.in b/Toolchain/CMake/ClangToolchain.txt.in
index 51eb4af1d4..308700697c 100644
--- a/Toolchain/CMake/ClangToolchain.txt.in
+++ b/Toolchain/CMake/ClangToolchain.txt.in
@@ -21,11 +21,12 @@ set(CMAKE_CXX_COMPILER_TARGET ${triple})
set(CMAKE_ASM_COMPILER ${TOOLCHAIN_PATH}/clang)
set(CMAKE_ASM_COMPILER_TARGET ${triple})
set(CMAKE_LINKER ${TOOLCHAIN_PATH}/ld.lld)
+set(CMAKE_AR ${TOOLCHAIN_PATH}/llvm-ar)
+set(CMAKE_NM ${TOOLCHAIN_PATH}/llvm-nm)
+set(CMAKE_OBJCOPY ${TOOLCHAIN_PATH}/llvm-objcopy)
set(CMAKE_RANLIB ${TOOLCHAIN_PATH}/llvm-ranlib)
set(CMAKE_STRIP ${TOOLCHAIN_PATH}/llvm-strip)
-set(CMAKE_AR ${TOOLCHAIN_PATH}/llvm-ar)
set(SERENITY_CXXFILT ${TOOLCHAIN_PATH}/llvm-cxxfilt)
-set(CMAKE_OBJCOPY ${TOOLCHAIN_PATH}/llvm-objcopy)
set(CMAKE_EXE_LINKER_FLAGS_INIT "-Wl,--hash-style=gnu,-z,relro,-z,now,-z,noexecstack,-z,max-page-size=0x1000,-z,separate-code")