Commit Graph

864 Commits

Author SHA1 Message Date
Lloyd-Pottiger
7419a3bd58 fix
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
2022-10-29 18:58:11 +08:00
Robert Schulze
da5a2e2db0
Merge remote-tracking branch 'origin/master' into generated-file-cleanup
Physical merge conflicts:
- src/Common/ZooKeeper/ZooKeeperImpl.cpp
- src/Core/config_core.h.in
- src/Functions/FunctionsAES.h
- src/Functions/config_functions.h.in
- src/configure_config.cmake

Logical merge conflicts:
- Functions/tryDecrypt.cpp
2022-10-06 08:43:25 +00:00
Alexey Milovidov
25d13b89e9
Merge pull request #41142 from MeenaRenganathan22/OpenSSL_InHouse
Changes to support the OpenSSL In-house build.
2022-10-05 23:02:04 +03:00
Alexey Milovidov
a46206571e
Update CMakeLists.txt 2022-10-05 23:00:49 +03:00
Alexey Milovidov
89b1a5188f
Update CMakeLists.txt 2022-10-05 22:59:44 +03:00
BoloniniD
3a3ca51980 Fixes after review 2022-10-02 20:52:05 +03:00
root
7e4edfeb5a Merge branch 'master' of https://github.com/MeenaRenganathan22/ClickHouse into OpenSSL_InHouse 2022-09-30 15:50:46 -07:00
root
bb1771e159 Update the macro ENABLE_CH_BUNDLE_BORINGSSLL to ENABLE_EXTERNAL_OPENSSL 2022-09-30 10:35:49 -07:00
BoloniniD
55c79230b3 Merge branch 'master' of github.com:ClickHouse/ClickHouse into BLAKE3 2022-09-29 23:53:25 +03:00
Robert Schulze
06507c40de
${ConfigIncludePath} --> ${CONFIG_INCLUDE_PATH} 2022-09-28 08:28:47 +00:00
Robert Schulze
823d8fb6cd
Move git calls back into git.cmake
+ renamed the file from originally "git_status.cmake" to "git.cmake"
  (because we not longer run only "git status")
2022-09-27 11:45:58 +00:00
Robert Schulze
ec35ff9cd6
Log git hash during startup
We currently only log a compiler-generated "build id" at startup which
is different for each build. That makes it useless to determine the
exact source code state in tests (e.g. BC test) and from user log files
(e.g. if someone compiled an intermediate version of ClickHouse).

Current log message:
  Starting ClickHouse 22.10.1.1 with revision 54467, build id: 6F35820328F89C9F36E91C447FF9E61CAF0EF019, PID 42633

New log message:
  Starting ClickHouse 22.10.1.1 (revision 54467, git hash: b6b1f7f763f94ffa12133679a6f80342dd1c3afe, build id: 47B12BE61151926FBBD230DE42F3B7A6652AC482), PID 981813
2022-09-26 14:12:36 +00:00
BoloniniD
0df426d329 Corrosion fixes + review fixes 2022-09-16 00:05:21 +03:00
BoloniniD
147dfac11e Try using Corrosion 2022-09-12 23:05:41 +03:00
Meena Renganathan
51d6611b96 Committing the ClickHouse core changes and other libraries to support OpenSSL. BoringSSL is still set as default 2022-09-12 09:05:38 -07:00
BoloniniD
e8bcbcd016
Merge branch 'master' into BLAKE3 2022-09-09 11:48:31 +03:00
BoloniniD
d635c3f9be Disable BLAKE3 for aarch64-darwin 2022-09-06 21:22:40 +03:00
Azat Khuzhin
2d3fb36a62 Fix debug symbols (Add a quirk to force clang emit .debug_aranges with ThinLTO)
Wrap a linker into a script that will add some settings (`-mllvm
-generate-arange-section`) in case of ThinLTO to emit `.debug_aranges`
symbols.

