Commit Graph

80 Commits

Author SHA1 Message Date
Robert Schulze
1845bfc644
Revert change to ld64.lld linker on Mac
This reverts PRs #42470, #47673 and #47744. The problem was that after
the switch to ld64.lld, server binaries build in Debug mode no longer
came up, see the discussion after (*). My attempt to fix it with
`-no_compact_unwind` didn't help.

I also tried
- `-keep_dwarf_unwind`,
- `-unwindlib` (to use the OS unwinder),
- the unwinder in contrib (CMake variable EXCEPTION_HANDLING_LIBRARY)
but w/o success. Just tons of wasted time.

Rolling back to lld as linker on Mac. This will bring back many linker
warnings (#42282) but I rather accept that (temporarily, maybe someone
can figure out how to fix them) than have a broken Debug binary.

(*) https://github.com/ClickHouse/ClickHouse/pull/42470#issuecomment-1312344068
2023-03-27 15:26:54 +02:00
Robert Schulze
5d5308e060
CMake cleanup: Remove configuration of CMAKE_SHARED_LINKER_FLAGS
Follow-up to #44828
2023-03-26 17:59:39 +00:00
Robert Schulze
67ebad488f
Small refactoring of linker selection code 2023-03-19 18:16:20 +01:00
Robert Schulze
bf99d624e7
cmake: remove support for gold linker
It's dead since 5+ years.
2023-03-16 21:16:13 +00:00
Robert Schulze
16d61832fb
Bump minimum required Clang from 12 to 15
Needed due to https://github.com/ClickHouse/ClickHouse/pull/46247#discussion_r1109855435
2023-02-22 10:03:08 +00:00
Suzy Wang
19d26828a0 s390x build support 2023-01-20 21:16:55 +00:00
Nikolay Degterinsky
bfccdb130e
Small typo 2022-12-07 00:43:37 +01:00
Nikolay Degterinsky
57ca6ad60b
Make massages about GCC fatal 2022-12-07 00:40:41 +01:00
Lloyd-Pottiger
9ec313b05c remove generic driver lld
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
2022-11-08 18:32:53 +08:00
Lloyd-Pottiger
7419a3bd58 fix
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
2022-10-29 18:58:11 +08:00
Ilya Yatsishin
0404c960c6 add -15 tools to cmake.tools 2022-10-18 13:19:16 +02: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
Robert Schulze
fa6deaa0f7
Merge pull request #38294 from ClickHouse/fix_system_dot_licences_on_mac
Fix system.licenses on mac
2022-06-23 09:33:07 +02:00
Robert Schulze
a26aba792e
Assume GNU tools are installed when crosscompiling 2022-06-22 20:07:26 +02:00
Robert Schulze
1030dd305a
Correct brew install command 2022-06-22 16:59:03 +02:00
Robert Schulze
287a7f6e98
Let CMake check the presence of GNU utils
In list-licenses.sh it's too late ... the build simply continues if
list-licenses.sh returns with a non-zero exit code.
2022-06-21 23:49:29 +02:00
Robert Schulze
26b122d9a9
Bump minimum / maximum LLVM to 12 / 14
- the CI builds were recently upgraded to Clang 14

- this commit bumps versions of other LLVM tools needed for the build

- this is important for people who have multiple LLVM versions installed
  via their package manager
2022-06-17 09:49:08 +02:00
Robert Schulze
35c3944d1a
Warn when gold is used instead of lld 2022-06-13 11:31:08 +00:00
Robert Schulze
28ae7ad9c6
Print used linker always and not only on Linux 2022-05-15 16:07:10 +02:00
Robert Schulze
7000bdb3e8
Remove condition which is always true 2022-05-15 16:07:10 +02:00
Robert Schulze
7c11f41038
Removed funny objcopy/strip finding logic on Apple
On Darwin, the build script tries to
1. use llvm-objcopy/llvm-strip from $PATH,
2. if not found by 1., use standard objcopy/strip from $PATH

The brew install instructions recommends to set $PATH to brew's binary
dir, so 2. will find something (assuming binutils is installed from
brew). If $PATH additionally points to brew's LLVM binary dir (which is
different from brew's binary dir), 1. will find the llvm versions of the
tools.

