summaryrefslogtreecommitdiff
path: root/indra/cmake/Linker.cmake
diff options
context:
space:
mode:
authorBrad Linden <46733234+brad-linden@users.noreply.github.com>2024-09-23 13:31:55 -0700
committerGitHub <noreply@github.com>2024-09-23 13:31:55 -0700
commitd8e52ec001c476a2320f2d5caceb813465d707e4 (patch)
tree2fe671253d83620fba0e0b1c6c488997b558a7ef /indra/cmake/Linker.cmake
parent3747dd9a085e4d75ec21c8048f1269bc3f29e582 (diff)
parent38916ebf367aa400d8151d78204e714d40e8c323 (diff)
Merge pull request #940 from secondlife/release/maint-b
Maintenance B merges into develop
Diffstat (limited to 'indra/cmake/Linker.cmake')
-rw-r--r--indra/cmake/Linker.cmake11
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/cmake/Linker.cmake b/indra/cmake/Linker.cmake
new file mode 100644
index 0000000000..8016842192
--- /dev/null
+++ b/indra/cmake/Linker.cmake
@@ -0,0 +1,11 @@
+include_guard(GLOBAL)
+
+if( LINK_WITH_MOLD )
+ find_program(MOLD_BIN mold)
+ 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()