Commit Graph

9 Commits

Author SHA1 Message Date
Rafael Espindola e8025644b2 Produce an error when trying to link with -emit-llvm.
llvm-svn: 189193
2013-08-25 14:27:09 +00:00
Rafael Espindola 493f045e75 Don't imply -flto with -O4.
We now saturate at -O3.

llvm-svn: 189149
2013-08-23 21:49:00 +00:00
Shuxin Yang 9b49f22500 Fix grammar mistake.
Thank Richard Smith for figuring out this problem.

llvm-svn: 188408
2013-08-14 20:07:23 +00:00
Shuxin Yang 83930ac0b7 Do no use -emit-llvm for -flto.
Tested on multiple OSes.

llvm-svn: 188406
2013-08-14 19:45:49 +00:00
Daniel Dunbar 24e52992c0 Driver: Support invoking Clang on .ll or .bc inputs.
- We actually pretend that we have two separate types for LLVM assembly/bitcode because we need to use the standard suffixes with LTO ('clang -O4 -c t.c' should generate 't.o').

It is now possible to do something like:
  $ clang -emit-llvm -S t.c -o t.ll ... assorted other compile flags ...
  $ clang -c t.ll -o t.o ... assorted other compile flags ...
and expect that the output will be almost* identical to:
  $ clang -c t.c -o t.o ... assorted other compile flags ...
because all the target settings (default CPU, target features, etc.) will all be initialized properly by the driver/frontend.

*: This isn't perfect yet, because in practice we will end up running the optimization passes twice. It's possible to get something equivalent out with a well placed -mllvm -disable-llvm-optzns, but I'm still thinking about the cleanest way to solve this problem more generally.

llvm-svn: 105584
2010-06-07 23:28:45 +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
Daniel Dunbar 1386495406 Driver: Handle -flto, -O4, and tweak -emit-llvm to match llvm-gcc.
- -emit-llvm no longer changes what compilation steps are done.

 - -emit-llvm and -emit-llvm -S write output files with .o and .s
    suffixes, respectively.

 - <rdar://problem/6714125> clang-driver should support -O4 and -flto,
   like llvm-gcc

llvm-svn: 67645
2009-03-24 20:17:30 +00:00