aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Driver/Tools.cpp
AgeCommit message (Collapse)AuthorFilesLines
2015-11-19clang-cl: Make /W4 imply -Wall -Wextra (PR25563)Hans Wennborg1-0/+20
llvm-svn: 253582
2015-11-18[ARM] Support +feature targeting in -mcpu/-marchBradley Smith1-8/+32
llvm-svn: 253471
2015-11-18[Myriad]: insert -L paths into linker cmd only when they exist.Douglas Katzman1-13/+5
Differential Revision: http://reviews.llvm.org/D14754 llvm-svn: 253467
2015-11-17[Myriad]: -nostdlib implies -nostartfilesDouglas Katzman1-1/+1
llvm-svn: 253390
2015-11-17[CUDA] Make CUDA compilation usable by default.Artem Belevich1-0/+2
Currently clang requires several additional command line options in order to enable new features needed during CUDA compilation. This patch makes these options default. * Automatically include cuda_runtime.h if we've found a valid CUDA installation. * Disable automatic CUDA header inclusion during unit tests. * Added test case for command line construction. * Enabled target overloads and relaxed call checks that are needed in order to include CUDA headers. * Added CUDA-7.5 installation path to the CUDA installation search list. * Define __CUDA__ macro to indicate CUDA compilation. llvm-svn: 253389
2015-11-17[CUDA] added include paths for both sides of CUDA compilation.Artem Belevich1-4/+20
In order to compile a CUDA file clang must be able to find include files for both both host and device. This patch passes AuxToolchain to AddPreprocessingOptions and uses it to add include paths for the opposite side of compilation. We also must be able to find CUDA include files. If the driver found CUDA installation, it adds appropriate include path to CUDA headers. This can be disabled with '-nocudainc'. - Added include paths for the opposite side of compilation. - Added include paths to detected CUDA installation. - Added -nocudainc to prevent adding CUDA include path. - Added test cases to verify new functionality. Differential Revision: http://reviews.llvm.org/D13170 llvm-svn: 253386
2015-11-17[CUDA] use -aux-triple to pass target triple of opposite side of compilationArtem Belevich1-0/+17
Clang needs to know target triple for both sides of compilation so that preprocessor macros and target builtins from both sides are available. This change augments Compilation class to carry information about toolchains used during different CUDA compilation passes and refactors BuildActions to use it when it constructs CUDA jobs. Removed DeviceTriple from CudaHostAction/CudaDeviceAction as it's no longer needed. Differential Revision: http://reviews.llvm.org/D13144 llvm-svn: 253385
2015-11-17Use !hasArg with two options instead of !hasArg && !hasArg.Douglas Katzman1-92/+52
Thereby fixing a warning about failure to claim all args. llvm-svn: 253372
2015-11-17Add trivial utility to append -L arguments to linker step. NFCDouglas Katzman1-35/+9
llvm-svn: 253350
2015-11-16[Myriad]: pass the 'std=' option to moviCompileDouglas Katzman1-1/+1
llvm-svn: 253213
2015-11-16Update for the gnu flavor being renamed to old-gnu.Rafael Espindola1-3/+3
llvm-svn: 253191
2015-11-15Make the mingw toolchain accept 'ld' and 'lld' only as values to -fuse-ld.Yaron Keren1-0/+2
Post-commit suggestion by Filipe Cabecinhas. llvm-svn: 253161
2015-11-13Revert "[AArch64] Unconditionally pass subtarget feature reserve-x18 on Darwin."Justin Bogner1-5/+3
This reverts r243310, which is redundant as of r253102. Conflicts: lib/Driver/Tools.cpp llvm-svn: 253104
2015-11-12Add support for driver option -mno-ms-bitfields.Akira Hatanaka1-1/+2
This option is used to cancel -mms-bitfields on the command line. rdar://problem/15898553 llvm-svn: 252912
2015-11-12Re-recommit: Add support for the new mips-mti-linux toolchain.Vasileios Kalintiris1-20/+44
Last time, this caused two Windows buildbots and a single ARM buildbot to fail. I XFAIL'd the failing test on win32,win64 machines in order to see if the ARM buildbot complains again. llvm-svn: 252901
2015-11-10Use the generic Sparc CPU handling for Linux, FreeBSD and OpenBSD, too.Joerg Sonnenberger1-29/+26
This currently changes the default toward the more historic -Av8/-Av9, but as discussed with James Y Knight, consistency is for now more important than figuring out which default CPU each OS should be using. llvm-svn: 252571
2015-11-10Use the normal switch over getArch() approach and not a long if chain.Joerg Sonnenberger1-13/+23
llvm-svn: 252562
2015-11-09Reorganise CPU handling for Sparc. When using -mcpu=v9 and co, __sparcv8Joerg Sonnenberger1-3/+38
is not defined for 32bit mode, but __sparcv9 is. Pass down the correct -target-cpu flags to the backend, so that instruction restrictions are applied correctly. Pass down the correct -A flag when not using IAS. The latter is limited to NetBSD targets in this commit. llvm-svn: 252545
2015-11-09[EABI] Add Clang support for -meabi flagRenato Golin1-0/+5
The -meabi flag to control LLVM EABI version. Without '-meabi' or with '-meabi default' imply LLVM triple default. With '-meabi gnu' sets EABI GNU. With '-meabi 4' or '-meabi 5' set EABI version 4 and 5 respectively. A similar patch was introduced in LLVM. Patch by Vinicius Tinti. llvm-svn: 252463
2015-11-05After some discussion, promote -fobjc-weak to a driver option.John McCall1-0/+17
rdar://problem/23415863 llvm-svn: 252187
2015-11-04Fix some Clang-tidy modernize warnings, other minor fixes.Eugene Zelenko1-3/+3
Differential revision: http://reviews.llvm.org/D14311 llvm-svn: 252081
2015-11-04Silence "enumeral and non-enumeral type in conditional expression" warning; NFC.Aaron Ballman1-1/+1
llvm-svn: 252047
2015-11-02Clang format a few prior patches (NFC)Teresa Johnson1-1/+2
I had clang formatted my earlier patches using the wrong style. Reformatted with the LLVM style. llvm-svn: 251813
2015-10-30Disable SjLj exceptions for watchOSTim Northover1-1/+1
llvm-svn: 251709
2015-10-30Watch and TV OS: wire up basic ABI choicesTim Northover1-2/+9
This sets the mostly expected Darwin default ABI options for these two platforms. Active changes from these defaults for watchOS are in a later patch. llvm-svn: 251708
2015-10-30Support watchOS and tvOS driver optionsTim Northover1-2/+7
This patch should add support for almost all command-line options and driver tinkering necessary to produce a correct "clang -cc1" invocation for watchOS and tvOS. llvm-svn: 251706
2015-10-30Revert "[mips] Add support for the new mips-mti-linux toolchain."Vasileios Kalintiris1-44/+20
This reverts commits r251633. I'll investigate the test failure off trunk in order to keep the buildbots clean. llvm-svn: 251698
2015-10-30Revert "Try to run and investigate the mips-mti-linux.c test failure on ARM ↵Renato Golin1-13/+0
buildbots." This reverts commit r251695. Debug is meant to be done off tree, not use the buildbots experiments. I'll help investigate this problem off trunk. llvm-svn: 251696
2015-10-30Try to run and investigate the mips-mti-linux.c test failure on ARM buildbots.Vasileios Kalintiris1-0/+13
This should be a NFC for every toolchain other than mips-mti-linux (where we print the list of directories searched for crt files). It will soon be reverted once we hit the clang-cmake-armv7-a15-selfhost-neon buildbot. llvm-svn: 251695
2015-10-29[mips] Add support for the new mips-mti-linux toolchain.Vasileios Kalintiris1-20/+44
The original commit in r249137 added the mips-mti-linux toolchain. However, the newly added tests of that commit failed in few buildbots. This commit re-applies the original changes but XFAILs the test file which caused the buildbot failures. This will allow us to examine what's going wrong without having to commit/revert large changes. llvm-svn: 251633
2015-10-29Driver: CrossWindows sanitizers link supportSaleem Abdulrasool1-0/+16
Add the required libraries to the linker invocation when building with sanitizers. llvm-svn: 251600
2015-10-29Driver: inline some small arraysSaleem Abdulrasool1-10/+4
Use an initializer list to remove a couple of small static arrays. NFC. llvm-svn: 251599
2015-10-28Put global classes into the appropriate namespace.Benjamin Kramer1-0/+2
Most of the cases belong into an anonymous namespace. No functionality change intended. llvm-svn: 251514
2015-10-28Driver: support -fuse-ld= on cross windowsSaleem Abdulrasool1-2/+1
Update the linker selection to support the `-fuse-ld=` option for selecting a linker. llvm-svn: 251493
2015-10-27[mips] Separated mips specific -Wa options, so that they are not checked on ↵Daniel Sanders1-12/+30
other platforms. Summary: This is a follow on to post review comments on revision r248276. Patch by Scott Egerton. Reviewers: vkalintiris, dsanders Subscribers: joerg, rengolin, cfe-commits Differential Revision: http://reviews.llvm.org/D13100 llvm-svn: 251430
2015-10-22Define weak and __weak to mean ARC-style weak references, even in MRC.John McCall1-0/+1
Previously, __weak was silently accepted and ignored in MRC mode. That makes this a potentially source-breaking change that we have to roll out cautiously. Accordingly, for the time being, actual support for __weak references in MRC is experimental, and the compiler will reject attempts to actually form such references. The intent is to eventually enable the feature by default in all non-GC modes. (It is, of course, incompatible with ObjC GC's interpretation of __weak.) If you like, you can enable this feature with -Xclang -fobjc-weak but like any -Xclang option, this option may be removed at any point, e.g. if/when it is eventually enabled by default. This patch also enables the use of the ARC __unsafe_unretained qualifier in MRC. Unlike __weak, this is being enabled immediately. Since variables are essentially __unsafe_unretained by default in MRC, the only practical uses are (1) communication and (2) changing the default behavior of by-value block capture. As an implementation matter, this means that the ObjC ownership qualifiers may appear in any ObjC language mode, and so this patch removes a number of checks for getLangOpts().ObjCAutoRefCount that were guarding the processing of these qualifiers. I don't expect this to be a significant drain on performance; it may even be faster to just check for these qualifiers directly on a type (since it's probably in a register anyway) than to do N dependent loads to grab the LangOptions. rdar://9674298 llvm-svn: 251041
2015-10-22clang driver toolchain refactoringXinliang David Li1-40/+13
In this patch, the file static method addProfileRT is moved to be a virtual member function of base ToolChain class. This allows derived toolchain to override the default behavior easily and make it consistent with Darwin toolchain (a TODO was added for this refactoring - now removed). A new helper method is also introduced to test if instrumentation profile option is turned on or not. Differential Revision: http://reviews.llvm.org/D13326 llvm-svn: 250994
2015-10-21[Myriad]: Always add -L paths even if -nostdlib is set.Douglas Katzman1-7/+5
llvm-svn: 250932
2015-10-18Support linking against OpenMP runtime on FreeBSD.Dimitry Andric1-0/+1
Summary: Similar to rL248426 (which was a followup to rL248379 and rL248424), add the required libraries for OpenMP on the linker command line, and update the test case. Reviewers: emaste, theraven, joerg Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D13822 llvm-svn: 250657
2015-10-18Make a bunch of static arrays const.Craig Topper1-2/+2
llvm-svn: 250647
2015-10-16PS4: Make sure to add the sanitizer runtime before any linker inputFilipe Cabecinhas1-2/+4
llvm-svn: 250514
2015-10-15Recommit "Clang support for -flto=thin."Teresa Johnson1-12/+14
This recommits r250398 with fixes to the tests for bot failures. Add "-target x86_64-unknown-linux" to the clang invocations that check for the gold plugin. llvm-svn: 250455
2015-10-15Revert "Clang support for -flto=thin." (bot failures)Teresa Johnson1-14/+12
Rolling this back for now since there are a couple of bot failures on the new tests I added, and I won't have a chance to look at them in detail until later this afternoon. I think the new tests need some restrictions on having the gold plugin available. This reverts commit r250398. llvm-svn: 250402
2015-10-15Clang support for -flto=thin.Teresa Johnson1-12/+14
Summary: Add clang support for -flto=thin option, which is used to set the EmitFunctionSummary code gen option on compiles. Add -flto=full as an alias to the existing -flto. Add tests to check for proper overriding of -flto variants on the command line, and convert grep tests to FileCheck. Reviewers: dexonsmith, joker.eph Subscribers: davidxl, cfe-commits Differential Revision: http://reviews.llvm.org/D11908 llvm-svn: 250398
2015-10-15Remove unnecessary braces in single-line 'if'.Douglas Katzman1-2/+1
llvm-svn: 250363
2015-10-14Bring back r250262: PS4 toolchainFilipe Cabecinhas1-7/+341
There was a minor problem with a test. Sorry for the noise yesterday. This patch adds missing pieces to clang, including the PS4 toolchain definition, added warnings, PS4 defaults, and Driver changes needed for our compiler. A patch by Filipe Cabecinhas, Pierre Gousseau and Katya Romanova! Differential Revision: http://reviews.llvm.org/D13482 llvm-svn: 250293
2015-10-14Revert-to-green r250262 (PS4 toolchain patch)Sean Silva1-341/+7
It is breaking llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast e.g. http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/1362 llvm-svn: 250273
2015-10-14I took care of the build problem in the commit 250252.Ekaterina Romanova1-7/+341
Resubmitting the patch. This patch adds missing pieces to clang, including the PS4 toolchain definition, added warnings, PS4 defaults, and Driver changes needed for our compiler. A patch by Filipe Cabecinhas, Pierre Gousseau and Katya Romanova! Differential Revision: http://reviews.llvm.org/D13482 llvm-svn: 250262
2015-10-14reverting my patch, cause build problemsEkaterina Romanova1-341/+7
llvm-svn: 250257
2015-10-13This patch adds missing pieces to clang, including the PS4 toolchainEkaterina Romanova1-7/+341
definition, added warnings, PS4 defaults, and Driver changes needed for our compiler. A patch by Filipe Cabecinhas, Pierre Gousseau and Katya Romanova! Differential Revision: http://reviews.llvm.org/D13482 llvm-svn: 250252