summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Driver.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Update for llvm api change.Rafael Espindola2014-02-241-2/+1
| | | | llvm-svn: 202053
* Use llvm::DeleteContainerSeconds when possibleReid Kleckner2014-02-191-4/+1
| | | | llvm-svn: 201739
* Add Multilib selection machineryJonathan Roelofs2014-02-121-39/+22
| | | | | | | | | | | | This patch improves the support for picking Multilibs from gcc installations. It also provides a better approximation for the flags '-print-multi-directory' and '-print-multi-lib'. This reverts r201203 (i.e. re-applying r201202 with small fixes in unittests/CMakeLists.txtto make the build bots happy). review: http://llvm-reviews.chandlerc.com/D2538 llvm-svn: 201205
* Revert 201202Jonathan Roelofs2014-02-121-22/+39
| | | | | | Breaks cmake configure of new unit tests directory llvm-svn: 201203
* Add Multilib selection machineryJonathan Roelofs2014-02-121-39/+22
| | | | | | | | | This patch improves the support for picking Multilibs from gcc installations. It also provides a better approximation for the flags '-print-multi-directory' and '-print-multi-lib'. review: http://llvm-reviews.chandlerc.com/D2538 llvm-svn: 201202
* Move -verify-pch to use VerifyJobActionBen Langmuir2014-02-061-6/+5
| | | | | | | | | Use the verify hook rather than the compile hook to represent the -verify-pch action, and move the exising --verify-debug-info action into its own subclass of VerifyJobAction. Incidentally change the name printed by -ccc-print-phases for --verify-debug-info. llvm-svn: 200938
* Add a CC1 option -verify-pchBen Langmuir2014-02-051-0/+3
| | | | | | | | | This option will: - load the given pch file - verify it is not out of date by stat'ing dependencies, and - return 0 on success and non-zero on error llvm-svn: 200884
* clang-cl: Better error message when trying to compile stdin (PR18640)Hans Wennborg2014-01-291-1/+2
| | | | | | | We should suggest using /Tc or /Tp to set the input type, instead of erroneously suggesting -x, which isn't a clang-cl flag. llvm-svn: 200362
* Fix -Wsometimes-uninitialized in r199754Alp Toker2014-01-211-7/+6
| | | | | | | Also make the -m16 check x86-specific. Other archs may have a different take on things. llvm-svn: 199755
* Add -m16 option for using x86-*-*-code16 tripleDavid Woodhouse2014-01-211-5/+14
| | | | llvm-svn: 199754
* Split out -verify into two distinct option flagsAlp Toker2014-01-171-2/+2
| | | | | | | | | | | | Instead of dual-purposing a single flag, rename the driver option to --verify-debug-info. The frontend -verify option that enables diagnostic verification remains unchanged except that it's now a pure CC1Option. Both have been given proper help text. llvm-svn: 199451
* MachO: use *-*-*-macho for MachO embedded targets.Tim Northover2014-01-161-20/+14
| | | | | | | | | | | | Previously we had bodged together some hacks mapping MachO embedded targets (i.e. mainly ARM v6M and v7M) to the "*-*-darwin-eabi" triple. This is incorrect in both details (they don't run Darwin and they're not EABI in any real sense). This commit appropriates the existing "MachO" environment for the purpose instead. llvm-svn: 199367
* Implement -m32 and -m64 with llvm::Triple functions.Jakob Stoklund Olesen2014-01-101-12/+7
| | | | | | Don't repeat the 32 <-> 64 architecture mapping incompletely. llvm-svn: 198943
* Enable -fuse-init-array for all AArch64 ELF targets by default, not just linux.Kristof Beyls2014-01-101-0/+4
| | | | llvm-svn: 198940
* [Driver] Fix a typo in the setting of the arch name when -arch x86_64h is used.Quentin Colombet2014-01-081-1/+1
| | | | | | <rdar://problem/15711488> llvm-svn: 198722
* Sort all the #include lines with LLVM's utils/sort_includes.py whichChandler Carruth2014-01-071-1/+1
| | | | | | | encodes the canonical rules for LLVM's style. I noticed this had drifted quite a bit when cleaning up LLVM, so wanted to clean up Clang as well. llvm-svn: 198686
* Propagate "-arch x86_64h" setting to the linker. <rdar://problem/15711488>Bob Wilson2013-12-281-6/+13
| | | | | | | | | This is a follow-up to r194907, which added a new -arch setting to make it easier to specify AVX2 targets. The "-arch x86_64h" option needs to be passed on to the linker, but it was getting canonicalized to x86_64 by the code in getArchTypeForDarwinArchName. llvm-svn: 198096
* clang-cl: Support /P and /E (preprocess to file or stdout)Hans Wennborg2013-12-201-2/+11
| | | | llvm-svn: 197827
* Add option to use temporary file for assembling with clangDavid Peixotto2013-12-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | This commit adds the flag '-via-file-asm' to the clang driver. The purpose of this flag is to have a way to test that clang can consume the assembly code that it outputs. When passed this flag, clang will generate a temporary file that contains the assembly output from the compile step. This assembly file will then be consumed by either the integrated assembler or the external assembler. To test that the integrated assembler can consume its own output compile with: $ clang -integrated-assembler -via-file-asm Without the '-via-file-asm' flag, clang would directly create the object file when using the integrated assembler. With the flag it will first create the temporary assembly file and then read that file and assemble it with the integrated assembler. The flow is similar to -save-temps, except that it only effects the assembly input and the temporary file is not saved. llvm-svn: 196606
* Fix method/variable name typosAlp Toker2013-12-031-4/+4
| | | | llvm-svn: 196214
* Remove a whole lot of unused variablesAlp Toker2013-11-271-1/+1
| | | | | | | There are about 30 removed in this patch, generated by a new FixIt I haven't got round to submitting yet. llvm-svn: 195814
* Remove the Darwin_Generic_GCC toolchain.Rafael Espindola2013-11-241-7/+1
| | | | | | | | | | | This is currently unused by any test. The code path would still be hit by clang on ppc, but * PPC has not been supported on current versions of OS X * A port of current clang to older OS X on ppc should be using toolchains::DarwinClang. llvm-svn: 195585
* SanitizerArgs: add ability to filter/diagnose unsupported sanitizers.Peter Collingbourne2013-11-011-8/+0
| | | | | | | | | | | | The thread, memory, dataflow and function sanitizers are now diagnosed if enabled explicitly on an unsupported platform. Unsupported sanitizers which are enabled implicitly (as part of a larger group) are silently disabled. As a side effect, this makes SanitizerArgs parsing toolchain-dependent (and thus essentially reverts r188058), and moves SanitizerArgs ownership to ToolChain. Differential Revision: http://llvm-reviews.chandlerc.com/D1990 llvm-svn: 193875
* clang-cl: diagnose setting asm listing filename with multiple inputsHans Wennborg2013-10-181-1/+12
| | | | llvm-svn: 193006
* clang-cl: Add support for asm listings (/FA and /Fa)Hans Wennborg2013-10-171-2/+17
| | | | | | | | | | This adds support for outputing the assembly to a file during compilation. It does this by changing the compilation pipeling to not use the integrated assembler, and keep the intermediate assembler file. Differential Revision: http://llvm-reviews.chandlerc.com/D1946 llvm-svn: 192902
* XCore target: add an xcore toolchain implementationRobert Lytton2013-10-111-0/+4
| | | | llvm-svn: 192437
* Produce an error if a -cc1 only option is passed to the driver.Rafael Espindola2013-09-251-1/+1
| | | | llvm-svn: 191380
* Produce errors for unknown options.Rafael Espindola2013-09-231-0/+5
| | | | | | | | | This doesn't change a lot since clang still thinks it knows all of the -f*, -m* and -W* options for example. Other than the options clang explicitly claims to know, this fixes pr9701. llvm-svn: 191249
* clang-cl: Don't warn about overriding /MD with /MT, /Fo with another /Fo, etc.Hans Wennborg2013-09-181-22/+0
| | | | | | | | | | | | | | | | I put in the warnings because MSVC has them, but I don't think they're very useful. Clang does not warn about overriding flags in general, e.g. it's perfectly fine to have -fomit-frame-pointer followed by -fno-omit-frame-pointer. We should focus on warning where things get confusing, such as with the /TP and /TC options. In "clang-cl /TC a.c /TP b.cc", the user might not realize that the /TP flag will apply to both files, and we warn about that. Differential Revision: http://llvm-reviews.chandlerc.com/D1718 llvm-svn: 190964
* clang-cl: ignore compile-only options in link-only invocations.Hans Wennborg2013-09-171-1/+6
| | | | | | | | | | | Previously we would warn about unused arguments such as /MD when linking. Clang already has logic to ignore compile-only options, e.g. for -D and -U. This patch extends that to include clang-cl's compile-only options too. Also, some clang-cl options should always be ignored. Doing this earlier means they get ignored both for compilation and link-only invocations. llvm-svn: 190825
* Move Compilation::PrintJob and PrintDiagnosticJob into Job::Print.Hans Wennborg2013-09-121-3/+3
| | | | | | | | | | | | | | | | | This moves the code to Job.cpp, which seems like a more natural fit, and replaces the "is this a JobList? is this a Command?" logic with a virtual function call. It also removes the code duplication between PrintJob and PrintDiagnosticJob and simplifies the code a little. There's no functionality change here, except that the Executable is now always printed within quotes, whereas it would previously not be quoted in crash reports, which I think was a bug. Differential Revision: http://llvm-reviews.chandlerc.com/D1653 llvm-svn: 190620
* clang-cl: Warn about overriding /MD with /MT etc.Hans Wennborg2013-09-111-2/+2
| | | | | | | This also bakes the /M options into a separate option group to make them easier to refer to from the code. llvm-svn: 190529
* clang-cl: Support building DLLs (PR17083)Hans Wennborg2013-09-101-6/+14
| | | | | | | | This adds driver support for building DLLs (the /LD and /LDd flags). It basically does two things: runtime selection and passing -dll and -implib to the linker. llvm-svn: 190428
* clang-cl: Use .obj as extension for unnamed object files (PR17095)Hans Wennborg2013-09-051-1/+1
| | | | | | | | We already use .obj as extension when the user provides a stem file name (via /Fo), but were failing in the most basic case when the file name is based on the input file. llvm-svn: 190071
* Use -### instead of -ccc-print-options.Rafael Espindola2013-09-031-26/+2
| | | | | | | Convert the last few tests using -ccc-print-options to -### and remove -ccc-print-options. llvm-svn: 189802
* 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
OpenPOWER on IntegriCloud