Commit Graph

19 Commits

Author SHA1 Message Date
Bob Wilson 23a55f1eee Reapply "Change -save-temps to emit unoptimized bitcode files."
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
2014-12-21 07:00:00 +00:00
Reid Kleckner da0acc816c Revert "Change -save-temps to emit unoptimized bitcode files."
This reverts commit r224503.

It broke compilation of fortran through the Clang driver. Previously
`clang -c t.f` would invoke `gcc t.f` and `clang -cc1as`, but now it
tries to call `clang -cc1 t.f` which fails for obvious reasons.

llvm-svn: 224546
2014-12-18 23:07:04 +00:00
Bob Wilson f5ba8288ad Change -save-temps to emit unoptimized bitcode files.
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: 224503
2014-12-18 06:08:26 +00:00
Sebastian Pop 422377cfd3 rename -ccc-host-triple into -target
llvm-svn: 148582
2012-01-20 22:01:23 +00:00
Eli Friedman d749c6bf2e Revert r148138; it's causing test failures.
llvm-svn: 148141
2012-01-13 21:33:06 +00:00
Sebastian Pop 9a8d528ddf rename -ccc-host-triple into -target
llvm-svn: 148138
2012-01-13 20:37:02 +00:00
Daniel Dunbar 5618e98f33 Update tests to use %clang instead of 'clang', and forcibly disable use of '
clang ' or ' clang -cc1 ' or ' clang-cc ' in test lines (by substituting them to
garbage).

llvm-svn: 91460
2009-12-15 22:01:24 +00:00
Daniel Dunbar 34546ce43d Remove RUN: true lines.
llvm-svn: 86432
2009-11-08 01:47:25 +00:00
Daniel Dunbar 8b57697954 Eliminate &&s in tests.
- 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious.

llvm-svn: 86430
2009-11-08 01:45:36 +00:00
Sebastian Redl c6a9254f01 Convert some driver checks to FileCheck.
llvm-svn: 85133
2009-10-26 18:07:30 +00:00
Daniel Dunbar 36245c5a90 Rename clang-driver to clang.
Again, I tried to update cmake but it is untested.

llvm-svn: 67606
2009-03-24 03:07:05 +00:00
Eli Friedman bae2042bb5 Don't use &> in tests; dash doesn't understand it.
llvm-svn: 67483
2009-03-22 21:49:20 +00:00
Daniel Dunbar ea9f032613 ccc/Driver: .s defaults to 'assembler-with-cpp' on Darwin.
- <rdar://problem/6669441> ccc doesn't handle assembler-with-cpp
   semantics correctly (but clang supports it)

 - This is sad, because it requires a fairly useless target
   hook. C'est la vie.

llvm-svn: 67418
2009-03-20 23:39:23 +00:00
Daniel Dunbar ebfef240ae Test had extra line which was masking actual failures.
llvm-svn: 67130
2009-03-17 23:30:47 +00:00
Daniel Dunbar 8904d1adda Driver: Add test for pipelining for analyzer and precompiler.
llvm-svn: 67129
2009-03-17 23:26:35 +00:00
Daniel Dunbar 71bdee6ea1 Driver: Make sure to get the default arch name from the tool chain, not the
host; the toolchain may differ based on command line arguments.

llvm-svn: 67106
2009-03-17 21:29:52 +00:00
Daniel Dunbar c178c5f126 Driver: Desensitize test to location of input.
llvm-svn: 66950
2009-03-13 21:03:35 +00:00
Daniel Dunbar 192f4facac Driver: Test pipelining for universal builds.
llvm-svn: 66942
2009-03-13 20:45:03 +00:00
Daniel Dunbar c5a5ac5015 Driver: Fix '-x none' handling.
- Enough stuff works now we can test argument parsing & pipelining.

llvm-svn: 66913
2009-03-13 17:57:10 +00:00