Dawn Perchik
68bb1b441f
Add support for Borland extensions via option -fborland-extensions
...
(original patch r112791 was reverted due to a bug).
llvm-svn: 112915
2010-09-02 23:59:25 +00:00
Dawn Perchik
f0882f90f3
Reverting rev 112791 - apparently -fborland-extensions is on all the time?!
...
llvm-svn: 112797
2010-09-02 02:18:55 +00:00
Dawn Perchik
1fcc18c7bc
Add support for Borland extensions via option -fborland-extensions
...
llvm-svn: 112791
2010-09-02 01:12:01 +00:00
Daniel Dunbar
f241019e24
Driver/Darwin: Switch back to old toolchain, looks like new one isn't quite
...
ready yet.
llvm-svn: 112138
2010-08-26 01:41:44 +00:00
Daniel Dunbar
b8f7a14575
Driver: Fix thinko where I switched to always using the old toolchain, instead
...
of always using the new toolchain.
llvm-svn: 112125
2010-08-26 00:55:55 +00:00
Daniel Dunbar
e9f7151485
Driver/Darwin: Pass the right arch specific dir for ARM, when linking.
...
llvm-svn: 112124
2010-08-26 00:55:52 +00:00
Daniel Dunbar
d435275c59
Frontend: Add basic -H support.
...
- I didn't implement the GCC "multiple include guard" detection parts, because
it doesn't seem useful or obvious.
llvm-svn: 111983
2010-08-24 22:44:13 +00:00
Daniel Dunbar
fe6c97b443
Driver/Clang: Forward -Wa, and -Xassembler to clang -cc1 when using the
...
integrated assembler. For now this mostly just means that we will error out if
someone tries to use this mechanism to send an argument to the assembler.
llvm-svn: 111921
2010-08-24 16:47:49 +00:00
Daniel Dunbar
82eb4ce476
Driver: Move Clang "triple" computation routines to method on the
...
ToolChain. This fixes a potenial bad cast when running Clang on PPC code, since
the tool chain in effect is not a subclass of the Darwin one, but we were
treating it like it was.
- This introduces some gross code duplication, but the right fix for it is to
just move the Driver to start depending on the targets in libBasic, so I am
not planning on fixing it immediately.
llvm-svn: 111856
2010-08-23 22:35:37 +00:00
Daniel Dunbar
e31e323c02
Driver/Darwin: Switch to using simplified tool chain by default -- what better
...
way to see what will break! :)
llvm-svn: 111840
2010-08-23 20:58:55 +00:00
Daniel Dunbar
09a4851ead
Driver/Darwin: When using the simplified Clang toolchain, make sure to also pass
...
the arch specific gcc lib path.
llvm-svn: 111839
2010-08-23 20:58:52 +00:00
Daniel Dunbar
5d3b70a6fc
Driver: Update -ccc-install-dir to also set the installed dir. Totally
...
non-obvious.
llvm-svn: 111838
2010-08-23 20:58:50 +00:00
Chandler Carruth
6f33bd9345
Add two new enumerations to the unsupported list for Windows so that all cases
...
are handled.
llvm-svn: 111773
2010-08-22 06:56:37 +00:00
Michael J. Spencer
b186bc3c4b
Visual Studio tools used on win32 hosts when targeting win32.
...
llvm-svn: 111748
2010-08-21 21:55:07 +00:00
Douglas Gregor
eec975ce5a
Add machine-parseable Fix-It output as part of diagnostics, under the
...
flag -fdiagnostics-parseable-fixits, from Eelis van der Weegen!
llvm-svn: 111557
2010-08-19 20:24:43 +00:00
Daniel Dunbar
b613ffc1aa
Driver: Claim the -mlinker-version synthesized argument, it shouldn't be
...
reported as unused.
llvm-svn: 111310
2010-08-17 22:32:45 +00:00
David Chisnall
589a494352
Pass some things to the linker that gcc passes. -r is the only one of these that I'm sure about, but the others seem to be listed on FreeBSD by gcc -dumpspecs, so I hope they're right. Apparently -r is also not passed on GNU/Linux (and should be), but I can't see where the toolchain definition for this platform live.
...
llvm-svn: 111114
2010-08-15 22:58:12 +00:00
Daniel Dunbar
568b7500fe
Driver/OptParser: Add a NoForward flag to prevent forwarding certain options to
...
GCC.
- Mark -Xclang and -mlinker-version= with it for now, although I am sure there
are more.
llvm-svn: 111005
2010-08-13 04:44:20 +00:00
Daniel Dunbar
628fcf4e3b
Driver: Use the compile time linker version as the default for -mlinker-version,
...
if detected.
- This is a hack, we really want the linker version at execution time, but we
don't have any infrastructure for getting that. Yet.
llvm-svn: 110886
2010-08-12 00:05:12 +00:00
Argyrios Kyrtzidis
90bdfbbdf7
Switch on PCH for C++. C++ fans all over the world rejoice.
...
llvm-svn: 110879
2010-08-11 23:27:58 +00:00
Daniel Dunbar
cacb0e2d45
Driver/Darwin: Pass -demangle when linking, if the linker supports it.
...
llvm-svn: 110873
2010-08-11 23:07:50 +00:00
Daniel Dunbar
976a2f54fa
Driver: Add -mlinker-version=, which forwards to -target-linker-version.
...
llvm-svn: 110872
2010-08-11 23:07:47 +00:00
Ted Kremenek
0476899b20
Turn on idempotent operations checker when using --analyze.
...
llvm-svn: 110695
2010-08-10 18:03:13 +00:00
Daniel Dunbar
ce25f33e2a
Driver/FreeBSD: Infer the right arch name in the presence of -m32,-m64, for the
...
cases we care about.
- This is eventually going to be unified outside the host specific code.
llvm-svn: 110693
2010-08-10 17:39:05 +00:00
Rafael Espindola
92b0093112
Run the assembler instead of gcc on Linux.
...
llvm-svn: 110635
2010-08-10 00:25:48 +00:00
Eric Christopher
f387dbde81
Make -funroll-loops turn on loop unrolling in the optimizer instead
...
of just ignoring it.
llvm-svn: 110525
2010-08-07 23:08:14 +00:00
Daniel Dunbar
939c1211cc
Driver: Don't forward any -g options to GCC, when using it to drive the
...
assembler.
- Fixes PR6218, hopefully.
llvm-svn: 110111
2010-08-03 16:14:14 +00:00
Daniel Dunbar
71c723da29
Driver/Darwin: Change where Darwin computes the host version, to normalize tool
...
chain construction.
llvm-svn: 110028
2010-08-02 05:44:07 +00:00
Daniel Dunbar
a73a9845e2
Driver: Have -ccc-host-triple simply override the default in the driver, for
...
now.
llvm-svn: 110027
2010-08-02 05:44:04 +00:00
Daniel Dunbar
3ae26dfc91
Driver/Darwin: Inline some constants.
...
llvm-svn: 110026
2010-08-02 05:44:01 +00:00
Daniel Dunbar
a18a487633
Driver/FreeBSD: Change how FreeBSD derives the Lib32 variable, to normalize tool
...
chain construction.
llvm-svn: 110025
2010-08-02 05:43:59 +00:00
Daniel Dunbar
cc7df6cc7b
Driver: Move HostInfo::lookupTypeForExtension to ToolChain::LookupTypeForExtension.
...
llvm-svn: 110024
2010-08-02 05:43:56 +00:00
Daniel Dunbar
a36c2b3a62
Driver: Give Build{Universal,}Actions access to the default host tool chain. I
...
avoided this originally to enforce that the driver actions aren't toolchain
dependent, but it isn't worth the cumbersone additional hostinfo split.
llvm-svn: 110023
2010-08-02 05:43:51 +00:00
Daniel Dunbar
7fbaf53470
Driver: Add Compilation::addCommand and switch tools to using it, now that we
...
don't have to deal with nested jobs.
llvm-svn: 110015
2010-08-02 02:38:28 +00:00
Daniel Dunbar
b785d74080
Driver: Eliminate PipedJob, which is now unused.
...
llvm-svn: 110014
2010-08-02 02:38:25 +00:00
Daniel Dunbar
b440f56e53
Driver: Eliminate special InputInfo kind for pipes, it is now unused.
...
llvm-svn: 110013
2010-08-02 02:38:21 +00:00
Daniel Dunbar
bffefc015e
Driver: Eliminate now unnecessary tool hooks for whether they accept piped input/output.
...
llvm-svn: 110012
2010-08-02 02:38:18 +00:00
Daniel Dunbar
d00272f6d6
Driver: Simplify.
...
llvm-svn: 110011
2010-08-02 02:38:15 +00:00
Daniel Dunbar
c12a412cb6
Driver: Eliminate now unused argument.
...
llvm-svn: 110010
2010-08-02 02:38:12 +00:00
Daniel Dunbar
89f791e2c2
Driver: Simplify logic for sending 'clang -E t.c' output to stdout.
...
llvm-svn: 110009
2010-08-02 02:38:08 +00:00
Daniel Dunbar
a7dd15888b
Driver: Never try to use piped inputs.
...
llvm-svn: 110008
2010-08-02 02:38:06 +00:00
Daniel Dunbar
926f81fce5
Driver: Start ripping out support for -pipe, which is worthless and complicates
...
too many other things.
llvm-svn: 110007
2010-08-02 02:38:03 +00:00
Daniel Dunbar
ea3813fbc9
Driver/OpenBSD: Update toolchain for compiler changes / C++; patch by Jonathan
...
Gray.
llvm-svn: 109994
2010-08-01 23:13:54 +00:00
Daniel Dunbar
88979914d7
Driver: Keep track of a separate "install dir", which is the path where clang
...
was invoked from (which may not be where the executable itself is).
- This allows having e.g., /Developer/usr/bin/clang be a symlink to some other
location, while still making sure the Driver finds 'as', 'ld', etc. relative
to itself.
llvm-svn: 109989
2010-08-01 22:29:51 +00:00
Daniel Dunbar
6d48476446
Driver/Darwin: Set -force_cpusubtype_ALL only by default on x86.
...
llvm-svn: 109074
2010-07-22 01:47:22 +00:00
Daniel Dunbar
a66a4d10ae
Driver/Darwin: Always allow blocks on Darwin, so that users can conditionally
...
use blocks even when targetting older systems (using runtime checks and weak
linking).
llvm-svn: 109072
2010-07-22 00:40:31 +00:00
Rafael Espindola
38360b3ff7
Add -lstdc++ to DragonFly tools.
...
Patch by Sascha Wildner.
llvm-svn: 108830
2010-07-20 12:59:03 +00:00
Daniel Dunbar
99b5524324
Driver: Make -fnext-runtime the default when rewriting Objective-C.
...
llvm-svn: 108741
2010-07-19 19:44:22 +00:00
Daniel Dunbar
354e96df95
Driver/Darwin: Add deployment target after doing argument translation, so that
...
-mmacosx-version-min works inside a -Xarch_ flag.
llvm-svn: 108712
2010-07-19 17:11:36 +00:00
Daniel Dunbar
b2b8a91aa4
Driver: Factor out Darwin::AddDeploymentTarget.
...
llvm-svn: 108711
2010-07-19 17:11:33 +00:00
Daniel Dunbar
e38764c66c
Driver: Change the driver to take the path to the main executable, instead of
...
taking it in pieces.
- Fixes a problem where the Clang executable path was not initialized properly
on Win32, because sys::Path::getBasename() doesn't do what I always think it
does. Imagine that, a sys::Path interface that is confusing!
llvm-svn: 108667
2010-07-19 00:44:04 +00:00
Daniel Dunbar
b31b76f1eb
Driver: Fix a possible use after free.
...
llvm-svn: 108659
2010-07-18 21:16:15 +00:00
Chris Lattner
ad4f38b1a9
BUILD_ARCHIVE is the default for libraries, no need to set it.
...
llvm-svn: 108633
2010-07-18 00:14:47 +00:00
Daniel Dunbar
b2447154e0
Driver/Darwin: Resolve deployment target defaulting to be more predictable;
...
assume we are targetting OS X unless an explicit option is given.
llvm-svn: 108426
2010-07-15 16:18:06 +00:00
Daniel Dunbar
9765b9817d
Driver: When re'execing clang, use path to the main executable instead of
...
looking up Clang in the normal search paths (which may end up finding the wrong
clang).
llvm-svn: 108346
2010-07-14 18:46:27 +00:00
Daniel Dunbar
9c3ed5f4d0
Driver: Remove some unused arguments.
...
llvm-svn: 108345
2010-07-14 18:46:23 +00:00
Daniel Dunbar
af68a88e68
Driver/Darwin: Pass -pie/-no_pie to the linker when -fpie/-fno-pie and friends
...
are explicitly given.
llvm-svn: 108297
2010-07-13 23:31:40 +00:00
Douglas Gregor
8ed0c0b99d
Introduce -f{no-}spell-checking options to enable/disable
...
spell-checking. By default, spell-checking is enabled for Clang
(obviously) but disabled in CIndex for performance reasons.
llvm-svn: 107992
2010-07-09 17:35:33 +00:00
Chris Lattner
3e2ee147d0
add driver support for minix, patch by Kees van Reeuwijk
...
from PR7583
llvm-svn: 107788
2010-07-07 16:01:42 +00:00
Daniel Dunbar
bb7ac52e02
Driver/IRgen: Add support for -momit-leaf-frame-pointer.
...
llvm-svn: 107367
2010-07-01 01:31:45 +00:00
Daniel Dunbar
9dcde4bdec
Driver/Darwin: Add one -L for the DarwinClang toolchain to point into the gcc
...
library directory, as we still rely on a few libraries that are hiding there (in
particular libstdc++.dylib).
llvm-svn: 107353
2010-06-30 23:56:13 +00:00
Daniel Dunbar
00d3d8e902
Driver/Darwin: Only run dsymutil when we are also compiling/assembling as part
...
of the compilation.
- <rdar://problem/8141387> clang is always invoking dsymutil
llvm-svn: 107149
2010-06-29 16:38:33 +00:00
Rafael Espindola
0e1fb4f341
Set the default arch based on the triple.
...
llvm-svn: 107021
2010-06-28 17:18:09 +00:00
Rafael Espindola
b1ef8ffb15
Use softfp for linux gnueabi, keep the warning for everything else.
...
llvm-svn: 106984
2010-06-27 18:29:21 +00:00
Chris Lattner
51924e517b
Implement support for -fwrapv, rdar://7221421
...
As part of this, pull together trapv handling into the same enum.
This also add support for NSW multiplies.
This also makes PCH disagreement on overflow behavior silent, since it
really doesn't matter except for warnings and codegen (no macros get
defined etc).
llvm-svn: 106956
2010-06-26 21:25:03 +00:00
Daniel Dunbar
a99a3c108f
Driver: Add make variable to allow disabling default integrated assembler, till
...
all the kinks are worked out.
llvm-svn: 106641
2010-06-23 18:15:13 +00:00
Douglas Gregor
769ba3e50c
Make c++ and C++ valid extensions for C++ source files, from Seth Cantrell!
...
llvm-svn: 106602
2010-06-22 23:43:22 +00:00
Daniel Dunbar
a91c0ba88a
Driver: Remove some dead code left around after a refactoring. Found by the
...
Clang static analyzer!
llvm-svn: 106568
2010-06-22 20:18:18 +00:00
Chris Lattner
3c77a355e0
implement support for -finstrument-functions, patch by Nelson
...
Elhage!
llvm-svn: 106507
2010-06-22 00:03:40 +00:00
Alexis Hunt
c675ec09f0
Update CMake build for new attribute changes.
...
llvm-svn: 106188
2010-06-17 00:37:02 +00:00
Rafael Espindola
23a8a06554
Change the test for which ABI/CC to use on ARM to be base on the environment
...
(the last argument of the triple).
llvm-svn: 106131
2010-06-16 19:01:17 +00:00
Daniel Dunbar
7c995e8fac
Frontend: Allow passing -cc1 level arguments to plugins. Patch by Troy Straszheim!
...
llvm-svn: 106113
2010-06-16 16:59:23 +00:00
Daniel Dunbar
3648ba756f
Driver: Support -Wp,-MMD,FOO, which I found an instance of. :(
...
llvm-svn: 106039
2010-06-15 20:30:18 +00:00
Douglas Gregor
0832963acd
Implement -fvisibility-inlines-hidden. <rdar://problem/7819834>
...
llvm-svn: 106003
2010-06-15 17:05:35 +00:00
Daniel Dunbar
e9c5e2cc71
Driver/FreeBSD: Add libexec to program search paths, to workaround some build
...
problem; patch by Ed Schouten.
llvm-svn: 105996
2010-06-15 15:03:31 +00:00
Daniel Dunbar
5a9d1835be
Driver: Fix PR4062 by dissecting one particular -Wp, form.
...
llvm-svn: 105966
2010-06-14 21:37:09 +00:00
Daniel Dunbar
fb3d747fc6
Driver: Dissect -Wl, and -Xlinker arguments to remove --no-demangle, which was a
...
collect2 option that is passed by some projects (notably WebKit).
llvm-svn: 105964
2010-06-14 21:23:12 +00:00
Daniel Dunbar
3f1a1ffd95
Driver: Eliminate uses of Arg::getIndex.
...
Also, fix a memory leak.
llvm-svn: 105963
2010-06-14 21:23:08 +00:00
Daniel Dunbar
5714fc5e8b
Driver: Fix refacto in DerivedArgList::MakeSeparateArg.
...
llvm-svn: 105958
2010-06-14 20:20:44 +00:00
Daniel Dunbar
2d6e9ee033
Driver: Add DerivedArgList::AddFOOArg helper functions, and switch to using them.
...
llvm-svn: 105957
2010-06-14 20:20:41 +00:00
Daniel Dunbar
af8decbde0
Driver: Switch Compilation to return the translated arguments by default.
...
llvm-svn: 105844
2010-06-11 22:43:38 +00:00
Daniel Dunbar
775d406043
Driver: Add an explicit argument translation phase to the driver itself. We are going to need this to handle things like -Xassembler, -Xpreprocessor, and -Xlinker which we might have to introspect.
...
llvm-svn: 105842
2010-06-11 22:00:26 +00:00
Daniel Dunbar
5c5d30b03a
Driver: Get rid of the proxy support in DerivedArgList.
...
llvm-svn: 105841
2010-06-11 22:00:22 +00:00
Daniel Dunbar
18974bdc68
Fix a couple comments.
...
llvm-svn: 105840
2010-06-11 22:00:19 +00:00
Daniel Dunbar
7c9e4306af
Driver: Change OptTable::ParseArg to take any ArgList.
...
llvm-svn: 105839
2010-06-11 22:00:17 +00:00
Daniel Dunbar
a442fd5da6
Driver: Fix arg_iterator typing to reflect that it is really an iterator over Arg*s.
...
llvm-svn: 105838
2010-06-11 22:00:13 +00:00
Jeffrey Yasskin
2b99c6fc4f
Add an option -fshow-overloads=best|all to limit the number of overload
...
candidates printed. We default to 'all'. At the moment, 'best' prints only
the first 4 overloads, but we'll improve that over time.
llvm-svn: 105815
2010-06-11 05:57:47 +00:00
Daniel Dunbar
bfe71f2416
Driver: Change Option parsing to always create arguments referring to unaliased
...
options.
- This matches the intent of the .td files, and will simplify alias handling.
- PR7321.
llvm-svn: 105763
2010-06-09 22:44:34 +00:00
Daniel Dunbar
35cbfeba8f
Driver: Eliminate Arg subclasses, which are now unnecessary.
...
llvm-svn: 105762
2010-06-09 22:31:08 +00:00
Daniel Dunbar
8b77f73314
Driver: Keep the rendering style in the option, instead of as part of the Arg.
...
llvm-svn: 105761
2010-06-09 22:31:04 +00:00
Daniel Dunbar
8f1ebabaf7
Driver: Change Arg to just hold the values directly, instead of implicitly
...
deriving them from the Arg type.
llvm-svn: 105760
2010-06-09 22:31:00 +00:00
Daniel Dunbar
c656d3e111
Revert "Driver: Change Option parsing to always create arguments referring to
...
unaliased", this isn't quite right yet.
llvm-svn: 105747
2010-06-09 19:27:07 +00:00
Daniel Dunbar
aea0620b89
Driver: Change Option parsing to always create arguments referring to unaliased
...
options.
- This matches the intent of the .td files, and will simplify alias handling.
- PR7321.
llvm-svn: 105744
2010-06-09 19:19:01 +00:00
Daniel Dunbar
26a95c6717
Driver: Add an explicit offset to JoinedArg and JoinedAndSeparateArg, so that
...
they can be independent of the exact option that created them.
llvm-svn: 105739
2010-06-09 18:49:38 +00:00
Daniel Dunbar
d96e279f02
Driver: Change Arg::render methods to use option name instead of string where
...
possible.
llvm-svn: 105738
2010-06-09 18:49:31 +00:00
Daniel Dunbar
ee6b692551
Makefiles: Set Clang CPP compiler flags in a single location, instead of scattered throughout the project Makefiles.
...
llvm-svn: 105638
2010-06-08 20:44:43 +00:00
Daniel Dunbar
e6c1daa8fd
Makefile: Switch Clang Makefiles to always include the top-level Clang Makefile.
...
- This eliminates most dependencies on how Clang is installed relative to LLVM.
llvm-svn: 105637
2010-06-08 20:34:18 +00:00
Jeffrey Yasskin
460aa54d0a
Implement -fcaret-diagnostics to undo -fno-caret-diagnostics.
...
llvm-svn: 105597
2010-06-08 04:56:20 +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
7f3d95054b
Driver: Change -dwarf-debug-flags option to pass the original command line
...
arguments after translation, instead of the -cc1 level arguments.
llvm-svn: 105476
2010-06-04 18:47:06 +00:00
Daniel Dunbar
6beaf5110f
Driver/Darwin: Model dsymutil properly, as a separate action/tool kind which is
...
added as the last output step, instead of just hacking it into the link step.
- Among other things, this fixes dSYM generation when using multiple -arch options.
llvm-svn: 105475
2010-06-04 18:28:41 +00:00
Daniel Dunbar
8829962030
Driver: Add an explicit dsymutil action.
...
llvm-svn: 105474
2010-06-04 18:28:36 +00:00
Daniel Dunbar
99ca8b71cd
Driver: Spell -relax-all correctly when calling the cc1as tool.
...
llvm-svn: 104955
2010-05-28 16:43:21 +00:00
Daniel Dunbar
9296f63ff0
Driver: Update -O -> -O2 replacement for addition of -O0 option.
...
llvm-svn: 104823
2010-05-27 06:51:08 +00:00
Daniel Dunbar
06e2cc3f86
Driver: Add support for -m[no-]relax-all, and make it the default at -O0.
...
llvm-svn: 104815
2010-05-27 06:18:05 +00:00
Daniel Dunbar
bd3b1d40da
Attempt to make MSVC happy.
...
llvm-svn: 104432
2010-05-22 05:05:12 +00:00
Chandler Carruth
e039148801
Daniel re-educated me about what Alias does and does not do. Turn that off for
...
'-fasm' and explicitly map from that flag to -fgnu-keywords in the driver. Turn
off the driver in the lexer test for this madness and add a test to the driver
that the translation actually works.
llvm-svn: 104428
2010-05-22 02:21:53 +00:00
Daniel Dunbar
07494795e5
Driver: When printing a "command was signalled" type of diagnostic, use the
...
short name of the tool in use, instead of the name of the action that created
the command. The practical impact is we now get:
clang: error: clang frontend command failed due to signal 6 (use -v to see invocation)
instead of:
clang: error: assembler command failed due to signal 6 (use -v to see invocation)
when clang crashes on a job that uses the integrated assembler.
llvm-svn: 104417
2010-05-22 00:37:20 +00:00
Daniel Dunbar
1cb532ca28
Driver: Add Tool::ShortName, intended to be a human readable name for the tool.
...
llvm-svn: 104416
2010-05-22 00:37:18 +00:00
Benjamin Kramer
71b0bb9922
Try to fix MSVC build.
...
llvm-svn: 104371
2010-05-21 19:58:44 +00:00
Daniel Dunbar
6232d347bc
Driver: Switch to using the integrated assembler for standalone assembly jobs
...
(or -save-temps), when the integrated assembler is enabled.
llvm-svn: 104282
2010-05-20 21:48:38 +00:00
Daniel Dunbar
4f5e79c67d
Driver: Add a tool definition for the Clang integrated assembler.
...
llvm-svn: 104280
2010-05-20 21:30:13 +00:00
Daniel Dunbar
2fcaa549a8
Driver/MC: Add 'clang -cc1as' integrated assembler tool, currently accepts approximately the same interface as 'llvm-mc'.
...
llvm-svn: 104239
2010-05-20 17:49:16 +00:00
Daniel Dunbar
3730048129
Driver: Move some argument lookup utilities into driver::ArgList.
...
llvm-svn: 104237
2010-05-20 16:54:55 +00:00
Ted Kremenek
bd7b3ccbf8
Expose -fobjc-nonfragile-abi2 as a top-level clang driver option. Fixes <rdar://problem/8007063>.
...
llvm-svn: 104205
2010-05-20 02:12:37 +00:00
Daniel Dunbar
0d8ca9e91a
Driver: Make -fverbose-asm the default for platforms where the integrated
...
assembler defaults to on.
llvm-svn: 103825
2010-05-14 22:00:22 +00:00
Daniel Dunbar
f9ff35010c
Driver: Enable -integrated-as by default, at least for Darwin/x86 without -static.
...
- How else will we figure out what is broken, eh?
llvm-svn: 103759
2010-05-14 02:03:00 +00:00
Daniel Dunbar
fcc49a8f1f
Driver/Darwin/i386: Don't allow compiling C++ with -fapple-kext, we don't support the necessary ABI yet.
...
llvm-svn: 103632
2010-05-12 18:19:58 +00:00
Daniel Dunbar
4083d044e1
Simplify.
...
llvm-svn: 103631
2010-05-12 18:19:55 +00:00
Duncan Sands
af260b9945
VISIBILITY_HIDDEN was renamed LLVM_LIBRARY_VISIBILITY.
...
llvm-svn: 103494
2010-05-11 20:16:05 +00:00
Rafael Espindola
66bfb27545
Handle -ffunction-sections and -fdata-sections in the driver.
...
llvm-svn: 103197
2010-05-06 21:06:04 +00:00
Chandler Carruth
a77a72734c
Remove a dependency on Frontend headers in the Driver library. Also saves
...
building and passing arguments to cc1 layer when setting values to their
defaults.
llvm-svn: 103162
2010-05-06 04:55:18 +00:00
Chris Lattner
86ed5b016a
add a new --print-diagnostic-categories option, which causes the driver to
...
print out all of the category numbers with their description. This is useful
for clients that want to map the numbers produced by
--fdiagnostics-show-category=id to their human readable string form. The
output is simple but utilitarian:
$ clang --print-diagnostic-categories
1,Format String
2,Something Else
This implements rdar://7928193
llvm-svn: 103080
2010-05-05 05:53:24 +00:00
Chris Lattner
bf6fac8415
add a new -fdiagnostics-show-category=none/id/name option, giving control
...
over choice of:
t.c:3:11: warning: conversion specifies type 'char *' but the argument has type 'int' [-Wformat]
t.c:3:11: warning: conversion specifies type 'char *' but the argument has type 'int' [-Wformat,1]
t.c:3:11: warning: conversion specifies type 'char *' but the argument has type 'int' [-Wformat,Format String]
dox to come.
llvm-svn: 103056
2010-05-04 21:55:25 +00:00
Douglas Gregor
cd121fb013
Introduce a limit on the depth of the macro instantiation backtrace
...
printed in a diagnostic, similar to the limit we already have on the
depth of the template instantiation backtrace. The macro instantiation
backtrace is limited to 10 "instantiated from:" diagnostics; when it's
longer than that, we'll show the first half, then say how many were
suppressed, then show the second half. The limit can be changed with
-fmacro-instantiation-limit=N, and turned off with N=0.
This eliminates a lot of note spew with libraries making use of the
Boost.Preprocess library.
llvm-svn: 103014
2010-05-04 17:13:42 +00:00
Ted Kremenek
d8a23f988d
Do not enable '-analyze-check-security-syntactic' by default when using '--analyze'. There
...
are several known issues to address for it should be turned on by default.
llvm-svn: 102664
2010-04-29 22:50:22 +00:00
Daniel Dunbar
12c82080a2
Driver: Add support for -fobjc-abi-version=.
...
- <rdar://problem/7919678>
llvm-svn: 102559
2010-04-28 23:25:24 +00:00
Daniel Dunbar
2cb4e7a872
Simplify.
...
llvm-svn: 102432
2010-04-27 15:35:03 +00:00
Daniel Dunbar
34d7a99062
Add Driver support for -fno-constant-cfstrings.
...
llvm-svn: 102431
2010-04-27 15:34:57 +00:00
Daniel Dunbar
df3d1c2d1f
Driver/Darwin: Fix Objective-C non-fragile ABI and dispatch method defaults, which were wrong in numerous places.
...
- <rdar://problem/7903449>
llvm-svn: 102257
2010-04-24 18:37:41 +00:00
Daniel Dunbar
fca18c1b41
NeXT: Clean up dispatch method policy selection.
...
- Replace -cc1 level -fobjc-legacy-dispatch with -fobjc-dispatch-method={legacy,non-legacy,mixed}.
- Lift "mixed" vs "non-mixed" policy choice up to driver level, instead of being buried in CGObjCMac.cpp.
- No intended functionality change.
llvm-svn: 102255
2010-04-24 17:56:46 +00:00
Daniel Dunbar
db059592fe
Simplify.
...
llvm-svn: 102254
2010-04-24 17:56:39 +00:00
Douglas Gregor
ffed1cb339
Introduce a limit on the depth of the template instantiation backtrace
...
we will print with each error that occurs during template
instantiation. When the backtrace is longer than that, we will print
N/2 of the innermost backtrace entries and N/2 of the outermost
backtrace entries, then skip the middle entries with a note such as:
note: suppressed 2 template instantiation contexts; use
-ftemplate-backtrace-limit=N to change the number of template
instantiation entries shown
This should eliminate some excessively long backtraces that aren't
providing any value.
llvm-svn: 101882
2010-04-20 07:18:24 +00:00
Chandler Carruth
e03aa55bfd
Add support for '-fgnu-keywords' and '-fasm' to Clang's driver. They are not
...
implemented precisely the same as GCC, but the distinction GCC makes isn't
useful to represent. This allows parsing code which uses GCC-specific keywords
('asm', etc.) without parsing in a fully GNU mode.
llvm-svn: 101667
2010-04-17 20:17:31 +00:00
Daniel Dunbar
88534f4201
Driver: Add missing claim() for -mllvm options.
...
llvm-svn: 101618
2010-04-17 06:10:00 +00:00
Daniel Dunbar
3e0cac6f20
Tidy up comment.
...
llvm-svn: 101357
2010-04-15 06:18:42 +00:00
Daniel Dunbar
76fa840d09
Driver/Frontend: Add support for -mllvm, which forwards options to the LLVM option parser.
...
- Note that this is a behavior change, previously -mllvm at the driver level forwarded to clang -cc1. The driver does a little magic to make sure that '-mllvm -disable-llvm-optzns' works correctly, but other users will need to be updated to use -Xclang.
llvm-svn: 101354
2010-04-15 06:09:03 +00:00
Chris Lattner
b986aba6db
add haiku support, patch by Paul Davey!
...
llvm-svn: 100982
2010-04-11 19:29:39 +00:00
Daniel Dunbar
06ef31c8b1
Driver: Only add extra -L paths on darwin if they exist. Unfortunately, this
...
means it isn't really possible to write the test case for this code, but this is
the kind of thing that really requires testing against the installed compiler
anyway.
llvm-svn: 100935
2010-04-10 18:18:57 +00:00
Daniel Dunbar
16334e143f
Driver: Ignore -fobjc-gc and -fobjc-gc-only for platforms which don't support them.
...
llvm-svn: 100930
2010-04-10 16:20:23 +00:00
Daniel Dunbar
4364558956
Driver/Darwin/x86: When linking, incorporate -L paths based on the path where
...
Clang is installed. This is designed to match gcc, and is important when
installed in a non-standard location.
- This is gross, but no worse than ever. It will die when we finally move to
the compiler-rt based toolchain, any day now.
llvm-svn: 100915
2010-04-10 01:24:22 +00:00
John McCall
dfea9989ef
Turn access control on by default in the driver.
...
llvm-svn: 100882
2010-04-09 19:12:06 +00:00
John McCall
3155f573f5
Turn access control on by default in -cc1.
...
Remove -faccess-control from -cc1; add -fno-access-control.
Make the driver pass -fno-access-control by default.
Update a bunch of tests to be correct under access control.
llvm-svn: 100880
2010-04-09 19:03:51 +00:00
Benjamin Kramer
f41ccef5eb
Remove caseless switch.
...
llvm-svn: 100770
2010-04-08 15:44:22 +00:00
Chris Lattner
b35583df52
add a new driver-level -ferror-limit=412 option, which causes clang to stop
...
emitting diagnostics after it has produced that many errors. Give this a
default value of 20 which produces plenty of errors for people to fix before
recompiling but not so many that their entire console scrolls away when the
compiler gets confused. The experience looks like this:
$ clang foo.c
<tons of crap>
foo.c:102:3: error: unknown type name 'somethingbad'
somethingbad x;
^
fatal error: too many errors emitted, stopping now
36 warnings and 20 errors generated.
llvm-svn: 100689
2010-04-07 20:49:23 +00:00
Daniel Dunbar
3d45e17d15
Driver: Add a Tool::hasGoodDiagnostics hook, and use it to simplify logic for
...
deciding when we need to emit an extra "command failed" diagnostic.
- This also fixes the case where we were emitting that extra diagnostics, even
when using clang w/ the integrated assembler, which has good diagnostics.
llvm-svn: 100529
2010-04-06 17:07:49 +00:00
Daniel Dunbar
e43887bd2b
Driver: Add support for a CLANGXX_IS_PRODUCTION build variable, which enable
...
Clang++ support, even in "Production" mode (for testing purposes).
llvm-svn: 100119
2010-04-01 18:21:41 +00:00
Chris Lattner
bf2803fb20
add support for -MQ flag to quote targets in dependency file,
...
PR6661, patch by Ori Avtalion!
llvm-svn: 99821
2010-03-29 17:55:58 +00:00
Daniel Dunbar
9abbebedc8
Driver/Darwin: Support CCC_ENABLE_NEW_DARWIN_TOOLCHAIN as an environment
...
override to enable use of the DarwinClang tool chain on all platforms (not just
ARM).
llvm-svn: 99660
2010-03-26 22:41:03 +00:00
Douglas Gregor
64b046fce4
Implement support for -nostdc++. Fixes PR6446.
...
llvm-svn: 99417
2010-03-24 20:13:48 +00:00