Commit Graph

767 Commits

Author SHA1 Message Date
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