Apple "cross compilation" for protoc (#12881)

This commit is contained in:
Ilya Lavrenov
2022-09-03 10:50:01 +04:00
committed by GitHub
parent ac6e180bdd
commit fb8423dcee
9 changed files with 115 additions and 84 deletions

View File

@@ -343,7 +343,7 @@ else()
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-dead_strip")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,-dead_strip")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-dead_strip")
if (CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64")
if(CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64" AND AARCH64)
# Disable -mcpu=native
ie_add_compiler_flags(-Wno-error=unused-command-line-argument)
endif()