mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
Merge pull request #17501 from traceon/fix-xcode-builds
Fix CMake generation and build for native Xcode and AppleClang
This commit is contained in:
commit
ef43ceade4
@ -154,17 +154,19 @@ endif ()
|
|||||||
# Make sure the final executable has symbols exported
|
# Make sure the final executable has symbols exported
|
||||||
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -rdynamic")
|
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -rdynamic")
|
||||||
|
|
||||||
find_program (OBJCOPY_PATH NAMES "llvm-objcopy" "llvm-objcopy-11" "llvm-objcopy-10" "llvm-objcopy-9" "llvm-objcopy-8" "objcopy")
|
if (OS_LINUX)
|
||||||
if (OBJCOPY_PATH)
|
find_program (OBJCOPY_PATH NAMES "llvm-objcopy" "llvm-objcopy-11" "llvm-objcopy-10" "llvm-objcopy-9" "llvm-objcopy-8" "objcopy")
|
||||||
message(STATUS "Using objcopy: ${OBJCOPY_PATH}.")
|
if (OBJCOPY_PATH)
|
||||||
|
message(STATUS "Using objcopy: ${OBJCOPY_PATH}.")
|
||||||
|
|
||||||
if (ARCH_AMD64)
|
if (ARCH_AMD64)
|
||||||
set(OBJCOPY_ARCH_OPTIONS -O elf64-x86-64 -B i386)
|
set(OBJCOPY_ARCH_OPTIONS -O elf64-x86-64 -B i386)
|
||||||
elseif (ARCH_AARCH64)
|
elseif (ARCH_AARCH64)
|
||||||
set(OBJCOPY_ARCH_OPTIONS -O elf64-aarch64 -B aarch64)
|
set(OBJCOPY_ARCH_OPTIONS -O elf64-aarch64 -B aarch64)
|
||||||
|
endif ()
|
||||||
|
else ()
|
||||||
|
message(FATAL_ERROR "Cannot find objcopy.")
|
||||||
endif ()
|
endif ()
|
||||||
else ()
|
|
||||||
message(FATAL_ERROR "Cannot find objcopy.")
|
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (OS_DARWIN)
|
if (OS_DARWIN)
|
||||||
|
@ -12,13 +12,7 @@ set(CMAKE_CXX_STANDARD_LIBRARIES ${DEFAULT_LIBS})
|
|||||||
set(CMAKE_C_STANDARD_LIBRARIES ${DEFAULT_LIBS})
|
set(CMAKE_C_STANDARD_LIBRARIES ${DEFAULT_LIBS})
|
||||||
|
|
||||||
# Minimal supported SDK version
|
# Minimal supported SDK version
|
||||||
|
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.15)
|
||||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=10.15")
|
|
||||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.15")
|
|
||||||
set (CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -mmacosx-version-min=10.15")
|
|
||||||
|
|
||||||
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -mmacosx-version-min=10.15")
|
|
||||||
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -mmacosx-version-min=10.15")
|
|
||||||
|
|
||||||
# Global libraries
|
# Global libraries
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ option (WEVERYTHING "Enable -Weverything option with some exceptions." ON)
|
|||||||
|
|
||||||
# Control maximum size of stack frames. It can be important if the code is run in fibers with small stack size.
|
# Control maximum size of stack frames. It can be important if the code is run in fibers with small stack size.
|
||||||
# Only in release build because debug has too large stack frames.
|
# Only in release build because debug has too large stack frames.
|
||||||
if ((NOT CMAKE_BUILD_TYPE_UC STREQUAL "DEBUG") AND (NOT SANITIZE))
|
if ((NOT CMAKE_BUILD_TYPE_UC STREQUAL "DEBUG") AND (NOT SANITIZE) AND (NOT CMAKE_CXX_COMPILER_ID MATCHES "AppleClang"))
|
||||||
add_warning(frame-larger-than=32768)
|
add_warning(frame-larger-than=32768)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user