134 Star 2 Fork 57

src-openEuler/clang

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0027-Driver-fix-compile-error-for-fGNU-compatibility.patch 2.08 KB
一键复制 编辑 原始数据 按行查看 历史
eastb233 提交于 2024-11-21 15:38 . Add option -fGNU-compatibility
From 82d51aca563c40c84b70c0e295a9561d3dd4092b Mon Sep 17 00:00:00 2001
From: jianghaibo <jianghaibo9@huawei.com>
Date: Wed, 20 Nov 2024 16:13:04 +0800
Subject: [PATCH] [Driver] fix compile error for -fGNU-compatibility
---
clang/include/clang/Driver/Options.td | 2 +-
clang/test/Driver/test-generate-missing-build-notes.cpp | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td
index ccf395dad35a..c109d7a8fcab 100644
--- a/clang/include/clang/Driver/Options.td
+++ b/clang/include/clang/Driver/Options.td
@@ -1819,7 +1819,7 @@ def fgcc_compatible : Flag<["-"], "fgcc-compatible">,
Flags<[CC1Option]>,
MarshallingInfoFlag<DiagnosticOpts<"GccCompatible">>,
HelpText<"Enable gcc compatibility for openEuler.">;
-def : Flag["-"], "fGNU-compatibility">,
+def fGNU_compatibility : Flag<["-"], "fGNU-compatibility">,
Flags<[CC1Option]>, Alias<fgcc_compatible>,
HelpText<"Alias for -fgcc_compatible">;
def fno_gcc_compatible : Flag<["-"], "fno-gcc-compatible">, Flags<[CC1Option]>;
diff --git a/clang/test/Driver/test-generate-missing-build-notes.cpp b/clang/test/Driver/test-generate-missing-build-notes.cpp
index efd5251e6a1c..54ac4c66a5b0 100644
--- a/clang/test/Driver/test-generate-missing-build-notes.cpp
+++ b/clang/test/Driver/test-generate-missing-build-notes.cpp
@@ -1,6 +1,7 @@
// 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
+// RUN: %clang -### -fGNU-compatibility -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
--
2.38.1.windows.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/clang.git
git@gitee.com:src-openeuler/clang.git
src-openeuler
clang
clang
master

搜索帮助