Skip to content

Commit c92d5da

Browse files
authored
[clang] Use a specific target when testing that -fomit-frame-pointer and -pg are mutually exclusive (#148000)
Some targets, such as `aarch64-pc-windows-msvc`, always require that Frame Pointer be reserved even when `-fomit-frame-pointer` is provided, thus it is always valid to use `-pg` on those targets. This test didn't take these targets into account; thus it was failing on Arm64 Windows host machines. The fix is to explicitly set a target that doesn't require Frame Pointers reservation.
1 parent dd1105b commit c92d5da

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/test/Driver/frame-pointer-elim.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
// RUN: FileCheck --check-prefix=KEEP-NONE %s
4545

4646
// -pg -fomit-frame-pointer => error.
47-
// RUN: not %clang -### -S -fomit-frame-pointer -pg %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-OMIT-FP-PG %s
48-
// RUN: %clang -### -S -fomit-frame-pointer -fno-omit-frame-pointer -pg %s 2>&1 | FileCheck -check-prefix=CHECK-MIX-NO-OMIT-FP-PG %s
47+
// RUN: not %clang -### --target=i386-linux -S -fomit-frame-pointer -pg %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-OMIT-FP-PG %s
48+
// RUN: %clang -### --target=i386-linux -S -fomit-frame-pointer -fno-omit-frame-pointer -pg %s 2>&1 | FileCheck -check-prefix=CHECK-MIX-NO-OMIT-FP-PG %s
4949
// CHECK-NO-MIX-OMIT-FP-PG: '-fomit-frame-pointer' not allowed with '-pg'
5050
// CHECK-MIX-NO-OMIT-FP-PG-NOT: '-fomit-frame-pointer' not allowed with '-pg'
5151

0 commit comments

Comments
 (0)