summaryrefslogtreecommitdiff
path: root/lib/Driver/Tools.cpp
Commit message (Collapse)AuthorAge
...
* gcov-style profiling support for OpenBSD. Patch by Jonathan Gray.Eli Friedman2011-12-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146631 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typos.Rafael Espindola2011-12-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146595 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use the frame pointer on linux x86 and x86_64 if optimizing. ThisRafael Espindola2011-12-14
| | | | | | | | matches gcc's behavior. Fixes PR8186. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146586 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix "control may reach end of non-void function" warning.Nick Lewycky2011-12-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146448 91177308-0d34-0410-b5e6-96231b3b80d8
* Hexagon backend supportTony Linthicum2011-12-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146413 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver: Handle -f{no-}honor-infinities, -f{no-}honor-nans, andDaniel Dunbar2011-12-09
| | | | | | | | -ffinite-math-only. - No test case yet, I don't know how to construct a situation where this matters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146297 91177308-0d34-0410-b5e6-96231b3b80d8
* Misc Minix-specific changes to clang:Eli Friedman2011-12-08
| | | | | | | | | | | | | . move compiler-rt to a separate directory so the -L argument only includes compiler-rt (thanks joerg) . build all clang subdirs . switches the Minix platform to ELF . normalizes toolchain invocation Patch by Ben Gras. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146206 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor cleanup. Avoid redundant getTriple() calls.Bob Wilson2011-12-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146122 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver/Linux: Fix the ASAN library path to match current compiler-rtDaniel Dunbar2011-12-07
| | | | | | integration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146098 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Mac: do not link dynamic libs with the asan-rt, use -undefined ↵Kostya Serebryany2011-12-06
| | | | | | dynamic_lookup for dynamic libs. Style fixes. Patch by glider@google.com git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145955 91177308-0d34-0410-b5e6-96231b3b80d8
* Stack realignment is a tristate. Add -mno-stackrealign to turn off all stackNick Lewycky2011-12-06
| | | | | | | realignment, even with locals with alignment exceeding the ABI guarantee. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145909 91177308-0d34-0410-b5e6-96231b3b80d8
* Add -mstack-alignment=X and fix -mstackrealign handling now that theJoerg Sonnenberger2011-12-05
| | | | | | | backend options are gone. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145868 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] don't require libstdc++ for asan on linux. Mac fix will go separatelyKostya Serebryany2011-12-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145823 91177308-0d34-0410-b5e6-96231b3b80d8
* Get the -march argument based on the target MIPS architecture or cpu and passAkira Hatanaka2011-11-30
| | | | | | | | | | it to GNU assembler. In addition, change function getMipsArchFromCPU() so that it can be reused in ConstructJob(). Patch by Simon Atanasyan. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145509 91177308-0d34-0410-b5e6-96231b3b80d8
* when -faddress-sanitizer is present, add required flags to the linker ↵Kostya Serebryany2011-11-30
| | | | | | command (linux-only) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145467 91177308-0d34-0410-b5e6-96231b3b80d8
* Change processor names. Patch by Simon Atanasyan.Akira Hatanaka2011-11-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145453 91177308-0d34-0410-b5e6-96231b3b80d8
* A couple driver fixes for PPC Linux. Patches by Michael Kostylev. ↵Eli Friedman2011-11-28
| | | | | | PR11444/PR11445. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145321 91177308-0d34-0410-b5e6-96231b3b80d8
* Add driver arguments -ftemplate-depth=N and -fconstexpr-depth=N, with the sameRichard Smith2011-11-21
| | | | | | | | | | | | | | semantics and defaults as the corresponding g++ arguments. The historical g++ argument -ftemplate-depth-N is kept for compatibility, but modern g++ versions no longer document that option. Add -cc1 argument -fconstexpr-depth N to implement the corresponding functionality. The -ftemplate-depth=N part of this fixes PR9890. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145045 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the linker emulation name for FreeBSD/PPC32.Roman Divacky2011-11-21
| | | | | | | | Submitted by Andreas Tobler! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145041 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach the driver about failure result files, which are compilationPeter Collingbourne2011-11-21
| | | | | | | | output files that are valid regardless of whether the compilation succeeded or failed (but not if we crash). Add depfiles to the failure result file list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145018 91177308-0d34-0410-b5e6-96231b3b80d8
* clang/Darwin: Use the compiler-rt provided profile library.Daniel Dunbar2011-11-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144869 91177308-0d34-0410-b5e6-96231b3b80d8
* Add -f[no-]address-sanitizer flagKostya Serebryany2011-11-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144800 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't track depfiles as result files which need to be cleaned up on failure.Matt Beaumont-Gay2011-11-14
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144590 91177308-0d34-0410-b5e6-96231b3b80d8
* Add top-level driver option '--serialize-diagnostics' for serialize compiler ↵Ted Kremenek2011-11-11
| | | | | | diagnostics to a file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144339 91177308-0d34-0410-b5e6-96231b3b80d8
* Misc fixes for clang driver on Mips Linux. Patch by Simon Atanasyan.Eli Friedman2011-11-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144108 91177308-0d34-0410-b5e6-96231b3b80d8
* Whitespace.Chad Rosier2011-11-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144002 91177308-0d34-0410-b5e6-96231b3b80d8
* Tablegenify -g options.Chad Rosier2011-11-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144001 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix an unsafe use of Twine.Benjamin Kramer2011-11-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143962 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixing -g break caused by a dead reference to a temporary introduced in r143732.David Blaikie2011-11-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143856 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the depfile as a result file so that it is deleted if we crash,Peter Collingbourne2011-11-06
| | | | | | and prevent the diagnostic preprocessor run from writing a depfile. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143846 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the Linux header searching from the Frontend to the Driver. This isChandler Carruth2011-11-05
| | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143822 91177308-0d34-0410-b5e6-96231b3b80d8
* On Linux, enable the gold plugin if we are using LTO.Peter Collingbourne2011-11-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143778 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable -flimit-debug-info by default. Now, clang lazily emits debug info for ↵Devang Patel2011-11-04
| | | | | | structs. Original behavior can be restored using -fno-limit-debug-info. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143733 91177308-0d34-0410-b5e6-96231b3b80d8
* [driver] Don't blindly accept all -g options.Chad Rosier2011-11-04
| | | | | | | rdar://10383444 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143732 91177308-0d34-0410-b5e6-96231b3b80d8
* Sink the strange '-stdlib=...' flag handling into the C++ includeChandler Carruth2011-11-04
| | | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143687 91177308-0d34-0410-b5e6-96231b3b80d8
* Sink the handling of -fobjc-arc-cxxlib to live with the other -fobjc-arcChandler Carruth2011-11-04
| | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143686 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a FIXME to cleanup the CPATH handling. It's currently burried withChandler Carruth2011-11-04
| | | | | | | | the rest of the mess in InitHeaderSearch.cpp. We could hoist it into the driver profitably, removing more noise from the driver -> frontend communication. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143685 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a system include management interface to the toolchain, and call itChandler Carruth2011-11-04
| | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143684 91177308-0d34-0410-b5e6-96231b3b80d8
* Invoke the Darwin assembler with -g instead of --gdwarf2.Bob Wilson2011-11-02
| | | | | | | | | 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> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143533 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an option to emulate the strange Apple gcc behavior of #pragma pack.Eli Friedman2011-11-02
| | | | | | | | <rdar://problem/10374763> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143527 91177308-0d34-0410-b5e6-96231b3b80d8
* Stop disabling integrated assembler with -static. <rdar://problem/10175391>Bob Wilson2011-10-30
| | | | | | | The integrated assembler seems to be working pretty well for -static code now, so remove the hacks to disable it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143304 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow the -fno-operator-names option to be passed down to the restEric Christopher2011-10-25
| | | | | | | | | | of the compiler. Fixes PR10198 Patch by Brian Foley! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142913 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the SystemZ backend.Dan Gohman2011-10-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142879 91177308-0d34-0410-b5e6-96231b3b80d8
* Have -fms-no-extensions turn off -fms-compatibilityDouglas Gregor2011-10-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142798 91177308-0d34-0410-b5e6-96231b3b80d8
* lib/Driver/Tools.cpp: Use PathV2::is_absolute() to add ↵NAKAMURA Takumi2011-10-22
| | | | | | -fdebug-compilation-dir. pwd[0] might not be '/' on Win32 hosts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142720 91177308-0d34-0410-b5e6-96231b3b80d8
* Take DW_AT_comp_dir from $PWD when it's present and starts with a '/'. This isNick Lewycky2011-10-21
| | | | | | | | closer to what GCC does, except that GCC also checks that the inodes for $PWD and '.' match. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142633 91177308-0d34-0410-b5e6-96231b3b80d8
* Frontend: Support -iframework.Daniel Dunbar2011-10-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142418 91177308-0d34-0410-b5e6-96231b3b80d8
* Wire up support for the controlling the extended dwarf .file directive. WithNick Lewycky2011-10-17
| | | | | | | | r142300 but not this patch, clang -S may emit .s files that assemblers other than llvm-mc can't parse. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142301 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement -static-libstdc++ for linux.Rafael Espindola2011-10-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142290 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement -static-libgcc on linux and refactor the code responsible for addingRafael Espindola2011-10-17
| | | | | | libgcc to the link line into a helper function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142269 91177308-0d34-0410-b5e6-96231b3b80d8