[clang] [SFrame][Retry] Add assembler option --gsframe (PR #165806)

Tarun Prabhu via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 3 07:43:23 PST 2025


================
@@ -0,0 +1,15 @@
+// RUN: %clang -### -c --target=x86_64 -Wa,--gsframe %s -Werror 2>&1 | FileCheck %s
+// CHECK:  "-cc1" {{.*}}"--gsframe"
+
+// RUN: %clang -### -c --target=x86_64 %s 2>&1 | FileCheck %s --check-prefix=NO
+// NO:     "-cc1"
+
+// RUN: %clang -### -c --target=x86_64 -Werror -Wa,--gsframe -x assembler %s -Werror 2>&1 | FileCheck %s --check-prefix=ASM
+// ASM:    "-cc1as" {{.*}}"--gsframe"
+
+// RUN: not %clang -### -c --target=mips64 -Wa,--gsframe %s 2>&1 | FileCheck %s --check-prefix=NOTARGETC
+// NOTARGETC: error: unsupported option '--gsframe' for target '{{.*}}'
+
+// RUN: not %clang -### -c --target=mips64 -Wa,--gsframe -x assembler %s 2>&1 | FileCheck %s --check-prefix=NOTARGETASM
+// NOTARGETASM: error: unsupported option '--gsframe' for target '{{.*}}'
----------------
tarunprabhu wrote:

Since this option is only available on `x86_64` and `aarch64`, it would be good to add some tests for the latter as well.

https://github.com/llvm/llvm-project/pull/165806


More information about the cfe-commits mailing list