summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/ToolChains.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Update for API change in LLVM: ARMTargetParser class is just the ARMChandler Carruth2015-08-301-2/+2
| | | | | | namespace. llvm-svn: 246368
* Support Debian s390x multiarch pathsSylvestre Ledru2015-08-281-0/+9
| | | | | | | | | | Summary: Patch by Steven Chamberlain <steven@pyro.eu.org> Reviewers: uweigand Differential Revision: http://reviews.llvm.org/D12430 llvm-svn: 246295
* Change Native Client x86 usr include and link path to match SDK expectationsDerek Schuff2015-08-261-4/+13
| | | | | | | | | | | | GNU multilib style uses x86_64-nacl/include and x86_64-nacl/usr/include but the SDK expects i686-nacl/usr/include for its files. Change the driver to use this. Fixes https://code.google.com/p/nativeclient/issues/detail?id=4108 Differential Revision: http://reviews.llvm.org/D11271 llvm-svn: 246040
* Use GetLinkerPath utility function to find linker for NaCl toolchainDerek Schuff2015-08-241-1/+1
| | | | | | | | | | | | | | Summary: This is more consistent with other targets and also makes the -fuse-ld flag work. Reviewers: jvoung Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10697 llvm-svn: 245908
* Represent 2 parallel string arrays as one string[][2] array.Douglas Katzman2015-08-141-19/+19
| | | | | | Differential Revision: http://reviews.llvm.org/D11991 llvm-svn: 245063
* [AArch64] Enable thread sanitizer on clangRenato Golin2015-08-051-2/+2
| | | | | | | | With this option, clang can use -fsanitize=thread on AArch64. Patch by Adhemerval Zanella. llvm-svn: 244091
* [sanitizers] Enable dfsan for aarch64Adhemerval Zanella2015-07-301-1/+4
| | | | | | This patch enables DFSan for aarch64/linux. llvm-svn: 243685
* Rename {Hexagon,NaCl}_TC to {Hexagon,NaCl}ToolChain respectively. NFCDouglas Katzman2015-07-271-50/+54
| | | | | | | | | 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
* Driver: Add AMDGPU toolchainTom Stellard2015-07-181-0/+10
| | | | | | | | | | | | | | 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
* [cuda] Driver changes to compile and stitch together host and device-side ↵Artem Belevich2015-07-131-0/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* This reverts commit r242058, r242065, r242067.Rafael Espindola2015-07-131-59/+0
| | | | | | | | | | 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-131-0/+59
| | | | | | | | | | | | | | | | | | | | | | | 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
* Add GCC-compatible flags -fprofile-generate and -fprofile-use.Diego Novillo2015-07-091-0/+1
| | | | | | | | | | | | | | | | | | This patch adds support for specifying where the profile is emitted in a way similar to GCC. These flags are used to specify directories instead of filenames. When -fprofile-generate=DIR is used, the compiler will generate code to write to <DIR>/default.profraw. The patch also adds a couple of extensions: LLVM_PROFILE_FILE can still be used to override the directory and file name to use and -fprofile-use accepts both directories and filenames. To simplify the set of flags used in the backend, all the flags get canonicalized to -fprofile-instr-{generate,use} when passed to the backend. The decision to use a default name for the profile is done in the driver. llvm-svn: 241825
* [Driver] semi-annual ubuntu version bump.Benjamin Kramer2015-07-091-1/+3
| | | | llvm-svn: 241812
* [MIPS] Add support for direct-to-nacl in ClangPetar Jovanovic2015-07-081-0/+14
| | | | | | | | | | | For Mips direct-to-nacl, the goal is to be close to le32 front-end and use Mips32EL backend. This patch defines new NaClMips32ELTargetInfo and modifies it slightly to be close to le32. It also adds necessary parts, inline with ARM and X86. Differential Revision: http://reviews.llvm.org/D10739 llvm-svn: 241678
* [Driver] x86-64 Windows is always PICDavid Majnemer2015-06-281-2/+6
| | | | | | This fixes PR23963. llvm-svn: 240902
* [PPC]: Fix bug in getMultiarchTriple.Douglas Katzman2015-06-261-18/+22
| | | | | | | | And generally prefer not to restate TargetTriple.str() over and over. Differential Revision: http://reviews.llvm.org/D10605 llvm-svn: 240808
* clang-format some of the files in lib/Driver. NFCDouglas Katzman2015-06-261-580/+489
| | | | | | | | | Nothing was hand edited afterward except a few literal strings and comments that were poorly broken. Differential Revision: http://reviews.llvm.org/D10689 llvm-svn: 240791
* Use more range-based for loopsDouglas Katzman2015-06-251-40/+35
| | | | | | Differential Revision: http://reviews.llvm.org/D10738 llvm-svn: 240674
* Teach Clang about the PPC64 memory sanitizer implementation.Jay Foad2015-06-251-1/+4
| | | | | | | | | | | | | | | | Summary: This is the Clang part of the PPC64 memory sanitizer implementation in D10648. Reviewers: kcc, eugenis, willschm, wschmidt, samsonov Reviewed By: samsonov Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D10650 llvm-svn: 240628
* Update darwin SDK version parsing to support OSX and simulatorSteven Wu2015-06-251-8/+23
| | | | | | | | | | This re-commits r226005 with a tweak. The origin attempt failed because Darwin bot sets up SDKROOT and clang can deduce SDK version from them after this patch. That broke many driver tests due to the change of deployment target version. Now the tests should not complain after r240574. llvm-svn: 240619
* [UBSan] Allow to use -fsanitize=vptr only on Mac OS 10.9+Alexey Samsonov2015-06-251-5/+5
| | | | | | | See https://llvm.org/bugs/show_bug.cgi?id=23539 for why this is necessary. llvm-svn: 240618
* Pedantically rename all Tool subclasses to be nouns, not verbs. NFCDouglas Katzman2015-06-231-65/+40
| | | | | | | | | | | | | | | | | | Classes in Tools.h inherit ultimately from Tool, which is a noun, but subclasses of Tool were named for their operation, such as "Compile", wherein the constructor call "Compile(args...)" could be misconstrued as actually causing a compile to happen. Likewise various other methods were not harmonious with their effect, in that "BuildLinker()" returned a "new namespace::Link(...)" instead of a "new namespace::Linker(...)" which it now does. Exceptions: Clang and ClangAs are un-renamed. Those are their rightful names. And there is no particulary great way to name the "Lipo-er" and a few others. Differential Revision: http://reviews.llvm.org/D10595 llvm-svn: 240455
* Eliminate "enumeration value not handled in switch" warningsDouglas Katzman2015-06-231-0/+2
| | | | | | (Caused by r240370) llvm-svn: 240376
* Change some if/else chains to 'switch' statements. NFCDouglas Katzman2015-06-231-24/+46
| | | | | | Differential Revision: http://reviews.llvm.org/D10612 llvm-svn: 240370
* Add comment about the importance of being adjacent. NFCDouglas Katzman2015-06-221-0/+3
| | | | llvm-svn: 240328
* [Sanitizers] Provide better diagnostic for sanitizers unsupported for target ↵Alexey Samsonov2015-06-191-20/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | triple. Introduce ToolChain::getSupportedSanitizers() that would return the set of sanitizers available on given toolchain. By default, these are sanitizers which don't necessarily require runtime support and are not toolchain- or architecture-dependent. Sanitizers (ASan, DFSan, TSan, MSan etc.) which cannot function without runtime library are marked as supported only on platforms for which we actually build these runtimes. This would allow more fine-grained checks in the future: for instance, we have to restrict availability of -fsanitize=vptr to Mac OS 10.9+ (PR23539). Update test cases accrodingly: add tests for certain unsupported configurations, remove test cases for -fsanitize=vptr + PS4 integration, as we don't build the runtime for PS4 at the moment. This change was first submitted as r239953 and reverted in r239958. The problem was and still is in Darwin toolchains, which get the knowledge about target platform too late after initializaition, while now we require this information when ToolChain::getSanitizerArgs() is called. r240170 works around this issue. llvm-svn: 240179
* Add nominal support for 'shave' target.Douglas Katzman2015-06-191-0/+43
| | | | | | | | | | | | | | This change passes through C and assembler jobs to Movidius tools by constructing commands which are the same as ones produces by the examples in the SDK. But rather than reference MV_TOOLS_DIR to find tools, we will assume that binaries are installed wherever the Driver would find its native tools. Similarly, this change assumes that -I options will "just work" based on where SDK headers get installed, rather than baking into the Driver some magic paths. Differential Revision: http://reviews.llvm.org/D10440 llvm-svn: 240134
* [Driver] Compute MacOS/iOS version from triple if/when we actually need it. NFC.Alexey Samsonov2015-06-181-24/+19
| | | | llvm-svn: 240065
* [Driver] Remove unused class member. NFC.Alexey Samsonov2015-06-181-6/+0
| | | | llvm-svn: 239981
* [Driver] Simplify code choosing between MacOS and iOS platforms. NFC.Alexey Samsonov2015-06-181-12/+10
| | | | llvm-svn: 239980
* Revert "[Sanitizers] Provide better diagnostic for sanitizers unsupported ↵Alexey Samsonov2015-06-171-55/+20
| | | | | | | | | for target triple." This reverts commit r239953, while I'm investigating assertion failure from http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check/9994/ llvm-svn: 239958
* [Sanitizers] Provide better diagnostic for sanitizers unsupported for target ↵Alexey Samsonov2015-06-171-20/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | triple. Summary: Introduce ToolChain::getSupportedSanitizers() that would return the set of sanitizers available on given toolchain. By default, these are sanitizers which don't necessarily require runtime support (i.e. set from -fsanitize=undefined-trap). Sanitizers (ASan, DFSan, TSan, MSan etc.) which cannot function without runtime library are marked as supported only on platforms for which we actually build these runtimes. This would allow more fine-grained checks in the future: for instance, we have to restrict availability of -fsanitize=vptr to Mac OS 10.9+ (PR23539) Update test cases accrodingly: add tests for certain unsupported configurations, remove test cases for -fsanitize=vptr + PS4 integration, as we don't build the runtime for PS4 at the moment. Test Plan: regression test suite Reviewers: pcc Subscribers: cfe-commits, filcab, eugenis, thakis, kubabrecka, emaste, rsmith Differential Revision: http://reviews.llvm.org/D10467 llvm-svn: 239953
* Remove duplicated alteration to getProgramPaths().Douglas Katzman2015-06-161-4/+0
| | | | | | | | This appears to have been accidental. Differential Revision: http://reviews.llvm.org/D10444 llvm-svn: 239844
* [bpf] add support for BPF backendAlexei Starovoitov2015-06-101-0/+2
| | | | | | add support for bpfel/bpfeb targets llvm-svn: 239496
* range-for'ify Args->filtered_begin(...) loopsSean Silva2015-06-091-8/+3
| | | | | | | We already have Args->filtered(...) which is a drop-in range-for replacement. llvm-svn: 239381
* [SPARC] Add multiarch include paths.James Y Knight2015-06-051-0/+10
| | | | | | | | | | | Adds tests verifying the proper dirs are found in the Debian 8/GCC4.9 layout for sparc (32bit), sparc (32bit) with lib64 multilib, and sparc64. The test cases added here also cover r239047, which fixed the linker paths. llvm-svn: 239154
* [SPARC] Fix multiarch path detection for sparc and sparcv9.James Y Knight2015-06-041-0/+8
| | | | llvm-svn: 239047
* Remove extraneous qualifiers due to "using namespace". NFCDouglas Katzman2015-06-041-9/+9
| | | | llvm-svn: 239038
* Change big 'if' statement into a switch. NFCDouglas Katzman2015-06-031-15/+20
| | | | | | Differential Revision: http://reviews.llvm.org/D10223 llvm-svn: 238955
* [ARMTargetParser] FIXME MachO arch names. NFCRenato Golin2015-05-281-21/+26
| | | | llvm-svn: 238435
* Factor out SmallDataThresholdIkhlas Ajbar2015-05-141-0/+24
| | | | | | This patch factors out SmallDataThreshold code. llvm-svn: 237364
* Driver: Fix a -Wshadow issue from r237091Justin Bogner2015-05-121-1/+1
| | | | | | | | | | The MachO toolchain has an isTargetIOSBased method, but it isn't virtual so it isn't very meaningful to call it. After thinking about this, I guess that putting this logic in the MachO class is a bit of a layering violation anyway. Do this more like how we handle AddLinkRuntimeLibArgs instead. llvm-svn: 237095
* Re-apply "Driver: Make profiling flags work with -nostdlib on Darwin"Justin Bogner2015-05-121-14/+20
| | | | | | | | This time without a stray "true" in an argument list. This reverts r237077, restoring r237074. llvm-svn: 237091
* Revert "Driver: Make profiling flags work with -nostdlib on Darwin"Justin Bogner2015-05-121-20/+14
| | | | | | This revert r237074. These tests are failing all over the place. llvm-svn: 237077
* Driver: Make profiling flags work with -nostdlib on DarwinJustin Bogner2015-05-121-14/+20
| | | | | | | | | | | | | Compiler-rt's Profiling library isn't part of the stdlib, so -nostdlib shouldn't prevent it from being linked. This makes Darwin behave like other toolchains, and link in the profile runtime irrespective of -nostdlib, since the resulting program can't be run unless you link this. I've also added a test to show that other toolchains already behave like this. llvm-svn: 237074
* [Sparc] Add support for 'sparcel' to clang.Douglas Katzman2015-05-111-0/+1
| | | | | | Differential Revision: http://reviews.llvm.org/D8784 llvm-svn: 237001
* Using ARMTargetParser in ClangRenato Golin2015-05-081-0/+2
| | | | | | | | | | | | | | | | This is a starting point for using the TargetParser in Clang, in a simple enough part of the code that can be used without disrupting the crazy platform support that we need to be compatible with other toolchains. Also adding a few FIXME on obvious places that need replacing, but those cases will indeed break a few of the platform assumptions, as arch/cpu names change multiple times in the driver. Finally, I'm changing the "neon-vfpv3" behaviour to match standard NEON, since -mfpu=neon implies vfpv3 by default in both Clang and LLVM. That option string is still supported as an alias to "neon". llvm-svn: 236901
* Revert "Allow case-insensitive values for -mcpu for ARM and AArch64"Renato Golin2015-05-081-1/+1
| | | | | | | This reverts commit r236859, as it broke multiple builds. I'll investigate and reapply when safe. llvm-svn: 236869
* Allow case-insensitive values for -mcpu for ARM and AArch64Renato Golin2015-05-081-1/+1
| | | | | | | | | GCC allows case-insensitive values for -mcpu, -march and -mtune options. This patch implements the same behaviour for the -mcpu option. Patch by Gabor Ballabas. llvm-svn: 236859
OpenPOWER on IntegriCloud