[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.
This commit is contained in:
Daniel Paoliello 2025-07-10 10:43:14 -07:00 committed by GitHub
parent dd1105bcea
commit c92d5dad67
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -44,8 +44,8 @@
// RUN: FileCheck --check-prefix=KEEP-NONE %s
// -pg -fomit-frame-pointer => error.
// RUN: not %clang -### -S -fomit-frame-pointer -pg %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-OMIT-FP-PG %s
// RUN: %clang -### -S -fomit-frame-pointer -fno-omit-frame-pointer -pg %s 2>&1 | FileCheck -check-prefix=CHECK-MIX-NO-OMIT-FP-PG %s
// RUN: not %clang -### --target=i386-linux -S -fomit-frame-pointer -pg %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-OMIT-FP-PG %s
// 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
// CHECK-NO-MIX-OMIT-FP-PG: '-fomit-frame-pointer' not allowed with '-pg'
// CHECK-MIX-NO-OMIT-FP-PG-NOT: '-fomit-frame-pointer' not allowed with '-pg'