summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Driver/Darwin: Pass -pie/-no_pie to the linker when -fpie/-fno-pie and friendsDaniel Dunbar2010-07-131-2/+9
| | | | | | are explicitly given. llvm-svn: 108297
* Introduce -f{no-}spell-checking options to enable/disableDouglas Gregor2010-07-091-0/+4
| | | | | | | spell-checking. By default, spell-checking is enabled for Clang (obviously) but disabled in CIndex for performance reasons. llvm-svn: 107992
* add driver support for minix, patch by Kees van ReeuwijkChris Lattner2010-07-071-29/+157
| | | | | | from PR7583 llvm-svn: 107788
* Driver/IRgen: Add support for -momit-leaf-frame-pointer.Daniel Dunbar2010-07-011-0/+5
| | | | llvm-svn: 107367
* Set the default arch based on the triple.Rafael Espindola2010-06-281-46/+55
| | | | llvm-svn: 107021
* Use softfp for linux gnueabi, keep the warning for everything else.Rafael Espindola2010-06-271-2/+9
| | | | llvm-svn: 106984
* Implement support for -fwrapv, rdar://7221421Chris Lattner2010-06-261-0/+1
| | | | | | | | | | | | 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
* Driver: Remove some dead code left around after a refactoring. Found by theDaniel Dunbar2010-06-221-10/+0
| | | | | | Clang static analyzer! llvm-svn: 106568
* implement support for -finstrument-functions, patch by NelsonChris Lattner2010-06-221-0/+2
| | | | | | Elhage! llvm-svn: 106507
* Change the test for which ABI/CC to use on ARM to be base on the environmentRafael Espindola2010-06-161-12/+5
| | | | | | (the last argument of the triple). llvm-svn: 106131
* Implement -fvisibility-inlines-hidden. <rdar://problem/7819834>Douglas Gregor2010-06-151-0/+2
| | | | llvm-svn: 106003
* Driver: Eliminate uses of Arg::getIndex.Daniel Dunbar2010-06-141-2/+3
| | | | | | Also, fix a memory leak. llvm-svn: 105963
* Driver: Fix arg_iterator typing to reflect that it is really an iterator ↵Daniel Dunbar2010-06-111-16/+16
| | | | | | over Arg*s. llvm-svn: 105838
* Add an option -fshow-overloads=best|all to limit the number of overloadJeffrey Yasskin2010-06-111-0/+3
| | | | | | | 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
* Implement -fcaret-diagnostics to undo -fno-caret-diagnostics.Jeffrey Yasskin2010-06-081-1/+5
| | | | llvm-svn: 105597
* Driver: Support invoking Clang on .ll or .bc inputs.Daniel Dunbar2010-06-071-10/+20
| | | | | | | | | | | | | | | - 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
* Driver: Change -dwarf-debug-flags option to pass the original command lineDaniel Dunbar2010-06-041-2/+7
| | | | | | arguments after translation, instead of the -cc1 level arguments. llvm-svn: 105476
* Driver/Darwin: Model dsymutil properly, as a separate action/tool kind which isDaniel Dunbar2010-06-041-42/+0
| | | | | | | 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
* Driver: Add an explicit dsymutil action.Daniel Dunbar2010-06-041-0/+20
| | | | llvm-svn: 105474
* Driver: Spell -relax-all correctly when calling the cc1as tool.Daniel Dunbar2010-05-281-1/+1
| | | | llvm-svn: 104955
* Driver: Update -O -> -O2 replacement for addition of -O0 option.Daniel Dunbar2010-05-271-1/+2
| | | | llvm-svn: 104823
* Driver: Add support for -m[no-]relax-all, and make it the default at -O0.Daniel Dunbar2010-05-271-0/+18
| | | | llvm-svn: 104815
* Daniel re-educated me about what Alias does and does not do. Turn that off forChandler Carruth2010-05-221-0/+8
| | | | | | | | '-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
* Driver: Add a tool definition for the Clang integrated assembler.Daniel Dunbar2010-05-201-0/+52
| | | | llvm-svn: 104280
* Expose -fobjc-nonfragile-abi2 as a top-level clang driver option. Fixes ↵Ted Kremenek2010-05-201-0/+5
| | | | | | <rdar://problem/8007063>. llvm-svn: 104205
* Driver: Make -fverbose-asm the default for platforms where the integratedDaniel Dunbar2010-05-141-1/+8
| | | | | | assembler defaults to on. llvm-svn: 103825
* Driver/Darwin/i386: Don't allow compiling C++ with -fapple-kext, we don't ↵Daniel Dunbar2010-05-121-1/+11
| | | | | | support the necessary ABI yet. llvm-svn: 103632
* Simplify.Daniel Dunbar2010-05-121-3/+3
| | | | llvm-svn: 103631
* Handle -ffunction-sections and -fdata-sections in the driver.Rafael Espindola2010-05-061-0/+3
| | | | llvm-svn: 103197
* Remove a dependency on Frontend headers in the Driver library. Also savesChandler Carruth2010-05-061-13/+8
| | | | | | | building and passing arguments to cc1 layer when setting values to their defaults. llvm-svn: 103162
* add a new -fdiagnostics-show-category=none/id/name option, giving controlChris Lattner2010-05-041-0/+6
| | | | | | | | | | | | 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
* Introduce a limit on the depth of the macro instantiation backtraceDouglas Gregor2010-05-041-1/+10
| | | | | | | | | | | | | | 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
* Do not enable '-analyze-check-security-syntactic' by default when using ↵Ted Kremenek2010-04-291-1/+3
| | | | | | | | '--analyze'. There are several known issues to address for it should be turned on by default. llvm-svn: 102664
* Driver: Add support for -fobjc-abi-version=.Daniel Dunbar2010-04-281-1/+13
| | | | | | - <rdar://problem/7919678> llvm-svn: 102559
* Simplify.Daniel Dunbar2010-04-271-4/+2
| | | | llvm-svn: 102432
* Add Driver support for -fno-constant-cfstrings.Daniel Dunbar2010-04-271-0/+8
| | | | llvm-svn: 102431
* NeXT: Clean up dispatch method policy selection.Daniel Dunbar2010-04-241-7/+11
| | | | | | | | | | - 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
* Simplify.Daniel Dunbar2010-04-241-6/+2
| | | | llvm-svn: 102254
* Introduce a limit on the depth of the template instantiation backtraceDouglas Gregor2010-04-201-0/+6
| | | | | | | | | | | | | | | | 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
* Add support for '-fgnu-keywords' and '-fasm' to Clang's driver. They are notChandler Carruth2010-04-171-0/+10
| | | | | | | | 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
* Driver: Add missing claim() for -mllvm options.Daniel Dunbar2010-04-171-0/+2
| | | | llvm-svn: 101618
* Tidy up comment.Daniel Dunbar2010-04-151-4/+3
| | | | llvm-svn: 101357
* Driver/Frontend: Add support for -mllvm, which forwards options to the LLVM ↵Daniel Dunbar2010-04-151-1/+11
| | | | | | | | 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
* add haiku support, patch by Paul Davey!Chris Lattner2010-04-111-0/+5
| | | | llvm-svn: 100982
* Driver: Ignore -fobjc-gc and -fobjc-gc-only for platforms which don't ↵Daniel Dunbar2010-04-101-2/+15
| | | | | | support them. llvm-svn: 100930
* Turn access control on by default in the driver.John McCall2010-04-091-2/+2
| | | | llvm-svn: 100882
* Turn access control on by default in -cc1.John McCall2010-04-091-4/+4
| | | | | | | | 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
* Remove caseless switch.Benjamin Kramer2010-04-081-7/+3
| | | | llvm-svn: 100770
* add a new driver-level -ferror-limit=412 option, which causes clang to stopChris Lattner2010-04-071-0/+6
| | | | | | | | | | | | | | | | | 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
* add support for -MQ flag to quote targets in dependency file,Chris Lattner2010-03-291-6/+52
| | | | | | PR6661, patch by Ori Avtalion! llvm-svn: 99821
OpenPOWER on IntegriCloud