!110 [sync] PR-107: Ignored the -Wa,--generate-missing-build-notes= option
From: @openeuler-sync-bot Reviewed-by: @cf-zhao Signed-off-by: @cf-zhao
This commit is contained in:
commit
426dd73293
50
0013-Ignored-option-Wa-generate-missing-build-notes.patch
Normal file
50
0013-Ignored-option-Wa-generate-missing-build-notes.patch
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
From 2ce94f822eb951dcff23036f204a98900a4fb805 Mon Sep 17 00:00:00 2001
|
||||||
|
From: wangqiang <wangqiang1@kylinos.cn>
|
||||||
|
Date: Wed, 24 Apr 2024 11:21:02 +0800
|
||||||
|
Subject: [PATCH] Ignored option `-Wa,--generate-missing-build-notes=`
|
||||||
|
|
||||||
|
---
|
||||||
|
clang/lib/Driver/ToolChains/Clang.cpp | 6 ++++++
|
||||||
|
.../Driver/test-generate-missing-build-notes.cpp | 13 +++++++++++++
|
||||||
|
2 files changed, 19 insertions(+)
|
||||||
|
create mode 100644 clang/test/Driver/test-generate-missing-build-notes.cpp
|
||||||
|
|
||||||
|
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
|
||||||
|
index 6b5930990..704a32912 100644
|
||||||
|
--- a/clang/lib/Driver/ToolChains/Clang.cpp
|
||||||
|
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
|
||||||
|
@@ -2731,6 +2731,12 @@ static void CollectArgsForIntegratedAssembler(Compilation &C,
|
||||||
|
CmdArgs.push_back(Value.data());
|
||||||
|
} else if (Value == "--version") {
|
||||||
|
D.PrintVersion(C, llvm::outs());
|
||||||
|
+ #ifdef BUILD_FOR_OPENEULER
|
||||||
|
+ } else if (Value.startswith("--generate-missing-build-notes=") &&
|
||||||
|
+ Args.hasFlag(options::OPT_fgcc_compatible,
|
||||||
|
+ options::OPT_fno_gcc_compatible, false)) {
|
||||||
|
+ // Do nothing.
|
||||||
|
+ #endif
|
||||||
|
} else {
|
||||||
|
D.Diag(diag::err_drv_unsupported_option_argument)
|
||||||
|
<< A->getSpelling() << Value;
|
||||||
|
diff --git a/clang/test/Driver/test-generate-missing-build-notes.cpp b/clang/test/Driver/test-generate-missing-build-notes.cpp
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000..efd5251e6
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/clang/test/Driver/test-generate-missing-build-notes.cpp
|
||||||
|
@@ -0,0 +1,13 @@
|
||||||
|
+// REQUIRES: build_for_openeuler
|
||||||
|
+// RUN: %clang -### -fgcc-compatible -Wa,--generate-missing-build-notes=yes %s 2>&1 | FileCheck -check-prefix=CHECK-NO-ERROR %s
|
||||||
|
+// RUN: %clang -### -fgcc-compatible -Wa,--generate-missing-build-notes=no %s 2>&1 | FileCheck -check-prefix=CHECK-NO-ERROR %s
|
||||||
|
+// CHECK-NO-ERROR-NOT: --generate-missing-build-notes=
|
||||||
|
+// RUN: %clang -### -Wa,--generate-missing-build-notes=yes %s 2>&1 | FileCheck -check-prefix=CHECK-ERROR %s
|
||||||
|
+// RUN: %clang -### -Wa,--generate-missing-build-notes=no %s 2>&1 | FileCheck -check-prefix=CHECK-ERROR %s
|
||||||
|
+// RUN: %clang -### -fno-gcc-compatible -Wa,--generate-missing-build-notes=yes %s 2>&1 | FileCheck -check-prefix=CHECK-ERROR %s
|
||||||
|
+// RUN: %clang -### -fno-gcc-compatible -Wa,--generate-missing-build-notes=no %s 2>&1 | FileCheck -check-prefix=CHECK-ERROR %s
|
||||||
|
+// CHECK-ERROR: error: unsupported argument '--generate-missing-build-notes=
|
||||||
|
+
|
||||||
|
+int main() {
|
||||||
|
+ return 1;
|
||||||
|
+}
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
From 5721be433ddee5f60d4a9434df43a023f1ec4c0e Mon Sep 17 00:00:00 2001
|
||||||
|
From: wangqiang <wangqiang1@kylinos.cn>
|
||||||
|
Date: Sun, 28 Apr 2024 14:30:34 +0800
|
||||||
|
Subject: [PATCH] Update llvm-lit config to support build_for_openeuler
|
||||||
|
|
||||||
|
---
|
||||||
|
clang/test/lit.site.cfg.py.in | 1 +
|
||||||
|
1 files changed, 1 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/clang/test/lit.site.cfg.py.in b/clang/test/lit.site.cfg.py.in
|
||||||
|
index ef75770a2..ae5309180 100644
|
||||||
|
--- a/clang/test/lit.site.cfg.py.in
|
||||||
|
+++ b/clang/test/lit.site.cfg.py.in
|
||||||
|
@@ -42,6 +42,7 @@ config.llvm_external_lit = path(r"@LLVM_EXTERNAL_LIT@")
|
||||||
|
config.ppc_linux_default_ieeelongdouble = @PPC_LINUX_DEFAULT_IEEELONGDOUBLE@
|
||||||
|
config.have_llvm_driver = @LLVM_TOOL_LLVM_DRIVER_BUILD@
|
||||||
|
config.use_classic_flang = @LLVM_ENABLE_CLASSIC_FLANG@
|
||||||
|
+config.build_for_openeuler = @BUILD_FOR_OPENEULER@
|
||||||
|
|
||||||
|
import lit.llvm
|
||||||
|
lit.llvm.initialize(lit_config, config)
|
||||||
|
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
Name: %{pkg_name}
|
Name: %{pkg_name}
|
||||||
Version: %{clang_version}
|
Version: %{clang_version}
|
||||||
Release: 15
|
Release: 16
|
||||||
Summary: A C language family front-end for LLVM
|
Summary: A C language family front-end for LLVM
|
||||||
|
|
||||||
License: NCSA
|
License: NCSA
|
||||||
@ -58,6 +58,8 @@ Patch9: 0009-Backport-LoongArch-improve-the-support-for-compiler-rt-and-bugfix.
|
|||||||
Patch10: 0010-Backport-clang-Avoid-Wshadow-warning-when-init-capture-named.patch
|
Patch10: 0010-Backport-clang-Avoid-Wshadow-warning-when-init-capture-named.patch
|
||||||
Patch11: 0011-Add-the-support-for-classic-flang.patch
|
Patch11: 0011-Add-the-support-for-classic-flang.patch
|
||||||
Patch12: 0012-Fix-declaration-definition-mismatch-for-classic-flang.patch
|
Patch12: 0012-Fix-declaration-definition-mismatch-for-classic-flang.patch
|
||||||
|
Patch13: 0013-Ignored-option-Wa-generate-missing-build-notes.patch
|
||||||
|
Patch14: 0014-Update-llvm-lit-config-to-support-build_for_openeule.patch
|
||||||
|
|
||||||
# Patches for clang-tools-extra
|
# Patches for clang-tools-extra
|
||||||
# See https://reviews.llvm.org/D120301
|
# See https://reviews.llvm.org/D120301
|
||||||
@ -392,6 +394,9 @@ LD_LIBRARY_PATH=%{buildroot}/%{install_libdir} %{__ninja} check-all -C ./_build
|
|||||||
%{install_bindir}/git-clang-format
|
%{install_bindir}/git-clang-format
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Apr 29 2024 wangqiang <wangqiang1@kylinos.cn> - 17.0.6-16
|
||||||
|
- Ignored the `-Wa,--generate-missing-build-notes=` option, update llvm-lit config to support macro `build_for_openeuler`
|
||||||
|
|
||||||
* Wed Apr 17 2024 luofeng <luofeng13@huawei.com> -17.0.6-15
|
* Wed Apr 17 2024 luofeng <luofeng13@huawei.com> -17.0.6-15
|
||||||
- Add the support for classic flang
|
- Add the support for classic flang
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user