mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-10-20 18:56:17 +00:00
Update code base to use LLVM 21 (#434)
Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com> Co-authored-by: LJ <81748770+elle-j@users.noreply.github.com> Co-authored-by: xermicus <cyrill@parity.io>
This commit is contained in:
31 files changed
+318
-195
No files matched your search
@@ -82,10 +82,10 @@ Obtain a compatible build for your host platform from the release section of thi
|
||||
|
||||
Build artifacts end up in the `./target-llvm/gnu/target-final/` directory by default.
|
||||
The `gnu` directory depends on the supported archticture and will either be `gnu`, `musl` or `emscripten`.
|
||||
You now need to export the final target directory `$LLVM_SYS_181_PREFIX`:
|
||||
You now need to export the final target directory `$LLVM_SYS_211_PREFIX`:
|
||||
|
||||
```shell
|
||||
export LLVM_SYS_181_PREFIX=${PWD}/target-llvm/gnu/target-final
|
||||
export LLVM_SYS_211_PREFIX=${PWD}/target-llvm/gnu/target-final
|
||||
```
|
||||
|
||||
If built with the `--enable-tests` option, test tools will be in the `./target-llvm/gnu/build-final/` directory, along with copies of the build artifacts. For all supported build options, run `revive-llvm build --help`.
|
||||
|
||||
@@ -33,7 +33,7 @@ pub fn build(
|
||||
crate::utils::check_presence("lld")?;
|
||||
crate::utils::check_presence("ninja")?;
|
||||
|
||||
let musl_name = "musl-1.2.3";
|
||||
let musl_name = "musl-1.2.5";
|
||||
let musl_build = LLVMPath::musl_build(musl_name)?;
|
||||
let musl_target = LLVMPath::musl_target()?;
|
||||
|
||||
@@ -222,6 +222,7 @@ fn build_host(
|
||||
"-DCOMPILER_RT_BUILD_ORC='Off'",
|
||||
"-DCOMPILER_RT_DEFAULT_TARGET_ARCH='aarch64'",
|
||||
"-DCOMPILER_RT_DEFAULT_TARGET_ONLY='On'",
|
||||
"-DCMAKE_C_COMPILER_TARGET='aarch64-unknown-linux-musl'",
|
||||
])
|
||||
.args(crate::platforms::shared::SHARED_BUILD_OPTS)
|
||||
.args(crate::platforms::shared::shared_build_opts_ccache(
|
||||
@@ -294,6 +295,7 @@ fn build_target(
|
||||
"-G",
|
||||
"Ninja",
|
||||
"-DBUILD_SHARED_LIBS='Off'",
|
||||
"-DLLVM_USE_LINKER='lld'",
|
||||
"-DLINKER_SUPPORTS_COLOR_DIAGNOSTICS=0",
|
||||
format!(
|
||||
"-DCMAKE_INSTALL_PREFIX='{}'",
|
||||
|
||||
@@ -36,7 +36,7 @@ pub fn build(
|
||||
crate::utils::check_presence("lld")?;
|
||||
crate::utils::check_presence("ninja")?;
|
||||
|
||||
let musl_name = "musl-1.2.3";
|
||||
let musl_name = "musl-1.2.5";
|
||||
let musl_build = LLVMPath::musl_build(musl_name)?;
|
||||
let musl_target = LLVMPath::musl_target()?;
|
||||
|
||||
@@ -138,6 +138,8 @@ fn build_crt(
|
||||
"-DCOMPILER_RT_BUILD_PROFILE='Off'",
|
||||
"-DCOMPILER_RT_BUILD_MEMPROF='Off'",
|
||||
"-DCOMPILER_RT_BUILD_ORC='Off'",
|
||||
"-DCOMPILER_RT_DEFAULT_TARGET_ONLY='On'",
|
||||
"-DCMAKE_C_COMPILER_TARGET='x86_64-pc-linux-musl'",
|
||||
])
|
||||
.args(crate::platforms::shared::SHARED_BUILD_OPTS)
|
||||
.args(crate::platforms::shared::shared_build_opts_ccache(
|
||||
@@ -219,7 +221,6 @@ fn build_host(
|
||||
"-DCOMPILER_RT_BUILD_MEMPROF='Off'",
|
||||
"-DCOMPILER_RT_BUILD_ORC='Off'",
|
||||
"-DCOMPILER_RT_DEFAULT_TARGET_ARCH='x86_64'",
|
||||
"-DCOMPILER_RT_DEFAULT_TARGET_ONLY='On'",
|
||||
"-DLIBCLANG_BUILD_STATIC='On'",
|
||||
"-DBUILD_SHARED_LIBS='Off'",
|
||||
])
|
||||
@@ -294,6 +295,7 @@ fn build_target(
|
||||
"-DBUILD_SHARED_LIBS='Off'",
|
||||
"-DLIBCLANG_BUILD_STATIC='On'",
|
||||
"-DLLVM_BUILD_STATIC='On'",
|
||||
"-DLLVM_USE_LINKER='lld'",
|
||||
"-DLINKER_SUPPORTS_COLOR_DIAGNOSTICS=0",
|
||||
format!(
|
||||
"-DCMAKE_INSTALL_PREFIX='{}'",
|
||||
|
||||
Reference in new issue
Block a user