[Bf-blender-cvs] [7294f0ce3d8] soc-2020-io-performance: Revert the changes for ccache and lld.

Ankit Meel noreply at git.blender.org
Mon May 25 13:38:19 CEST 2020


Commit: 7294f0ce3d8408e396711af0f3e8f6ae12e5ca92
Author: Ankit Meel
Date:   Mon May 25 17:07:29 2020 +0530
Branches: soc-2020-io-performance
https://developer.blender.org/rB7294f0ce3d8408e396711af0f3e8f6ae12e5ca92

Revert the changes for ccache and lld.

These were meant to be local changes & not pushed to the GSoC branch.
After discussion with the mentors, I'm adding this reverting commit.
Moreover, LLD for mach-o is not production ready & under development.
See [1] [2].

Now building the branch will not need any modifications.

[1]: https://reviews.llvm.org/D75382
[2]: http://clang-developers.42468.n3.nabble.com/Building-clang-on-OSX-td4064374.html#a4064378

===================================================================

M	CMakeLists.txt
M	build_files/cmake/platform/platform_unix.cmake

===================================================================

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 72e21393171..5a3f2d8d7bb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -118,31 +118,6 @@ blender_project_hack_post()
 
 enable_testing()
 
-#------------------------------------------------------------------------------
-# ccache https://crascit.com/2016/04/09/using-ccache-with-cmake/
-# Revert 3cfb3360ca63 and 781b74589a78 locally. See lld changes too below.
-# or use the `AND 0` here and for lld.
-find_program(CCACHE_PROGRAM ccache)
-
-if(CCACHE_PROGRAM AND 1)
-	# Set up wrapper scripts
-	set(C_LAUNCHER   "${CCACHE_PROGRAM}")
-	set(CXX_LAUNCHER "${CCACHE_PROGRAM}")
-	configure_file(/Users/ankitkumar/blender-build/resources/launch-c.in   /Users/ankitkumar/blender-build/resources/launch-c)
-	configure_file(/Users/ankitkumar/blender-build/resources/launch-cxx.in /Users/ankitkumar/blender-build/resources/launch-cxx)
-	execute_process(COMMAND chmod a+rx "/Users/ankitkumar/blender-build/resources/launch-c" "/Users/ankitkumar/blender-build/resources/launch-cxx")
-  
-	# Set Xcode project attributes to route compilation and linking
-	# through our scripts
-	set(CMAKE_XCODE_ATTRIBUTE_CC         "/Users/ankitkumar/blender-build/resources/launch-c")
-	set(CMAKE_XCODE_ATTRIBUTE_CXX        "/Users/ankitkumar/blender-build/resources/launch-cxx")
-	set(CMAKE_XCODE_ATTRIBUTE_LD         "/Users/ankitkumar/blender-build/resources/launch-c")
-	set(CMAKE_XCODE_ATTRIBUTE_LDPLUSPLUS "/Users/ankitkumar/blender-build/resources/launch-cxx")
-	# Support Unix Makefiles and Ninja
-	set(CMAKE_C_COMPILER_LAUNCHER   "/Users/ankitkumar/blender-build/resources/launch-c")
-	set(CMAKE_CXX_COMPILER_LAUNCHER "/Users/ankitkumar/blender-build/resources/launch-cxx")
-endif()
-
 #-----------------------------------------------------------------------------
 # Redirect output files
 
@@ -500,20 +475,11 @@ if(WIN32)
 endif()
 
 # Compiler toolchain
-# Use `AND 0` to avoid changes. See ccache changes above too.
-if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
-  find_program(LLD_FOUND lld)
-  if(LLD_FOUND AND 1)
-    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" ON)
-    mark_as_advanced(WITH_LINKER_LLD)
-  else()
-    option(WITH_LINKER_GOLD "Use ld.gold linker which is usually faster than ld.bfd" ON)
-    mark_as_advanced(WITH_LINKER_GOLD)
-    option(WITH_LINKER_LLD "Use ld.lld linker which is usually faster than ld.gold" OFF)
-    mark_as_advanced(WITH_LINKER_LLD)
-  endif()
+if(CMAKE_COMPILER_IS_GNUCC)
+  option(WITH_LINKER_GOLD "Use ld.gold linker which is usually faster than ld.bfd" ON)
+  mark_as_advanced(WITH_LINKER_GOLD)
+  option(WITH_LINKER_LLD "Use ld.lld linker which is usually faster than ld.gold" OFF)
+  mark_as_advanced(WITH_LINKER_LLD)
 endif()
 
 if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake
index d4e6f2862a9..6e00a2dec7b 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 OR CMAKE_C_COMPILER_ID MATCHES "Clang")
+if(CMAKE_COMPILER_IS_GNUCC)
   set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
 
   if(WITH_LINKER_GOLD)
@@ -596,7 +596,7 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
     unset(LD_VERSION)
   endif()
 
-  elseif(WITH_LINKER_LLD)
+  if(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 OR CMAKE_C_COMPILER_ID MATCHES "Clang")
 
 # 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