summaryrefslogtreecommitdiff
path: root/lib/Driver/Tools.cpp
Commit message (Collapse)AuthorAge
...
* ObjectiveC driver. Scrap -fno-objc-legacy-dispatch for NeXTFariborz Jahanian2013-10-15
| | | | | | | | runtime. It will be silently ignored and regardless of deployment target. // rdar://14803286 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192719 91177308-0d34-0410-b5e6-96231b3b80d8
* For NetBSD/current on X86 do not use libgcc and default to libc++.Joerg Sonnenberger2013-10-14
| | | | | | | Adjust linkage to make more sense for older releases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192615 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn struct-path aware TBAA on by default.Manman Ren2013-10-11
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192497 91177308-0d34-0410-b5e6-96231b3b80d8
* XCore target: add an xcore toolchain implementationRobert Lytton2013-10-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192437 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo in comment. No functionality change.Nick Lewycky2013-10-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192412 91177308-0d34-0410-b5e6-96231b3b80d8
* [Mips] Do not check for options from the OPT_mips_CPUs_Group. All theseSimon Atanasyan2013-10-09
| | | | | | options are aliases now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192290 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r191947. The problem is not MIPS-specific and requires moreSimon Atanasyan2013-10-04
| | | | | | general solution. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191951 91177308-0d34-0410-b5e6-96231b3b80d8
* [Mips] For MIPS '-fPIC -static' means to compile as -fPIC but link withSimon Atanasyan2013-10-04
| | | | | | | | | -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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191947 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM: *-*-darwin-eabi triples should use AAPCS.Tim Northover2013-10-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191900 91177308-0d34-0410-b5e6-96231b3b80d8
* [ARM] Add -mfpu=none option to the driver.Amara Emerson2013-10-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191736 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r191586 and r191695. They cause crashes when building withRichard Smith2013-10-01
| | | | | | | -relaxed-aliasing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191725 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn struct-path aware TBAA on by default.Manman Ren2013-09-30
| | | | | | | Use -no-struct-path-tbaa to turn it off. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191695 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix misspelling of -fmodules-decluse.Daniel Jasper2013-09-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191640 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace -fobjc-default-synthesize-properties with ↵Rafael Espindola2013-09-27
| | | | | | | | | disable-objc-default-synthesize-properties. We want the modern behavior most of the time, so inverting the option simplifies the driver and the tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191551 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-cl: pass /FI options to fallbackHans Wennborg2013-09-27
| | | | | | | We started parsing /FI in r191442, and now we can pass it on to the fallback too. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191537 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove method that always returns true.Rafael Espindola2013-09-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191533 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-cl: fix passing optimization level to cl.exe in /fallback modeHans Wennborg2013-09-24
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191323 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-cl: pass /nologo when falling back to cl.exeHans Wennborg2013-09-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191316 91177308-0d34-0410-b5e6-96231b3b80d8
* Module use declarations (II)Daniel Jasper2013-09-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191283 91177308-0d34-0410-b5e6-96231b3b80d8
* [Mips] Support -mnan=2008 option. Define "__mips_nan2008" macros and passSimon Atanasyan2013-09-24
| | | | | | this option to the assembler. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191282 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused option.Rafael Espindola2013-09-24
| | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191251 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-cl: print diagnostics as "error(clang): foo" in /fallback modeHans Wennborg2013-09-24
| | | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191250 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-cl: implement custom search for cl.exe in /fallback modeHans Wennborg2013-09-20
| | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191099 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Do not imply -undefined dynamic_lookup when linking dylibs with ↵Alexander Potapenko2013-09-20
| | | | | | | | | | | | -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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191076 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-cl: implement /fallback modeHans Wennborg2013-09-19
| | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191034 91177308-0d34-0410-b5e6-96231b3b80d8
* [ARMv8] Add crypto-neon-fp-armv8 -mfpu option in driver.Amara Emerson2013-09-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191001 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-cl: Don't warn about overriding /MD with /MT, /Fo with another /Fo, etc.Hans Wennborg2013-09-18
| | | | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190964 91177308-0d34-0410-b5e6-96231b3b80d8
* Claim compatibility with VS 2012 by defaultReid Kleckner2013-09-18
| | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190908 91177308-0d34-0410-b5e6-96231b3b80d8
* [arcmt] Don't try to handle files that are already ARC'ified, this is not ↵Argyrios Kyrtzidis2013-09-17
| | | | | | | | possible currently. rdar://14461559 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190880 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-cl: ignore compile-only options in link-only invocations.Hans Wennborg2013-09-17
| | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190825 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up some Triple usage in clang.Cameron Esfahani2013-09-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190737 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for -ggnu-pubnames matching the llvm support.Eric Christopher2013-09-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190729 91177308-0d34-0410-b5e6-96231b3b80d8
* Add more Cortex CPUs and testsRenato Golin2013-09-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190703 91177308-0d34-0410-b5e6-96231b3b80d8
* [ARMv8] Change the naming of some options to be more consistent.Joey Gouly2013-09-13
| | | | | | | | Clang side changes for LLVM r190692. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190693 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-cl: Warn about overriding /MD with /MT etc.Hans Wennborg2013-09-11
| | | | | | | This also bakes the /M options into a separate option group to make them easier to refer to from the code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190529 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the ASan dll_thunk pathTimur Iskhodzhanov2013-09-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190516 91177308-0d34-0410-b5e6-96231b3b80d8
* Add -fansi-escape-codes optionNico Rieck2013-09-11
| | | | | | | | | | | | | Some build systems use pipes for stdin/stderr. On nix-ish platforms colored output can be forced by -fcolor-diagnostics. On Windows this option has no effect in these cases because LLVM uses the console API (which only operates on the console buffer) even if a console wrapper capable of interpreting ANSI escape codes is used. The -fansi-escape-codes option allows switching from the console API to ANSI escape codes. It has no effect on other platforms. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190464 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-cl: Support building DLLs (PR17083)Hans Wennborg2013-09-10
| | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190428 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-cl: use -fdiagnostics-format=msvc by defaultHans Wennborg2013-09-10
| | | | | | | This allows for navigating to errors within the MSVC IDE by clicking on the diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190378 91177308-0d34-0410-b5e6-96231b3b80d8
* Tweak implementation of -Wwrite-strings to better match the behavior of ↵Richard Smith2013-09-04
| | | | | | | | | | | | | | | | | current GCCs: * In C, as before, if the "warning flag" is enabled, warnings are produced by forcing string literals to have const-qualified types (the produced warnings are *not* -Wwrite-strings warnings). However, more recent GCCs (at least 4.4 onwards) now take -w into account here, so we now do the same. * In C++, this flag is entirely sane: it behaves just like any other warning flag. Stop triggering -fconst-strings here. This is a bit cleaner, but there's no real functionality change except in the case where -Xclang -fno-const-strings is also specified. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190006 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the -fuse-gold-plugin driver option.Rafael Espindola2013-09-04
| | | | | | | | * It was redundant with -flto. * It was confusing since -uAnythingElse is a different option. * GCC uses -fuse-linker-plugin, so it was not even a compatibility option. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189976 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-cl: Pass -incremental:no to linker when using ASanHans Wennborg2013-08-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189664 91177308-0d34-0410-b5e6-96231b3b80d8
* use the last passed -munaligned-access / -mno-unaligned-accessRenato Golin2013-08-28
| | | | | | | | | | | | | | | Passing inconsistent munaligned-access / mno-unaligned-access flags, intentionally resulted in a warning and the flag no-unaligned-access being used. Gcc does, at least in practice, use the last flag in such a case. This patch updates clang behaviour accordingly; use the last flag or base alignment behaviour on the target (which llvm will do if no flag is explicitly passed) Patch by Jeroen Hofstee. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189542 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-cl: Pass -debug to the linker when using -fsanitize=addressHans Wennborg2013-08-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189496 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r189440 - Disable loop vectorizer unrolling when no unrolling requestedHal Finkel2013-08-28
| | | | | | | | | | | | | | | | | | | | | As Chandler pointed out, we should not be using -backend-option because this will cause crashes for users of the tooling interface, etc. A better way to fix this will be to provide the unrolling pass-manager flag to the loop vectorizer directly. Original commit message: Disable loop vectorizer unrolling when no unrolling requested In addition to the regular loop unrolling transformation, the loop vectorizer can also unroll loops. If no unrolling has specifically been requested (by -fno-unroll-loops), and the loop vectorizer will be used, then add the backend option to (also) prevent the loop vectorizer from unrolling loops. I confirmed with Nadav (off list) that disabling vectorizer loop unrolling when -fno-unroll-loops is provided is the desired behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189441 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable loop vectorizer unrolling when no unrolling requestedHal Finkel2013-08-28
| | | | | | | | | | | | In addition to the regular loop unrolling transformation, the loop vectorizer can also unroll loops. If no unrolling has specifically been requested (by -fno-unroll-loops), and the loop vectorizer will be used, then add the backend option to (also) prevent the loop vectorizer from unrolling loops. I confirmed with Nadav (off list) that disabling vectorizer loop unrolling when -fno-unroll-loops is provided is the desired behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189440 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-cl: Support -fsanitize=addressHans Wennborg2013-08-27
| | | | | | | | | This exposes the -fsanitize=address option and adds the runtime library to the link command. Differential Revision: http://llvm-reviews.chandlerc.com/D1526 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189389 91177308-0d34-0410-b5e6-96231b3b80d8
* Warn that -O4 is the same as -O3.Rafael Espindola2013-08-27
| | | | | | | We error on -O5 and higher. While it is tempting to do the same for -O4, I agree with Jordan Rose: we should warn for a release at least first. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189369 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify now that -O4 just maps to -O3 and -O is an alias of -O2.Rafael Espindola2013-08-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189218 91177308-0d34-0410-b5e6-96231b3b80d8
* Add gcc ARM flags -munaligned-access / -mno-unaligned-accessRenato Golin2013-08-24
| | | | | | | | | | | | | | | | clang already had a mstrict-align which mentiones "Force all memory accesses to be aligned (ARM only)". On gcc arm this is controlled by -munaligned-access / -mno-unaligned-access. Add the gcc versions to the frontend and make -mstrict-align and alias to -mno-unaligned-access and only show it in clang -cc1 -help. Since the default value for unaligned accesses / strict alignment depends on the tripple, both the enable and disable flags are added. If both are set, the no-unaligned-access is used. Patch by Jeroen Hofstee. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189175 91177308-0d34-0410-b5e6-96231b3b80d8