summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Driver.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Produce an error when trying to link with -emit-llvm.Rafael Espindola2013-08-251-0/+4
| | | | llvm-svn: 189193
* Don't imply -flto with -O4.Rafael Espindola2013-08-231-4/+0
| | | | | | We now saturate at -O3. llvm-svn: 189149
* Driver::IsUsingLTO() no longer return true when seeing -emit-llvm.Shuxin Yang2013-08-231-3/+5
| | | | | | | | | | One step toward differentiating following two commands: clang -O3 -flto a.c -c, and clang -O3 -emit-llvm a.c Thanks many awesome folks for clarifying things. llvm-svn: 189148
* Move SanitizerArgs to the clang DriverAlexey Samsonov2013-08-191-0/+8
| | | | | | | | | | | | | | | | Summary: This change turns SanitizerArgs into high-level options stored in the Driver, which are parsed lazily. This fixes an issue of multiple copies of the same diagnostic message produced by sanitizer arguments parser. Reviewers: rsmith Reviewed By: rsmith CC: chandlerc, eugenis, cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1341 llvm-svn: 188660
* revert 188352Shuxin Yang2013-08-141-5/+3
| | | | llvm-svn: 188353
* Driver::IsUsingLTO() no longer return true when seeing -emit-llvm.Shuxin Yang2013-08-141-3/+5
| | | | | | | | | | The rationale for this change is to differentiate following two situations: 1) clang -c -emit-llvm a.c 2) clang -c -flto a.c Reviewed by Eric Christopher. Thanks a lot! llvm-svn: 188352
* clang-cl: Support /link option and set target to win32Hans Wennborg2013-08-131-0/+6
| | | | | | | | | | | | | This adds support for the /link option, which forwards subsequent arguments to the linker. The test for this will only work when targetting win32. Since that's the only target where clang-cl makes sense, use that target by default. Differential Revision: http://llvm-reviews.chandlerc.com/D1388 llvm-svn: 188331
* Handle "--" explicitly in the driverHans Wennborg2013-08-131-9/+17
| | | | | | | | | | Anything that comes after -- is treated as an input file. This used to be handled automagically by the option parsing library, but after LLVM r188314, we should handle it ourselves. No functionality change. llvm-svn: 188316
* clang-cl: Sink /Fe and /Fo diagnostic code into BuildActionsHans Wennborg2013-08-121-27/+28
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D1370 llvm-svn: 188226
* clang-cl: Support the /Fe optionHans Wennborg2013-08-121-27/+67
| | | | | | | | This is used to name the linked output file. Differential Revision: http://llvm-reviews.chandlerc.com/D1344 llvm-svn: 188210
* clang-cl: Expand warning about /TC and /TP override, and expand testHans Wennborg2013-08-121-14/+16
| | | | llvm-svn: 188190
* clang-cl: Use .obj as object file extension instead of .oHans Wennborg2013-08-071-4/+5
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D1302 llvm-svn: 187840
* clang-cl: Implement support for the /Fo optionHans Wennborg2013-08-061-2/+48
| | | | | | | | | This implements support for the /Fo option, which is used to set the filename or output dir for object files. Differential Revision: http://llvm-reviews.chandlerc.com/D1302 llvm-svn: 187820
* clang-cl: Implement the /Tc, /TC, /Tp and /TP options.Hans Wennborg2013-08-061-19/+74
| | | | | | | | | These are used to specify source files, and whether to treat source files as C or C++. Differential Revision: http://llvm-reviews.chandlerc.com/D1290 llvm-svn: 187760
* clang-cl: add the /c, /W0 and /W1 optionsHans Wennborg2013-07-311-3/+3
| | | | | | | | | | This adds a few more clang-cl options. It also exposes two core clang options to the clang-cl mode: we need to be able to claim --driver_mode so it doesn't show up as unused in cl mode, and we need -### for tests. Differential Revision: http://llvm-reviews.chandlerc.com/D1232 llvm-svn: 187527
* Start keeping track of what work was done to detect a GCC installationChandler Carruth2013-07-301-0/+4
| | | | | | | | | | | | on the system, and report it when running the driver in verbose mode. Without this it is essentially impossible to understand why a particular GCC toolchain is used by Clang for libstdc++, libgcc, etc. This also required threading a hook through the toolchain layers for a specific toolchain implementation to print custom information under 'clang -v'. The naming here isn't spectacular. Suggestions welcome. llvm-svn: 187427
* clang-cl: add support for the /? and /help optionsHans Wennborg2013-07-271-4/+36
| | | | | | | | | | | | | | This establishes a new Flag in Options.td, which can be assigned to options that should be made available in clang's cl.exe compatible mode, and updates the Driver to make use of the flag. (The whitespace change to CMakeLists forces the build to re-run CMake and pick up the include dependency on the new .td file. This makes the build work if someone moves backwards in commit history after this change.) Differential Revision: http://llvm-reviews.chandlerc.com/D1215 llvm-svn: 187280
* [PowerPC] Support powerpc64le as a syntax-checking target.Bill Schmidt2013-07-261-0/+8
| | | | | | | | | | | | | | | | | | | This patch provides basic support for powerpc64le as an LLVM target. However, use of this target will not actually generate little-endian code. Instead, use of the target will cause the correct little-endian built-in defines to be generated, so that code that tests for __LITTLE_ENDIAN__, for example, will be correctly parsed for syntax-only testing. Code generation will otherwise be the same as powerpc64 (big-endian), for now. The patch leaves open the possibility of creating a little-endian PowerPC64 back end, but there is no immediate intent to create such a thing. The new test case variant ensures that correct built-in defines for little-endian code are generated. llvm-svn: 187180
* Remove the -ccc-echo option that is now unused.Rafael Espindola2013-07-231-2/+1
| | | | llvm-svn: 186970
* Add a cl.exe compatible driver modeHans Wennborg2013-07-191-0/+1
| | | | | | | The mode doesn't actually do anything yet, but this provides a way to get into it. llvm-svn: 186720
* Address -Wreorder warning in Driver.cppHans Wennborg2013-07-181-2/+2
| | | | llvm-svn: 186617
* Turn Driver::CCCIsCXX and CCCIsCPP into a single Mode enum,Hans Wennborg2013-07-181-10/+40
| | | | | | | | | | | | and add a new option --driver-mode= to control it explicitly. The CCCIsCXX and CCCIsCPP flags were non-overlapping, i.e. there are currently really three modes that Clang can run in: gcc, g++ or cpp, so it makes sense to represent them as an enum. Having a command line flag to control it helps testing. llvm-svn: 186605
* Use the simpler is_directory.Rafael Espindola2013-07-171-2/+1
| | | | llvm-svn: 186487
* Update for llvm API change.Rafael Espindola2013-07-161-3/+2
| | | | llvm-svn: 186448
* Use llvm::sys::fs::createTemporaryFile.Rafael Espindola2013-07-051-1/+1
| | | | llvm-svn: 185717
* Use SmallVectorImpl instead of SmallVector for iterators and references to ↵Craig Topper2013-07-041-1/+1
| | | | | | avoid specifying the vector size unnecessarily. llvm-svn: 185610
* Add r184803 back now that the bug in unique_file has been fixed.Rafael Espindola2013-06-251-21/+6
| | | | | | | | Original message: Use the new PathV2 instead of implementing the logic in clang. llvm-svn: 184825
* Revert "Use the new PathV2 instead of implementing the logic in clang."Rafael Espindola2013-06-251-6/+21
| | | | | | This reverts commit 184803 while I debug the failures on the bots. llvm-svn: 184818
* Remove PathV1.h from Driver.cpp.Rafael Espindola2013-06-251-2/+1
| | | | llvm-svn: 184807
* Use the new PathV2 instead of implementing the logic in clang.Rafael Espindola2013-06-251-20/+6
| | | | llvm-svn: 184803
* Convert some uses of llvm::sys::Path.Rafael Espindola2013-06-241-27/+27
| | | | llvm-svn: 184774
* Use the simpler version of llvm::sys::fs::exists.Rafael Espindola2013-06-241-8/+4
| | | | llvm-svn: 184770
* Use llvm::sys::fs::can_execute.Rafael Espindola2013-06-191-5/+10
| | | | llvm-svn: 184297
* Include PathV1.h only where it is used.Rafael Espindola2013-06-171-0/+1
| | | | llvm-svn: 184090
* [Driver] Refactor clang driver to use LLVM's Option libraryReid Kleckner2013-06-141-8/+9
| | | | | | | | | | | | | | | | | | The big changes are: - Deleting Driver/(Arg|Opt)* - Rewriting includes to llvm/Option/ and re-sorting - 'using namespace llvm::opt' in clang::driver - Fixing the autoconf build by adding option everywhere As discussed in the review, this change includes using directives in header files. I'll make follow up changes to remove those in favor of name specifiers. Reviewers: espindola Differential Revision: http://llvm-reviews.chandlerc.com/D975 llvm-svn: 183989
* Use the global functions instead of the Program methods.Rafael Espindola2013-06-121-3/+2
| | | | llvm-svn: 183861
* Driver: implement --dyld-prefix option.Peter Collingbourne2013-05-271-0/+2
| | | | | | | | | This option is used to select a dynamic loader prefix to be used at runtime. Currently this is implemented for the Linux toolchain. Differential Revision: http://llvm-reviews.chandlerc.com/D851 llvm-svn: 182744
* [driver] Allow multiple -arch options with -save-temps by adding the arch nameChad Rosier2013-04-301-21/+35
| | | | | | | to the temporary files. rdar://13218604 llvm-svn: 180813
* Hexagon: Set Hexagon tool-chain when configured as OSless target.Jyotsna Verma2013-03-291-1/+5
| | | | llvm-svn: 178358
* [Mips] Handle pseudo-target flags '-EL' and '-EB' and properly adjustSimon Atanasyan2013-03-281-0/+15
| | | | | | toolchain flags for MIPS targets. llvm-svn: 178232
* <rdar://problem/13509689> Introduce -module-file-info option that provides ↵Douglas Gregor2013-03-271-1/+5
| | | | | | | | | | | information about a particular module file. This option can be useful for end users who want to know why they ended up with a ton of different variants of the "std" module in their module cache. This problem should go away over time, as we reduce the need for module variants, but it will never go away entirely. llvm-svn: 178148
* Reject -no-integrated-as on windows.Rafael Espindola2013-03-241-11/+15
| | | | llvm-svn: 177840
* Revert svn r176894 and r177658.Bob Wilson2013-03-231-11/+10
| | | | | | | | | | | Changing -ccc-install-dir to affect cc1's resource-dir setting broke our internal LNT tests. After discussing the situation with Jim, we've decided to pursue an alternate approach. We really want the resource-dir to be located relative to clang, even when using -ccc-install-dir, but we're going to add a fallback setting for the libc++ headers if they don't exist alongside the compiler. llvm-svn: 177815
* If a .syms file is available alongside a sanitizer runtime, pass it to theRichard Smith2013-03-231-1/+3
| | | | | | | | linker via --dynamic-list instead of using --export-dynamic. This reduces the size of the dynamic symbol table, and thus of the binary (in some cases by up to ~30%). llvm-svn: 177783
* Remove unused argument.Rafael Espindola2013-03-181-2/+2
| | | | llvm-svn: 177303
* Pass an ArgList to every toolchain constructor. Remove the useIntegratedAsRafael Espindola2013-03-181-4/+4
| | | | | | argument. llvm-svn: 177301
* Refactor a bit of duplicated code to useIntegratedAs.Rafael Espindola2013-03-181-3/+1
| | | | llvm-svn: 177299
* Remove unused argument.Rafael Espindola2013-03-181-3/+3
| | | | llvm-svn: 177293
* Remove unused argument.Rafael Espindola2013-03-181-2/+1
| | | | llvm-svn: 177287
* Driver: -ccc-install-dir should affect cc1 -resource-dirJim Grosbach2013-03-121-9/+11
| | | | | | | | | | | | | | | -ccc-install-dir is supposed to cause the compiler to behave as-if it were installed in the indicated location. It almost does, but misses anything that's relying on the resource directory (libc++ header search, in particular). The resource dir is resolved too early, before command line args are handled. The fix is simply to move handling of the resource dir until after we know if a -ccc-install-dir is present. rdar://13402696 llvm-svn: 176894
OpenPOWER on IntegriCloud