Commit Graph

176 Commits

Author SHA1 Message Date
Ted Kremenek 32a59b2315 Do not automatically run the 'missing -dealloc' check until we have adequate time to make it much smarter (too much noise).
llvm-svn: 65474
2009-02-25 21:08:30 +00:00
Daniel Dunbar cdff38b1f6 ccc: Don't remove result files on error when -save-temps is present.
llvm-svn: 65349
2009-02-23 23:37:18 +00:00
Daniel Dunbar 9e5dfc6111 ccc: Remove unknown host warning, it was breaking gcc's configure.
llvm-svn: 65276
2009-02-22 08:15:14 +00:00
Daniel Dunbar f175ba1d17 ccc: Remove temporary files used in compilation, and remove
compilation results on failures.

llvm-svn: 65254
2009-02-22 01:23:52 +00:00
Daniel Dunbar e8f256c7f9 Unbreak Darwin PIC handling; my refactoring yesterday was bogus.
llvm-svn: 65154
2009-02-20 20:52:47 +00:00
Daniel Dunbar 6ef6a04dd6 Fix test case.
llvm-svn: 65139
2009-02-20 18:53:07 +00:00
Daniel Dunbar ba1c8f5a3c ccc: Spell mattr correctly.
llvm-svn: 65119
2009-02-20 07:47:48 +00:00
Daniel Dunbar e1889f935a ccc: Basic translation of gcc subtarget feature options to LLVM
options (i.e., -mno-red-zone, -msoft-float, -mno-sse, etc.)
 - Also, make sure unwind tables default to on Darwin/x86_64.
 - PR3604.

llvm-svn: 65118
2009-02-20 07:35:04 +00:00
Daniel Dunbar b9b440cde6 ccc: Use toolchain hook for default relocation model value.
llvm-svn: 65116
2009-02-20 06:48:26 +00:00
Daniel Dunbar 63e03cbe8c ccc: Use toolChain arch name instead of looking for arch command line
argument; the toolchain should always know the arch.
 - Fixes: <rdar://problem/6582911> -ccc-clang-archs doesn't work for excluding ppc

llvm-svn: 65104
2009-02-20 01:48:01 +00:00
Daniel Dunbar 1b84824f83 ccc: Store arch name in all toolchains.
- No functionality change.

llvm-svn: 65102
2009-02-20 01:36:35 +00:00
Daniel Dunbar 92cfae68e9 ccc: Give all tools access to the toolchain they are in.
- No functionality change.

llvm-svn: 65100
2009-02-20 01:30:38 +00:00
Daniel Dunbar 2a07da78c0 ccc: Give nicer error when spawning a subprocess fails.
llvm-svn: 65075
2009-02-19 22:59:57 +00:00
Daniel Dunbar a118a07157 ccc: Also look for .gch files when seeing if we should auto load a
token-cache for clang.

llvm-svn: 65069
2009-02-19 22:01:23 +00:00
Daniel Dunbar 5805c98526 ccc: Forward -ftime-report to clang.
llvm-svn: 64887
2009-02-18 05:01:43 +00:00
Daniel Dunbar 7b8b7492dd ccc: Pass -{MM,MMD,MF,MP,MT} to clang. Error on -{M,MM,MG,MQ} which
clang doesn't support yet.
 - See PR3603.

llvm-svn: 64783
2009-02-17 19:02:12 +00:00
Daniel Dunbar 89f908b883 ccc: Recognize -isystem.
llvm-svn: 64776
2009-02-17 18:10:48 +00:00
Daniel Dunbar ce96aea9ec ccc: Assume gcc will accept piped assembler input when using generic GCC toolchain.
llvm-svn: 64775
2009-02-17 18:10:15 +00:00
Daniel Dunbar 8ceb91f41b ccc: Fix a FIXME.
llvm-svn: 64774
2009-02-17 18:07:00 +00:00
Ted Kremenek b535181199 Static Analyzer driver/options (partial) cleanup:
- Move all analyzer options logic to AnalysisConsumer.cpp.
- Unified specification of stores/constraints/output to be:
   -analyzer-output=...
   -analyzer-store=...
   -analyzer-constraints=...
  instead of -analyzer-range-constraints, -analyzer-store-basic, etc.
- Updated drivers (ccc-analyzer, scan-builds, new ccc) to obey this new
  interface
- Updated test cases to conform to new driver options

llvm-svn: 64737
2009-02-17 04:27:41 +00:00
Daniel Dunbar 46414874a5 ccc: Pass -f[no-]math-errno to clang.
llvm-svn: 64709
2009-02-17 00:42:05 +00:00
Daniel Dunbar a1c37501ed ccc: @<filename> arguments are only treated specially if <filename>
exists, otherwise gcc just treats as an input.
 - PR3591

llvm-svn: 64640
2009-02-16 18:18:43 +00:00
Daniel Dunbar 87f7ba3541 ccc: Pass -P to clang.
llvm-svn: 64578
2009-02-15 05:59:37 +00:00
Douglas Gregor 69c7951c8e Add -ffreestanding to suppress the implicit declaration of library builtins like printf and malloc. Fixes PR3586
llvm-svn: 64566
2009-02-14 20:49:29 +00:00
Daniel Dunbar 72e90d7fb0 ccc: Suffix for PCH files is appended, not replaced. (Test case)
llvm-svn: 64467
2009-02-13 17:42:52 +00:00
Daniel Dunbar b903a072b1 ccc: Suffix for PCH files is appended, not replaced.
llvm-svn: 64466
2009-02-13 17:42:34 +00:00
Daniel Dunbar 7ae70391f0 ccc: Test case for transparent PTH support.
llvm-svn: 64420
2009-02-13 00:49:50 +00:00
Daniel Dunbar 391fc04b02 ccc: Stop patching output file name when using transparent PTH support.
<rdar://problem/6515236> [ccc] generate expected output files when used with PCH

