Skip to content

Commit d242cc8

Browse files
authored
Merge pull request #399 from kclonts/dfp-optional-include
add option to disable the workaround enabled for clang + libstdc++
2 parents f2b07a7 + 6f6d9a8 commit d242cc8

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ OPTION (WITH_SYSTEM_CITYHASH "Use system cityhash" OFF)
2020
OPTION (WITH_SYSTEM_ZSTD "Use system ZSTD" OFF)
2121
OPTION (DEBUG_DEPENDENCIES "Print debug info about dependencies duting build" ON)
2222
OPTION (CHECK_VERSION "Check that version number corresponds to git tag, usefull in CI/CD to validate that new version published on GitHub has same version in sources" OFF)
23+
OPTION (DISABLE_CLANG_LIBC_WORKAROUND "Disable linking compiler-rt & gcc_s if using clang & libstdc++" OFF)
2324

2425
PROJECT (CLICKHOUSE-CLIENT
2526
VERSION "${CLICKHOUSE_CPP_VERSION}"

clickhouse/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ if (MSVC)
8989
# remove in 3.0
9090
add_compile_options(/wd4996)
9191
else()
92-
set(cxx_extra_wall "-Wempty-body -Wconversion -Wreturn-type -Wparentheses -Wuninitialized -Wunreachable-code -Wunused-function -Wunused-value -Wunused-variable")
92+
set(cxx_extra_wall "-Wempty-body -Wconversion -Wreturn-type -Wparentheses -Wuninitialized -Wunreachable-code -Wunused-function -Wunused-value -Wunused-variable")
9393
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${cxx_extra_wall}")
9494

9595
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
@@ -130,7 +130,7 @@ ELSE ()
130130
ENDIF ()
131131

132132

133-
IF (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
133+
IF (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT DISABLE_CLANG_LIBC_WORKAROUND)
134134
INCLUDE (CheckCXXSourceCompiles)
135135

136136
CHECK_CXX_SOURCE_COMPILES("#include <bits/c++config.h>\nint main() { return __GLIBCXX__ != 0; }"

0 commit comments

Comments
 (0)