Sync https://gitee.com/openeuler/llvm-project/pulls/108 and https://gitee.com/openeuler/llvm-project/pulls/123
39 lines
2.1 KiB
Diff
39 lines
2.1 KiB
Diff
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
|
|
|