!37 根据服务器版本适配clang17
From: @s-c-c Reviewed-by: @yukaii Signed-off-by: @yukaii
This commit is contained in:
commit
c9f1e11d2d
@ -71,7 +71,7 @@ index b7e1c45..e5d4d54 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
- libclang_rt_file = "${clang_base_path}/lib/clang/12.0.1/lib/${abi_target}/libclang_rt.builtins.a"
|
- libclang_rt_file = "${clang_base_path}/lib/clang/12.0.1/lib/${abi_target}/libclang_rt.builtins.a"
|
||||||
+ libclang_rt_file = "${clang_base_path}/lib/clang/15.0.7/lib/${abi_target}/libclang_rt.builtins.a"
|
+ libclang_rt_file = "${clang_base_path}/lib/clang/17.0.6/lib/${abi_target}/libclang_rt.builtins.a"
|
||||||
}
|
}
|
||||||
diff --git a/toolchain/gcc_toolchain.gni b/toolchain/gcc_toolchain.gni
|
diff --git a/toolchain/gcc_toolchain.gni b/toolchain/gcc_toolchain.gni
|
||||||
index 0c91ccf..6a68e42 100755
|
index 0c91ccf..6a68e42 100755
|
||||||
@ -95,7 +95,7 @@ index 1e95b63..7794e6f 100755
|
|||||||
if (is_clang) {
|
if (is_clang) {
|
||||||
# Clang compiler version. Clang files are placed at version-dependent paths.
|
# Clang compiler version. Clang files are placed at version-dependent paths.
|
||||||
- clang_version = "12.0.1"
|
- clang_version = "12.0.1"
|
||||||
+ clang_version = "15.0.7"
|
+ clang_version = "17.0.6"
|
||||||
}
|
}
|
||||||
use_custom_clang = true
|
use_custom_clang = true
|
||||||
}
|
}
|
||||||
|
|||||||
42
0028-change-clang-compiler-path.patch
Normal file
42
0028-change-clang-compiler-path.patch
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
From efc0ea7fc6de6853c2bc6157f1f8a66c671531e4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: heppen <hepeng68@huawei.com>
|
||||||
|
Date: Fri, 4 Aug 2023 11:45:16 +0800
|
||||||
|
Subject: [PATCH] change clang compiler path
|
||||||
|
|
||||||
|
---
|
||||||
|
config/clang/clang.gni | 4 ++--
|
||||||
|
toolchain/gcc_toolchain.gni | 2 +-
|
||||||
|
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/config/clang/clang.gni b/config/clang/clang.gni
|
||||||
|
index 9728e12..f00283c 100755
|
||||||
|
--- a/config/clang/clang.gni
|
||||||
|
+++ b/config/clang/clang.gni
|
||||||
|
@@ -4,9 +4,9 @@
|
||||||
|
|
||||||
|
import("//build/toolchain/toolchain.gni")
|
||||||
|
|
||||||
|
-default_clang_base_path = "/usr/lib64/llvm15/"
|
||||||
|
+default_clang_base_path = "/usr/"
|
||||||
|
clang_lib_path =
|
||||||
|
- "${default_clang_base_path}/lib/clang/15.0.7/lib"
|
||||||
|
+ "/usr/lib64"
|
||||||
|
|
||||||
|
declare_args() {
|
||||||
|
# Indicates if the build should use the Chrome-specific plugins for enforcing
|
||||||
|
diff --git a/toolchain/gcc_toolchain.gni b/toolchain/gcc_toolchain.gni
|
||||||
|
index 6a68e42..0c91ccf 100755
|
||||||
|
--- a/toolchain/gcc_toolchain.gni
|
||||||
|
+++ b/toolchain/gcc_toolchain.gni
|
||||||
|
@@ -585,7 +585,7 @@ template("clang_toolchain") {
|
||||||
|
|
||||||
|
gcc_toolchain(target_name) {
|
||||||
|
# prefix = rebase_path("$clang_base_path/bin", root_build_dir)
|
||||||
|
- prefix = "/usr/lib64/llvm15/bin"
|
||||||
|
+ prefix = "/usr/bin"
|
||||||
|
cc = "$prefix/clang"
|
||||||
|
cxx = "$prefix/clang++"
|
||||||
|
ld = cxx
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
29
0029-feat-adapt-for-llvm17.patch
Normal file
29
0029-feat-adapt-for-llvm17.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
From 46c7f9e5780634e091f5bbe399602641e254f438 Mon Sep 17 00:00:00 2001
|
||||||
|
From: yykk <yukai20@huawei.com>
|
||||||
|
Date: Fri, 26 Apr 2024 14:56:38 +0800
|
||||||
|
Subject: [PATCH] =?UTF-8?q?=E9=80=82=E9=85=8DLLVM17=EF=BC=8C=E5=88=A0?=
|
||||||
|
=?UTF-8?q?=E9=99=A4=E4=B8=8D=E6=94=AF=E6=8C=81=E7=9A=84=E5=8F=82=E6=95=B0?=
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
---
|
||||||
|
config/compiler/BUILD.gn | 2 --
|
||||||
|
1 file changed, 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/config/compiler/BUILD.gn b/config/compiler/BUILD.gn
|
||||||
|
index 0049dc0..6118cc2 100644
|
||||||
|
--- a/config/compiler/BUILD.gn
|
||||||
|
+++ b/config/compiler/BUILD.gn
|
||||||
|
@@ -734,8 +734,6 @@ config("compiler_cpu_abi") {
|
||||||
|
}
|
||||||
|
cflags += [
|
||||||
|
"-march=$arm_arch",
|
||||||
|
- "-mfloat-abi=$arm_float_abi",
|
||||||
|
- "-mfpu=$arm_fpu",
|
||||||
|
]
|
||||||
|
ldflags += [ "-march=$arm_arch" ]
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.38.1.windows.1
|
||||||
|
|
||||||
@ -2,11 +2,11 @@
|
|||||||
%global openHarmony_source_release OpenHarmony-v3.2-Release
|
%global openHarmony_source_release OpenHarmony-v3.2-Release
|
||||||
Name: distributed-build
|
Name: distributed-build
|
||||||
Version: 1.0.0
|
Version: 1.0.0
|
||||||
Release: 11
|
Release: 12
|
||||||
Summary: openEuler embedded softbus build tools
|
Summary: openEuler embedded softbus build tools
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
URL: https://gitee.com/openharmony/build
|
URL: https://gitee.com/openharmony/build
|
||||||
Requires: ninja-build, gn, clang15, llvm15, lld15, python, python-pyyaml, python-jinja2, distributed-build_lite
|
Requires: ninja-build, gn, clang, llvm, lld, python, python-pyyaml, python-jinja2, distributed-build_lite
|
||||||
Source0: https://gitee.com/openharmony/build/repository/archive/%{openHarmony_source_release}.tar.gz #/build-%{openHarmony_source_release}.tar.gz
|
Source0: https://gitee.com/openharmony/build/repository/archive/%{openHarmony_source_release}.tar.gz #/build-%{openHarmony_source_release}.tar.gz
|
||||||
Patch0001: 0001-feat-Adapt-to-Openeuler-python-export-lld.patch
|
Patch0001: 0001-feat-Adapt-to-Openeuler-python-export-lld.patch
|
||||||
Patch0002: 0002-feat-Adapt-to-Openeuler-for-compilation.patch
|
Patch0002: 0002-feat-Adapt-to-Openeuler-for-compilation.patch
|
||||||
@ -31,6 +31,8 @@ Patch0024: 0024-feat-for-embedded-add-linux_arm64-toolchain.patch
|
|||||||
Patch0025: 0025-feat-for-embedded-fix-sysroot-path.patch
|
Patch0025: 0025-feat-for-embedded-fix-sysroot-path.patch
|
||||||
Patch0026: 0026-feat-for-embedded-fix-jsoncpp-icu-zlib-sysroot.patch
|
Patch0026: 0026-feat-for-embedded-fix-jsoncpp-icu-zlib-sysroot.patch
|
||||||
Patch0027: 0027-feat-support-gn-upgrade.patch
|
Patch0027: 0027-feat-support-gn-upgrade.patch
|
||||||
|
Patch0028: 0028-change-clang-compiler-path.patch
|
||||||
|
Patch0029: 0029-feat-adapt-for-llvm17.patch
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -50,6 +52,9 @@ cp -rp %{_builddir}/build-%{openHarmony_source_release}/* %{buildroot}/opt/dist
|
|||||||
/opt/distributed-middleware-build
|
/opt/distributed-middleware-build
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Aug 31 2024 yukaii <yukai20@huawei.com> - 1.0.0-12
|
||||||
|
- Adapt for LLVM-17, remove invalid compilation parameters
|
||||||
|
|
||||||
* Mon Jul 29 2024 s_c_c <shichuchao@huawei.com> - 1.0.0-11
|
* Mon Jul 29 2024 s_c_c <shichuchao@huawei.com> - 1.0.0-11
|
||||||
- Remove set_sources_assignment_filter and delete some redundant patchs
|
- Remove set_sources_assignment_filter and delete some redundant patchs
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user