-
Notifications
You must be signed in to change notification settings - Fork 410
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade toolchain to LLVM17 & Support C++23 (#8899)
close #7193, close #8898 Co-authored-by: JaySon <[email protected]>
- Loading branch information
1 parent
b03d747
commit 06427c4
Showing
7 changed files
with
40 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Copyright 2024 PingCAP, Ltd. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# Hi, there! | ||
# This is passed via jenkins podTemplate argument. | ||
# Instead of trying injections, take a look at https://en.pingcap.com/careers/. | ||
image_tag_suffix: -llvm-17.0.6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,7 @@ And the following operating systems: | |
The following packages are required: | ||
|
||
- CMake 3.21.0+ | ||
- Clang 13.0.6+ | ||
- Clang 17.0.0+ under Linux or AppleClang 15.0.0+ under MacOS | ||
- Rust | ||
- Python 3.0+ | ||
- Ninja-Build or GNU Make | ||
|
@@ -56,10 +56,10 @@ curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain none | |
source $HOME/.cargo/env | ||
|
||
# Install LLVM, see https://apt.llvm.org for details | ||
# Clang will be available as /usr/bin/clang++-13 | ||
# Clang will be available as /usr/bin/clang++-17 | ||
wget https://apt.llvm.org/llvm.sh | ||
chmod +x llvm.sh | ||
sudo ./llvm.sh 13 all | ||
sudo ./llvm.sh 17 all | ||
|
||
# Install other dependencies | ||
sudo apt install -y cmake ninja-build zlib1g-dev libcurl4-openssl-dev ccache | ||
|
@@ -128,10 +128,10 @@ brew install ninja cmake [email protected] ccache | |
If your MacOS is higher or equal to 13.0, it should work out of the box because by default Apple clang is 14.0.0. But if your MacOS is lower than 13.0, you should install llvm clang manually. | ||
|
||
```shell | ||
brew install llvm@15 | ||
brew install llvm@17 | ||
|
||
# check llvm version | ||
clang --version # should be 15.0.0 or higher | ||
clang --version # should be 17.0.0 or higher | ||
``` | ||
|
||
</details> | ||
|
@@ -162,8 +162,8 @@ Note: In Linux, usually you need to explicitly specify to use LLVM. | |
```shell | ||
# In cmake-build-debug directory: | ||
cmake .. -GNinja -DCMAKE_BUILD_TYPE=DEBUG \ | ||
-DCMAKE_C_COMPILER=/usr/bin/clang-13 \ | ||
-DCMAKE_CXX_COMPILER=/usr/bin/clang++-13 | ||
-DCMAKE_C_COMPILER=/usr/bin/clang-17 \ | ||
-DCMAKE_CXX_COMPILER=/usr/bin/clang++-17 | ||
``` | ||
|
||
In MacOS, if you install llvm clang, you need to explicitly specify to use llvm clang. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters