-
Notifications
You must be signed in to change notification settings - Fork 411
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into feature/vector-index
- Loading branch information
Showing
255 changed files
with
7,047 additions
and
1,451 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
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 |
---|---|---|
|
@@ -125,7 +125,7 @@ xcode-select --install | |
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. | ||
If your MacOS is higher or equal to 13.0 (Ventura), it should work out of the box because by default Xcode 14.3 provides Apple clang 14.0.0. But if your MacOS is lower than 13.0, you should install llvm clang manually. | ||
|
||
```shell | ||
brew install llvm@17 | ||
|
@@ -149,21 +149,14 @@ To build TiFlash for development: | |
|
||
```shell | ||
# In the TiFlash repository root: | ||
mkdir cmake-build-debug # The directory name can be customized | ||
cd cmake-build-debug | ||
|
||
cmake .. -GNinja -DCMAKE_BUILD_TYPE=DEBUG | ||
|
||
ninja tiflash | ||
cmake --workflow --preset dev | ||
``` | ||
|
||
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-17 \ | ||
-DCMAKE_CXX_COMPILER=/usr/bin/clang++-17 | ||
export CC="/usr/bin/clang-17" | ||
export CXX="/usr/bin/clang++-17" | ||
``` | ||
|
||
In MacOS, if you install llvm clang, you need to explicitly specify to use llvm clang. | ||
|
@@ -177,7 +170,12 @@ export CXX="/opt/homebrew/opt/llvm/bin/clang++" | |
|
||
Or use `CMAKE_C_COMPILER` and `CMAKE_CXX_COMPILER` to specify the compiler, like this: | ||
```shell | ||
mkdir cmake-build-debug | ||
cd cmake-build-debug | ||
|
||
cmake .. -GNinja -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_C_COMPILER=/opt/homebrew/opt/llvm/bin/clang -DCMAKE_CXX_COMPILER=/opt/homebrew/opt/llvm/bin/clang++ | ||
|
||
ninja tiflash | ||
``` | ||
|
||
After building, you can get TiFlash binary in `dbms/src/Server/tiflash` in the `cmake-build-debug` directory. | ||
|
@@ -270,11 +268,8 @@ cmake .. -GNinja -DCMAKE_BUILD_TYPE=DEBUG -DFOO=BAR | |
Unit tests are automatically enabled in debug profile. To build these unit tests: | ||
|
||
```shell | ||
cd cmake-build-debug | ||
cmake .. -GNinja -DCMAKE_BUILD_TYPE=DEBUG | ||
ninja gtests_dbms # Most TiFlash unit tests | ||
ninja gtests_libdaemon # Settings related tests | ||
ninja gtests_libcommon | ||
# In the TiFlash repository root: | ||
cmake --workflow --preset unit-tests-all | ||
``` | ||
|
||
Then, to run these unit tests: | ||
|
@@ -296,12 +291,7 @@ To build unit test executables with sanitizer enabled: | |
|
||
```shell | ||
# In the TiFlash repository root: | ||
mkdir cmake-build-sanitizer | ||
cd cmake-build-sanitizer | ||
cmake .. -GNinja -DENABLE_TESTS=ON -DCMAKE_BUILD_TYPE=ASan # or TSan | ||
ninja gtests_dbms | ||
ninja gtests_libdaemon | ||
ninja gtests_libcommon | ||
cmake --workflow --preset asan-tests-all # or tsan-tests-all | ||
``` | ||
|
||
There are known false positives reported from leak sanitizer (which is included in address sanitizer). To suppress these errors, set the following environment variables before running the executables: | ||
|
@@ -359,10 +349,7 @@ To build micro benchmark tests, you need release profile and tests enabled: | |
|
||
```shell | ||
# In the TiFlash repository root: | ||
mkdir cmake-build-release | ||
cd cmake-build-release | ||
cmake .. -GNinja -DCMAKE_BUILD_TYPE=RELEASE -DENABLE_TESTS=ON | ||
ninja bench_dbms | ||
cmake --workflow --preset benchmarks | ||
``` | ||
|
||
Then, to run these micro benchmarks: | ||
|
Submodule tiflash-proxy
updated
30 files
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
Oops, something went wrong.