Dicussion in the LLVM can be found here [1].

  [1]: https://discourse.llvm.org/t/clang-does-not-produce-full-debug-aranges-section-with-thinlto/64898

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-09-02 23:22:25 +02:00
Alexander Tokmakov
69387acffa
Revert "Support for DWARF-5 in in house DWARF parser" 2022-08-29 14:25:53 +03:00
Alexey Milovidov
8448242785
Merge pull request #40716 from azat/fix-gdb-index
Fix gdb index (makes gdb 17x faster)
2022-08-29 00:13:58 +03:00
Alexey Milovidov
ae97e880d7
Merge pull request #40710 from azat/DWARF-5
Support for DWARF-5 in in house DWARF parser
2022-08-29 00:13:33 +03:00
Alexey Milovidov
ddff5e9145
Merge pull request #40712 from ClickHouse/ci-cmake-self-extractable
cmake: Disable default ENABLE_CLICKHOUSE_SELF_EXTRACTING
2022-08-28 17:12:19 +03:00
Azat Khuzhin
19178a8f18 Fix gdb index (makes gdb 17x faster)
Right now LINKER_NAME contains version so it does not work:

    Aug 27 13:02:10 -- Using linker: /usr/bin/ld.lld-14

Without this patch:

    $ time gdb ~/ch/clickhouse/.bld-release/programs/clickhouse -batch

    real    1m20.564s
    user    1m18.622s
    sys     0m1.940s

    $ time lldb-13 clickhouse -batch
    real    0m9.353s
    user    1m31.035s
    sys     0m8.346s

With:

    $ time gdb clickhouse -batch
    real    0m4.769s
    user    0m3.969s
    sys     0m0.800s

    $ time lldb clickhouse -batch
    real    0m6.703s
    user    0m45.383s
    sys     0m4.934s

So by just adding 4.15MiB to the binary size, gdb start up time improved
17 times.

    $ objdump -j .gdb_index -h .bld-release/programs/clickhouse

    .bld-release/programs/clickhouse:     file format elf64-x86-64

    Sections:
    Idx Name          Size      VMA               LMA               File off  Algn
     40 .gdb_index    00426d74  0000000000000000  0000000000000000  7fb43443  2**0
                      CONTENTS, READONLY, DEBUGGING

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-08-28 15:01:34 +02:00
Azat Khuzhin
7f65075dcb Fix usage of SHA1 for BuildID
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-08-28 09:02:10 +02:00
Yakov Olkhovskiy
b5bb1be15a pass ENABLE_CLICKHOUSE_SELF_EXTRACTING to native build 2022-08-27 23:29:32 +00:00
Azat Khuzhin
444acb96c8 Do not pin DWARF-4 during build
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-08-27 22:28:15 +02:00
Alexey Milovidov
91ed3ebe9a Remove the remaining parts of "unbundled" build 2022-08-27 02:18:47 +02:00
Robert Schulze
cadfdc40ef
fix: CMake option ENABLE_CCACHE is not propagated to native build
- fixes #40439
2022-08-23 18:59:51 +00:00
Alexey Milovidov
a716d78264 Support build with clang-16 2022-08-13 06:06:01 +02:00
BoloniniD
29084d92d8 Fix CMake for ENABLE_RUST 2022-08-02 20:44:12 +03:00
BoloniniD
b161773f71 Merge branch 'master' of github.com:ClickHouse/ClickHouse into BLAKE3 2022-08-02 20:25:25 +03:00
Robert Schulze
d834d9e137
Minor: Better variable name output 2022-07-31 07:44:25 +00:00
Alexey Milovidov
36e6500e54
Merge branch 'master' into BLAKE3 2022-07-30 23:14:05 +03:00
Robert Schulze
199e254777
Merge remote-tracking branch 'origin/master' into no-split-binary 2022-07-28 15:54:22 +00:00
Yakov Olkhovskiy
da42ec7d28 some refactoring 2022-07-24 21:08:43 -04:00
Alexey Milovidov
071374b152 Remove SPLIT_BINARY 2022-07-24 01:15:54 +02:00
Yakov Olkhovskiy
e7438cc433
Merge branch 'master' into cmake-self-extracting-executable 2022-07-21 00:25:08 -04:00
Yakov Olkhovskiy
b766552481 add native build for cross-compilation 2022-07-20 23:09:05 -04:00
Azat Khuzhin
0e95dba3ef Fix make clean (due to crosscompile of llvm)
Without ADDITIONAL_CLEAN_FILES it reports an error:

    Cleaning... ninja: error: remove(contrib/llvm/llvm/NATIVE): Directory not empty
    ninja: error: remove(/bld/contrib/llvm/llvm/NATIVE): Directory not empty
    0 files.

Note, that ADDITIONAL_CLEAN_FILES had been added since cmake 3.15.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-07-20 17:34:10 +03:00
Azat Khuzhin
21fa5e6ece Add check for CLICKHOUSE_SPLIT_BINARY=1 with USE_STATIC_LIBRARIES=1
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-07-18 11:42:49 +03:00
Azat Khuzhin
30018ce5d3 Fix running cmake with predefined cache (for development only)
Right now cmake add the following options only if USE_STATIC_LIBRARIES
is OFF:
- SPLIT_SHARED_LIBRARIES
- CLICKHOUSE_SPLIT_BINARY

And this breaks the following usage:

    $ cmake ..
    $ cat > debug-build-cache.cmake
    set(USE_STATIC_LIBRARIES              OFF CACHE BOOL "")
    set(SPLIT_SHARED_LIBRARIES            ON  CACHE BOOL "")
    set(CLICKHOUSE_SPLIT_BINARY           ON  CACHE BOOL "")
    ^D
    $ cmake -C debug-build-cache.cmake ..
    CMake Error at CMakeLists.txt:83 (message):
      Defining SPLIT_SHARED_LIBRARIES=1 without USE_STATIC_LIBRARIES=0 has no
      effect.

Since with this initial cache we have the following:

- USE_STATIC_LIBRARIES=OFF (because it was already set)
- SPLIT_SHARED_LIBRARIES=ON (was not set before, so new value)
- CLICKHOUSE_SPLIT_BINARY (was not set before, also new value)

Yes this is not the common usage, but it seems that it is pretty easy to
avoid.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-07-17 12:18:24 +03:00
Alexey Milovidov
d8b1b44a29
Merge branch 'master' into align-branch-within-32b 2022-07-13 16:53:34 +03:00
Robert Schulze
1a7727a254
Prefix overridden add_executable() command with "clickhouse_"
A simple HelloWorld program with zero includes except iostream triggers
a build of ca. 2000 source files. The reason is that ClickHouse's
top-level CMakeLists.txt overrides "add_executable()" to link all
binaries against "clickhouse_new_delete". This links against
"clickhouse_common_io", which in turn has lots of 3rd party library
dependencies ... Without linking "clickhouse_new_delete", the number of
compiled files for "HelloWorld" goes down to ca. 70.

As an example, the self-extracting-executable needs none of its current
dependencies but other programs may also benefit.

In order to restore access to the original "add_executable()", the
overriding version is now prefixed. There is precedence for a
"clickhouse_" prefix (as opposed to "ch_"), for example
"clickhouse_split_debug_symbols". In general prefixing makes sense also
because overriding CMake commands relies on undocumented behavior and is
considered not-so-great practice (*).

(*) https://crascit.com/2018/09/14/do-not-redefine-cmake-commands/
2022-07-11 19:36:18 +02:00
Azat Khuzhin
e8f5cd3c68 Add separate option to omit symbols from heavy contrib
Sometimes it is useful to build contrib with debug symbols for further
debugging.

With everything turned ON (i.e. debug build) I got 3.3GB vs 3.0GB w/o
this patch, 9% bloat, thoughts about this is this OK or not for you, if
not STRIP_DEBUG_SYMBOLS_HEAVY_CONTRIB can be OFF by default (regardless
of build type).

P.S. aws debug symbols adds just 1.7%.
v2: rename STRIP_HEAVY_DEBUG_SYMBOLS
v3: OMIT_HEAVY_DEBUG_SYMBOLS
v4: documentation had been removed
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-07-02 06:32:03 +03:00
Robert Schulze
bb358617e1
Better naming for stuff related to splitted debug symbols
The previous name was slightly misleading, e.g. it is not about
"intalling stripped binaries" but about splitting debug symbols from the
binary.
2022-06-30 23:41:27 +02:00
BoloniniD
6ddcec0906
Merge branch 'master' into BLAKE3 2022-06-28 16:53:06 +03:00
Robert Schulze
bc46cef63c
Minor follow-up
- change ELF section name to ".clickhouse.hash" (lowercase seems
  standard)

- more expressive/concise integrity check messages at startup
2022-06-14 08:52:13 +00:00
Robert Schulze
e25fbb9292
Log official/non-official build and integrated/separate debug symbols
The goal is to find out why some of the binaries with official name
(BuilderDebRelease, BuilderBinRelease) produced by CI still contain no
hash section.

(also, strip and objcopy are mandatory tools and we don't need to check
for their existence at this point)
2022-06-13 12:34:09 +00:00
BoloniniD
b05ee41d25 Merge branch 'master' of github.com:ClickHouse/ClickHouse into BLAKE3 2022-06-06 16:03:10 +03:00
Wangyang Guo
ea5e37abef Align branches within a 32B boundary for AMD64 arch to make benchmark more stable 2022-06-06 17:22:21 +08:00