summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.cpp
Commit message (Collapse)AuthorAgeFilesLines
* SanitizerArgs: add ability to filter/diagnose unsupported sanitizers.Peter Collingbourne2013-11-011-5/+5
| | | | | | | | | | | | 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
* [AArch64] Add some CPU targets for "generic", A-53 and A-57.Amara Emerson2013-10-311-0/+23
| | | | | | | | | | Enables the clang driver to begin targeting specific CPUs. Introduced a "generic" CPU which will ensure that the optional FP feature is enabled by default when it gets to LLVM, without needing any extra arguments. Cortex-A53 and A-57 are also introduced with tests, although backend handling of them does not yet exist. llvm-svn: 193740
* Add -lm to sanitizer link arguments.Evgeniy Stepanov2013-10-291-0/+1
| | | | | | We'll need to intercept a few function in libm. llvm-svn: 193644
* ARM: Add -m[no-]crc to dis/enable CRC subtargetfeature from clangBernard Ogden2013-10-291-0/+9
| | | | | | | | Allow users to disable or enable CRC subtarget feature. Differential Revision: http://llvm-reviews.chandlerc.com/D2037 llvm-svn: 193600
* Add driver support for FP, SIMD and crypto defaults.Bernard Ogden2013-10-241-1/+5
| | | | | | | | | Although we wire up a bit for v8fp for macro setting purposes, we don't set a macro yet. Need to ask list about that. Change-Id: Ic9819593ce00882fbec72757ffccc6f0b18160a0 llvm-svn: 193367
* Set appropriate FPU default for Linux on v8Bernard Ogden2013-10-241-0/+2
| | | | | Change-Id: If9b649c92e7196e3e791948545dc80901a0761eb llvm-svn: 193365
* Teach clang driver about Cortex-A53 and Cortex-A57.Bernard Ogden2013-10-241-0/+1
| | | | | | | | | | | Adds some Cortex-A53 strings where they were missing before. Cortex-A57 is entirely new to clang. Doesn't touch code only used by Darwin, in consequence of which one of the A53 lines has been removed. Change-Id: I5edb58f6eae93947334787e26a8772c736de6483 llvm-svn: 193364
* Driver: Various string-related cleanups.Benjamin Kramer2013-10-211-50/+45
| | | | | | Also fixes some funky formatting. llvm-svn: 193079
* Add the __ARM_ARCH_EXT_IDIV__ predefine. It is set to 1 if we have hardware ↵Silviu Baranga2013-10-211-0/+23
| | | | | | divide in the mode that we are compiling in (depending on the target features), not defined if we don't. Should be compatible with the GCC conterpart. Also adding a -hwdiv option to overide the default behavior. llvm-svn: 193074
* Expose -fmodule-name and -fmodule-map-file as driver options.Daniel Jasper2013-10-211-1/+16
| | | | | Review: http://llvm-reviews.chandlerc.com/D1974 llvm-svn: 193069
* Revert r193022 and r193048. They broke the ubsan test suite.Peter Collingbourne2013-10-201-16/+13
| | | | llvm-svn: 193057
* Driver: libubsan_cxx depends on libubsan. Preserve the topological ordering, ↵Benjamin Kramer2013-10-201-2/+3
| | | | | | some linkers depend on it. llvm-svn: 193048
* When building ubsan, link in ubsan parts first and sanitizer-common second, toNick Lewycky2013-10-191-12/+14
| | | | | | | pick up the common bits ubsan actually needs. Also remove whole-archive when we aren't trying to re-export the symbols. llvm-svn: 193022
* [mips] Added -mfp64 and -mfp32 options.Daniel Sanders2013-10-171-0/+2
| | | | | | | | | | | | | | | | These options specify 64-bit FP registers and 32-bit FP registers respectively. When using -mfp32, the FPU has 16x double-precision registers overlapping with the 32x single-precision registers (each double-precision register overlaps two single-precision registers). When using -mfp64, the FPU has 32x double-precision registers overlapping with the 32x single-precision registers (each double-precision register overlaps with one single-precision register and has an additional 32-bits). MSA requires -mfp64. llvm-svn: 192899
* Rework ppc options handling into a features group.Eric Christopher2013-10-161-14/+23
| | | | | | This should have no functional behavior. llvm-svn: 192838
* Driver: Factor duplicated code.Benjamin Kramer2013-10-161-36/+25
| | | | llvm-svn: 192817
* [mips] Enable frame-pointer elimination for -O1 and above.Akira Hatanaka2013-10-161-2/+10
| | | | llvm-svn: 192815
* ObjectiveC driver. Scrap -fno-objc-legacy-dispatch for NeXTFariborz Jahanian2013-10-151-2/+3
| | | | | | | runtime. It will be silently ignored and regardless of deployment target. // rdar://14803286 llvm-svn: 192719
* For NetBSD/current on X86 do not use libgcc and default to libc++.Joerg Sonnenberger2013-10-141-18/+23
| | | | | | Adjust linkage to make more sense for older releases. llvm-svn: 192615
* Turn struct-path aware TBAA on by default.Manman Ren2013-10-111-2/+3
| | | | | | | | Use -no-struct-path-tbaa to turn it off. This is the same as r191695, which was reverted because it depends on a commit that has issues. llvm-svn: 192497
* XCore target: add an xcore toolchain implementationRobert Lytton2013-10-111-0/+55
| | | | llvm-svn: 192437
* Fix typo in comment. No functionality change.Nick Lewycky2013-10-111-2/+2
| | | | llvm-svn: 192412
* [Mips] Do not check for options from the OPT_mips_CPUs_Group. All theseSimon Atanasyan2013-10-091-21/+2
| | | | | | options are aliases now. llvm-svn: 192290
* Revert r191947. The problem is not MIPS-specific and requires moreSimon Atanasyan2013-10-041-7/+1
| | | | | | general solution. llvm-svn: 191951
* [Mips] For MIPS '-fPIC -static' means to compile as -fPIC but link withSimon Atanasyan2013-10-041-1/+7
| | | | | | | | | -static. So do not turn off the PIC flag if -static passed to the driver in case of MIPS target. http://llvm.org/bugs/show_bug.cgi?id=14693 llvm-svn: 191947
* ARM: *-*-darwin-eabi triples should use AAPCS.Tim Northover2013-10-031-1/+2
| | | | llvm-svn: 191900
* [ARM] Add -mfpu=none option to the driver.Amara Emerson2013-10-011-4/+39
| | | | llvm-svn: 191736
* Revert r191586 and r191695. They cause crashes when building withRichard Smith2013-10-011-3/+2
| | | | | | -relaxed-aliasing. llvm-svn: 191725
* Turn struct-path aware TBAA on by default.Manman Ren2013-09-301-2/+3
| | | | | | Use -no-struct-path-tbaa to turn it off. llvm-svn: 191695
* Fix misspelling of -fmodules-decluse.Daniel Jasper2013-09-291-2/+2
| | | | llvm-svn: 191640
* Replace -fobjc-default-synthesize-properties with ↵Rafael Espindola2013-09-271-4/+0
| | | | | | | | | disable-objc-default-synthesize-properties. We want the modern behavior most of the time, so inverting the option simplifies the driver and the tests. llvm-svn: 191551
* clang-cl: pass /FI options to fallbackHans Wennborg2013-09-271-0/+4
| | | | | | | We started parsing /FI in r191442, and now we can pass it on to the fallback too. llvm-svn: 191537
* Remove method that always returns true.Rafael Espindola2013-09-271-3/+1
| | | | llvm-svn: 191533
* clang-cl: fix passing optimization level to cl.exe in /fallback modeHans Wennborg2013-09-241-1/+13
| | | | | | | | | We were previously mostly passing it through, but -O0 and -O3 are not valid options to cl.exe. We should translate -O0 to /Od and -O3 to /Ox. -O{1,2,s} get passed through. llvm-svn: 191323
* clang-cl: pass /nologo when falling back to cl.exeHans Wennborg2013-09-241-0/+1
| | | | llvm-svn: 191316
* Module use declarations (II)Daniel Jasper2013-09-241-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Review: http://llvm-reviews.chandlerc.com/D1546. I have picked up this patch form Lawrence (http://llvm-reviews.chandlerc.com/D1063) and did a few changes. From the original change description (updated as appropriate): This patch adds a check that ensures that modules only use modules they have so declared. To this end, it adds a statement on intended module use to the module.map grammar: use module-id A module can then only use headers from other modules if it 'uses' them. This enforcement is off by default, but may be turned on with the new option -fmodules-decluse. When enforcing the module semantics, we also need to consider a source file part of a module. This is achieved with a compiler option -fmodule-name=<module-id>. The compiler at present only applies restrictions to the module directly being built. llvm-svn: 191283
* [Mips] Support -mnan=2008 option. Define "__mips_nan2008" macros and passSimon Atanasyan2013-09-241-0/+10
| | | | | | this option to the assembler. llvm-svn: 191282
* Remove unused option.Rafael Espindola2013-09-241-1/+0
| | | | | | | gcc doesn't support "gcc -m sse" and this was not tested in clang and only used for link argument on darwin, so this was very likely just a bug. llvm-svn: 191251
* clang-cl: print diagnostics as "error(clang): foo" in /fallback modeHans Wennborg2013-09-241-1/+4
| | | | | | | | | | | | | | | This solves two problems: 1) MSBuild will not flag the build as unsuccessful just because we print an error in the output, since "error(clang):" doesn't seem to match the regex it's using. 2) It becomes more clear that the diagnostic is coming from clang as supposed to cl.exe. Differential Revision: http://llvm-reviews.chandlerc.com/D1735 llvm-svn: 191250
* clang-cl: implement custom search for cl.exe in /fallback modeHans Wennborg2013-09-201-4/+39
| | | | | | | | | | This solves the problem of fallback onto ourselves if clang-cl has been renamed to cl.exe and put on the PATH, as happens with the VS integration. Differential Revision: http://llvm-reviews.chandlerc.com/D1731 llvm-svn: 191099
* [ASan] Do not imply -undefined dynamic_lookup when linking dylibs with ↵Alexander Potapenko2013-09-201-14/+0
| | | | | | | | | | -fsanitize=address. Instead add the ASan runtime to the linker command line so that only the ASan API functions can be undefined in the target library. Fixes http://llvm.org/bugs/show_bug.cgi?id=17275 llvm-svn: 191076
* clang-cl: implement /fallback modeHans Wennborg2013-09-191-1/+76
| | | | | | | | | | | | | When this flag is enabled, clang-cl falls back to cl.exe if it cannot compile the code itself for some reason. The idea is to use this to help build projects that almost compile with clang-cl, except for some files that can then be built with the fallback mechanism. Differential Revision: http://llvm-reviews.chandlerc.com/D1711 llvm-svn: 191034
* [ARMv8] Add crypto-neon-fp-armv8 -mfpu option in driver.Amara Emerson2013-09-191-0/+3
| | | | llvm-svn: 191001
* clang-cl: Don't warn about overriding /MD with /MT, /Fo with another /Fo, etc.Hans Wennborg2013-09-181-13/+1
| | | | | | | | | | | | | | | | 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
* Claim compatibility with VS 2012 by defaultReid Kleckner2013-09-181-2/+2
| | | | | | | | | | | | This will define _MSC_VER to 1700 by default and avoid linker errors from /failifmismatch linker directives in the C++ standard headers. Most people trying out the Visual Studio integration are using 2012, since that's the only version that clang-format works with. This way they don't have to pass funky -Xclang -fmsc-version=1700 flags just to link against the standard C++ runtime. llvm-svn: 190908
* [arcmt] Don't try to handle files that are already ARC'ified, this is not ↵Argyrios Kyrtzidis2013-09-171-1/+1
| | | | | | | | possible currently. rdar://14461559 llvm-svn: 190880
* clang-cl: ignore compile-only options in link-only invocations.Hans Wennborg2013-09-171-3/+0
| | | | | | | | | | | 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
* Clean up some Triple usage in clang.Cameron Esfahani2013-09-141-9/+8
| | | | llvm-svn: 190737
* Add support for -ggnu-pubnames matching the llvm support.Eric Christopher2013-09-131-0/+6
| | | | llvm-svn: 190729
* Add more Cortex CPUs and testsRenato Golin2013-09-131-2/+2
| | | | llvm-svn: 190703
OpenPOWER on IntegriCloud