summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Driver.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Driver: Change -dumpversion to return a GCC compatible answer.Daniel Dunbar2011-01-121-1/+7
| | | | | | - See comment for why. llvm-svn: 123296
* Replace all uses of PathV1::exists with PathV2::fs::exists.Michael J. Spencer2011-01-101-4/+10
| | | | llvm-svn: 123150
* Replace all uses of PathV1::get{Basename,Dirname,Suffix} with their PathV2 ↵Michael J. Spencer2010-12-181-12/+7
| | | | | | equivalents. llvm-svn: 122140
* Replace all uses of PathV1::getLast with PathV2::filename.Michael J. Spencer2010-12-181-5/+5
| | | | llvm-svn: 122117
* Going back to the drawing board with these two awful hacks.Eric Christopher2010-12-171-4/+1
| | | | llvm-svn: 122096
* Fix spelling.Michael J. Spencer2010-12-171-1/+1
| | | | llvm-svn: 122088
* Replace all uses of PathV1::isAbsolute with PathV2::is_{absolute,relative}.Michael J. Spencer2010-12-171-4/+6
| | | | llvm-svn: 122087
* Horrible hack for systems that use -dumpversion with clang to expect versionsEric Christopher2010-12-171-1/+4
| | | | | | that match gcc versions. Eew. llvm-svn: 122080
* Driver: M and MM should be grouped together, <rdar://problem/8744831>.Daniel Dunbar2010-12-081-3/+2
| | | | llvm-svn: 121284
* Merge System into Support.Michael J. Spencer2010-11-291-2/+2
| | | | llvm-svn: 120297
* Use hasErrorOccurred() instead of getNumErrors() where it makes sense.Argyrios Kyrtzidis2010-11-181-2/+2
| | | | llvm-svn: 119746
* Refactoring of Diagnostic class.Argyrios Kyrtzidis2010-11-181-1/+1
| | | | | | | | | | | -Move the stuff of Diagnostic related to creating/querying diagnostic IDs into a new DiagnosticIDs class. -DiagnosticIDs can be shared among multiple Diagnostics for multiple translation units. -The rest of the state in Diagnostic object is considered related and tied to one translation unit. -Have Diagnostic point to the SourceManager that is related with. Diagnostic can now accept just a SourceLocation instead of a FullSourceLoc. -Reflect the changes to various interfaces. llvm-svn: 119730
* Implement -working-directory.Argyrios Kyrtzidis2010-11-031-4/+13
| | | | | | | | | | | | | | | | | | | When -working-directory is passed in command line, file paths are resolved relative to the specified directory. This helps both when using libclang (where we can't require the user to actually change the working directory) and to help reproduce test cases when the reproduction work comes along. --FileSystemOptions is introduced which controls how file system operations are performed (currently it just contains the working directory value if set). --FileSystemOptions are passed around to various interfaces that perform file operations. --Opening & reading the content of files should be done only through FileManager. This is useful in general since file operations will be abstracted in the future for the reproduction mechanism. FileSystemOptions is independent of FileManager so that we can have multiple translation units sharing the same FileManager but with different FileSystemOptions. Addresses rdar://8583824. llvm-svn: 118203
* Use CLANG_RESOURCE_DIR define if one is provided, otherwise use the default ofChandler Carruth2010-10-191-4/+9
| | | | | | | | '../lib/clang/<version>'. Actually use '..' rather than removing the trailing component to correctly handle paths containing '.' or symlinks in the presence of -no-canonical-prefixes, etc. This shouldn't change any existing behavior. llvm-svn: 116803
* lib/Driver/Driver.cpp: Use the driver g++-4 for Cygwin-1.5.NAKAMURA Takumi2010-10-111-1/+13
| | | | llvm-svn: 116183
* Revert r114712 due to failure on darwin buildbot.Nick Lewycky2010-09-241-10/+4
| | | | llvm-svn: 114713
* Make -M/-MM behave like in gcc; use -MF first then -o else use stdout.Nick Lewycky2010-09-231-4/+10
| | | | llvm-svn: 114712
* Fix header comment so we don't break emacs.Nick Lewycky2010-09-231-1/+1
| | | | llvm-svn: 114711
* Driver: implement driver automagic support for -lcc_kextShantonu Sen2010-09-171-3/+11
| | | | | | | | | Rewrite linker arguments to use libclang_rt.cc_kext.a instead of gcc-specific libcc_kext.a Resolves Radar 7808495 llvm-svn: 114193
* Driver: Support -dumpmachine.Daniel Dunbar2010-09-171-0/+5
| | | | llvm-svn: 114155
* Driver: Add magic handling for "reserved library names", starting withDaniel Dunbar2010-09-171-0/+12
| | | | | | | | | | | | | | | | | | | | -lstdc++. This is the best gross solution for a gross problem. This issue is that historically, GCC has add -L options to its internally library directories. This has allowed users and platforms to end up depending on the layout of GCC's internal library directories. We want to correct this mistake by eliminating that -L, but this means that existing libraries which are in the GCC lib dir won't be found. We are going to handle this by treating those -l names as "reserved", and requiring toolchains to know how to add the right full path to the reserved library. The immediately side effect of this is that users trying to use -L to find their own -lstdc++ will need to start using -nostdlib (which is a good idea anyway). Another side effect is that -stdlib=libc++ -lstdc++ will now do the "right" thing, for curious definitions of right. llvm-svn: 114144
* Make "-ccc-cxx" option work on Linux.Rafael Espindola2010-09-061-2/+4
| | | | | | | | | Patch by nobled. I also took the opportunity to make the field private since now it is only ready from the outside. llvm-svn: 113138
* Driver: Update -ccc-install-dir to also set the installed dir. TotallyDaniel Dunbar2010-08-231-1/+1
| | | | | | non-obvious. llvm-svn: 111838
* Visual Studio tools used on win32 hosts when targeting win32.Michael J. Spencer2010-08-211-0/+5
| | | | llvm-svn: 111748
* Driver: Claim the -mlinker-version synthesized argument, it shouldn't beDaniel Dunbar2010-08-171-0/+1
| | | | | | reported as unused. llvm-svn: 111310
* Driver: Use the compile time linker version as the default for -mlinker-version,Daniel Dunbar2010-08-121-0/+10
| | | | | | | | 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
* Driver: Have -ccc-host-triple simply override the default in the driver, forDaniel Dunbar2010-08-021-3/+4
| | | | | | now. llvm-svn: 110027
* Driver: Move HostInfo::lookupTypeForExtension to ↵Daniel Dunbar2010-08-021-1/+1
| | | | | | ToolChain::LookupTypeForExtension. llvm-svn: 110024
* Driver: Give Build{Universal,}Actions access to the default host tool chain. IDaniel Dunbar2010-08-021-9/+9
| | | | | | | 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
* Driver: Add Compilation::addCommand and switch tools to using it, now that weDaniel Dunbar2010-08-021-1/+1
| | | | | | don't have to deal with nested jobs. llvm-svn: 110015
* Driver: Simplify.Daniel Dunbar2010-08-021-7/+2
| | | | llvm-svn: 110011
* Driver: Eliminate now unused argument.Daniel Dunbar2010-08-021-4/+2
| | | | llvm-svn: 110010
* Driver: Simplify logic for sending 'clang -E t.c' output to stdout.Daniel Dunbar2010-08-021-25/+4
| | | | llvm-svn: 110009
* Driver: Never try to use piped inputs.Daniel Dunbar2010-08-021-7/+2
| | | | llvm-svn: 110008
* Driver: Start ripping out support for -pipe, which is worthless and complicatesDaniel Dunbar2010-08-021-17/+4
| | | | | | too many other things. llvm-svn: 110007
* 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
OpenPOWER on IntegriCloud