summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver
Commit message (Collapse)AuthorAgeFilesLines
...
* Silence unused argument warning for --cuda-host-only.Artem Belevich2015-07-281-0/+4
| | | | | | Differential Revision: http://reviews.llvm.org/D11575 llvm-svn: 243479
* --cuda-host-only should not disable linking phase.Artem Belevich2015-07-281-4/+2
| | | | | | | | | | | | Host-only cuda compilation does produce valid host object file and in some cases users do want to proceed on to the linking phase. The change removes special case that stopped compilation pipeline at the Assembly phase. Device-side compilation is still stopped early by the types::getCompilationPhases(). Differential Revision: http://reviews.llvm.org/D11573 llvm-svn: 243478
* Add -femulated-tls flag to select the emulated TLS model.Chih-Hung Hsieh2015-07-281-0/+6
| | | | | | | | | This will be used for old targets like Android that do not support ELF TLS models. Differential Revision: http://reviews.llvm.org/D10524 llvm-svn: 243441
* Use TargetParser to parse -mhwdiv command line option in Driver.Alexandros Lamprineas2015-07-281-13/+2
| | | | | | Change-Id: I2ebc40f77af75ec6b43ce8364d6d5a1d29988bd6 Phabricator: http://reviews.llvm.org/D11501 llvm-svn: 243398
* [ARM] Implement -Wa,-mfpu and friends for assemblersRenato Golin2015-07-271-62/+115
| | | | | | | | | | | This patch allows Clang to pass on -Wa,-mfpu, -Wa,-mhwdiv and -Wa,-mcpu to the integrated assembler (via target-features), but -march is still not being passed, but validated. In case the command line has both -mxxx and -Wa,-mxxx, we warn that the naked one will not be used in assembler mode. llvm-svn: 243353
* [ARM] Changes to Arch/CPU handling to help with -Wa,-mfpu etc. (nfc)Renato Golin2015-07-273-43/+87
| | | | | | | | | | | | To be able to handle -Wa, options in the assembler (ClangAs), we need to make the handling of options based on the value of the options, not direct Arguments from the list, since the list is immutable. No functional change in this patch, but this allows validating of -Wa,-mfpu and friends in the same way we validate -mfpu and friends, *just* for the assembler. llvm-svn: 243352
* [AArch64] Unconditionally pass subtarget feature reserve-x18 on Darwin.Akira Hatanaka2015-07-271-3/+5
| | | | | | | After r243308, the front-end is responsible for checking the target OS and passing reserve-x18 if the target is Darwin. llvm-svn: 243310
* Rename {Hexagon,NaCl}_TC to {Hexagon,NaCl}ToolChain respectively. NFCDouglas Katzman2015-07-274-93/+98
| | | | | | | | | Also rename XCore (the toolchain) to XCoreToolChain since XCore is also a namespace for its tools. Differential Revision: http://reviews.llvm.org/D10609 llvm-svn: 243279
* Setting ARM dynamic linker name from commandlineRenato Golin2015-07-271-2/+4
| | | | | | | | | | Currently trigger to select hard-float linker is only based of -gnueabihf appearing in target triplet, but we should also select it when hardfloat is requested via cmdline. Patch by Khem Raj. llvm-svn: 243262
* [clang-cl] Handle -O correctlyDavid Majnemer2015-07-273-4/+120
| | | | | | | | | | | | | | | We had multiple bugs here: - We didn't support multiple optimization options in one argument. e.g. -O2y- - We didn't correctly expand -O[12dx] to their respective options. - We treated -O1 as clang -O1 instead of clang -Os. - We treated -Ox as clang -O3 instead of clang -O2. In fact, cl's -Ox option is *less* powerful than cl's -O2 option despite -Ox described as "Full Optimization". This fixes PR24003. llvm-svn: 243261
* [clang-cl] Add fallback support for /ZlDavid Majnemer2015-07-251-0/+1
| | | | llvm-svn: 243207
* [AArch64] Pass subtarget feature "+reserve-x18" instead of passing backendAkira Hatanaka2015-07-251-5/+3
| | | | | | | | | | | | | | option "-aarch64-reserve-x18". This change is needed since backend options do not make it to the backend when doing LTO and are not capable of changing the behavior of code-gen passes on a per-function basis. rdar://problem/21529937 Differential Revision: http://reviews.llvm.org/D11462 llvm-svn: 243185
* Select the highest version of the mingw toolchain found using ↵Yaron Keren2015-07-242-13/+20
| | | | | | | | Generic_GCC::GCCVersion similar to the way Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple works. llvm-svn: 243153
* Base the sys-root/mingw/include path on sysroot and not on /usr.Yaron Keren2015-07-241-1/+1
| | | | | | Thanks to Richard Smith for pointing this out! llvm-svn: 243144
* Apparently some of the bots add .svn dirs inside the test/Driver/Inputs Yaron Keren2015-07-241-22/+28
| | | | | | directory structure. Try to make mingw toolchain resilient to such surprises. llvm-svn: 243105
* Add extensive tests for the mingw toolchain and remove trailing slash from Arch.Yaron Keren2015-07-241-49/+45
| | | | | | | | Address Richard Smith comments: remove the trailing seperator from the Arch variable, implement six mingw_* trees under tools/clangtest/Driver/Inputs and merge linux and Windows tests into a universal test that uses these trees. llvm-svn: 243098
* [clang-cl] Implement support for the /Zl flagDavid Majnemer2015-07-241-8/+15
| | | | | | | | | The flag allows users to specify that they do not want the object file to have any implicit /defaultlib directives. This fixes PR24236. llvm-svn: 243097
* [Compiler-RT] Remove dependency on libgcc_s/ehRenato Golin2015-07-231-7/+0
| | | | | | | | | | | | | | Currently, for --rtlib=compiler-rt on GNU systems, we're assuming that one has libgcc_s and libgcc_eh as low-level libraries, which when used in conjunction with -lunwind or -lc++abi, breaks that assumption. My original fix was wrong, and this patch reverts it to prepare for a new flag to choose the unwinder/C++ libraries. For the time being, people can use "-lgcc_s -lgcc_eh" or "-lunwind -lc++abi" or any combination they need explicitly. llvm-svn: 243025
* [mingw] Add support for -rtlib option and -stdlib option to the mingw driverReid Kleckner2015-07-222-37/+46
| | | | | | | | | | Now clang should be able to use compiler-rt and libc++ on mingw. Based on a patch by Martell Malone. Differential Revision: http://reviews.llvm.org/D11237 llvm-svn: 242905
* Pass -I options to integrates and external assemblersRenato Golin2015-07-221-0/+4
| | | | | | | | Fixes PR21000. Patch by Artem Belevich. llvm-svn: 242904
* Fix mingw toolchain to honor sysroot on Linux and add tests.Yaron Keren2015-07-212-43/+86
| | | | | | | | It should now support three mingw distributions running on Windows and three Linux distributions. The include directories for each are listed in the comments. llvm-svn: 242766
* [ARM] Pass subtarget feature "+reserve-r9" instead of passing backendAkira Hatanaka2015-07-211-7/+6
| | | | | | | | | | | | | | | | | | option "-arm-reserve-r9". This recommits r242736, which had to be reverted because the llvm-side change that was committed in r242737 caused the number of subtarget features to go over the limit of 64. This change is needed since backend options do not make it to the backend when doing LTO and are not capable of changing the behavior of code-gen passes on a per-function basis. rdar://problem/21529937 Differential Revision: http://reviews.llvm.org/D11319 llvm-svn: 242755
* Revert r242736.Akira Hatanaka2015-07-201-6/+7
| | | | | | | | | r242737 caused builds to fail with the following error message, so I'm reverting the clang side change too: error:Too many subtarget features! Bump MAX_SUBTARGET_FEATURES. llvm-svn: 242741
* [ARM] Pass subtarget feature "+reserve-r9" instead of passing backendAkira Hatanaka2015-07-201-7/+6
| | | | | | | | | | | | | | option "-arm-reserve-r9". This change is needed since backend options do not make it to the backend when doing LTO and are not capable of changing the behavior of code-gen passes on a per-function basis. rdar://problem/21529937 Differential Revision: http://reviews.llvm.org/D11319 llvm-svn: 242736
* [CUDA] Moved device-side triple calculation to buildCudaActions().Artem Belevich2015-07-202-26/+26
| | | | | | Differential Revision: http://reviews.llvm.org/D11310 llvm-svn: 242718
* Fixed style issues pointed out by Justin Bogner.Artem Belevich2015-07-203-39/+35
| | | | | | Differential Revision: http://reviews.llvm.org/D11273 llvm-svn: 242698
* Remove erroneous space in "lib64" string constant.Yaron Keren2015-07-201-1/+1
| | | | llvm-svn: 242667
* Allow case-insensitive values for -mtune for AArch64 target in line with GCC.Gabor Ballabas2015-07-201-4/+5
| | | | | | | | | GCC allows case-insensitive values for -mcpu, -march and -mtune options. This patch implements the same behaviour for the -mtune option for the AArch64 target. Differential Revision: http://reviews.llvm.org/D10563 llvm-svn: 242663
* Fix typo found by Joerg Sonnenberger.Yaron Keren2015-07-201-1/+1
| | | | llvm-svn: 242662
* Support mingw toolchain include and lib directories on Arch Linux.Yaron Keren2015-07-201-27/+40
| | | | | | Thanks to Thomas Pochtrager for testing this! llvm-svn: 242660
* Silence the driver warnings, if we see "-w" on the Driver.Filipe Cabecinhas2015-07-181-0/+3
| | | | | | | | | | | | | | | | | | Summary: We can enable warnings after that -w, so the patch might not be 100% correct. The problem that triggered this is: we have some amount of tests that expect 0 warnings (including unit tests for -w), but -w ends up not fully silencing everything. Reviewers: echristo, chandlerc Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D11322 llvm-svn: 242606
* Driver/ToolChain/AMDGPU: Attempt to fix buildbots after r242601Tom Stellard2015-07-181-1/+1
| | | | llvm-svn: 242602
* Driver: Add AMDGPU toolchainTom Stellard2015-07-185-0/+58
| | | | | | | | | | | | | | Summary: This is a minimal toolchain, which sets the integrated assembler as default, and uses lld for linking. Reviewers: arsenm, mcrosier Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D10700 llvm-svn: 242601
* Fix -save-temp when using objc-arc, sanitizer and profilingSteven Wu2015-07-171-7/+4
| | | | | | | | | | | | Currently, -save-temp will cause ObjCARC optimization to be dropped, sanitizer pass to run early in the pipeline, and profiling instrumentation to run twice. Fix the issue by properly disable all passes in the optimization pipeline when generating bitcode output and parse some of the Language Options even when the input is bitcode so the passes can be setup correctly. llvm-svn: 242565
* [Mips] Set mips64r6 as default CPU for MIPS64 AndroidPetar Jovanovic2015-07-171-0/+4
| | | | | | | | Change default CPU for MIPS64 Android. Now it is mips64r6. Differential Revision: http://reviews.llvm.org/D11294 llvm-svn: 242522
* Driver: Determine file names for crash reports more reliablyJustin Bogner2015-07-172-59/+63
| | | | | | | | Guessing which file name to replace based on the -main-file-name argument to -cc1 is flawed. Instead, keep track of which arguments are inputs to each command. llvm-svn: 242504
* [ARM] Pass subtarget feature "+no-movt" instead of passing backend optionAkira Hatanaka2015-07-161-4/+4
| | | | | | | | | | | | | | "-arm-use-movt=0". This change is needed since backend options do not make it to the backend when doing LTO and are not capable of changing the behavior of code-gen passes on a per-function basis. rdar://problem/21529937 Differential Revision: http://reviews.llvm.org/D11025 llvm-svn: 242368
* [clang-cl] Use the Windows response file tokenizerReid Kleckner2015-07-151-1/+3
| | | | | | | | | | | | | | | | | | | | We were still using the Unix response file tokenizer for all driver modes. This was difficult to get right in the beginning because there is a circular dependency. The Driver class also can't officially determine its mode until it can see all possible --driver-mode= flags, and those flags could come from the response file. Now we use the Windows parsing algorithm if the program name looks like clang-cl, or if the --driver-mode=cl flag is present on the main command line. Fixes PR23709. Reviewers: hans Differential Revision: http://reviews.llvm.org/D11229 llvm-svn: 242346
* Run clang-format on Tools.h, the indentation is inconsistentReid Kleckner2015-07-151-392/+378
| | | | llvm-svn: 242309
* CodeGen: Improve CFI type blacklisting mechanism.Peter Collingbourne2015-07-151-0/+2
| | | | | | | | | | We now use the sanitizer special case list to decide which types to blacklist. We also support a special blacklist entry for types with a uuid attribute, which are generally COM types whose virtual tables are defined externally. Differential Revision: http://reviews.llvm.org/D11096 llvm-svn: 242286
* Driver: Delete dead codeJustin Bogner2015-07-141-7/+0
| | | | | | VerifyJobActions never have multiple inputs. llvm-svn: 242223
* [clang-cl] Disable C++ exceptions a different wayReid Kleckner2015-07-141-7/+3
| | | | | | | | | | Rather than making -fexceptions a core option that enables C++ EH in clang-cl, users can use the '-Xclang -fexceptions -Xclang -fcxx-exceptions' flag set. We weren't going to expose -fexceptions in clang-cl in the long run, so this way we don't add and then remove a flag. llvm-svn: 242176
* Support mingw-w64 toolchain on openSUSE and likely other LinuxesYaron Keren2015-07-141-1/+28
| | | | | | Thanks to Ismail Donmez for testing and to Joerg Sonnenbergerþ for his comments. llvm-svn: 242150
* Add support for -fuse-ld= in the mingw toolchain driver.Yaron Keren2015-07-141-2/+10
| | | | | | | | | | | | We will still default to ld until such a time lld become a stable release. lld supports arm NT under the machine name "thumb2pe". http://reviews.llvm.org/D11088 Patch by Martell Malone Reviewed by Reid Kleckner llvm-svn: 242121
* [cuda] Driver changes to compile and stitch together host and device-side ↵Artem Belevich2015-07-137-16/+313
| | | | | | | | | | | | | | | | | | | | | | | | | | CUDA code. NOTE: reverts r242077 to reinstate r242058, r242065, 242067 and includes fix for OS X test failures. - Changed driver pipeline to compile host and device side of CUDA files and incorporate results of device-side compilation into host object file. - Added a test for cuda pipeline creation in clang driver. New clang options: --cuda-host-only - Do host-side compilation only. --cuda-device-only - Do device-side compilation only. --cuda-gpu-arch=<ARCH> - specify GPU architecture for device-side compilation. E.g. sm_35, sm_30. Default is sm_20. May be used more than once in which case one device-compilation will be done per unique specified GPU architecture. Differential Revision: http://reviews.llvm.org/D9509 llvm-svn: 242085
* [OpenMP] Add TLS-based implementation for threadprivate directive.Samuel Antao2015-07-131-0/+10
| | | | llvm-svn: 242080
* This reverts commit r242058, r242065, r242067.Rafael Espindola2015-07-137-313/+16
| | | | | | | | | | The tests were failing on OS X. Revert "[cuda] Driver changes to compile and stitch together host and device-side CUDA code." Revert "Fixed regex to properly match '64' in the test case." Revert "clang/test/Driver/cuda-options.cu REQUIRES clang-driver, at least." llvm-svn: 242077
* [cuda] Driver changes to compile and stitch together host and device-side ↵Artem Belevich2015-07-137-16/+313
| | | | | | | | | | | | | | | | | | | | | | | CUDA code. - Changed driver pipeline to compile host and device side of CUDA files and incorporate results of device-side compilation into host object file. - Added a test for cuda pipeline creation in clang driver. New clang options: --cuda-host-only - Do host-side compilation only. --cuda-device-only - Do device-side compilation only. --cuda-gpu-arch=<ARCH> - specify GPU architecture for device-side compilation. E.g. sm_35, sm_30. Default is sm_20. May be used more than once in which case one device-compilation will be done per unique specified GPU architecture. Differential Revision: http://reviews.llvm.org/D9509 llvm-svn: 242058
* Disable C++ EH by default for clang-cl and MSVC environmentsReid Kleckner2015-07-101-16/+21
| | | | | | | | | We don't need any more bug reports from users telling us that MSVC-style C++ exceptions are broken. Developers and adventurous users can still test the existing functionality by passing along -fexceptions to either clang or clang-cl. llvm-svn: 241952
* Add an experimental flag -fsanitize-memory-use-after-dtor.Evgeniy Stepanov2015-07-101-0/+7
| | | | | | | | | | | This flag will enable detection of use-after-destructor (but before memory deallocation) bugs. No actual functionality yet. https://code.google.com/p/address-sanitizer/issues/detail?id=73 Patch by Naomi Musgrave. llvm-svn: 241935
OpenPOWER on IntegriCloud