This reapplies r224503 along with a fix for compiling Fortran by having the clang driver invoke gcc (see r224546, where it was reverted). I have added a testcase for that as well. Original commit message: It is often convenient to use -save-temps to collect the intermediate results of a compilation, e.g., when triaging a bug report. Besides the temporary files for preprocessed source and assembly code, this adds the unoptimized bitcode files as well. This adds a new BackendJobAction, which is mostly mechanical, to run after the CompileJobAction. When not using -save-temps, the BackendJobAction is combined into one job with the CompileJobAction, similar to the way the integrated assembler is handled. I've implemented this entirely as a driver change, so under the hood, it is just using -disable-llvm-optzns to get the unoptimized bitcode. Based in part on a patch by Steven Wu. rdar://problem/18909437 llvm-svn: 224688
34 lines
1.6 KiB
C
34 lines
1.6 KiB
C
// Check that we verify debug output properly with multiple -arch options.
|
|
//
|
|
// RUN: %clang -target x86_64-apple-darwin10 -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-darwin10 -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-darwin10" - "darwin::Dsymutil", inputs: ["a.out"], output: "a.out.dSYM"
|
|
// CHECK-MULTIARCH-BINDINGS: # "x86_64-apple-darwin10" - "darwin::VerifyDebug", inputs: ["a.out.dSYM"], output: (nothing)
|
|
|
|
// Check output name derivation.
|
|
//
|
|
// RUN: %clang -target x86_64-apple-darwin10 -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-darwin10" - "darwin::Link", inputs: [{{.*}}], output: "foo"
|
|
// CHECK-OUTPUT-NAME: "x86_64-apple-darwin10" - "darwin::Dsymutil", inputs: ["foo"], output: "foo.dSYM"
|
|
// CHECK-OUTPUT-NAME: "x86_64-apple-darwin10" - "darwin::VerifyDebug", inputs: ["foo.dSYM"], output: (nothing)
|
|
|
|
// Check that we only verify when needed.
|
|
//
|
|
// RUN: touch %t.o
|
|
// RUN: %clang -target x86_64-apple-darwin10 -ccc-print-bindings \
|
|
// RUN: --verify-debug-info -o foo %t.o -g 2> %t
|
|
// RUN: not grep "Verify" %t
|