代码拉取完成,页面将自动刷新
同步操作将从 openEuler-RISC-V/clang 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。