From d387ef224fa7dd0ff668de3425186a6d2b065223 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 20 Sep 2023 16:25:14 +0200 Subject: [PATCH] macOS: upgrade to Xcode 15 For Blender 4.0 only, 3.3 and 3.6 keep using the older Xcode version. The new linker in Xcode 15 gives many warnings due to duplicated libraries, generated by CMake to resolve circular dependencies. For now use the old linker to silence these warnings. Remove legacy flags for libc++, this is the default for a long time and generates warnings with the new linker. Reason for upgrade is to take advantage of MetalRT curve support. Pull Request: https://projects.blender.org/blender/blender/pulls/110243 --- .../cmake/platform/platform_apple.cmake | 18 ++++-------------- build_files/config/pipeline_config.yaml | 2 ++ 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platform/platform_apple.cmake index f5bbc67bc6f..fb9386b8af6 100644 --- a/build_files/cmake/platform/platform_apple.cmake +++ b/build_files/cmake/platform/platform_apple.cmake @@ -192,8 +192,6 @@ set(PLATFORM_LINKFLAGS "-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Cocoa -framework Carbon -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework Metal -framework QuartzCore" ) -list(APPEND PLATFORM_LINKLIBS c++) - if(WITH_OPENIMAGEDENOISE) if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64") # OpenImageDenoise uses BNNS from the Accelerate framework. @@ -330,16 +328,6 @@ endif() if(WITH_CYCLES AND WITH_CYCLES_EMBREE) find_package(Embree 3.8.0 REQUIRED) - - # Embree static library linking can mix up SSE and AVX symbols, causing - # crashes on macOS systems with older CPUs that don't have AVX. Using - # force load avoids that. The Embree shared library does not suffer from - # this problem, precisely because linking a shared library uses force load. - set(_embree_libraries_force_load) - foreach(_embree_library ${EMBREE_LIBRARIES}) - list(APPEND _embree_libraries_force_load "-Wl,-force_load,${_embree_library}") - endforeach() - set(EMBREE_LIBRARIES ${_embree_libraries_force_load}) endif() add_bundled_libraries(embree/lib) @@ -435,8 +423,10 @@ string(APPEND PLATFORM_LINKFLAGS " -Wl,-unexported_symbols_list,'${PLATFORM_SYMBOLS_MAP}'" ) -string(APPEND CMAKE_CXX_FLAGS " -stdlib=libc++") -string(APPEND PLATFORM_LINKFLAGS " -stdlib=libc++") +# Use old, slower linker for now to avoid many linker warnings. +if(${XCODE_VERSION} VERSION_GREATER_EQUAL 15.0) + string(APPEND PLATFORM_LINKFLAGS " -Wl,-ld_classic") +endif() # Make stack size more similar to Embree, required for Embree. string(APPEND PLATFORM_LINKFLAGS_EXECUTABLE " -Wl,-stack_size,0x100000") diff --git a/build_files/config/pipeline_config.yaml b/build_files/config/pipeline_config.yaml index a916787ea2b..379f6477d61 100644 --- a/build_files/config/pipeline_config.yaml +++ b/build_files/config/pipeline_config.yaml @@ -4,6 +4,8 @@ buildbot: gcc: version: '11.0.0' + xcode: + version: '15.0' cuda10: version: '10.1.243' cuda11: