[PATCH] D129512: [Driver] Don't use frame pointer on Fuchsia when optimizations are enabled
Petr Hosek via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 11 14:46:07 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG0ed8d8209584: [Driver] Don't use frame pointer on Fuchsia when optimizations are enabled (authored by phosek).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129512/new/
https://reviews.llvm.org/D129512
Files:
clang/lib/Driver/ToolChains/Clang.cpp
clang/test/Driver/fuchsia.c
Index: clang/test/Driver/fuchsia.c
===================================================================
--- clang/test/Driver/fuchsia.c
+++ clang/test/Driver/fuchsia.c
@@ -55,6 +55,18 @@
// CHECK-NOT: crtend.o
// CHECK-NOT: crtn.o
+// RUN: %clang -### %s --target=x86_64-unknown-fuchsia 2>&1 \
+// RUN: | FileCheck %s -check-prefix=CHECK-FP-ALL
+// RUN: %clang -### %s --target=aarch64-unknown-fuchsia 2>&1 \
+// RUN: | FileCheck %s -check-prefix=CHECK-FP-NONLEAF
+// RUN: %clang -### %s --target=x86_64-unknown-fuchsia -O3 2>&1 \
+// RUN: | FileCheck %s -check-prefix=CHECK-FP-NONE
+// RUN: %clang -### %s --target=aarch64-unknown-fuchsia -O3 2>&1 \
+// RUN: | FileCheck %s -check-prefix=CHECK-FP-NONE
+// CHECK-FP-ALL: "-mframe-pointer=all"
+// CHECK-FP-NONLEAF: "-mframe-pointer=non-leaf"
+// CHECK-FP-NONE: "-mframe-pointer=none"
+
// RUN: %clang -### %s --target=x86_64-unknown-fuchsia -rtlib=libgcc -fuse-ld=lld 2>&1 \
// RUN: | FileCheck %s -check-prefix=CHECK-RTLIB
// CHECK-RTLIB: error: invalid runtime library name in argument '-rtlib=libgcc'
Index: clang/lib/Driver/ToolChains/Clang.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Clang.cpp
+++ clang/lib/Driver/ToolChains/Clang.cpp
@@ -567,7 +567,7 @@
break;
}
- if (Triple.isOSNetBSD()) {
+ if (Triple.isOSFuchsia() || Triple.isOSNetBSD()) {
return !areOptimizationsEnabled(Args);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129512.443763.patch
Type: text/x-patch
Size: 1451 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220711/79bba0a5/attachment.bin>
More information about the cfe-commits
mailing list