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
This commit is contained in:
Brecht Van Lommel 2023-09-20 16:25:14 +02:00 committed by Brecht Van Lommel
parent e2cef1c713
commit d387ef224f
2 changed files with 6 additions and 14 deletions

View File

@ -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")

View File

@ -4,6 +4,8 @@
buildbot:
gcc:
version: '11.0.0'
xcode:
version: '15.0'
cuda10:
version: '10.1.243'
cuda11: