summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/ToolChains.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* InstrProf: Support for setting profile output from command lineJustin Bogner2015-04-301-0/+1
| | | | | | | | | | | | | | | | This change is the third of 3 patches to add support for specifying the profile output from the command line via -fprofile-instr-generate=<path>, where the specified output path/file will be overridden by the LLVM_PROFILE_FILE environment variable. This patch adds the necessary support to the clang frontend, and adds a new test. The compiler-rt and llvm parts are r236055 and r236288, respectively. Patch by Teresa Johnson. Thanks! llvm-svn: 236289
* [ASan] Don't link against libc++abi when not using libc++Hans Wennborg2015-04-091-3/+6
| | | | | | | This is a follow-up to r233860 which added -lc++abi when using ASan on Mac, and broke Chromium's ASan build which doesn't use libc++. llvm-svn: 234521
* [ARM] add support for Cortex-R4/R4FJaved Absar2015-04-091-1/+1
| | | | | | | | Adds ARM Cortex-R4 and R4F support and tests in Clang. Though Cortex-R4 support was present, the support for hwdiv in thumb-mode was not defined or tested properly. This has also been added. llvm-svn: 234488
* Update our list of distros a bit.Benjamin Kramer2015-04-061-6/+15
| | | | | | | | - Debian jessie will be released this month, add the next testing version to the list. - RHEL7 was released last june. - Ubuntu utopic was released last october, vivid will follow later this month. llvm-svn: 234149
* [UBSan] Embed UBSan into ASan runtime (Clang part).Alexey Samsonov2015-04-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Change the way we use ASan and UBSan together. Instead of keeping two separate runtimes (libclang_rt.asan and libclang_rt.ubsan), embed UBSan into ASan and get rid of libclang_rt.ubsan. If UBSan is not supported on a platform, all UBSan sources are just compiled into dummy empty object files. UBSan initialization code (e.g. flag parsing) is directly called from ASan initialization, so we are able to enforce correct initialization order. This mirrors the approach we already use for ASan+LSan. This change doesn't modify the way we use standalone UBSan. Test Plan: regression test suite Reviewers: kubabrecka, zaks.anna, kcc, rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D8645 llvm-svn: 233860
* Add driver support for Native Client SDKDerek Schuff2015-03-301-1/+155
| | | | | | | | | | | | | | Add Tool and ToolChain support for clang to target the NaCl OS using the NaCl SDK for x86-32, x86-64 and ARM. Includes nacltools::Assemble and Link which are derived from gnutools. They are similar to Linux but different enought that they warrant their own class. Also includes a NaCl_TC in ToolChains derived from Generic_ELF with library and include paths suitable for an SDK and independent of the system tools. Differential Revision: http://reviews.llvm.org/D8590 llvm-svn: 233594
* Let Clang invoke CloudABI's linker.Ed Schouten2015-03-261-0/+30
| | | | | | | | | | | | | | | | | | | | | | Now that CloudABI's target information and header search logic for Clang has been submitted, the only thing that remains to be done is adding support for CloudABI's linker. CloudABI uses Binutils ld, although there is some work to use lld instead. This means that this code is largely based on what we use on FreeBSD. There are some exceptions, however: - Only static linking is performed. CloudABI does not support any dynamically linked executables. - CloudABI uses compiler-rt, libc++ and libc++abi unconditionally. Link in these libraries instead of using libgcc_s, libstdc++, etc. - We must ensure that the .eh_frame_hdr is present to make C++ exceptions work properly. Differential Revision: http://reviews.llvm.org/D8250 llvm-svn: 233269
* [UBSan] Use shared library for UBSan on OS X (Clang part).Alexey Samsonov2015-03-231-34/+29
| | | | | | | | | | | | | | | | | | Summary: UBSan is now used in the same way as ASan, and is supported on OSX and on iOS simulator. At the moment ASan and UBSan can't be used together due to PR21112, but I hope to resolve it soon by embedding UBSan into ASan. Test Plan: regression test suite. Reviewers: zaks.anna, kubabrecka Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D8471 llvm-svn: 233035
* [multilib] Turn virtual functor into functin_refBenjamin Kramer2015-03-221-5/+6
| | | | | | And update code to use lambdas where possible, plus random cleanup. NFCI. llvm-svn: 232916
* Remove many superfluous SmallString::str() calls.Yaron Keren2015-03-181-10/+10
| | | | | | | | | | | | | | | Now that SmallString is a first-class citizen, most SmallString::str() calls are not required. This patch removes a whole bunch of them, yet there are lots more. There are two use cases where str() is really needed: 1) To use one of StringRef member functions which is not available in SmallString. 2) To convert to std::string, as StringRef implicitly converts while SmallString do not. We may wish to change this, but it may introduce ambiguity. llvm-svn: 232622
* [Mips] Handle -mips32r[3|5] / -mips64r[3|5] options while selecting ↵Simon Atanasyan2015-02-261-2/+5
| | | | | | | | | | | | lib/headers paths There is no supported toolchain which provides headers / libs / object files specific to the mips32r[3|5] and mips64r[3|5] ISA. So select "r2" specific folders when they are available. http://reviews.llvm.org/D7879 llvm-svn: 230611
* [Mips] Support mips-r6 path suffix for Adnroid MIPS toolchainSimon Atanasyan2015-02-251-0/+2
| | | | | | | This path suffix is used if user provides the -mips32r6 command line options. llvm-svn: 230469
* Driver: Fix use of dangling std::string temporaryBenjamin Kramer2015-02-181-1/+2
| | | | | | | | | | | What's going on here is that the ternary operator produces a std::string rvalue that the StringRef points to. I'd hoped bugs like this were a thing of the past with our asan testing but apparently this code path is only used when LLVM is configured with a custom --with-c-include-dirs setting. Unbreaks bootstrapping with GCC5 on Fedora (PR22625), patch by Jonathan Wakely! llvm-svn: 229719
* [ARM] Add missing M/R class CPUsBradley Smith2015-02-181-3/+3
| | | | | | | | | | | | Add some of the missing M and R class Cortex CPUs, namely: Cortex-M0+ (called Cortex-M0plus for GCC compatibility) Cortex-M1 SC000 SC300 Cortex-R5 llvm-svn: 229661
* Revert "More robust deployment target parsing on darwin"Steven Wu2015-01-141-20/+8
| | | | | | This breaks green-dragon. Revert it and investigate. llvm-svn: 226011
* More robust deployment target parsing on darwinSteven Wu2015-01-141-8/+20
| | | | | | | | | | | | | | | | Summary: This is a more robust way of figuring out implicit deployment target from isysroot. It also handles iphone simulator target. Reviewers: bob.wilson, t.p.northover Reviewed By: t.p.northover Subscribers: t.p.northover, cfe-commits Differential Revision: http://reviews.llvm.org/D6939 llvm-svn: 226005
* Use the integrated assembler by default on 32-bit PowerPC and SPARC.Brad Smith2015-01-141-0/+3
| | | | llvm-svn: 225958
* Revert "Use the integrated assembler by default on 32-bit PowerPC and SPARC"Duncan P. N. Exon Smith2015-01-051-3/+0
| | | | | | | | | This reverts commit r225212. It's failing on multiple buildbots [1][2]. [1]: http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/22032 [2]: http://lab.llvm.org:8080/green/view/Clang/job/clang-stage1-cmake-RA-incremental_check/2357/ llvm-svn: 225221
* Use the integrated assembler by default on 32-bit PowerPC and SPARCBrad Smith2015-01-051-0/+3
| | | | llvm-svn: 225212
* Remove special case for aarch64 static vs. PIC code in iOS kernel code.Bob Wilson2014-12-021-2/+1
| | | | | | | | | | I added this check a while back but then made a note to myself that it should be completely unnecessary since iOS always uses PIC code-gen for aarch64. Since I could never come up with any reason why it would be necessary, I'm just going to remove it and we'll see if anything breaks. rdar://problem/13627985 llvm-svn: 223097
* clang: do not add -pie for tsanDmitry Vyukov2014-11-211-2/+2
| | | | | | | | | Revision 220571 removes the requirement to use -pie for tsan binaries. So remove -pie from driver. Also s/hasZeroBaseShadow/requiresPIE/ because that is what it is used for. Msan does not have zero-based shadow, but requires pie. And in general the relation between zero-based shadow and pie is unclear. http://reviews.llvm.org/D6318 llvm-svn: 222526
* Fix clash of gcc toolchains in hexagon driver regression tests.Samuel Antao2014-11-071-7/+11
| | | | | | If clang was configured with a custom gcc toolchain (either by using GCC_INSTALL_PREFIX in cmake or the equivalent configure command), the path to the custom gcc toolchain path takes precedence to the one specified by -ccc-install-dir. This causes several regression tests to fail as they will be using an unexpected path. Adding the switch --gcc-toolchain="" in each test command is not enough as the hexagon toolchain implementation in the driver is not evaluating this argument. This commit modifies the hexagon toolchain to take the --gcc-toolchain="" argument into account when deciding the toolchain path, similarly to what is already done for other targets toolchains. Additionally, the faulty regression tests are modified in order to --gcc-toolchain="" be passed to the commands. llvm-svn: 221535
* Remove references to the cortex-a9-mp CPU.Charlie Turner2014-11-061-1/+1
| | | | | | | | | | This CPU definition is redundant. The Cortex-A9 is defined as supporting multiprocessing extensions. Remove references to this CPU. This CPU was recently removed from LLVM. See http://reviews.llvm.org/D6057 Change-Id: I62ae7cc656fcae54fbaefc4b6976e77e694a8678 llvm-svn: 221458
* Use @rpath as LC_ID_DYLIB for ASan dylib on OS XKuba Brecka2014-11-041-6/+28
| | | | | | | | Change the LC_ID_DYLIB of ASan's dynamic libraries on OS X to be set to "@rpath/libclang_rt.asan_osx_dynamic.dylib" and similarly for iossim. Clang driver then sets the "-rpath" to be the real path to where clang currently has the dylib (because clang uses the relative path to its current executable). This means if you move the compiler or install the binary release, -fsanitize=address will link to the proper library. Reviewed at http://reviews.llvm.org/D6018 llvm-svn: 221279
* Driver: Pass some std::strings by reference instead of valueDavid Majnemer2014-11-041-2/+2
| | | | | | No functional change intended. This fixes PR21463. llvm-svn: 221249
* Rename 'DarwinStaticLib' to 'DarwinLibName'Kuba Brecka2014-10-311-2/+2
| | | | | | | | | | The former name doesn't make sense, we are using this parameter for both .a and .dylib libraries. No functional change. http://reviews.llvm.org/D6040 llvm-svn: 220939
* Use non-member begin/end for a slight readability improvement.Benjamin Kramer2014-10-181-125/+67
| | | | llvm-svn: 220140
* Adds support for the Cortex-A17 processor to ClangRenato Golin2014-10-131-1/+1
| | | | | | Patch by Matthew Wahab. llvm-svn: 219607
* Treat -mios-simulator-version-min option as an alias for -mios-version-min.Bob Wilson2014-10-101-30/+10
| | | | | | | | We can safely rely on the architecture to distinguish iOS device builds from iOS simulator builds. We already have code to do that, in fact. This simplifies some of the error checking for the option handling. llvm-svn: 219545
* Remove rest of the comment that is no longer true after r219527.Bob Wilson2014-10-101-4/+0
| | | | llvm-svn: 219528
* Remove a FIXME: use the ios_simulator_version_min linker option consistently.Bob Wilson2014-10-101-4/+1
| | | | | | | | | | | | This was previously only used when explicitly requested with a command line option because it had to work with some old versions of the linker when it was first introduced. That is ancient history now, and it should be safe to use the correct option even when using the IPHONEOS_DEPLOYMENT_TARGET environment variable to specify that the target is the iOS simulator. Besides updating the test for this, I also added a few more tests for the iOS linker options. llvm-svn: 219527
* Remove support for the IOS_SIMULATOR_DEPLOYMENT_TARGET env var.Bob Wilson2014-10-101-20/+0
| | | | | | | | It turns out that this was never used. Instead we just use the IPHONEOS_DEPLOYMENT_TARGET variable for both iOS devices and simulator. rdar://problem/18596744 llvm-svn: 219467
* [SystemZ] Turn on the integrated assembler by defaultUlrich Weigand2014-10-091-1/+2
| | | | llvm-svn: 219426
* Turn on the integrated assembler by default for ppc64 andEric Christopher2014-10-061-1/+3
| | | | | | | | ppc64le. Reviewed by Hal Finkel and Bill Schmidt. llvm-svn: 219129
* [ARM] Add support for Cortex-M7, FPv5-SP and FPv5-DPOliver Stannard2014-10-011-1/+1
| | | | | | | | | The Cortex-M7 has 3 options for its FPU: none, FPv5-SP-D16 and FPv5-DP-D16. FPv5 has the same instructions as FP-ARMv8, so it can be modeled using the same target feature, and all double-precision operations are already disabled by the fp-only-sp target features. llvm-svn: 218748
* Test commit. Fix a whitespace in ToolChains.cpp.Rafael Auler2014-09-291-1/+1
| | | | llvm-svn: 218630
* Typo fix, no functionality change.Alexander Potapenko2014-09-011-1/+1
| | | | llvm-svn: 216876
* Call powerpc-darwin external tools with -arch ppc.Rafael Espindola2014-08-281-1/+1
| | | | | | | | | | With this patch we call external tools for powerpc-darwin with "-arch ppc" instead of "-arch powerpc", so as to be compatible with the cctools assembler and ld64 linker. Patch by Stephen Drake! llvm-svn: 216687
* Fix PR20773 which I introduced with a silly edit mistake in r216531.Chandler Carruth2014-08-271-1/+1
| | | | | | | Trivial fix, and I've made the gentoo tests more representative. With the changes, they would have caught this failure. llvm-svn: 216572
* Significantly fix Clang's header search for Ubuntu (and possibly otherChandler Carruth2014-08-271-24/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | modern Debian-based distributions) due to on-going multiarch madness. It appears that when the multiarch heeader search support went into the clang driver, it went in in a quite bad state. The order of includes completely failed to match the order exhibited by GCC, and in a specific case -- when the GCC triple and the multiarch triple don't match as with i686-linux-gnu and i386-linux-gnu -- we would absolutely fail to find the libstdc++ target-specific header files. I assume that folks who have been using Clang on Ubuntu 32-bit systems have been applying weird patches to hack around this. I can't imagine how else it could have worked. This was originally reported by a 64-bit operating system user who had a 32-bit crosscompiler installed. We tried to use that rather than the bi-arch support of the 64-bit compiler, but failed due to the triple differences. I've corrected all the wrong orderings in the existing tests and added a specific test for the multiarch triple strings that are different in a significant way. This should significantly improve the usability of Clang when checked out vanilla from upstream onto Ubuntu machines with an i686 GCC installation for whatever reason. llvm-svn: 216531
* Delete support for AuroraUX.Rafael Espindola2014-08-141-26/+0
| | | | | | auroraux.org is not resolving. llvm-svn: 215644
* [Driver] Support -muclibc / -mglibc command line options for a coupleSimon Atanasyan2014-08-131-3/+20
| | | | | | | | | | | | | of MIPS toolchains. The uCLibc implemented for multiple architectures. A couple of MIPS toolchains contains both uCLibc and glibc implementation so these options allow to select used C library. Initially -muclibc / -mglibc (as well as -mbionic) have been implemented in gcc for various architectures so they are not MIPS specific. llvm-svn: 215552
* For NetBSD, use the same settings for PPC64 as for PPC when it comes toJoerg Sonnenberger2014-08-131-0/+5
| | | | | | | integrated assembler, libc++ and libgcc. Set emulation for ld for both platforms for correct -m32 handling. llvm-svn: 215551
* ToolChains.cpp: Increase size of Lines vector in DetectDistroHans Wennborg2014-08-111-1/+1
| | | | | | In a Clang bootstrap, the size of this vector was always 11. llvm-svn: 215370
* Increase the size of two SmallVectors in ↵Hans Wennborg2014-08-111-2/+2
| | | | | | | | Generic_GCC::GCCInstallationDetector::init In a bootstrap build of Clang, the size was always greater than 12. llvm-svn: 215369
* Use the correct fallback directory for EABIHF targets on NetBSD/arm.Joerg Sonnenberger2014-08-091-2/+4
| | | | | | From Matt Thomas. llvm-svn: 215292
* NetBSD/aarch64 has no libgcc or libstdc++. Drop arm64 tests.Joerg Sonnenberger2014-08-091-0/+1
| | | | llvm-svn: 215291
* Driver: Add -fno-profile-arcs to go with -fprofile-arcsJustin Bogner2014-08-071-1/+2
| | | | | | This is a trivial gcc-compatible change. llvm-svn: 215051
* [Driver] Move information about toolchain specific include directoriesSimon Atanasyan2014-08-061-17/+35
| | | | | | | | | | | | from the common driver code to the corresponding `MultilibSet` declarations. Now the `MultilibSet` can hold an optional callback function which is responsible to return a set of include directories specific for the toolchain. That allows to remove MIPS toolchain specific directories from `Linux::AddClangSystemIncludeArgs` method and simplify adding new directories in the future. llvm-svn: 214949
* Xcore target: Fix CXXStdlibIncludeArgs to check 'nostdinc++' flag too.Robert Lytton2014-08-011-1/+2
| | | | | | | | | | Summary: There are no tests as it is dependant upon the environment variables XCC_C_INCLUDE_PATH & XCC_CPLUS_INCLUDE_PATH being set. Differential Revision: http://reviews.llvm.org/D4621 llvm-svn: 214510
OpenPOWER on IntegriCloud