[Bf-blender-cvs] [36426b0a685] master: CMake/macOS: Replace -Xlinker with -Wl.

Ankit Meel noreply at git.blender.org
Mon Nov 23 12:05:44 CET 2020


Commit: 36426b0a68565cb6aad5695c570a2521f23152ea
Author: Ankit Meel
Date:   Sun Nov 22 01:28:53 2020 +0530
Branches: master
https://developer.blender.org/rB36426b0a68565cb6aad5695c570a2521f23152ea

CMake/macOS: Replace -Xlinker with -Wl.

Causes link issues on Xcode's "New Build System" which was introduced
in Xcode 10 and is default on Xcode 12.
https://devtalk.blender.org/t/16273

Differential Revision: https://developer.blender.org/D9624
Reviewed by: brecht, #platform_macos

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

M	build_files/cmake/platform/platform_apple.cmake

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

diff --git a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platform/platform_apple.cmake
index b1168cf28da..e5ca15a03ba 100644
--- a/build_files/cmake/platform/platform_apple.cmake
+++ b/build_files/cmake/platform/platform_apple.cmake
@@ -337,7 +337,7 @@ if(WITH_CYCLES_EMBREE)
   find_package(Embree 3.8.0 REQUIRED)
   # Increase stack size for Embree, only works for executables.
   if(NOT WITH_PYTHON_MODULE)
-    string(APPEND PLATFORM_LINKFLAGS " -Xlinker -stack_size -Xlinker 0x100000")
+    string(APPEND PLATFORM_LINKFLAGS " -Wl,-stack_size,0x100000")
   endif()
 
   # Embree static library linking can mix up SSE and AVX symbols, causing
@@ -450,7 +450,7 @@ endif()
 # Avoid conflicts with Luxrender, and other plug-ins that may use the same
 # libraries as Blender with a different version or build options.
 set(PLATFORM_LINKFLAGS
-  "${PLATFORM_LINKFLAGS} -Xlinker -unexported_symbols_list -Xlinker '${CMAKE_SOURCE_DIR}/source/creator/osx_locals.map'"
+  "${PLATFORM_LINKFLAGS} -Wl,-unexported_symbols_list,'${CMAKE_SOURCE_DIR}/source/creator/osx_locals.map'"
 )
 
 string(APPEND CMAKE_CXX_FLAGS " -stdlib=libc++")



More information about the Bf-blender-cvs mailing list