Daniel Dunbar
b89c106114
ccc: Don't remove result files on error when -save-temps is present.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65349 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-23 23:37:18 +00:00
Daniel Dunbar
8e111c77e4
ccc: Remove unknown host warning, it was breaking gcc's configure.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65276 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-22 08:15:14 +00:00
Daniel Dunbar
9ff1c0784c
ccc: Remove temporary files used in compilation, and remove
...
compilation results on failures.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65254 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-22 01:23:52 +00:00
Daniel Dunbar
2b91d502a5
Unbreak Darwin PIC handling; my refactoring yesterday was bogus.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65154 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-20 20:52:47 +00:00
Daniel Dunbar
9876edc067
Fix test case.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65139 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-20 18:53:07 +00:00
Daniel Dunbar
3198be8ab5
ccc: Spell mattr correctly.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65119 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-20 07:47:48 +00:00
Daniel Dunbar
4311e4507a
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65118 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-20 07:35:04 +00:00
Daniel Dunbar
c4556d1151
ccc: Use toolchain hook for default relocation model value.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65116 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-20 06:48:26 +00:00
Daniel Dunbar
a805135a16
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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65104 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-20 01:48:01 +00:00
Daniel Dunbar
15423b066d
ccc: Store arch name in all toolchains.
...
- No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65102 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-20 01:36:35 +00:00
Daniel Dunbar
5e187a16f7
ccc: Give all tools access to the toolchain they are in.
...
- No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65100 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-20 01:30:38 +00:00
Daniel Dunbar
eeb44ce483
ccc: Give nicer error when spawning a subprocess fails.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65075 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-19 22:59:57 +00:00
Daniel Dunbar
f084663ed0
ccc: Also look for .gch files when seeing if we should auto load a
...
token-cache for clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65069 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-19 22:01:23 +00:00
Daniel Dunbar
00dbfde0d7
ccc: Forward -ftime-report to clang.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64887 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 05:01:43 +00:00
Daniel Dunbar
d563e52c37
ccc: Pass -{MM,MMD,MF,MP,MT} to clang. Error on -{M,MM,MG,MQ} which
...
clang doesn't support yet.
- See PR3603.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64783 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-17 19:02:12 +00:00
Daniel Dunbar
360c6ce217
ccc: Recognize -isystem.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64776 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-17 18:10:48 +00:00
Daniel Dunbar
48d0d61001
ccc: Assume gcc will accept piped assembler input when using generic GCC toolchain.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64775 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-17 18:10:15 +00:00
Daniel Dunbar
87a7b2833e
ccc: Fix a FIXME.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64774 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-17 18:07:00 +00:00
Ted Kremenek
be1fe1eb12
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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64737 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-17 04:27:41 +00:00
Daniel Dunbar
27a02acd23
ccc: Pass -f[no-]math-errno to clang.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64709 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-17 00:42:05 +00:00
Daniel Dunbar
83d67909f9
ccc: @<filename> arguments are only treated specially if <filename>
...
exists, otherwise gcc just treats as an input.
- PR3591
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64640 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-16 18:18:43 +00:00
Daniel Dunbar
41577f1130
ccc: Pass -P to clang.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64578 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-15 05:59:37 +00:00
Douglas Gregor
3573c0c0b4
Add -ffreestanding to suppress the implicit declaration of library builtins like printf and malloc. Fixes PR3586
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64566 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-14 20:49:29 +00:00
Daniel Dunbar
1ee821b0b9
ccc: Suffix for PCH files is appended, not replaced. (Test case)
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64467 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-13 17:42:52 +00:00
Daniel Dunbar
faa20c7f41
ccc: Suffix for PCH files is appended, not replaced.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64466 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-13 17:42:34 +00:00
Daniel Dunbar
501525eed4
ccc: Test case for transparent PTH support.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64420 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-13 00:49:50 +00:00
Daniel Dunbar
3d2b79020a
ccc: Stop patching output file name when using transparent PTH support.
...
<rdar://problem/6515236> [ccc] generate expected output files when used with PCH
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64419 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-13 00:49:01 +00:00
Daniel Dunbar
0a3e3caa15
Always pass -disable-free to clang when compiling.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64416 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-13 00:29:22 +00:00
Mike Stump
77a60115e3
One more tweak to account for gluing together llvm and clang into one.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64276 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-11 01:11:36 +00:00
Mike Stump
84606bb63f
More version experimentation.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64271 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-11 01:01:17 +00:00
Mike Stump
e6c4f65bd4
Run a little experiment with version numbers.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64268 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-11 00:36:04 +00:00
Daniel Dunbar
8aa6181260
ccc: -dM wasn't being passed to Darwin/CC1 correctly.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64169 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-09 21:22:38 +00:00
Daniel Dunbar
8425a0f7b5
ccc: Forward -dM to clang.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63955 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-06 19:26:48 +00:00
Daniel Dunbar
2ceb041eb3
ccc/Darwin: Add a missing Darwin argument translation, -shared becomes
...
-dynamiclib. Re-audited translations to make sure I didn't miss
something else.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63953 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-06 19:18:58 +00:00
Daniel Dunbar
5e83baaaaa
ccc: Give explicit error on @ style argument lists (not yet supported).
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63903 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-06 01:28:59 +00:00
Daniel Dunbar
bbd34e6658
ccc: Implement special language recognition handling for -.
...
- <rdar://problem/6551577> [ccc] require -x with -
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63901 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-05 23:44:44 +00:00
Daniel Dunbar
c1212a39e0
ccc: Translate -O to -O1 for clang, and only pass last -O option.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63816 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-05 02:43:38 +00:00
Daniel Dunbar
33244aa31d
ccc: Forward -femit-all-decls to clang and use an option group to
...
simplify handling of -f options clang recognizes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63778 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-04 21:21:08 +00:00
Daniel Dunbar
fb54849903
ccc: -ObjC and -ObjC++ change default language, but only for "source
...
files".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63727 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-04 08:01:01 +00:00
Daniel Dunbar
0eb59312c7
Use /usr/bin/env to run Python for increased portability. Patch by
...
David Chisnall.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63661 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 21:25:26 +00:00
Mike Stump
b55cc635f5
Add -fno-blocks support. This fixes block-no-block-def.c.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63385 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-30 08:22:07 +00:00
Daniel Dunbar
ba362f6478
ccc: Forward -fobjc-nonfragile-abi to clang.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63378 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-30 04:43:19 +00:00
Daniel Dunbar
6949ce44f8
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63349 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-30 00:24:16 +00:00
Daniel Dunbar
e4c0da8312
ccc: Mark -combine option as unsupported.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63348 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-30 00:12:29 +00:00
Daniel Dunbar
350b5d437e
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63346 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-29 23:54:06 +00:00
Daniel Dunbar
2d43e3bbd2
ccc: Honor -ccc-clang for generic GCC toolchain.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63277 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-29 06:12:22 +00:00
Daniel Dunbar
64134057d2
Fix test case (for -### printing version)
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63223 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-28 19:30:43 +00:00
Daniel Dunbar
76715913cd
ccc: Support -v; invent a version number for ccc for now, will be
...
shared with clang eventually.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63220 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-28 19:26:20 +00:00
Daniel Dunbar
6262cc40d8
ccc/Darwin/clang: Fix a mistranslation for the llvm-backend; llvm-gcc
...
doesn't set the relocation model when -mdynamic-no-pic is present.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63129 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-27 20:42:58 +00:00
Daniel Dunbar
bac51fa0fd
ccc: Normalize machine name to i386 for platforms which report the
...
machine as x86_64.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63122 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-27 19:29:51 +00:00