summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/ToolChains.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [asan] Add iOS support for Address SanitizerAnna Zaks2016-02-021-6/+24
| | | | | | Differential Revision: http://reviews.llvm.org/D15624 llvm-svn: 259453
* ARMv7k: simplify logic for deciding sjlj-exceptions.Tim Northover2016-01-271-2/+1
| | | | | | | Slight change of behaviour in the odd armv7+watchos case, which should match the other runtime components. llvm-svn: 258994
* ARMv7k: select ABI based on v7k Arch rather than watchos OS.Tim Northover2016-01-271-1/+3
| | | | | | | | Various bits we'd like to use the new ABI actually compile with "-arch armv7k -miphoneos-version-min=9.0". Not ideal, but also not ridiculous given how slices work. llvm-svn: 258976
* Introduce -fsanitize-stats flag.Peter Collingbourne2016-01-161-0/+7
| | | | | | | | | This is part of a new statistics gathering feature for the sanitizers. See clang/docs/SanitizerStats.rst for further info and docs. Differential Revision: http://reviews.llvm.org/D16175 llvm-svn: 257971
* [CUDA] Invoke ptxas and fatbinary during compilation.Justin Lebar2016-01-141-7/+20
| | | | | | | | | | | | | | | | | | | | Summary: Previously we compiled CUDA device code to PTX assembly and embedded that asm as text in our host binary. Now we compile to PTX assembly and then invoke ptxas to assemble the PTX into a cubin file. We gather the ptx and cubin files for each of our --cuda-gpu-archs and combine them using fatbinary, and then embed that into the host binary. Adds two new command-line flags, -Xcuda_ptxas and -Xcuda_fatbinary, which pass args down to the external tools. Reviewers: tra, echristo Subscribers: cfe-commits, jhen Differential Revision: http://reviews.llvm.org/D16082 llvm-svn: 257809
* [WebAssembly] Configure some simple include paths and runtime library settings.Dan Gohman2016-01-141-0/+23
| | | | llvm-svn: 257774
* [Darwin] Fix deployment target detectionFrederic Riss2016-01-121-1/+1
| | | | | | | | | There was a thinko in the deployment target detection code that made the -isysroot parsing have precedence over the environment variable for tvOS. This patch makes this logic symetric for all platforms (the env variable must have precedence). llvm-svn: 257543
* [Hexagon] Treat -march and -mcpu as equivalentKrzysztof Parzyszek2016-01-061-7/+2
| | | | llvm-svn: 256977
* [Hexagon] Use back_inserter as target iterator in std::copyKrzysztof Parzyszek2016-01-061-1/+2
| | | | llvm-svn: 256934
* Fix C++ support on recent DragonFly BSD releasesDimitry Andric2015-12-271-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: [ Copied from https://llvm.org/bugs/show_bug.cgi?id=25597 ] Clang support for DragonFly BSD is lagging a bit, resulting in poor support for c++. DragonFlyBSD is unique in that it has two base compilers. At the time of the last Clang update for DragonFly, these compilers were GCC 4.4 and GCC 4.7 (default). With DragonFly Release 4.2, GCC 4.4 was replaced with GCC 5.0, partially because the C++11 support of GCC 4.7 was incomplete. The DragonFly project will Release version 4.4 soon. This patch updates the Clang driver to use libstdc++ from GCC 5.2 The support for falling back to the alternate compiler was removed for two reasons: 1) The last release to use GCC 4.7 is DF 4.0 which has already reached EOL 2) GCC 4.7 libstdc++ is insufficient for many "ports" Therefore, I think it is reasonable that the development version of clang expects GCC 5.2 to be in place and not try to fall back to another compiler. The attached patch will do this. The Tools.cpp file was signficantly modified to fix the linking which had been changed somewhere along the line. The rest of the changes should be self-explanatory. Reviewers: joerg, rsmith, davide Subscribers: jrmarino, davide, cfe-commits Differential Revision: http://reviews.llvm.org/D15166 llvm-svn: 256467
* [WebAssembly] Initial linking support.Dan Gohman2015-12-161-0/+13
| | | | | | | | | This begins minimal support for invoking 'ld' from clang for WebAssembly targets. Differential Revision: http://reviews.llvm.org/D15586 llvm-svn: 255848
* [CUDA] renamed cuda_runtime.h wrapper to __cuda_runtime.hArtem Belevich2015-12-161-1/+1
| | | | | | | | | | | | | | Currently it's easy to break CUDA compilation by passing "-isystem /path/to/cuda/include" to compiler which leads to compiler including real cuda_runtime.h from there instead of the wrapper we need. Renaming the wrapper ensures that we can include the wrapper regardless of user-specified include paths and files. Differential Revision: http://reviews.llvm.org/D15534 llvm-svn: 255802
* [Hexagon] Update default paths and argumentsKrzysztof Parzyszek2015-12-141-128/+87
| | | | | | | | | - Removed support for hexagonv3 and earlier. - Added handling of hexagonv55 and hexagonv60. - Added handling of target features (hvx, hvx-double). - Updated paths to reflect current directory layout. llvm-svn: 255502
* Driver: add multilibs for ARM EBSaleem Abdulrasool2015-12-111-0/+12
| | | | | | | | This improves the coverage for the multilib directories used for ARM. Also add tests covering the internal triple (thumbv7-*). The Juno board can be run in this configuration. llvm-svn: 255328
* [PPC64, TSAN] Enable thread sanitizer for PPC64Bill Schmidt2015-12-081-1/+1
| | | | | | | | Patch by Simone Atzeni. This enables the -fsanitize=thread flag for PPC64 and PPC64LE. llvm-svn: 255067
* 80-col and whitespace fixups.Eric Christopher2015-12-071-9/+12
| | | | llvm-svn: 254958
* Revert Sparc and SparcV9 to external assembler. Now that the CPUJoerg Sonnenberger2015-11-271-3/+0
| | | | | | | | handling is corrected, the primary reason for forcing IAS as default is gone and the remaining issues are still somewhat problematic in common situations. llvm-svn: 254199
* Driver: Defer computation of linker path until it is needed.Peter Collingbourne2015-11-201-6/+1
| | | | | | | This allows us to construct Linux toolchains without a valid linker. This is needed for example to build a CUDA device toolchain after r253385. llvm-svn: 253707
* [Myriad]: handle Preprocess job action (-E)Douglas Katzman2015-11-201-0/+1
| | | | llvm-svn: 253647
* Support CMake's clang_rt.profile library naming schemeChris Bieneman2015-11-201-11/+25
| | | | | | | | | | | | Summary: This code is a bit undesirable, but it gets clang to work with the autoconf and cmake-built libclang_rt.profile libraries. Reviewers: bogner Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D14847 llvm-svn: 253625
* [Myriad]: insert -L paths into linker cmd only when they exist.Douglas Katzman2015-11-181-21/+20
| | | | | | Differential Revision: http://reviews.llvm.org/D14754 llvm-svn: 253467
* [CUDA] Make CUDA compilation usable by default.Artem Belevich2015-11-171-1/+5
| | | | | | | | | | | | | | | | | | 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
* [CUDA] Detect and link with CUDA's libdevice bitcode library.Artem Belevich2015-11-171-0/+41
| | | | | | | | | | | - added detection of libdevice bitcode file and API to find one appropriate for the GPU we're compiling for. - pass additional cc1 options for linking with detected libdevice bitcode - added -nocudalib to prevent automatic linking with libdevice - added test cases to verify new functionality Differential Revision: http://reviews.llvm.org/D14556 llvm-svn: 253387
* [CUDA] added include paths for both sides of CUDA compilation.Artem Belevich2015-11-171-0/+9
| | | | | | | | | | | | | | | | | | | | | 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
* ARM: fix mismatch between Clang and backend on exception type.Tim Northover2015-11-171-6/+2
| | | | | | | | | | | | "-arch armv7k" is only normally used with a watchos target, but Clang doesn't stop you from giving a "-miphoneos-version-min" option too, converting the triple to "thumbv7k-apple-ios". In this case the backend will decide to use SjLj exceptions, so Clang needs to agree so it can create the correct predefines. Fortunately, there's a handy function to make the decision for us now. llvm-svn: 253355
* [mips] Do not add arch name in the compiler-rt's components.Vasileios Kalintiris2015-11-161-2/+1
| | | | | | | Instead, use the constant "mips" since the libraries are already placed under the multilib's OS suffix. llvm-svn: 253214
* Re-recommit: Add support for the new mips-mti-linux toolchain.Vasileios Kalintiris2015-11-121-3/+162
| | | | | | | | 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
* [Driver] Use platform-appropriate profiling libraries for WatchOS, TVOSVedant Kumar2015-11-101-2/+10
| | | | | | | | | | | | | When adding profiling instrumentation, use libclang_rt.profile_tvos.a for TVOS targets and libclang_rt.profile_watchos.a for WatchOS targets. I've also fixed up a comment and added an assert() that prevents us from defaulting to an incorrect platform. Differential Revision: http://reviews.llvm.org/D14521 Reviewed-by: t.p.northover llvm-svn: 252558
* Extend linux header search to find libc++ headers in c++/vN for any N.Evgeniy Stepanov2015-11-091-6/+22
| | | | llvm-svn: 252514
* [tsan] Add Clang frontend support for TSan on OS XKuba Brecka2015-11-061-0/+3
| | | | | | | | We're currently in process of porting TSan to OS X, and quite a few of the initial support in the runtime library has already landed in trunk. This patch actually enables "-fsanitize=thread" in the frontend. Differential Revision: http://reviews.llvm.org/D14440 llvm-svn: 252310
* Disable SjLj exceptions for watchOSTim Northover2015-10-301-4/+12
| | | | llvm-svn: 251709
* Watch and TV OS: wire up basic ABI choicesTim Northover2015-10-301-3/+1
| | | | | | | 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
* Support watchOS and tvOS driver optionsTim Northover2015-10-301-27/+158
| | | | | | | | 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
* Revert "[mips] Add support for the new mips-mti-linux toolchain."Vasileios Kalintiris2015-10-301-162/+3
| | | | | | | This reverts commits r251633. I'll investigate the test failure off trunk in order to keep the buildbots clean. llvm-svn: 251698
* add support of the latest Ubuntu (Xenial Xerus)Sylvestre Ledru2015-10-291-1/+3
| | | | llvm-svn: 251639
* [mips] Add support for the new mips-mti-linux toolchain.Vasileios Kalintiris2015-10-291-3/+162
| | | | | | | | | | 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
* Put global classes into the appropriate namespace.Benjamin Kramer2015-10-281-0/+2
| | | | | | | Most of the cases belong into an anonymous namespace. No functionality change intended. llvm-svn: 251514
* Create undef reference to profile hook symbol Xinliang David Li2015-10-271-0/+13
| | | | | | | | | Create undef reference to profile hook symbol when PGO instrumentation is turned on. This allows LLVM to omit emission of hook variable use method for every single module instrumented. llvm-svn: 251385
* clang driver toolchain refactoringXinliang David Li2015-10-221-9/+2
| | | | | | | | | | | | | | 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
* Roll-back r250822.Angel Garcia Gomez2015-10-201-6/+6
| | | | | | | | | | Summary: It breaks the build for the ASTMatchers Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D13893 llvm-svn: 250827
* Apply modernize-use-default to clang.Angel Garcia Gomez2015-10-201-6/+6
| | | | | | | | | | | | Summary: Replace empty bodies of default constructors and destructors with '= default'. Reviewers: bkramer, klimek Subscribers: klimek, alexfh, cfe-commits Differential Revision: http://reviews.llvm.org/D13890 llvm-svn: 250822
* Teach MyriadToolchain how to find its C++ header paths.James Y Knight2015-10-161-32/+50
| | | | | | | Also move the addLibStdCXXIncludePaths helper function from Linux to Generic_GCC. llvm-svn: 250536
* Bring back r250262: PS4 toolchainFilipe Cabecinhas2015-10-141-0/+74
| | | | | | | | | | | | | | 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
* Revert-to-green r250262 (PS4 toolchain patch)Sean Silva2015-10-141-74/+0
| | | | | | | 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
* I took care of the build problem in the commit 250252.Ekaterina Romanova2015-10-141-0/+74
| | | | | | | | | | | | | | 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
* reverting my patch, cause build problemsEkaterina Romanova2015-10-141-74/+0
| | | | llvm-svn: 250257
* This patch adds missing pieces to clang, including the PS4 toolchainEkaterina Romanova2015-10-131-0/+74
| | | | | | | | | | | 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
* [VFS] Wire up multilib toolchain code to the VFS.Benjamin Kramer2015-10-091-10/+13
| | | | | | This lets a VFSified driver actually validate the GCC paths. llvm-svn: 249829
* Use Triple.isAndroid() where possible.Evgeniy Stepanov2015-10-081-4/+3
| | | | llvm-svn: 249751
* [VFS] Port driver tool chains to VFS.Benjamin Kramer2015-10-071-120/+126
| | | | | | | There are still some loose ends here but it's sufficient so we can detect GCC headers that are inside of a VFS. llvm-svn: 249556
OpenPOWER on IntegriCloud