summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.cpp
Commit message (Collapse)AuthorAgeFilesLines
* clang/Darwin: Use the compiler-rt provided profile library.Daniel Dunbar2011-11-171-9/+0
| | | | llvm-svn: 144869
* Add -f[no-]address-sanitizer flagKostya Serebryany2011-11-161-0/+4
| | | | llvm-svn: 144800
* Don't track depfiles as result files which need to be cleaned up on failure.Matt Beaumont-Gay2011-11-141-2/+0
| | | | | | | | | This is a partial revert of r143846. While cleaning up after a crash is probably a good idea, we were also deleting .d files if the compilation failed due to invalid input, which is not the desired behavior. The test is XFAIL'd until the cleanup code can be reworked to do the right thing. llvm-svn: 144590
* Add top-level driver option '--serialize-diagnostics' for serialize compiler ↵Ted Kremenek2011-11-111-0/+6
| | | | | | diagnostics to a file. llvm-svn: 144339
* Misc fixes for clang driver on Mips Linux. Patch by Simon Atanasyan.Eli Friedman2011-11-081-0/+11
| | | | llvm-svn: 144108
* Whitespace.Chad Rosier2011-11-071-1/+1
| | | | llvm-svn: 144002
* Tablegenify -g options.Chad Rosier2011-11-071-15/+0
| | | | llvm-svn: 144001
* Fix an unsafe use of Twine.Benjamin Kramer2011-11-071-5/+4
| | | | llvm-svn: 143962
* Fixing -g break caused by a dead reference to a temporary introduced in r143732.David Blaikie2011-11-061-1/+1
| | | | llvm-svn: 143856
* Add the depfile as a result file so that it is deleted if we crash,Peter Collingbourne2011-11-061-2/+5
| | | | | | and prevent the diagnostic preprocessor run from writing a depfile. llvm-svn: 143846
* Move the Linux header searching from the Frontend to the Driver. This isChandler Carruth2011-11-051-3/+3
| | | | | | | | | | | | | | | | the first (and diff-noisiest) step to making Linux header searching tremendously more principled and less brittle. Note that this step should have essentially no functional impact. We still search the exact same set of paths in the exact same order. The only change here is where the code implementing such a search lives. This has one obvious negative impact -- we now pass a ludicrous number of flags to the CC1 layer. That should go away as I re-base this logic on the logic to detect a GCC installation. I want to do this in two phases so the bots can tell me if this step alone breaks something, and so that the diffs of the refactoring make more sense. llvm-svn: 143822
* On Linux, enable the gold plugin if we are using LTO.Peter Collingbourne2011-11-051-1/+1
| | | | llvm-svn: 143778
* Enable -flimit-debug-info by default. Now, clang lazily emits debug info for ↵Devang Patel2011-11-041-0/+1
| | | | | | structs. Original behavior can be restored using -fno-limit-debug-info. llvm-svn: 143733
* [driver] Don't blindly accept all -g options.Chad Rosier2011-11-041-2/+18
| | | | | | rdar://10383444 llvm-svn: 143732
* Sink the strange '-stdlib=...' flag handling into the C++ includeChandler Carruth2011-11-041-4/+1
| | | | | | | | | | | | | | | | | | | | handling logic of the generic ToolChain. This flag, despite its name, has *nothing* to do with the GCC flag '-nostdlib' that relates (exclusively) to the linking behavior. It is a most unfortunate name in that regard... It is used to tell InitHeaderSearch.cpp *which* set of C++ standard library header search paths to use -- those for libstdc++ from GCC's installation, or those from a libc++ installation. As this logic is hoisted out of the Frontend, and into the Driver as part of this ToolChain, the generic method will be overridden for the platform, where it can implement this logic directly. As such, hiding the CC1 option passing in the generic space is a natural fit despite the odd naming. Also, expand on the comments to clarify whats going on, and tidy up the Tools.cpp code now that its simpler. llvm-svn: 143687
* Sink the handling of -fobjc-arc-cxxlib to live with the other -fobjc-arcChandler Carruth2011-11-041-4/+11
| | | | | | | | implementation in the driver. This cleans up the signature and semantics of the include flag adding component of the toolchain. Another step to ready it for holding all the InitHeaderSearch logic. llvm-svn: 143686
* Add a FIXME to cleanup the CPATH handling. It's currently burried withChandler Carruth2011-11-041-0/+2
| | | | | | | | the rest of the mess in InitHeaderSearch.cpp. We could hoist it into the driver profitably, removing more noise from the driver -> frontend communication. llvm-svn: 143685
* Add a system include management interface to the toolchain, and call itChandler Carruth2011-11-041-10/+13
| | | | | | | | | | | and the C++ include management routine from the proper place when forming preprocessor options in the driver. This is the first step to teaching the driver to manage all of the header search paths. Currently, these methods remain just stubs in the abstract toolchain. Subsequent patches will flesh them out with implementations for various toolchains based on the current code in InitHeaderSearch.cpp. llvm-svn: 143684
* Invoke the Darwin assembler with -g instead of --gdwarf2.Bob Wilson2011-11-021-1/+1
| | | | | | | | | The -g and --gdwarf2 options are currently synonyms to the Darwin assembler. But clang itself does not recognize --gdwarf2, so if we want to experiment with using clang, with its integrated assembler, to replace the default assembler, it is necessary to use -g. <rdar://problem/10349486> llvm-svn: 143533
* Add an option to emulate the strange Apple gcc behavior of #pragma pack.Eli Friedman2011-11-021-0/+4
| | | | | | <rdar://problem/10374763> llvm-svn: 143527
* Stop disabling integrated assembler with -static. <rdar://problem/10175391>Bob Wilson2011-10-301-9/+1
| | | | | | | The integrated assembler seems to be working pretty well for -static code now, so remove the hacks to disable it. llvm-svn: 143304
* Allow the -fno-operator-names option to be passed down to the restEric Christopher2011-10-251-0/+1
| | | | | | | | | of the compiler. Fixes PR10198 Patch by Brian Foley! llvm-svn: 142913
* Remove the SystemZ backend.Dan Gohman2011-10-241-3/+0
| | | | llvm-svn: 142879
* Have -fms-no-extensions turn off -fms-compatibilityDouglas Gregor2011-10-241-2/+6
| | | | llvm-svn: 142798
* lib/Driver/Tools.cpp: Use PathV2::is_absolute() to add ↵NAKAMURA Takumi2011-10-221-1/+1
| | | | | | -fdebug-compilation-dir. pwd[0] might not be '/' on Win32 hosts. llvm-svn: 142720
* Take DW_AT_comp_dir from $PWD when it's present and starts with a '/'. This isNick Lewycky2011-10-211-0/+10
| | | | | | | closer to what GCC does, except that GCC also checks that the inodes for $PWD and '.' match. llvm-svn: 142633
* Frontend: Support -iframework.Daniel Dunbar2011-10-181-4/+0
| | | | llvm-svn: 142418
* Wire up support for the controlling the extended dwarf .file directive. WithNick Lewycky2011-10-171-0/+15
| | | | | | | r142300 but not this patch, clang -S may emit .s files that assemblers other than llvm-mc can't parse. llvm-svn: 142301
* Implement -static-libstdc++ for linux.Rafael Espindola2011-10-171-0/+6
| | | | llvm-svn: 142290
* Implement -static-libgcc on linux and refactor the code responsible for addingRafael Espindola2011-10-171-31/+27
| | | | | | libgcc to the link line into a helper function. llvm-svn: 142269
* Use Triple.isOSDarwin() instead of comparing against Triple::Darwin.Bob Wilson2011-10-141-13/+14
| | | | | | | | | There are now separate Triple::MacOSX and Triple::IOS values for the OS so comparing against Triple::Darwin will fail to match those. Note that I changed the expected output for the Driver/rewrite-objc.m test, which had previously not been passing Darwin-specific options with the macosx triple. llvm-svn: 141944
* Rename -Wc++0x-compat, -Wc++0x-extensions and -Wc++0x-narrowing from c++0x toRichard Smith2011-10-131-1/+3
| | | | | | | c++11. The old names are kept for backwards-compatibility. Patch by Ahmed Charles! Names for backwards-compatible DiagGroups removed by me. llvm-svn: 141913
* The Objective-C rewriter uses the fragile ABI, always.Douglas Gregor2011-10-121-1/+3
| | | | llvm-svn: 141795
* Driver: Add support for a new -nostdlibinc option.Daniel Dunbar2011-10-111-0/+2
| | | | | | | | | | | | - This disables the system include directories, but not the compiler builtin directories. Useful for projects that want to use things like the intrinsic headers, but are otherwise freestanding. - I'm willing to reconsider the option naming, I also considered providing an explicit -builtinc (which would match -nobuiltininc), but this is more consistent with existing options. llvm-svn: 141692
* Frontend: Replace -nostdinc by -nostdsysteminc (which is just system includeDaniel Dunbar2011-10-111-3/+8
| | | | | | paths). The -nostdinc behavior is now -nostdsysteminc + -nobuiltininc. llvm-svn: 141691
* Link in Scrt1.o instead of crt1.o when -pie is specified.Roman Divacky2011-10-101-2/+4
| | | | llvm-svn: 141573
* [arcmt] Ignore linking errors when doing ARC migration, rdar://10247606Argyrios Kyrtzidis2011-10-071-0/+12
| | | | llvm-svn: 141434
* More cleanup using StringSwitch.Chad Rosier2011-10-071-65/+35
| | | | llvm-svn: 141373
* Remove DISABLE_ARM_DARWIN_USE_MOVT ifdefs. Radar 9456730.Bob Wilson2011-10-061-8/+0
| | | | llvm-svn: 141320
* Add -Wlanguage-extension-token option for ext_token_used warning.Ivan Krasin2011-10-061-0/+1
| | | | llvm-svn: 141268
* Driver & AST: Implement support for -fpack-struct and -fpack-struct= commandDaniel Dunbar2011-10-051-0/+12
| | | | | | | line options. - <rdar://problem/10120602>, PR9631 llvm-svn: 141211
* [driver] Improve r141053 by only emitting the warning if the original inputChad Rosier2011-10-041-15/+1
| | | | | | | was assembly. Otherwise, something like -save-temps causes the integrated assembler to warn. llvm-svn: 141127
* [driver] Improve r141053 by only emitting the warning if the original inputChad Rosier2011-10-041-2/+12
| | | | | | | was assembly. Otherwise, something like -save-temps causes the integrated assembler to warn. llvm-svn: 141055
* [driver] Emit a warning if the user has requested debug information and we'reChad Rosier2011-10-041-1/+5
| | | | | | | using the integrated assembler. rdar://10216353 llvm-svn: 141053
* Make -fobjc-nonfragile-abi the -cc1 default, since it's theJohn McCall2011-10-021-3/+3
| | | | | | | | | | | | | | | | | | | increasingly prevailing case to the point that new features like ARC don't even support the fragile ABI anymore. This required a little bit of reshuffling with exceptions because a check was assuming that ObjCNonFragileABI was only being set in ObjC mode, and that's actually a bit obnoxious to do. Most, though, it involved a perl script to translate a ton of test cases. Mostly no functionality change for driver users, although there are corner cases with disabling language-specific exceptions that we should handle more correctly now. llvm-svn: 140957
* Remove the conditional that avoided passing the Objective-C runtime ↵David Chisnall2011-09-301-74/+72
| | | | | | specification flags to cc1. This fixes PR10369 (__builtin_NSStringMakeConstantString() selecting the wrong runtime in C / C++ code and crashing, although it doesn't fix the problem that instantiating the Mac runtime for non-Darwin targets was crashing.) llvm-svn: 140853
* Check for GCC paths that have the target triple in them. This is required ↵David Chisnall2011-09-271-18/+2
| | | | | | for a lot of cross-compile toolchains. Also add some slightly better support for -B. llvm-svn: 140645
* Make necessary changes in AddMIPSTargetArgs for targeting Mips64. Enable use ofAkira Hatanaka2011-09-261-16/+52
| | | | | | | -mcpu. llvm-svn: 140562
* Switch assert(0/false) llvm_unreachable.David Blaikie2011-09-231-1/+1
| | | | llvm-svn: 140367
* Add support for CPATH and friends.Benjamin Kramer2011-09-221-0/+49
| | | | | | | | | | | | This moves the existing code for CPATH into the driver and adds the environment lookup and path splitting there. The paths are then passed down to cc1 with -I options (CPATH), added after the normal user-specified include dirs. Language specific paths are passed via -LANG-isystem and the actual filtering is performed in the frontend. I tried to match GCC's behavior as close as possible Fixes PR8971. llvm-svn: 140341
OpenPOWER on IntegriCloud