Build: changes to macOS build flags to fix linker warnings

* Different fix for Mantaflow linker warnings that works with new OpenVDB.
* Use new linker for arm64 as it no longer produces warnings with latest
  Xcode. Still use the old one for x86_64 as some warnings remain.
* Fix wrong x86_64 build target in deps builder.

For the upcoming 4.1 libraries.

Ref #113157

Pull Request: https://projects.blender.org/blender/blender/pulls/116708
This commit is contained in:
Brecht Van Lommel
2024-01-02 16:22:48 +01:00
committed by Brecht Van Lommel
parent c6d61e8586
commit 1f3ce2a311
4 changed files with 5 additions and 13 deletions

View File

@@ -10,17 +10,6 @@ if(MSVC_CLANG AND WITH_OPENMP AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.0.1
remove_cc_flag("-fopenmp")
endif()
# Exporting functions from the blender binary gives linker warnings on Apple arm64 systems.
# Silence them here.
if(APPLE)
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64")
if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
string(APPEND CMAKE_C_FLAGS " -fvisibility=hidden")
string(APPEND CMAKE_CXX_FLAGS " -fvisibility=hidden")
endif()
endif()
endif()
set(MANTAVERSION "0.13")
add_definitions(-DWITH_FLUID=1)