summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Driver.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Make crash diagnostics on Windows the tiniest bit more usefulReid Kleckner2014-08-051-0/+2
| | | | | | | | | | | | | | This escapes any backslashes in the executable path and fixes an issue with a trailing quote when the main file name had to be quoted during printing. It's impossible to test this without putting backslashes or quotes into the executable path, so I didn't add automated tests. The crash diagnostics are still only useful if you're using bash on Windows, though. This should probably be writing a batch file instead. llvm-svn: 214924
* AArch64: update Clang for merged arm64/aarch64 triples.Tim Northover2014-07-231-4/+0
| | | | | | | | | | | | | | The main subtlety here is that the Darwin tools still need to be given "-arch arm64" rather than "-arch aarch64". Fortunately this already goes via a custom function to handle weird edge-cases in other architectures, and it tested. I removed a few arm64_be tests because that really isn't an interesting thing to worry about. No-one using big-endian is also referring to the target as arm64 (at least as far as toolchains go). Mostly they date from when arm64 was a separate target and we *did* need a parallel name simply to test it at all. Now aarch64_be is sufficient. llvm-svn: 213744
* [PATCH] [x32] Introduce -mx32 flag enforcing x32 mode for other triplets. By ↵Zinovy Nis2014-07-111-4/+8
| | | | | | | | | | | | Pavel Chupin (@pavel.v.chupin). -mx32 flag setup target environment to GNUX32 and can be used for other 32/64-bit triplets (i386-unknown-linux, x86_64-unknown-linux) to turn on x32 mode. Compatible with GCC -mx32 flag. Differential Revision: http://reviews.llvm.org/D4470 llvm-svn: 212817
* Driver: Fix think-o in adding -ivfsoverlay flag to crashdumpsJustin Bogner2014-07-071-3/+5
| | | | | | | If there isn't a VFS to overlay we shouldn't be adding a -ivfsoverlay flag. llvm-svn: 212468
* Use the newly added FindInEnvPath helper in clangEhsan Akhgari2014-06-301-30/+1
| | | | llvm-svn: 212058
* Revert r211866, r211895 and r211995, "Driver: use GNU::Link for the ↵NAKAMURA Takumi2014-06-291-3/+0
| | | | | | | | | | | Generic_GCC toolchain". It broke users of Generic_GCC, cygwin and mingw32. It reverts commits as follows: r211866: "Driver: use GNU::Link for the Generic_GCC toolchain" r211895: "Replace GetProgramPath("ld") with GetLinkerPath()." r211995: "Driver: add a cygwin linker tool" llvm-svn: 211998
* Driver: add a cygwin linker toolSaleem Abdulrasool2014-06-291-0/+3
| | | | | | | | | This adds a linker tool for the Windows cygwin environment. This linker invocation is significantly different from the generic ld invocation. It requires additional parameters as well as does not accept some normal parameters. This should fix self-hosting on Cygwin. llvm-svn: 211995
* Driver: Pass -ivfsoverlay to module crashdumpsJustin Bogner2014-06-271-1/+8
| | | | | | | | When we create a crashdump involving modules, we build a VFS to reproduce the problem with. This updates the reproduction script to use that VFS. llvm-svn: 211876
* Driver: Fix a misleading comment and test for what it actually didJustin Bogner2014-06-261-1/+1
| | | | llvm-svn: 211806
* Driver: Remove trailing whitespaceJustin Bogner2014-06-261-2/+2
| | | | llvm-svn: 211805
* Driver: Restore proper naming of crashdump filesJustin Bogner2014-06-241-1/+2
| | | | | | Based on a review of r211411 by Jordan Rose. llvm-svn: 211572
* Driver: In crashdumps with -fmodule, dump the module dependenciesJustin Bogner2014-06-201-1/+6
| | | | llvm-svn: 211421
* Driver: Record that we're in crashdump and push flags to ConstructJobJustin Bogner2014-06-201-2/+0
| | | | | | | | | | | It's more flexible and arguably better layering to set flags to modify compiling for diagnostics in the CC1 job themselves, rather than tweaking the driver flags and letting them propagate. There is one visible change this causes: crash report files will now get preprocessed names (.i and friends). llvm-svn: 211411
* Make clang-cl accept .lib inputs (PR20065)Hans Wennborg2014-06-181-0/+34
| | | | | | | | | | Patch by Ehsan Akhgari! (Tiny tweak by me: renamed PathSegment to LibDir.) Differential Revision: http://reviews.llvm.org/D4192 llvm-svn: 211189
* Add support for the /Fi argument to clang-cl (PR20036)Hans Wennborg2014-06-171-1/+4
| | | | | | | | Patch by Ehsan Akhgari! Differential Revision: http://reviews.llvm.org/D4143 llvm-svn: 211081
* Add support for the /EP argument to clang-clHans Wennborg2014-06-131-1/+2
| | | | | | | | | | This maps the /EP argument to both -E and -P. Patch by Ehsan Akhgari! Differential Reviion: http://reviews.llvm.org/D4133 llvm-svn: 210935
* Replace llvm::error_code with std::error_code.Rafael Espindola2014-06-121-2/+1
| | | | llvm-svn: 210780
* Remove the last remaining llvm/Config/config.h includesAlp Toker2014-06-041-4/+1
| | | | | | | | | | | | This corrects long-standing misuses of LLVM's internal config.h. In most cases the public llvm-config.h header was intended and we can now remove the old hacks thanks to LLVM r210144. The config.h header is private, won't be installed and should no longer be included by clang or other modules. llvm-svn: 210145
* [C++11] Use 'nullptr'. Driver edition.Craig Topper2014-05-171-10/+11
| | | | llvm-svn: 209069
* Eliminate DefaultImageName from the Driver constructorAlp Toker2014-05-151-2/+1
| | | | | | | | | | | | All callers were passing in "a.out" or garbage so a sensible default works fine here as a cleanup. This also brings about the possibility of adapting the value based on the driver's compatibility mode in future. The setting can still be changed via Driver::DefaultImageName as needed. llvm-svn: 208926
* Fix clang-cl Driver leakHans Wennborg2014-05-021-2/+3
| | | | | | | We were synthesizing new arguments from e.g. '/Tcfile.c' arguments, but didn't handle ownership correctly. llvm-svn: 207880
* When Driver::generateCompilationDiagnostics is filtering the list ofPaul Robinson2014-04-281-3/+4
| | | | | | | inputs to the preprocessor, check for invalid types first because not all linker inputs have an option value to retrieve. llvm-svn: 207454
* [ARM64] Plumb in big-endian - add arm64_be to the many switches where it was ↵James Molloy2014-04-171-0/+4
| | | | | | missing. llvm-svn: 206462
* AArch64: Add command line option to select big or little endianChristian Pirker2014-04-101-3/+9
| | | | llvm-svn: 205966
* Simplify clang-cl's target triple settingHans Wennborg2014-03-281-3/+2
| | | | llvm-svn: 205051
* clang-cl wants MSVC-style win32Hans Wennborg2014-03-281-1/+3
| | | | | | | This should fix the clang-cl tests after the Windows target triple canonicalization (r204978) llvm-svn: 204985
* Use the new Windows environment for target detectionSaleem Abdulrasool2014-03-271-3/+22
| | | | | | | | | This follows the LLVM change to canonicalise the Windows target triple spellings. Rather than treating each Windows environment as a single entity, the environments are now modelled properly as an environment. This is a mechanical change to convert the triple use to reflect that change. llvm-svn: 204978
* Fix an logic error in the clang driver preventing crtfastmath.o from linking ↵Benjamin Kramer2014-03-251-0/+4
| | | | | | | | | | | | | | when -Ofast is used without -ffast-math In gcc using -Ofast forces linking of crtfastmath.o. In the current clang crtfastmath.o is only linked when -ffast-math/-funsafe-math-optimizations passed. It can lead to performance issues, when using only -Ofast without explicit -ffast-math (I faced with it). My patch fixes inconsistency with gcc behaviour and also introduces few tests on it. Patch by Zinovy Nis! Differential Revision: http://llvm-reviews.chandlerc.com/D3114 llvm-svn: 204742
* Only allow streaming exactly type 'bool' to a DiagnosticBuilder, not anythingRichard Smith2014-03-121-2/+2
| | | | | | | that implicitly converts to 'bool' (such as pointers, and the first operand of ?:). Clean up issues found by this. Patch by Stephan Tolksdorf! llvm-svn: 203735
* [C++11] Replace OwningPtr include with <memory>.Ahmed Charles2014-03-091-1/+1
| | | | llvm-svn: 203389
* Replace OwningPtr with std::unique_ptr.Ahmed Charles2014-03-071-1/+1
| | | | | | This compiles cleanly with lldb/lld/clang-tools-extra/llvm. llvm-svn: 203279
* Change OwningPtr::take() to OwningPtr::release().Ahmed Charles2014-03-071-3/+3
| | | | | | This is a precursor to moving to std::unique_ptr. llvm-svn: 203275
* Update for LLVM API changeSaleem Abdulrasool2014-03-061-1/+1
| | | | | | | Use the new getObjectFormat/setObjectFormat instead of Environment now that the file format is a separate field. llvm-svn: 203161
* [C++11] Replace llvm::tie with std::tie.Benjamin Kramer2014-03-021-2/+2
| | | | llvm-svn: 202639
* 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
OpenPOWER on IntegriCloud