[clang] [clang] Enable crash reproducers when multiple -arch flags are involved (PR #197600)
Volodymyr Sapsai via cfe-commits
cfe-commits at lists.llvm.org
Fri May 15 12:59:36 PDT 2026
================
@@ -0,0 +1,86 @@
+// RUN: rm -rf %t
+// RUN: mkdir %t
+
+// Verify that crash diagnostics are generated for just the crashing arch when
+// multiple -arch options are present, rather than bailing out entirely.
+
+// RUN: env CLANG_CRASH_DIAGNOSTICS_DIR=%t \
+// RUN: not %crash_opt %clang %s -arch arm64 -arch arm64e -arch x86_64 -fsyntax-only -DCRASH_x86_64 2>&1 | \
+// RUN: FileCheck --check-prefix=CHECK %s
+// RUN: cat %t/crash-report-*.sh | FileCheck --check-prefix=CHECKSH-x86_64 %s
+// RUN: rm -f %t/crash-report-*
+
+// RUN: env CLANG_CRASH_DIAGNOSTICS_DIR=%t \
+// RUN: not %crash_opt %clang %s -arch arm64 -arch arm64e -arch x86_64 -fsyntax-only -DCRASH_arm64 2>&1 | \
+// RUN: FileCheck --check-prefix=CHECK %s
+// RUN: cat %t/crash-report-*.sh | FileCheck --check-prefix=CHECKSH-arm64 %s
+// RUN: rm -f %t/crash-report-*
+
+// RUN: env CLANG_CRASH_DIAGNOSTICS_DIR=%t \
+// RUN: not %crash_opt %clang %s -arch arm64 -arch arm64e -arch x86_64 -fsyntax-only -DCRASH_arm64e 2>&1 | \
+// RUN: FileCheck --check-prefix=CHECK %s
+// RUN: cat %t/crash-report-*.sh | FileCheck --check-prefix=CHECKSH-arm64e %s
+// RUN: rm -f %t/crash-report-*
+
+// If multiple arches crash, capture the reproducer for the first one.
+// one in the list.
----------------
vsapsai wrote:
Weird wording "the first one. one in the list"
Guess it is the result of previous editing.
https://github.com/llvm/llvm-project/pull/197600
More information about the cfe-commits
mailing list