llvm-project/clang/test/Driver/darwin-verify-debug.c
Louis Dionne 65d83ba343 [clang][Darwin] Re-apply "Always set the default C++ Standard Library to libc++"
Newer SDKs don't even provide libstdc++ headers, so it's effectively
never valid to build for libstdc++ unless the user explicitly asks
for it (in which case they will need to provide include paths and more).

This is a re-application of c5ccb78ade81 which had been reverted in
33171df9cc7f because it broke the Fuchsia CI bots. The issue was that
the test was XPASSing because it didn't fail anymore when the
CLANG_DEFAULT_CXX_LIB was set to libc++, which seems to be done for
Fuchsia. Instead, the test only fails if CLANG_DEFAULT_CXX_LIB is
set to libstdc++.

As a fly-by fix, also adjust the triple used by various tests to
something that is supported. Those tests were shown to fail on
internal bots.

Differential Revision: https://reviews.llvm.org/D131274
2022-08-16 09:27:18 -04:00

34 lines
1.6 KiB
C

// Check that we verify debug output properly with multiple -arch options.
//
// RUN: %clang -target x86_64-apple-darwin11 -ccc-print-phases \
// RUN: --verify-debug-info -arch i386 -arch x86_64 %s -g 2> %t
// RUN: FileCheck -check-prefix=CHECK-MULTIARCH-ACTIONS < %t %s
//
// CHECK-MULTIARCH-ACTIONS: 0: input, "{{.*}}darwin-verify-debug.c", c
// CHECK-MULTIARCH-ACTIONS: 9: dsymutil, {8}, dSYM
// CHECK-MULTIARCH-ACTIONS: 10: verify-debug-info, {9}, none
//
// RUN: %clang -target x86_64-apple-darwin11 -ccc-print-bindings \
// RUN: --verify-debug-info -arch i386 -arch x86_64 %s -g 2> %t
// RUN: FileCheck -check-prefix=CHECK-MULTIARCH-BINDINGS < %t %s
//
// CHECK-MULTIARCH-BINDINGS: # "x86_64-apple-darwin11" - "darwin::Dsymutil", inputs: ["a.out"], output: "a.out.dSYM"
// CHECK-MULTIARCH-BINDINGS: # "x86_64-apple-darwin11" - "darwin::VerifyDebug", inputs: ["a.out.dSYM"], output: (nothing)
// Check output name derivation.
//
// RUN: %clang -target x86_64-apple-darwin11 -ccc-print-bindings \
// RUN: --verify-debug-info -o foo %s -g 2> %t
// RUN: FileCheck -check-prefix=CHECK-OUTPUT-NAME < %t %s
//
// CHECK-OUTPUT-NAME: "x86_64-apple-darwin11" - "darwin::Linker", inputs: [{{.*}}], output: "foo"
// CHECK-OUTPUT-NAME: "x86_64-apple-darwin11" - "darwin::Dsymutil", inputs: ["foo"], output: "foo.dSYM"
// CHECK-OUTPUT-NAME: "x86_64-apple-darwin11" - "darwin::VerifyDebug", inputs: ["foo.dSYM"], output: (nothing)
// Check that we only verify when needed.
//
// RUN: touch %t.o
// RUN: %clang -target x86_64-apple-darwin11 -ccc-print-bindings \
// RUN: --verify-debug-info -o foo %t.o -g 2> %t
// RUN: not grep "Verify" %t