summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Driver.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* 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
OpenPOWER on IntegriCloud