summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver
Commit message (Collapse)AuthorAgeFilesLines
* The Driver does not set the +strict-align flag when targetingAlexandros Lamprineas2015-10-051-1/+2
| | | | | | | | [ARM] armv6m + netbsd. Tests are misssing for armv6m + darwin as well. Differential Revision: http://reviews.llvm.org/D13217 llvm-svn: 249308
* [mips][p5600] Add -mcpu=p5600 option.Daniel Sanders2015-10-051-1/+1
| | | | | | | | | | | | Summary: Reviewers: vkalintiris, atanasyan Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D12234 llvm-svn: 249306
* Remove support for the mips-mti-linux toolchain.Vasileios Kalintiris2015-10-056-254/+25
| | | | | | | There are two remaining buildbot failures that we'll have to investigate before submitting this again. llvm-svn: 249298
* Re-commit "Add support for the new mips-mti-linux toolchain."Vasileios Kalintiris2015-10-056-25/+254
| | | | | | | | | | | r249137 added support for the new mips-mti-linux toolchain. However, the new tests of that commit, broke some buildbots because they didn't use the correct regular expressions to capture the filename of Clang & LLD. This commit re-applies the changes of r249137 and fixes the tests in r249137 in order to match the filenames of the Clang and LLD executable. llvm-svn: 249294
* Add -f[no-]declspec to control recognition of __declspec as a keywordSaleem Abdulrasool2015-10-041-0/+7
| | | | | | | | | | | | | | | In versions of clang prior to r238238, __declspec was recognized as a keyword in all modes. It was then changed to only be enabled when Microsoft or Borland extensions were enabled (and for CUDA, as a temporary measure). There is a desire to support __declspec in Playstation code, and possibly other environments. This commit adds a command-line switch to allow explicit enabling/disabling of the recognition of __declspec as a keyword. Recognition is enabled by default in Microsoft, Borland, CUDA, and PS4 environments, and disabled in all other environments. Patch by Warren Ristow! llvm-svn: 249279
* Driver: follow WoA ABI recommendationsSaleem Abdulrasool2015-10-031-0/+4
| | | | | | | | | | The Windows on ARM ABI recommends that FPO be disabled. This is since the Windows on ARM ABI uses the FP for fast stack walking. By paying the slight cost of the loss of registers, a much faster backtrace is possible by using the frame pointer since the pdata need not be consulted. Furthermore, even if pdata is not available, you can still more easily reconstruct the stack. llvm-svn: 249227
* [Myriad]: Accept '-nostdlib' optionDouglas Katzman2015-10-021-17/+23
| | | | llvm-svn: 249166
* [DarwinDriver] Reapply: Use -lto_library to specify the path for libLTO.dylibBruno Cardoso Lopes2015-10-021-9/+28
| | | | | | | | | | | | | | | | | | | | | | Reapply r248935. Usually, when using LTO with a clang installation newer than the system's one, there's a libLTO.dylib version mismatch and LTO fails. One solution to this is to make ld point to the right libLTO.dylib by changing DYLD_LIBRARY_PATH. However, ld64 supports specifying the complete path to the desired libLTO.dylib through the -lto_library option. This commit adds support for the clang driver to use this option whenever it's capable of finding a libLTO.dylib in clang's installed library directory. This way, we don't need to rely on DYLD_LIBRARY_PATH nor get caught by version mismatches. Differential Revision: http://reviews.llvm.org/D13117 rdar://problem/7363476 llvm-svn: 249143
* Revert "Add support for the new mips-mti-linux toolchain."Vasileios Kalintiris2015-10-026-254/+25
| | | | | | | This reverts commit r249137 because it broke the Windows buildbots and a Linux buildbot for LLD. llvm-svn: 249141
* Fix bogus comment.Douglas Katzman2015-10-021-1/+1
| | | | llvm-svn: 249138
* Add support for the new mips-mti-linux toolchain.Vasileios Kalintiris2015-10-026-25/+254
| | | | | | | | | | | | | | | | | | | | Summary: This new toolchain uses primarily LLVM-based tools, eg. compiler-rt, lld, libcxx, etc. Because of this, it doesn't require neither an existing GCC installation nor a GNU environment. Ideally, in a follow-up patch we would like to add a new --{llvm|clang}-toolchain option (similar to --gcc-toolchain) in order to allow the use of this toolchain with independent Clang builds. For the time being, we use the --sysroot option just to test the correctness of the paths generated by the driver. Reviewers: atanasyan, dsanders, rsmith Subscribers: jfb, tberghammer, danalbert, srhines, dschuff, cfe-commits Differential Revision: http://reviews.llvm.org/D13340 llvm-svn: 249137
* Allow a ToolChain to compute the path of a compiler-rt's component.Vasileios Kalintiris2015-10-013-57/+44
| | | | | | | | | | | | | | | | Summary: This patch moves getCompilerRT() from the clang::driver::tools namespace to the ToolChain class. This is needed for multilib toolchains that need to place their libraries in Clang's resource directory with a layout that is different from the default one. Reviewers: atanasyan, rsmith Subscribers: tberghammer, danalbert, srhines, cfe-commits Differential Revision: http://reviews.llvm.org/D13339 llvm-svn: 249030
* Revert "[DarwinDriver] Use -lto_library to specify the path for libLTO.dylib"Bruno Cardoso Lopes2015-09-301-28/+9
| | | | | | Revert r248932. Bots complaining about new warnings where they shouldn't. llvm-svn: 248935
* [DarwinDriver] Use -lto_library to specify the path for libLTO.dylibBruno Cardoso Lopes2015-09-301-9/+28
| | | | | | | | | | | | | | | | | | | | Usually, when using LTO with a clang installation newer than the system's one, there's a libLTO.dylib version mismatch and LTO fails. One solution to this is to make ld point to the right libLTO.dylib by changing DYLD_LIBRARY_PATH. However, ld64 supports specifying the complete path to the desired libLTO.dylib through the -lto_library option. This commit adds support for the clang driver to use this option whenever it's capable of finding a libLTO.dylib in clang's installed library directory. This way, we don't need to rely on DYLD_LIBRARY_PATH nor get caught by version mismatches. Differential Revision: http://reviews.llvm.org/D13117 rdar://problem/7363476 llvm-svn: 248932
* Alias "-ggdbN" to "-gN" options, fixing some incompatibilities.Douglas Katzman2015-09-301-4/+2
| | | | | | | * assembling from a .s file mistook -ggdb0 for -g * -ggdb1 is supposed to mean basically -g1, not -gN for N>1 llvm-svn: 248912
* Driver: support ARM/HF on a single toolchainSaleem Abdulrasool2015-09-263-22/+37
| | | | | | | | | | | | | | | | | ARM EABI adds target attributes to the object file. Amongst the attributes that are emitted is the VFP argument passing (Hard vs Soft). The linker is responsible for checking these attributes and erroring on mismatches. This causes problems for the compiler-rt builtins when targeting both hard and soft. Because both of these options name the builtins compiler-rt component the same (libclang_rt.builtins-arm.a or libclang_rt.builtins-arm-android). GCC is able to get away with this as it does one target per toolchain. This changes the naming convention for the ARM compiler-rt builtins to differentiate between HF and Soft. Although this means that compiler-rt may be duplicated, it enables supporting both variants from a single toolchain. A similar approach is taken by the Darwin toolchain, naming the library to differentiate between the calling conventions. llvm-svn: 248649
* The Clang gcc-compatible driver (clang/tools/driver/driver.cpp) has someEric Christopher2015-09-251-0/+94
| | | | | | | | | | | | | | | | | | | | | | | logic to select an alternate target based on the executable it was called as. For instance, if you symlink i686-linux-android-gcc to clang and invoke it, the driver will act as though it were called with another argument ("-target i686-linux-android"). This leads to visible effects even in syntax-only compilations (like the ANDROID preprocessor symbol being defined). This behavior is not replicated for tool invocations--for instance, clang::createInvocationFromCommandLine will not choose an alternate target based on ArgList[0]. This means that configurations stored in compilation databases aren't accurately replayed. This patch separates the logic for selecting a mode flag and target from the executable name into a new member function on ToolChain. It should have no functional effects (but will allow other code to reuse the target/mode selection logic). Patch by Luke Zarko! llvm-svn: 248592
* Revert "This patch adds missing pieces to clang, including the PS4 toolchain ↵Greg Bedwell2015-09-255-456/+7
| | | | | | | | definition, added warnings, PS4 defaults, and Driver changes needed for our compiler." This reverts commit r248546 to get our bot green again while we discuss the best way forward. llvm-svn: 248578
* This patch adds missing pieces to clang, including the PS4 toolchainEkaterina Romanova2015-09-245-7/+456
| | | | | | | | | | | 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/D11279 llvm-svn: 248546
* Enable SafeStack on all Linux platforms.Evgeniy Stepanov2015-09-241-1/+1
| | | | llvm-svn: 248518
* Drop useless const in for-range loops.Benjamin Kramer2015-09-243-10/+10
| | | | | | | | StringRefs always point to immutable memory so the const doesn't add value here. Also quiets clang's -Wrange-loop-analysis which warns about the implicit copying. llvm-svn: 248496
* [Driver] Don't implicitly copy std::strings in for-range loop.Benjamin Kramer2015-09-241-1/+1
| | | | | | Found by -Wrange-loop-analysis. llvm-svn: 248495
* [mips] Relax -mnan=2008 acceptance to permit MIPS32R2 and MIPS64R2.Daniel Sanders2015-09-241-2/+5
| | | | | | | | | | | | | | | Summary: Strictly speaking, the MIPS*R2 ISA's should not permit -mnan=2008 since this feature was added in MIPS*R3. However, other toolchains permit this and we should do the same. Reviewers: atanasyan Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D13057 llvm-svn: 248481
* [ARM] Follow-up to fix crash "-target arm -mcpu=generic", without "-march="Vladimir Sukharev2015-09-241-1/+1
| | | | | | | | | | | Fix of dangling StringRef after temporary std::string is destroyed Follow-up to: http://reviews.llvm.org/rL248479 Reviewers: alexfh Subscribers: cfe-commits llvm-svn: 248480
* [ARM] Follow-up to fix crash "-target arm -mcpu=generic", without "-march="Vladimir Sukharev2015-09-241-3/+3
| | | | | | | | | | | Fix of dangling StringRef after temporary std::string is destroyed Follow-up to: http://reviews.llvm.org/rL248370 Reviewers: alexfh Subscribers: cfe-commits llvm-svn: 248479
* [Driver] Add support for Windows 10 SDKIgor Kudrin2015-09-242-68/+102
| | | | | | | | | | | | | | | | Summary: With Windows 10 SDK, Include and Lib directories now contain an additional subfolder with the name that corresponds to the full version of the SDK, for example: - C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\um - C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\um\x64 Reviewers: ruiu, rnk Subscribers: majnemer, cfe-commits Differential Revision: http://reviews.llvm.org/D12832 llvm-svn: 248463
* cuda-path: StringRef cannot be used here.NAKAMURA Takumi2015-09-241-1/+1
| | | | llvm-svn: 248459
* [darwin] [builtins] Stop generating cc_kext_ios5 and move iOS architectures ↵Chris Bieneman2015-09-231-5/+3
| | | | | | | | | | | | | | | | | out of cc_kext into cc_kext_ios Summary: This corresponds to a patch to compiler-rt (D13112). Xcode 7 doesn't support targeting iOS5 and earlier. Instead of just dropping cc_kext_ios5, I've repurposed it to cc_kext_ios, and I'm pulling the iOS architectures out of cc_kext. Putting OS X and iOS slices inside the same archive was just odd. Reviewers: bogner, bob.wilson Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D13113 llvm-svn: 248442
* [CUDA] Added CUDA installation detector class.Artem Belevich2015-09-232-1/+77
| | | | | | | | | | | Added new option --cuda-path=<path> which allows overriding default search paths. If it's not specified we look for CUDA installation in /usr/include/cuda and /usr/include/cuda-7.0. Differential Revision: http://reviews.llvm.org/D12989 llvm-svn: 248433
* Support linking against OpenMP runtime on NetBSD.Joerg Sonnenberger2015-09-231-0/+1
| | | | llvm-svn: 248426
* Push OpenMP linker flags after linker input on Darwin. Don't add anyJoerg Sonnenberger2015-09-231-2/+4
| | | | | | libraries if -nostdlib is specified. Test. llvm-svn: 248424
* Reverted r248408 "[CUDA] Added CUDA installation detector class."Artem Belevich2015-09-232-77/+1
| | | | | | because included test fails on some platforms. llvm-svn: 248413
* [CUDA] Added CUDA installation detector class.Artem Belevich2015-09-232-1/+77
| | | | | | | | | | | Added new option --cuda-path=<path> which allows overriding default search paths. If it's not specified we look for CUDA installation in /usr/include/cuda and /usr/include/cuda-7.0. Differential Revision: http://reviews.llvm.org/D12989 llvm-svn: 248408
* Refactor library decision for -fopenmp support from Darwin into aJoerg Sonnenberger2015-09-231-17/+23
| | | | | | function for sharing with other platforms. llvm-svn: 248379
* Add -fplugin=name.so option to the driverJohn Brawn2015-09-231-0/+7
| | | | | | | | This translates to -load name.so in the cc1 command. We can't name the driver option -load, as that means "link against oad", so instead we follow GCC's lead and name the option -fplugin. llvm-svn: 248378
* [ARM] Fix crash "-target arm -mcpu=generic", without "-march="Vladimir Sukharev2015-09-233-12/+18
| | | | | | | | | | | | | | | | An assertion hit has been fixed for cmdlines like $ clang --target=arm-linux-gnueabi -mcpu=generic hello.c Related to: http://reviews.llvm.org/rL245445 Reviewers: rengolin Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D13013 llvm-svn: 248370
* Augmented CudaHostAction to carry device-side triple.Artem Belevich2015-09-222-10/+11
| | | | | | Differential Revision: http://reviews.llvm.org/D12893 llvm-svn: 248298
* [CUDA] Fixes minor cuda-related issues in the driverArtem Belevich2015-09-221-13/+20
| | | | | | | | | | * Only the last of the --cuda-host-only/--cuda-device-only options has effect. * CudaHostAction always wraps host-side compilation now. * Fixed printing of empty action lists. Differential Revision: http://reviews.llvm.org/D12892 llvm-svn: 248297
* [mips] Added support for using the command line options -Wa,-msoft-float and ↵Daniel Sanders2015-09-221-0/+6
| | | | | | | | | | | | | | -Wa,-mhard-float. Patch by Scott Egerton. Reviewers: vkalintiris, dsanders Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D12600 llvm-svn: 248276
* Don't pass StringRefs around by const reference. Pass by value instead per ↵Craig Topper2015-09-211-1/+1
| | | | | | coding standards. NFC llvm-svn: 248137
* Convert two loops to range-based loops. No behavior change.Nico Weber2015-09-191-5/+3
| | | | llvm-svn: 248100
* Driver: alter the getARMFloatABI signatureSaleem Abdulrasool2015-09-193-25/+23
| | | | | | | | | | This changes getARMFloatABI to use the ToolChain and Args instead of Driver, Args, Triple. Although this pushes the Triple calculation/parsing into the function itself, it enables the use of the function for a future change. The reason to sink the triple calculation here is to avoid threading the Triple through multiple layers in a future change. llvm-svn: 248095
* Driver: tweak ARM target feature calculationSaleem Abdulrasool2015-09-192-11/+8
| | | | | | | | | Rather than using re-calculating the effective triple, thread the already calculated value down into AddARMTargetArgs. This avoids both recreating the triple, as well as re-parsing the triple as it was already done in the previous frame. llvm-svn: 248094
* Driver: avoid unnecessary string opsSaleem Abdulrasool2015-09-192-24/+35
| | | | | | | | Use an enumeration for the Floating Point ABIs supported on MIPS. This is replicating the ARM change to avoid string based tracking of the floating point ABI. NFC. llvm-svn: 248083
* clang-cl: Use 'pc' for the vendor field in the default tripleHans Wennborg2015-09-181-0/+1
| | | | | | | Leaving it unset can make the triple look confusing, especially when using -m32 or -m64. llvm-svn: 248005
* Use None instead of an explicit constructor.Douglas Katzman2015-09-182-3/+2
| | | | | | | And remove a needless 'const' since ArrayRef is immutable. Both as suggested by dblaikie on cfe-commits. llvm-svn: 247995
* Driver: avoid unnecessary string based operationsSaleem Abdulrasool2015-09-183-61/+71
| | | | | | | | Use an enumeration and change the use of the FloatABI from a string to the enumeration. This avoids the use of string values to represent an enumeration. NFC. llvm-svn: 247967
* [Myriad]: add "<sysroot>/include" to standard search pathDouglas Katzman2015-09-172-0/+9
| | | | llvm-svn: 247948
* Try to unbreak windows compiler after r247926.Douglas Katzman2015-09-171-1/+2
| | | | | | | It might not like {} implicitly cast to an Arrayref. That's the theory, since I can't test it. llvm-svn: 247932
* [Shave]: Drive sparc-myriad-elf-ld directly rather than via gcc.Douglas Katzman2015-09-175-39/+162
| | | | | | Differential Revision: http://reviews.llvm.org/D12541 llvm-svn: 247924
OpenPOWER on IntegriCloud