diff --git a/CMakeLists.txt b/CMakeLists.txt index 0491dea8786..91ccbcb2406 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -198,7 +198,7 @@ if (UNBUNDLED OR NOT (OS_LINUX OR APPLE) OR ARCH_32) endif () # Make this extra-checks for correct library dependencies. -if (NOT SANITIZE) +if (OS_LINUX AND NOT SANITIZE) set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-undefined") endif () diff --git a/dbms/src/Common/StackTrace.h b/dbms/src/Common/StackTrace.h index b0aa49bce5e..13147587a19 100644 --- a/dbms/src/Common/StackTrace.h +++ b/dbms/src/Common/StackTrace.h @@ -9,7 +9,8 @@ #ifdef __APPLE__ // ucontext is not available without _XOPEN_SOURCE -#define _XOPEN_SOURCE 700 +# pragma clang diagnostic ignored "-Wreserved-id-macro" +# define _XOPEN_SOURCE 700 #endif #include diff --git a/libs/libcommon/CMakeLists.txt b/libs/libcommon/CMakeLists.txt index 79e3d1fda80..cf1144124e8 100644 --- a/libs/libcommon/CMakeLists.txt +++ b/libs/libcommon/CMakeLists.txt @@ -84,7 +84,7 @@ elseif (USE_TCMALLOC) endif () elseif (SANITIZE) message (STATUS "Will use ${SANITIZE} sanitizer.") -else () +elseif (OS_LINUX) message (WARNING "Non default allocator is disabled. This is not recommended for production Linux builds.") endif ()