From 58f1b73554b892c2ed66a19b7ef8c6bd8df0b937 Mon Sep 17 00:00:00 2001 From: Alexander Kuzmenkov <36882414+akuzm@users.noreply.github.com> Date: Thu, 20 Aug 2020 21:56:22 +0300 Subject: [PATCH] Update build.md --- docs/en/development/build.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/en/development/build.md b/docs/en/development/build.md index 2e84bcfcc1b..75d73ab91c4 100644 --- a/docs/en/development/build.md +++ b/docs/en/development/build.md @@ -146,6 +146,14 @@ $ cd ClickHouse $ ./release ``` +## Faster builds for development + +Normally all tools of the ClickHouse bundle, such as `clickhouse-server`, `clickhouse-client` etc., are linked into a single static executable, `clickhouse`. This executable must be re-linked on every change, which might be slow. Two common ways to improve linking time are to use `lld` linker, and use the 'split' build configuration, which builds a separate binary for every tool, and further splits the code into serveral shared libraries. To enable these tweaks, pass the following flags to `cmake`: + +``` +-DCMAKE_C_FLAGS="-fuse-ld=lld" -DCMAKE_CXX_FLAGS="-fuse-ld=lld" -DUSE_STATIC_LIBRARIES=0 -DSPLIT_SHARED_LIBRARIES=1 -DCLICKHOUSE_SPLIT_BINARY=1 +``` + ## You Don’t Have to Build ClickHouse {#you-dont-have-to-build-clickhouse} ClickHouse is available in pre-built binaries and packages. Binaries are portable and can be run on any Linux flavour.