mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 16:42:05 +00:00
try to avoid conflict with prlimit
This commit is contained in:
parent
c187dca12c
commit
a55d03cb62
@ -66,7 +66,14 @@ endif ()
|
|||||||
|
|
||||||
include (cmake/find/ccache.cmake)
|
include (cmake/find/ccache.cmake)
|
||||||
|
|
||||||
option(ENABLE_CHECK_HEAVY_BUILDS "Don't allow C++ translation units to compile too long or to take too much memory while compiling" OFF)
|
# Take care to add prlimit in command line before ccache, or else ccache thinks that
|
||||||
|
# prlimit is compiler, and clang++ is its input file, and refuses to work with
|
||||||
|
# multiple inputs, e.g in ccache log:
|
||||||
|
# [2021-03-31T18:06:32.655327 36900] Command line: /usr/bin/ccache prlimit --as=10000000000 --data=5000000000 --cpu=600 /usr/bin/clang++-11 - ...... std=gnu++2a -MD -MT src/CMakeFiles/dbms.dir/Storages/MergeTree/IMergeTreeDataPart.cpp.o -MF src/CMakeFiles/dbms.dir/Storages/MergeTree/IMergeTreeDataPart.cpp.o.d -o src/CMakeFiles/dbms.dir/Storages/MergeTree/IMergeTreeDataPart.cpp.o -c ../src/Storages/MergeTree/IMergeTreeDataPart.cpp
|
||||||
|
#
|
||||||
|
# [2021-03-31T18:06:32.656704 36900] Multiple input files: /usr/bin/clang++-11 and ../src/Storages/MergeTree/IMergeTreeDataPart.cpp
|
||||||
|
|
||||||
|
option(ENABLE_CHECK_HEAVY_BUILDS "Don't allow C++ translation units to compile too long or to take too much memory while compiling." OFF)
|
||||||
if (ENABLE_CHECK_HEAVY_BUILDS)
|
if (ENABLE_CHECK_HEAVY_BUILDS)
|
||||||
# set DATA (since RSS does not work since 2.6.x+) to 2G
|
# set DATA (since RSS does not work since 2.6.x+) to 2G
|
||||||
set (RLIMIT_DATA 5000000000)
|
set (RLIMIT_DATA 5000000000)
|
||||||
@ -76,7 +83,7 @@ if (ENABLE_CHECK_HEAVY_BUILDS)
|
|||||||
if (SANITIZE STREQUAL "memory" OR COMPILER_GCC)
|
if (SANITIZE STREQUAL "memory" OR COMPILER_GCC)
|
||||||
set (RLIMIT_DATA 10000000000)
|
set (RLIMIT_DATA 10000000000)
|
||||||
endif()
|
endif()
|
||||||
set (CMAKE_CXX_COMPILER_LAUNCHER prlimit --as=${RLIMIT_AS} --data=${RLIMIT_DATA} --cpu=600)
|
set (CMAKE_CXX_COMPILER_LAUNCHER prlimit --as=${RLIMIT_AS} --data=${RLIMIT_DATA} --cpu=600 ${CMAKE_CXX_COMPILER_LAUNCHER})
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL "None")
|
if (NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL "None")
|
||||||
|
@ -32,7 +32,9 @@ if (CCACHE_FOUND AND NOT COMPILER_MATCHES_CCACHE)
|
|||||||
if (CCACHE_VERSION VERSION_GREATER "3.2.0" OR NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
if (CCACHE_VERSION VERSION_GREATER "3.2.0" OR NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
message(STATUS "Using ${CCACHE_FOUND} ${CCACHE_VERSION}")
|
message(STATUS "Using ${CCACHE_FOUND} ${CCACHE_VERSION}")
|
||||||
|
|
||||||
set_property (GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE_FOUND})
|
set (CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE_FOUND} ${CMAKE_CXX_COMPILER_LAUNCHER})
|
||||||
|
set (CMAKE_C_COMPILER_LAUNCHER ${CCACHE_FOUND} ${CMAKE_C_COMPILER_LAUNCHER})
|
||||||
|
|
||||||
set_property (GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE_FOUND})
|
set_property (GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE_FOUND})
|
||||||
|
|
||||||
# debian (debhelpers) set SOURCE_DATE_EPOCH environment variable, that is
|
# debian (debhelpers) set SOURCE_DATE_EPOCH environment variable, that is
|
||||||
|
@ -88,3 +88,7 @@ find . -name '*.ccache-*' -print -exec mv '{}' /output/ccache \;
|
|||||||
tar -czvf "/output/ccache.tgz" /output/ccache
|
tar -czvf "/output/ccache.tgz" /output/ccache
|
||||||
rm -rf /output/ccache
|
rm -rf /output/ccache
|
||||||
|
|
||||||
|
# Compress the log as well, or else the CI will try to compress all log files in place,
|
||||||
|
# and will fail because this directory is not writable.
|
||||||
|
gzip "/output/ccache.log"
|
||||||
|
|
||||||
|
@ -155,6 +155,7 @@ def parse_env_variables(build_type, compiler, sanitizer, package_type, image_typ
|
|||||||
|
|
||||||
if clang_tidy:
|
if clang_tidy:
|
||||||
cmake_flags.append('-DENABLE_CLANG_TIDY=1')
|
cmake_flags.append('-DENABLE_CLANG_TIDY=1')
|
||||||
|
cmake_flags.append('-D
|
||||||
# Don't stop on first error to find more clang-tidy errors in one run.
|
# Don't stop on first error to find more clang-tidy errors in one run.
|
||||||
result.append('NINJA_FLAGS=-k0')
|
result.append('NINJA_FLAGS=-k0')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user