From 148f80f0779f42c1aa7d2f07c04a63507446662c Mon Sep 17 00:00:00 2001 From: Bennett Goble Date: Wed, 10 Apr 2024 19:54:10 -0700 Subject: Linux: build with clang, link with mold --- indra/cmake/Linker.cmake | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 indra/cmake/Linker.cmake (limited to 'indra/cmake/Linker.cmake') diff --git a/indra/cmake/Linker.cmake b/indra/cmake/Linker.cmake new file mode 100644 index 0000000000..292aa25c57 --- /dev/null +++ b/indra/cmake/Linker.cmake @@ -0,0 +1,11 @@ +include_guard(GLOBAL) + +if (${LINK_WITH_MOLD}) + find_program(MOLD_BIN mold REQUIRED) + if(MOLD_BIN) + message(STATUS "Mold linker found: ${MOLD_BIN}. Enabling mold as active linker.") + add_link_options("-fuse-ld=${MOLD_BIN}") + else() + message(STATUS "Mold linker not found. Using default linker.") + endif() +endif() -- cgit v1.2.3