summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/ToolChains.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Add gold plugin support to the FreeBSD link driver.Roman Divacky2013-11-101-0/+4
| | | | llvm-svn: 194350
* Commit the changes to make libc++ the default on FreeBSD >= 10, rather thanDavid Chisnall2013-11-091-0/+37
| | | | | | just the test... llvm-svn: 194333
* Ubuntu has published its Saucy release. 'Trusty Tahr' dev has just started. ↵Sylvestre Ledru2013-11-071-1/+3
| | | | | | Add its support in Clang llvm-svn: 194198
* Default to use libc++ on OS X 10.9+ and iOS 7+.Bob Wilson2013-11-021-0/+6
| | | | llvm-svn: 193934
* SanitizerArgs: add ability to filter/diagnose unsupported sanitizers.Peter Collingbourne2013-11-011-2/+4
| | | | | | | | | | | | The thread, memory, dataflow and function sanitizers are now diagnosed if enabled explicitly on an unsupported platform. Unsupported sanitizers which are enabled implicitly (as part of a larger group) are silently disabled. As a side effect, this makes SanitizerArgs parsing toolchain-dependent (and thus essentially reverts r188058), and moves SanitizerArgs ownership to ToolChain. Differential Revision: http://llvm-reviews.chandlerc.com/D1990 llvm-svn: 193875
* Teach the driver to not try to use 'lib32' multilib spellings on ARMChandler Carruth2013-10-291-6/+19
| | | | | | | | | | | | | | | | | | | | | | | which doesn't use that multilib. As a consequence, fix Clang's support for cross compiling environments that were relying on this quirk to ensure the correct library search path ordering. This also re-instates the new test cases from Rafael's r193528 for cross-compiling to ARM on Ubuntu 13.10 without any of the changes to the existing test cases (they were no longer needed). This solution was the result of a lot of IRC debugging and trying to understand *exactly* what quirk was being relied upon. It took some time for me to figure out that it was the use of 'lib32' is a multilib that was throwing a wrench in the works. In case you are thinking that its silly to use a multilib of 'lib' at all, entertainingly, GCC does so as well (you can see it with the .../lib/../lib/crt1.o pattern it uses), and the 2-phase sequence of search paths (multilib followed by non-multilib) has observable (if dubious) consequences. =/ Yuck. llvm-svn: 193601
* Doh, got this turned around. This is in fact the consistent ordering.Chandler Carruth2013-10-291-4/+0
| | | | llvm-svn: 193596
* Clean up the deeply misleading name of the "MultiLibSuffix". This isChandler Carruth2013-10-291-36/+31
| | | | | | | | actually a MIPS-only hack to shim in random ABI directory suffixes in numerous places throughout the toolchain's path search. It shouldn't appear to be anything more general or useful. llvm-svn: 193595
* Cleanup comments and braces. No functionality changed, just trying toChandler Carruth2013-10-291-4/+15
| | | | | | | | | record what is *actually* going on here as the comments existing in the code are confusing at best, and in places outright misleading. The API is even more misleading. Yay. llvm-svn: 193577
* Revert "Support cross linking to arm on ubuntu."Rafael Espindola2013-10-281-23/+11
| | | | | | | | This reverts commit r193528 (and fixes). It broke Chandler's setup. llvm-svn: 193554
* Support cross linking to arm on ubuntu.Rafael Espindola2013-10-281-11/+23
| | | | | | | | | | With this patch we correctly determine that ubuntu's ARM tree is not biarch and use "lib" istead of "lib32". Without this patch the search inside the arm tree for the crt files was failing and we would end up trying to use the i686 ones in lib32. llvm-svn: 193528
* Just detect a distro as being fedora or not.Rafael Espindola2013-10-251-18/+4
| | | | | | | We don't have any checks that depend on the version of fedora, so we can simplify. llvm-svn: 193423
* Merge two adjacent ifs.Rafael Espindola2013-10-251-3/+2
| | | | llvm-svn: 193419
* Teach clang driver about Cortex-A53 and Cortex-A57.Bernard Ogden2013-10-241-1/+0
| | | | | | | | | | | Adds some Cortex-A53 strings where they were missing before. Cortex-A57 is entirely new to clang. Doesn't touch code only used by Darwin, in consequence of which one of the A53 lines has been removed. Change-Id: I5edb58f6eae93947334787e26a8772c736de6483 llvm-svn: 193364
* ARM-Darwin: Use the *-*-darwin-eabi triple for v6m & v7m archsTim Northover2013-10-241-4/+12
| | | | | | | These arch arguments are used for embedded targets (obviously) which need a different calling convention to iOS. llvm-svn: 193328
* For NetBSD/current on X86 do not use libgcc and default to libc++.Joerg Sonnenberger2013-10-141-0/+6
| | | | | | Adjust linkage to make more sense for older releases. llvm-svn: 192615
* XCore target: add an xcore toolchain implementationRobert Lytton2013-10-111-0/+75
| | | | llvm-svn: 192437
* [Mips] Support FSF Mips toolchain directories tree in the Clang driver.Simon Atanasyan2013-10-101-25/+128
| | | | | | | The patch reviewed by Rafael Espindola. http://llvm-reviews.chandlerc.com/D1843 llvm-svn: 192343
* [Mips] Group MIPS-related options checking function in one place.Simon Atanasyan2013-10-091-8/+8
| | | | llvm-svn: 192293
* [Mips] Make the isMipsR2Arch() function simpler - remove checking forSimon Atanasyan2013-10-091-7/+2
| | | | | | MIPS-arch. llvm-svn: 192292
* [Mips] Do not check for options from the OPT_mips_CPUs_Group. All theseSimon Atanasyan2013-10-091-9/+2
| | | | | | options are aliases now. llvm-svn: 192290
* Remove unused param from Linux::computeSysRoot().Simon Atanasyan2013-10-051-3/+3
| | | | llvm-svn: 192034
* Separate construction of bi-arch path suffix from construction ofSimon Atanasyan2013-09-281-67/+57
| | | | | | | | | | | | | | multi-library path suffix. The code calculates MIPS toolchain specific multi-lib path suffixes like mips16/soft-float/el is moved to the separate function findMultiLibSuffix(). This function called during GCC installation detection and result is stored for the future using. The patch reviewed by Rafael Espindola. http://llvm-reviews.chandlerc.com/D1738 llvm-svn: 191612
* Remove a use of OPT_m_Joined.Rafael Espindola2013-09-241-28/+35
| | | | | | | | This patch turns the -mv* hexagon options into aliases. We should really produce errors for invalid versions in the driver, but this patch preserves the old behavior for now. llvm-svn: 191298
* [ASan] Do not imply -undefined dynamic_lookup when linking dylibs with ↵Alexander Potapenko2013-09-201-6/+4
| | | | | | | | | | -fsanitize=address. Instead add the ASan runtime to the linker command line so that only the ASan API functions can be undefined in the target library. Fixes http://llvm.org/bugs/show_bug.cgi?id=17275 llvm-svn: 191076
* Moving Cortex-R cores to armv7r archRenato Golin2013-09-131-3/+1
| | | | llvm-svn: 190704
* Add more Cortex CPUs and testsRenato Golin2013-09-131-1/+5
| | | | llvm-svn: 190703
* Look for libstdc++ first on the clang install directory.Rafael Espindola2013-08-281-2/+11
| | | | | | | | | | When sysroot is not set, look for libstdc++ first on the clang install directory. Before this change if clang was installed alongside a gcc with the same version as the system one we would select the system libstdc++. Unfortunately this is hard to test as only the non-sysroot case is changed. llvm-svn: 189536
* Teach the Linux toolchain about more modern Gentoo installations of GCCChandler Carruth2013-08-261-8/+12
| | | | | | | | which add another wrinkle to the installation of the libstdc++ headers. Add at least some basic testing of the weirdnesses of Gentoo's layout. llvm-svn: 189212
* Move SanitizerArgs to the clang DriverAlexey Samsonov2013-08-191-5/+3
| | | | | | | | | | | | | | | | Summary: This change turns SanitizerArgs into high-level options stored in the Driver, which are parsed lazily. This fixes an issue of multiple copies of the same diagnostic message produced by sanitizer arguments parser. Reviewers: rsmith Reviewed By: rsmith CC: chandlerc, eugenis, cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1341 llvm-svn: 188660
* Enhance the clang -v gcc debug printing to skip obviously bad and duplicate ↵Benjamin Kramer2013-08-141-2/+4
| | | | | | | | | | | | | | | paths. Otherwise it lists all files (e.g. shared libraries) that happen to be in the same paths the GCC installations usually reside in. On a x86_64 Debian 7 system with i386 multilibs. before: clang -v 2>&1|wc -l 3059 after: clang -v 2>&1|wc -l 10 llvm-svn: 188400
* Add a convenient way to compare GCCVersions without creating temporary objects.Benjamin Kramer2013-08-091-15/+16
| | | | | | No functionality change. llvm-svn: 188084
* Make SanitizerArgs parsing toolchain-independentAlexey Samsonov2013-08-091-2/+2
| | | | llvm-svn: 188058
* Find a better compromise with the default library search paths used byChandler Carruth2013-07-311-20/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | Clang when linking and using a GCC installation from a GCC cross-compiler. This was desired already by two special case platforms (Android and Mips), and turns out to be generally (if frustratingly) true. I've added a substantial comment to the code clarifying the underlying assumptions of doing actual cross compiles with Clang (or GCC for that matter!) and help avoid further confusion here. The end result is to realize that fully general form of PR12478 cannot be resolved while we support existing cross-compiling GCC toolchains, and linking with them (namely, linking against their libgcc and libstdc++ installs). GCC installs these target libraries under a target-specific prefix but one that may not be available within the actual sysroot in use. When linking in this world, GCC works and Clang should as well, but caveat emptor: DSOs from this tree must be replicated and rpath-fixed to be found at runtime within the sysroot. I've extended the cross compile test cases to cover these issues by pointing them at a sysroot and actually checking the library search paths. llvm-svn: 187466
* Start keeping track of what work was done to detect a GCC installationChandler Carruth2013-07-301-0/+16
| | | | | | | | | | | | on the system, and report it when running the driver in verbose mode. Without this it is essentially impossible to understand why a particular GCC toolchain is used by Clang for libstdc++, libgcc, etc. This also required threading a hook through the toolchain layers for a specific toolchain implementation to print custom information under 'clang -v'. The naming here isn't spectacular. Suggestions welcome. llvm-svn: 187427
* [PowerPC] Support powerpc64le as a syntax-checking target.Bill Schmidt2013-07-261-1/+15
| | | | | | | | | | | | | | | | | | | This patch provides basic support for powerpc64le as an LLVM target. However, use of this target will not actually generate little-endian code. Instead, use of the target will cause the correct little-endian built-in defines to be generated, so that code that tests for __LITTLE_ENDIAN__, for example, will be correctly parsed for syntax-only testing. Code generation will otherwise be the same as powerpc64 (big-endian), for now. The patch leaves open the possibility of creating a little-endian PowerPC64 back end, but there is no immediate intent to create such a thing. The new test case variant ensures that correct built-in defines for little-endian code are generated. llvm-svn: 187180
* Fix gcc search for cross-compiler on Ubuntu 13.04.Eli Friedman2013-07-261-2/+9
| | | | | | | | Just more craziness to find crtbegin.o etc. Patch by Stephen Kelly. llvm-svn: 187175
* We don't need to know the OpenSUSE version, so don't parse it.Rafael Espindola2013-07-031-19/+11
| | | | | | Patch by Johannes Obermayr. llvm-svn: 185537
* Use the multiple argument form of path::append.Benjamin Kramer2013-06-281-11/+4
| | | | llvm-svn: 185164
* Add support for passing '-target armv8' through the Driver.Joey Gouly2013-06-261-0/+1
| | | | llvm-svn: 184970
* Remove PathV1.h usage from ToolChains.cpp.Rafael Espindola2013-06-261-34/+31
| | | | llvm-svn: 184902
* Use simpler version of llvm::sys::fs::exists.Rafael Espindola2013-06-251-14/+9
| | | | llvm-svn: 184857
* Reword and reformat some of the "Multiarch" code in the toolchain setup.Chandler Carruth2013-06-221-197/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | There are fundamentally two different things that were getting conflated here. 1) A bi-arch GCC toolchain install. This is not a full blown cross compiler, but it supports targetting both 32-bit and 64-bit variants of the same architecture using multilib OS installs and runtimes. 2) A "multiarch" Debian OS/runtime layout that lays out the libraries, headers, etc as-if there were going to be a full blown cross compiler even when in reality it is just a bi-arch GCC targeting two variants. Also, these tend to use oddly "canonicalized" triples without the vendor in them unlike the typical cross compiler runtime library search that vanilla GCC cross compilers perform. Now, when we mean the bi-arch nature of GCC accomplished with just a suffix or tweak to the GCC paths, we say 'Biarch' or something related. When we mean the Debian layout of includes and libraries, we say multiarch or reference the multiarch triple. In the process of reading and often renaming stuff in all these places, also reformat with clang-format. No functionality change should be going on here, this is just tidying up. llvm-svn: 184632
* Update a comment to clarify that searching the target triple binChandler Carruth2013-06-201-2/+8
| | | | | | | | | | | | | | directory for programs used by the driver is actually the standard behavior we want to be compatible with GCC cross compilers -- it isn't specific to SUSE or any other distro. Also start fleshing out testing of the different cross compilation patterns, both with a new very bare-bones tree of cross compilers and by extending the multilib trees. Currently, we don't correctly model doing a cross compile using the non-triple target of a bi-arch GCC install, but I'll add support for that (and tests) next. llvm-svn: 184499
* Revert "Adds support for openSUSE ARM v5/v7 triples."Renato Golin2013-06-191-2/+0
| | | | | | This reverts commit 312e51ca484976c2b1254952ff23d5162ca8edc2. llvm-svn: 184324
* Adds support for openSUSE ARM v5/v7 triples.Renato Golin2013-06-191-0/+2
| | | | | | | | Now, with a comma. Patch by İsmail Dönmez llvm-svn: 184323
* Revert r184302 on Renato's behalf - it broke the bots and he's asked me to ↵James Molloy2013-06-191-2/+0
| | | | | | revert as he's unavailable. llvm-svn: 184307
* Adds support for openSUSE ARM v5/v7 triples.Renato Golin2013-06-191-0/+2
| | | | | | Patch by İsmail Dönmez llvm-svn: 184302
* Include PathV1.h only where it is used.Rafael Espindola2013-06-171-0/+1
| | | | llvm-svn: 184090
* [Driver] Refactor clang driver to use LLVM's Option libraryReid Kleckner2013-06-141-4/+5
| | | | | | | | | | | | | | | | | | The big changes are: - Deleting Driver/(Arg|Opt)* - Rewriting includes to llvm/Option/ and re-sorting - 'using namespace llvm::opt' in clang::driver - Fixing the autoconf build by adding option everywhere As discussed in the review, this change includes using directives in header files. I'll make follow up changes to remove those in favor of name specifiers. Reviewers: espindola Differential Revision: http://llvm-reviews.chandlerc.com/D975 llvm-svn: 183989
OpenPOWER on IntegriCloud