aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/cmake/BerkeleyDB.cmake
diff options
context:
space:
mode:
authorAleric Inglewood2010-11-12 21:39:40 +0100
committerAleric Inglewood2010-11-12 22:38:18 +0100
commit86c2b6fd2a17f575998bd6efdcab5aa4bafc86b9 (patch)
treec48ad7fb84e460cda8398036e672212e96ab2171 /linden/indra/cmake/BerkeleyDB.cmake
parentMerge branch 'weekly' into SNOW-713 (diff)
downloadmeta-impy-86c2b6fd2a17f575998bd6efdcab5aa4bafc86b9.zip
meta-impy-86c2b6fd2a17f575998bd6efdcab5aa4bafc86b9.tar.gz
meta-impy-86c2b6fd2a17f575998bd6efdcab5aa4bafc86b9.tar.bz2
meta-impy-86c2b6fd2a17f575998bd6efdcab5aa4bafc86b9.tar.xz
Add support for using ld.gold on linux.
To use ld.gold configure with: -DCMAKE_EXE_LINKER_FLAGS:STRING="-Wl,-use-gold". ld.gold links the viewer on my machine in 8 seconds, as opposed to 19 seconds with ld.bfd. Moreover, it uses a LOT less memory during linking (about 750 MB instead of 2.5 GB!). Thanks to Siana Gearz for pointing out that ld.gold is so much faster.
Diffstat (limited to 'linden/indra/cmake/BerkeleyDB.cmake')
-rw-r--r--linden/indra/cmake/BerkeleyDB.cmake7
1 files changed, 6 insertions, 1 deletions
diff --git a/linden/indra/cmake/BerkeleyDB.cmake b/linden/indra/cmake/BerkeleyDB.cmake
index d98e791..de62763 100644
--- a/linden/indra/cmake/BerkeleyDB.cmake
+++ b/linden/indra/cmake/BerkeleyDB.cmake
@@ -6,6 +6,11 @@ set(DB_FIND_REQUIRED ON)
6if (STANDALONE) 6if (STANDALONE)
7 include(FindBerkeleyDB) 7 include(FindBerkeleyDB)
8else (STANDALONE) 8else (STANDALONE)
9 set(DB_LIBRARIES db-4.2) 9 if (LINUX)
10 # Need to add dependency pthread explicitely to support ld.gold.
11 set(DB_LIBRARIES db-4.2 pthread)
12 else (LINUX)
13 set(DB_LIBRARIES db-4.2)
14 endif (LINUX)
10 set(DB_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) 15 set(DB_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
11endif (STANDALONE) 16endif (STANDALONE)