llvm-svn: 64419
2009-02-13 00:49:01 +00:00
Daniel Dunbar e21993fa98 Always pass -disable-free to clang when compiling.
llvm-svn: 64416
2009-02-13 00:29:22 +00:00
Mike Stump f9cf4fa08c One more tweak to account for gluing together llvm and clang into one.
llvm-svn: 64276
2009-02-11 01:11:36 +00:00
Mike Stump 9d5d3b9de5 More version experimentation.
llvm-svn: 64271
2009-02-11 01:01:17 +00:00
Mike Stump 081e354f11 Run a little experiment with version numbers.
llvm-svn: 64268
2009-02-11 00:36:04 +00:00
Daniel Dunbar 8a1ca06456 ccc: -dM wasn't being passed to Darwin/CC1 correctly.
llvm-svn: 64169
2009-02-09 21:22:38 +00:00
Daniel Dunbar 1a5f04dc66 ccc: Forward -dM to clang.
llvm-svn: 63955
2009-02-06 19:26:48 +00:00
Daniel Dunbar 421d40c22b ccc/Darwin: Add a missing Darwin argument translation, -shared becomes
-dynamiclib. Re-audited translations to make sure I didn't miss
something else.

llvm-svn: 63953
2009-02-06 19:18:58 +00:00
Daniel Dunbar ba3325af7b ccc: Give explicit error on @ style argument lists (not yet supported).
llvm-svn: 63903
2009-02-06 01:28:59 +00:00
Daniel Dunbar 724167c280 ccc: Implement special language recognition handling for -.
- <rdar://problem/6551577> [ccc] require -x with -

llvm-svn: 63901
2009-02-05 23:44:44 +00:00
Daniel Dunbar e7dffe39ff ccc: Translate -O to -O1 for clang, and only pass last -O option.
llvm-svn: 63816
2009-02-05 02:43:38 +00:00
Daniel Dunbar ed9309ef46 ccc: Forward -femit-all-decls to clang and use an option group to
simplify handling of -f options clang recognizes.

llvm-svn: 63778
2009-02-04 21:21:08 +00:00
Daniel Dunbar 3ba943ed7a ccc: -ObjC and -ObjC++ change default language, but only for "source
files".

llvm-svn: 63727
2009-02-04 08:01:01 +00:00
Daniel Dunbar ed1ba4fc12 Use /usr/bin/env to run Python for increased portability. Patch by
David Chisnall.

llvm-svn: 63661
2009-02-03 21:25:26 +00:00
Mike Stump c99d003b25 Add -fno-blocks support. This fixes block-no-block-def.c.
llvm-svn: 63385
2009-01-30 08:22:07 +00:00
Daniel Dunbar 6d6d01f254 ccc: Forward -fobjc-nonfragile-abi to clang.
llvm-svn: 63378
2009-01-30 04:43:19 +00:00
Daniel Dunbar 3fc8ea64c9 ccc: Add -Xclang option, rename -WA, to -Xanalyzer.
- -Xclang always forwards to clang

 - -Xanalyzer replaces -WA,; it seems like the cleaner mechanism and
    is more readable.

llvm-svn: 63349
2009-01-30 00:24:16 +00:00
Daniel Dunbar b6e6a513c2 ccc: Mark -combine option as unsupported.
llvm-svn: 63348
2009-01-30 00:12:29 +00:00
Daniel Dunbar 711e882c1b ccc: Embrace destiny as a clang compiler driver.
This redoes the default mode that ccc runs in w.r.t. using clang. Now
ccc defaults to always using clang for any task clang can
handle. However, the following options exist to tweak this behavior:

 -ccc-no-clang: Don't use clang at all for compilation (still used for
  static analysis).
 
 -ccc-no-clang-cxx: Don't use clang for C++ and Objective-C++ inputs.

 -ccc-no-clang-cpp: Don't use clang as a preprocessor.

 -ccc-clang-archs <archs>: If present, only use clang for the given
  comma separated list of architectures. This only works on Darwin for
  now.

Note that all -ccc options must be first on the command line.

llvm-svn: 63346
2009-01-29 23:54:06 +00:00
Daniel Dunbar df49b7cf2f ccc: Honor -ccc-clang for generic GCC toolchain.
llvm-svn: 63277
2009-01-29 06:12:22 +00:00
Daniel Dunbar ad0d48d372 Fix test case (for -### printing version)
llvm-svn: 63223
2009-01-28 19:30:43 +00:00
Daniel Dunbar 36ccb30a35 ccc: Support -v; invent a version number for ccc for now, will be
shared with clang eventually.

llvm-svn: 63220
2009-01-28 19:26:20 +00:00
Daniel Dunbar f4a0cba545 ccc/Darwin/clang: Fix a mistranslation for the llvm-backend; llvm-gcc
doesn't set the relocation model when -mdynamic-no-pic is present.

llvm-svn: 63129
2009-01-27 20:42:58 +00:00