[Bf-blender-cvs] [4145949874b] soc-2020-io-performance: Linker changes.
Ankit Meel
noreply at git.blender.org
Thu May 21 19:21:03 CEST 2020
Commit: 4145949874b3b8f3db714bd30d74b3014ebc650d
Author: Ankit Meel
Date: Thu May 7 15:51:17 2020 +0530
Branches: soc-2020-io-performance
https://developer.blender.org/rB4145949874b3b8f3db714bd30d74b3014ebc650d
Linker changes.
===================================================================
M CMakeLists.txt
M build_files/cmake/platform/platform_unix.cmake
===================================================================
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 078b6633cb3..57228ed45a8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -498,10 +498,10 @@ if(WIN32)
endif()
# Compiler toolchain
-if(CMAKE_COMPILER_IS_GNUCC)
- option(WITH_LINKER_GOLD "Use ld.gold linker which is usually faster than ld.bfd" ON)
+if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
+ option(WITH_LINKER_GOLD "Use ld.gold linker which is usually faster than ld.bfd" OFF)
mark_as_advanced(WITH_LINKER_GOLD)
- option(WITH_LINKER_LLD "Use ld.lld linker which is usually faster than ld.gold" OFF)
+ option(WITH_LINKER_LLD "Use ld.lld linker which is usually faster than ld.gold" ON)
mark_as_advanced(WITH_LINKER_LLD)
endif()
diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake
index 6e00a2dec7b..d4e6f2862a9 100644
--- a/build_files/cmake/platform/platform_unix.cmake
+++ b/build_files/cmake/platform/platform_unix.cmake
@@ -580,7 +580,7 @@ endif()
# Compilers
# GNU Compiler
-if(CMAKE_COMPILER_IS_GNUCC)
+if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
if(WITH_LINKER_GOLD)
@@ -596,7 +596,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
unset(LD_VERSION)
endif()
- if(WITH_LINKER_LLD)
+ elseif(WITH_LINKER_LLD)
execute_process(
COMMAND ${CMAKE_C_COMPILER} -fuse-ld=lld -Wl,--version
ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
@@ -611,7 +611,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
# 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")
+# set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
# Intel C++ Compiler
elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
# think these next two are broken
More information about the Bf-blender-cvs
mailing list