This commit removes additional logic which repeats above steps in a more
implicit way by calling brew internally and figuring out the paths once
more if 1. and 2. cannot find them in the $PATH. This removes
duplication and simplifies the script. Maybe it even helps with
reproducibility.
2022-05-15 16:06:54 +02:00
Robert Schulze
9add41efce
Log locations of ar, ranlib and install-name-tool
Makes the output consistent with other build tools
2022-05-15 16:04:32 +02:00
Robert Schulze
a982e95caf
Harmonize and clarify error messasges 2022-05-15 16:04:32 +02:00
Robert Schulze
d505bcd510
Bump AppleClang to 12.0
- previous XCode 10.2 / Clang 7.0 was horribly outdated

- XCode 12.0 corresponds to the minimally required vanilla Clang version 12.0

- remove passing of "-fchar8_t" flag (with Clang >= 9, it is part of -std=c++20)
2022-05-15 16:04:32 +02:00
Robert Schulze
ef6138a2ee
Extract minimum compiler versions 2022-05-15 16:04:32 +02:00
Robert Schulze
ce50a1531f
Abort if unsupported compiler 2022-05-15 16:04:32 +02:00
Robert Schulze
2b3340861b
Remove support for ancient CMake
The first line in CMakeLists.txt says the minimum CMake version is
3.14. Therefore removing special code for earlier CMake versions.
2022-04-25 12:48:24 +02:00
alesapin
9e6f0ae9f2 Fix strip path 2022-03-23 18:44:09 +01:00
alesapin
fe8df7128e Add comment 2022-03-10 22:29:18 +01:00
alesapin
e53578910b Add ability to strip binaries in cmake 2022-03-10 22:23:28 +01:00
JackyWoo
b9861c45e1 terminate build when linker path not found 2021-12-09 15:17:24 +08:00
alexey-milovidov
a7de366741
Merge pull request #31957 from traceon/macos-fixes
Give some love to macOS platform
2021-11-30 04:15:32 +03:00
Alexey Milovidov
26e3c78da2 Something strange 2021-11-28 04:37:55 +03:00
Alexey Milovidov
8d8fcceede Output compiler version 2021-11-27 03:33:34 +03:00
Alexey Milovidov
a96e4fe393 More reproducible builds 2021-11-27 02:24:09 +03:00
Denis Glazachev
a0f2c69cf1 Allow AppleClang conditionally 2021-11-26 02:03:31 +03:00
Azat Khuzhin
0eef5ee778 Relax minimal clang version (set it to 12, was 13)
ClickHouse compiled fine under clang-12, and also note that not a lot of
distros already switched to clang-13, so it may requires additional
steps to compile ClickHouse otherwise.

Follow-up for: #30597
2021-10-24 09:40:41 +03:00
alexey-milovidov
14e891f07e
Merge pull request #30597 from ClickHouse/update-min-compiler-versions
Update minimum allowed compiler versions
2021-10-24 03:13:31 +03:00
Alexey Milovidov
6d49e59016 Update compiler versions 2021-10-24 00:12:50 +03:00
Alexey Milovidov
df5739b39b Revert "Allow AppleClang builds"
This reverts commit 1ddea6d7ee.
2021-10-23 22:59:12 +03:00
Alexey Milovidov
8196f89481 Remove trash from CMake 2021-10-11 06:58:08 +03:00
Yatsishin Ilya
227eb9fda5 try 2021-05-25 18:29:04 +03:00
Yatsishin Ilya
4f711ee038 fix darwin 2021-05-25 16:05:30 +03:00
Yatsishin Ilya
07556fac2c try fix aarch64 2021-05-25 12:52:53 +03:00
Yatsishin Ilya
d3149ae61c more 2021-05-21 17:42:04 +03:00
Alexey Milovidov
5423ef573a Add warning about gcc usage 2021-04-25 01:51:40 +03:00
mastertheknife
6d0349aec6 ppc64le: Re-enable compiling with Clang 2021-04-02 00:15:31 +03:00
Yatsishin Ilya
c64ba1ea8b fix 12.0.0 version 2021-03-11 11:03:03 +03:00
Yatsishin Ilya
682b5fb6ee better 2021-03-11 10:42:58 +03:00
Yatsishin Ilya
6e545c072a deprecated -fuse-ld changed to --ld-path for clang 2021-03-10 18:07:56 +03:00