summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Driver.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Driver: Change the driver to take the path to the main executable, instead ofDaniel Dunbar2010-07-191-7/+6
| | | | | | | | | 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
* Driver: When re'execing clang, use path to the main executable instead ofDaniel Dunbar2010-07-141-0/+5
| | | | | | | looking up Clang in the normal search paths (which may end up finding the wrong clang). llvm-svn: 108346
* add driver support for minix, patch by Kees van ReeuwijkChris Lattner2010-07-071-0/+2
| | | | | | from PR7583 llvm-svn: 107788
* Driver/Darwin: Only run dsymutil when we are also compiling/assembling as partDaniel Dunbar2010-06-291-5/+19
| | | | | | | of the compilation. - <rdar://problem/8141387> clang is always invoking dsymutil llvm-svn: 107149
* Driver: Support -Wp,-MMD,FOO, which I found an instance of. :(Daniel Dunbar2010-06-151-3/+7
| | | | llvm-svn: 106039
* Driver: Fix PR4062 by dissecting one particular -Wp, form.Daniel Dunbar2010-06-141-6/+19
| | | | llvm-svn: 105966
* Driver: Dissect -Wl, and -Xlinker arguments to remove --no-demangle, which was aDaniel Dunbar2010-06-141-3/+27
| | | | | | collect2 option that is passed by some projects (notably WebKit). llvm-svn: 105964
* Driver: Switch Compilation to return the translated arguments by default.Daniel Dunbar2010-06-111-1/+1
| | | | llvm-svn: 105844
* Driver: Add an explicit argument translation phase to the driver itself. We ↵Daniel Dunbar2010-06-111-1/+15
| | | | | | are going to need this to handle things like -Xassembler, -Xpreprocessor, and -Xlinker which we might have to introspect. llvm-svn: 105842
* Fix a couple comments.Daniel Dunbar2010-06-111-3/+1
| | | | llvm-svn: 105840
* Driver: Eliminate Arg subclasses, which are now unnecessary.Daniel Dunbar2010-06-091-1/+1
| | | | llvm-svn: 105762
* Driver: Support invoking Clang on .ll or .bc inputs.Daniel Dunbar2010-06-071-3/+3
| | | | | | | | | | | | | | | - 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/Darwin: Model dsymutil properly, as a separate action/tool kind which isDaniel Dunbar2010-06-041-3/+30
| | | | | | | 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: When printing a "command was signalled" type of diagnostic, use theDaniel Dunbar2010-05-221-19/+22
| | | | | | | | | | | 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
* Driver: Enable -integrated-as by default, at least for Darwin/x86 without ↵Daniel Dunbar2010-05-141-2/+9
| | | | | | | | -static. - How else will we figure out what is broken, eh? llvm-svn: 103759
* add a new --print-diagnostic-categories option, which causes the driver toChris Lattner2010-05-051-0/+13
| | | | | | | | | | | | | | | 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
* Driver: Add a Tool::hasGoodDiagnostics hook, and use it to simplify logic forDaniel Dunbar2010-04-061-5/+1
| | | | | | | | 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
* Driver: Add support for a CLANGXX_IS_PRODUCTION build variable, which enableDaniel Dunbar2010-04-011-2/+4
| | | | | | Clang++ support, even in "Production" mode (for testing purposes). llvm-svn: 100119
* Add very limited support for GCC's '-B' flag. This allows us to support unusualChandler Carruth2010-03-221-0/+20
| | | | | | toolchain configurations and is a small step toward FreeBSD support. llvm-svn: 99159
* Driver: Support CC_PRINT_OPTIONS, used for logging the compile commands (in ↵Daniel Dunbar2010-03-201-4/+4
| | | | | | -v style) to a file. llvm-svn: 99054
* Driver: Free Action objects.Daniel Dunbar2010-03-111-1/+4
| | | | llvm-svn: 98263
* add TCE target support, patch by Pekka J!Chris Lattner2010-03-041-0/+4
| | | | llvm-svn: 97746
* Driver: Allow driver title (for --help) to be overridden by clients.Daniel Dunbar2010-02-251-2/+3
| | | | llvm-svn: 97106
* PR5803: clang++: Treat untyped 'C' inputs as C++.Daniel Dunbar2010-02-171-0/+11
| | | | | | | - Patch by Andrzej K. Haczewski, with a tweak by me to emit a 'deprecated' diagnostic when we do this. We'll see what zee users say. llvm-svn: 96511
* Driver: Add -rewrite-objc, which is an interface to clang -cc1 -rewrite-objc.Daniel Dunbar2010-02-111-2/+7
| | | | llvm-svn: 95849
* Driver: Fix infinite loop and wrong message on invalid -ccc-clang-arch argument.Daniel Dunbar2010-02-111-4/+2
| | | | llvm-svn: 95848
* Driver: Add -[no-]integrated-as for clang.Daniel Dunbar2010-02-031-14/+41
| | | | | | | | | | | | | | | | | | | | - Requires backend support, which only exists for i386--darwin currently. No 'as' required: -- ddunbar@ozzy:tmp$ cat t.c int main() { return 42; } ddunbar@ozzy:tmp$ clang -m32 -integrated-as t.c ddunbar@ozzy:tmp$ ./a.out; echo $? 42 ddunbar@ozzy:tmp$ -- The random extra whitespace is how you know its working! :) llvm-svn: 95194
* ASTUnit: Don't check that input files exist when parsing ASTs from the commandDaniel Dunbar2010-01-251-6/+5
| | | | | | | line -- they may be remapped (fake) files. This is useful for testing parsing entirely from memory. llvm-svn: 94395
* Rename getClangFullVendorVersion() to getClangFullVersion().Ted Kremenek2010-01-231-1/+1
| | | | llvm-svn: 94273
* Move version string generation (e.g., "clang 1.1 ...") to ↵Ted Kremenek2010-01-221-7/+1
| | | | | | libBasic/Version.cpp, getClangFullVendorVersion(). llvm-svn: 94235
* (1) Rename getClangSubversionRevision() to getClangRevision(), andTed Kremenek2010-01-221-3/+1
| | | | | | | | | | | | | | | | | have it return a StringRef instead of an integer (to be more VCS agnostic). (2) Add getClangFullRepositoryVersion(), which contains an amalgamation of the repository name and the revision. (3) Change PCH to only emit the string returned by getClangFullRepositoryVersion() instead of also emitting the value of getClangSubversionRevision() (which has been removed). This is functionally equivalent. More cleanup to version string generation pending... llvm-svn: 94231
* Rename getClangSubversionPath() -> getClangRepositoryPath() and have it ↵Ted Kremenek2010-01-221-1/+1
| | | | | | return a StringRef. llvm-svn: 94213
* Driver: Lift clang resource directory computation to the Driver object.Daniel Dunbar2010-01-201-0/+8
| | | | llvm-svn: 93971
* Fix possible memory leak by using an OwningPtr.Ted Kremenek2010-01-191-5/+5
| | | | llvm-svn: 93834
* Remove some dead variables clang-analyzer found.Benjamin Kramer2009-12-251-5/+1
| | | | llvm-svn: 92162
* Driver: Fix '... -O4 -O0 ...', which was generating bitcode.Daniel Dunbar2009-12-231-2/+5
| | | | llvm-svn: 91962
* Driver: When linking, don't warn about unused arguments which are obviously onlyDaniel Dunbar2009-12-221-0/+5
| | | | | | | | used during compilation. - There is no easy way to define this group properly, unfortunately, and maybe this is a losing strategy. For now this is unambiguous more friendly, though. llvm-svn: 91940
* Remove several .c_str() to be forward-compatible with StringRef.Jeffrey Yasskin2009-12-081-3/+3
| | | | llvm-svn: 90822
* Shorten the help test for -no-canonical-prefixes, put it behind HelpHidden andRafael Espindola2009-12-071-0/+3
| | | | | | claim it in Driver.cpp instead of Tools.cpp. llvm-svn: 90777
* Unbreak -ccc-cxx and -ccc-clang-cxx defaulting.Daniel Dunbar2009-12-051-2/+3
| | | | llvm-svn: 90629
* Driver: Switch -ccc-* options to using the standard options functionality.Daniel Dunbar2009-12-041-167/+38
| | | | | | - I still want to get rid of them, but manually handling them isn't adding value. llvm-svn: 90602
* Add OptTable::PrintHelp.Daniel Dunbar2009-12-031-0/+2
| | | | llvm-svn: 90420
* What the FIXMEs want, the FIXMEs shall have.Daniel Dunbar2009-11-251-4/+3
| | | | llvm-svn: 89861
* Factor out OptTable::ParseArgs, for parsing an entire argument vector.Daniel Dunbar2009-11-191-28/+11
| | | | llvm-svn: 89327
* Driver: ArgList doesn't depend on Options.h anymore.Daniel Dunbar2009-11-191-2/+2
| | | | llvm-svn: 89313
* Driver: Switch to using explicit {getLast,has}ArgNoClaim functions instead ↵Daniel Dunbar2009-11-191-1/+1
| | | | | | | | of taking a Claim argument. - Most driver code always claims, and bool arguments don't play nice with the overloads. llvm-svn: 89308
* Use Option::matches instead of direct ID comparison.Daniel Dunbar2009-11-191-3/+3
| | | | llvm-svn: 89305
* Driver: Split OptTable out into OptTable.{h,cpp}Daniel Dunbar2009-11-191-0/+1
| | | | llvm-svn: 89283
* Driver: Rework OptTable to have no dependency on the options it manages.Daniel Dunbar2009-11-181-1/+1
| | | | llvm-svn: 89234
* Allow customization for the version line.Mike Stump2009-10-091-0/+3
| | | | llvm-svn: 83652
OpenPOWER on IntegriCloud