diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-05-04 18:34:32 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-05-04 18:34:32 +0300 |
commit | dc7d07753f537a89068dd770a7b264f8cbbb6d47 (patch) | |
tree | 5580a1dde4a2a878543442b9039840fe2b0d8c1e /CMakeLists.txt | |
parent | 920aa5e7d2da91805acb8e2c2963fd908f873eeb (diff) | |
parent | 1227e5c3d1ee20e9af57984a261b1d51d48c0263 (diff) |
Merge branch 'master' into gooseberry
Conflicts:
source/blender/editors/space_sequencer/sequencer_draw.c
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ff7c10f785c..3416a3f5756 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1185,6 +1185,19 @@ if(UNIX AND NOT APPLE) # though some c11 features can still be used. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu89") endif() + + # use ld.gold linker if available, could make optional + execute_process( + COMMAND ${CMAKE_C_COMPILER} -fuse-ld=gold -Wl,--version + ERROR_QUIET OUTPUT_VARIABLE LD_VERSION) + if ("${LD_VERSION}" MATCHES "GNU gold") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fuse-ld=gold") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-ld=gold") + else () + message(INFO "GNU gold linker isn't available, using the default system linker.") + endif () + unset(LD_VERSION) + # CLang is the same as GCC for now. elseif(CMAKE_C_COMPILER_ID MATCHES "Clang") set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing") |