summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.h
Commit message (Collapse)AuthorAgeFilesLines
...
* unique_ptrify JobList::JobsDavid Blaikie2014-09-041-5/+5
| | | | llvm-svn: 217168
* Delete support for AuroraUX.Rafael Espindola2014-08-141-28/+0
| | | | | | auroraux.org is not resolving. llvm-svn: 215644
* Header guard canonicalization, clang part.Benjamin Kramer2014-08-131-3/+3
| | | | | | Modifications made by clang-tidy with minor tweaks. llvm-svn: 215557
* [Driver] Support -muclibc / -mglibc command line options for a coupleSimon Atanasyan2014-08-131-0/+1
| | | | | | | | | | | | | 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
* [PowerPC] Support ELFv1/ELFv2 ABI selection via -mabi= optionUlrich Weigand2014-07-281-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While Clang now supports both ELFv1 and ELFv2 ABIs, their use is currently hard-coded via the target triple: powerpc64-linux is always ELFv1, while powerpc64le-linux is always ELFv2. These are of course the most common scenarios, but in principle it is possible to support the ELFv2 ABI on big-endian or the ELFv1 ABI on little-endian systems (and GCC does support that), and there are some special use cases for that (e.g. certain Linux kernel versions could only be built using ELFv1 on LE). This patch implements the Clang side of supporting this, based on the LLVM commit 214072. The command line options -mabi=elfv1 or -mabi=elfv2 select the desired ABI if present. (If not, Clang uses the same default rules as now.) Specifically, the patch implements the following changes based on the presence of the -mabi= option: In the driver: - Pass the appropiate -target-abi flag to the back-end - Select the correct dynamic loader version (/lib64/ld64.so.[12]) In the preprocessor: - Define _CALL_ELF to the appropriate value (1 or 2) In the compiler back-end: - Select the correct ABI in TargetInfo.cpp - Select the desired ABI for LLVM via feature (elfv1/elfv2) llvm-svn: 214074
* [Driver][Mips] Reduce code duplication - use existing functionSimon Atanasyan2014-07-161-0/+3
| | | | | | | | getMipsCPUAndABI() to get MIPS ABI name during multi-library selection. No functional changes. llvm-svn: 213143
* [mips] Correct the invocation of GAS in several cases.Daniel Sanders2014-07-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: As a result of this patch, assembling an empty file with GCC and Clang (using GAS as the assembler) now produces identical objects. -mfp32/-mfpxx/-mfp64 now form a trinity of options. -mfpxx is the default when the triple vendor is 'img' or 'mti', the ABI is O32, and the CPU is between mips2 and mips32r2/mips64r2 (inclusive). -mno-shared is always given to the assembler to match the effect of -mabicalls (currently unimplemented but Clang acts as if it is given). Similarly, -call_nonpic is always given to match the effect of -mplt (also unimplemented and acts as if given) except when the ABI is 64 in which case -mplt has no effect so -KPIC is given instead. -mhard-float/-msoft-float are now passed on. -modd-spreg/-mno-odd-spreg are now passed on. -mno-mips16 is correctly passed on. The assembler option is -no-mips16 not -mno-mips16 Differential Revision: http://reviews.llvm.org/D4515 llvm-svn: 213138
* [mips][mips64r6] Add support for mips-img-linux-gnu GCC toolchainsDaniel Sanders2014-07-101-1/+1
| | | | | | | | | | | | | | Summary: * Support the multilib layout used by the mips-img-linux-gnu * Recognize mips{,64}{,el}-img-linux-gnu as being aliases of mips-img-linux-gnu * Use the correct dynamic linker for mips-img-linux-gnu * Make mips32r6/mips64r6 the default CPU for mips-img-linux-gnu Subscribers: mpf Differential Revision: http://reviews.llvm.org/D4436 llvm-svn: 212719
* Revert r211866, r211895 and r211995, "Driver: use GNU::Link for the ↵NAKAMURA Takumi2014-06-291-18/+0
| | | | | | | | | | | Generic_GCC toolchain". It broke users of Generic_GCC, cygwin and mingw32. It reverts commits as follows: r211866: "Driver: use GNU::Link for the Generic_GCC toolchain" r211895: "Replace GetProgramPath("ld") with GetLinkerPath()." r211995: "Driver: add a cygwin linker tool" llvm-svn: 211998
* Driver: add a cygwin linker toolSaleem Abdulrasool2014-06-291-0/+18
| | | | | | | | | This adds a linker tool for the Windows cygwin environment. This linker invocation is significantly different from the generic ld invocation. It requires additional parameters as well as does not accept some normal parameters. This should fix self-hosting on Cygwin. llvm-svn: 211995
* clang-cl: Don't store the cl compiler Tool on the stack (PR20131)Hans Wennborg2014-06-261-1/+10
| | | | | | | | | | | | | | The Command will refer back to the Tool as its source, so it has to outlive the Command. Having the Tool on the stack would cause us to crash when using "clang-cl -GR -fallback", because if the Command fails, Driver::ExecuteCompilation tries to peek at the Command's source. Differential Revision: http://reviews.llvm.org/D4314 llvm-svn: 211802
* [mips] Correct linux dynamic linker for -mnan=2008Daniel Sanders2014-06-241-0/+1
| | | | | | | | | | | | Summary: The dynamic linker is named ld-linux-mipsn8.so.1 when -mnan=2008 is given (or is the default). It remains ld.so.1 for other cases. This is necessary for MIPS32r6/MIPS64r6 since these ISA's default to -mnan=2008. Differential Revision: http://reviews.llvm.org/D4273 llvm-svn: 211598
* ARM64: initial clang support commit.Tim Northover2014-03-291-0/+2
| | | | | | | | | | | This adds Clang support for the ARM64 backend. There are definitely still some rough edges, so please bring up any issues you see with this patch. As with the LLVM commit though, we think it'll be more useful for merging with AArch64 from within the tree. llvm-svn: 205100
* De-virtualize a method that doesn't override anything and has no overrides ↵Craig Topper2014-03-141-2/+2
| | | | | | itself. llvm-svn: 203895
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-141-223/+199
| | | | | | class. llvm-svn: 203893
* Add Multilib selection machineryJonathan Roelofs2014-02-121-0/+4
| | | | | | | | | | | | This patch improves the support for picking Multilibs from gcc installations. It also provides a better approximation for the flags '-print-multi-directory' and '-print-multi-lib'. This reverts r201203 (i.e. re-applying r201202 with small fixes in unittests/CMakeLists.txtto make the build bots happy). review: http://llvm-reviews.chandlerc.com/D2538 llvm-svn: 201205
* Revert 201202Jonathan Roelofs2014-02-121-4/+0
| | | | | | Breaks cmake configure of new unit tests directory llvm-svn: 201203
* Add Multilib selection machineryJonathan Roelofs2014-02-121-0/+4
| | | | | | | | | This patch improves the support for picking Multilibs from gcc installations. It also provides a better approximation for the flags '-print-multi-directory' and '-print-multi-lib'. review: http://llvm-reviews.chandlerc.com/D2538 llvm-svn: 201202
* MachO: use *-*-*-macho for MachO embedded targets.Tim Northover2014-01-161-20/+21
| | | | | | | | | | | | Previously we had bodged together some hacks mapping MachO embedded targets (i.e. mainly ARM v6M and v7M) to the "*-*-darwin-eabi" triple. This is incorrect in both details (they don't run Darwin and they're not EABI in any real sense). This commit appropriates the existing "MachO" environment for the purpose instead. llvm-svn: 199367
* Avoid temporary std::string.Rafael Espindola2013-12-121-2/+2
| | | | llvm-svn: 197160
* Don't return a pointer to a temporary std::string's c_str.Rafael Espindola2013-12-121-1/+1
| | | | llvm-svn: 197157
* Refactor duplicate functionsBernard Ogden2013-12-121-0/+7
| | | | | | | | | | getARMCPU and getLLVMArchSuffixForARM existed as very similar functions in both ToolChain.cpp and Tools.cpp. Create a single implementation of each in Tools.cpp, eliminate the duplicate and share via Tools.h. Creates an 'arm' namespace in Tools.h to be used by any ARM-targetting tools. llvm-svn: 197153
* Darwin-embedded: find correct libclang_rt for embedded targets.Tim Northover2013-12-121-0/+4
| | | | | | | | | | | | This refactors some of the Darwin toolchain classification to give a more solid distinction between the three primary Darwin platforms (OS X, IOS and IOS simulator) so that a 4th choice can be added temporarily: embedded MachO targets. Longer term, this support will be factored out into a separate class and no longer classified as "darwin-eabi", but the refactoring should still be useful. llvm-svn: 197148
* remove gcc::PrecompileRafael Espindola2013-11-241-12/+0
| | | | | | | | | | | | | | | Clang still has support for running gcc for performing various stages of a build. Right now it looks like this is used for * Supporting Fortran in the clang driver * Running an assembler or linker in systems we don't yet know how to run them directly. It looks like the gcc::Precompile is a vestige from the days when we supported using clang for C and running gcc for c++. This patch removes it (yes, we have no tests for it). llvm-svn: 195586
* Don't use the gcc driver for assembling.Rafael Espindola2013-11-231-11/+0
| | | | | | | | | Clang knows how to use the gnu assembler directly from doing so on linux and hurd. The existing support worked out of the box on cygwin and mingw and I was able to bootstrap clang with it in both systems (with pending patches for the new mingw abi, but that is independent of the assembler). llvm-svn: 195554
* [AArch64] Add some CPU targets for "generic", A-53 and A-57.Amara Emerson2013-10-311-0/+2
| | | | | | | | | | Enables the clang driver to begin targeting specific CPUs. Introduced a "generic" CPU which will ensure that the optional FP feature is enabled by default when it gets to LLVM, without needing any extra arguments. Cortex-A53 and A-57 are also introduced with tests, although backend handling of them does not yet exist. llvm-svn: 193740
* XCore target: add an xcore toolchain implementationRobert Lytton2013-10-111-0/+32
| | | | llvm-svn: 192437
* clang-cl: implement /fallback modeHans Wennborg2013-09-191-1/+23
| | | | | | | | | | | | | When this flag is enabled, clang-cl falls back to cl.exe if it cannot compile the code itself for some reason. The idea is to use this to help build projects that almost compile with clang-cl, except for some files that can then be built with the fallback mechanism. Differential Revision: http://llvm-reviews.chandlerc.com/D1711 llvm-svn: 191034
* Centralize the handling of -target-feature.Rafael Espindola2013-08-211-7/+0
| | | | | | | No functionality change other than changing the order of -target-feature relative to other -cc1 command line arguments. llvm-svn: 188906
* Centralize the handling of -target-cpu (-cc1, -cc1as) and -mcpu (gold plugin).Rafael Espindola2013-08-201-2/+0
| | | | llvm-svn: 188837
* clang-cl: Support the run-time selection options (/MD, /MT et al.)Hans Wennborg2013-08-081-0/+3
| | | | | | | | | | | | These flags set some preprocessor macros and injects a dependency on the runtime library into the object file, which later is picked up by the linker. This also adds a new CC1 flag for adding a dependent library. Differential Revision: http://llvm-reviews.chandlerc.com/D1315 llvm-svn: 187945
* AArch64: initial NEON supportTim Northover2013-08-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch by Ana Pazos - Completed implementation of instruction formats: AdvSIMD three same AdvSIMD modified immediate AdvSIMD scalar pairwise - Completed implementation of instruction classes (some of the instructions in these classes belong to yet unfinished instruction formats): Vector Arithmetic Vector Immediate Vector Pairwise Arithmetic - Initial implementation of instruction formats: AdvSIMD scalar two-reg misc AdvSIMD scalar three same - Intial implementation of instruction class: Scalar Arithmetic - Initial clang changes to support arm v8 intrinsics. Note: no clang changes for scalar intrinsics function name mangling yet. - Comprehensive test cases for added instructions To verify auto codegen, encoding, decoding, diagnosis, intrinsics. llvm-svn: 187568
* [SystemZ] Add -march= command-line optionRichard Sandiford2013-07-191-0/+2
| | | | llvm-svn: 186694
* [Driver] Remove the using namespace directives from headersReid Kleckner2013-06-171-59/+71
| | | | | | | | | | | This adds a bunch of llvm::opt name specifiers to all the uses of types from that namespace. Reviewers: espindola Differential Revision: http://llvm-reviews.chandlerc.com/D983 llvm-svn: 184079
* [Driver] Refactor clang driver to use LLVM's Option libraryReid Kleckner2013-06-141-0/+2
| | | | | | | | | | | | | | | | | | 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
* R600: Handle -mcpu option v3Tom Stellard2013-04-011-0/+1
| | | | | | | | | | v2: - Add a test case v3: - Use the -### clang option in the tests llvm-svn: 178499
* Rename clang::driver::tools::linuxtools to clang::driver::tools::gnutools.Thomas Schwinge2013-03-281-5/+4
| | | | | | | This is about the GNU Binutils' assembler and linker, so reflect that in the name. llvm-svn: 178272
* Driver: Pass down the -march setting down to -cc1as on x86 too.Benjamin Kramer2013-02-221-0/+1
| | | | | | | The assembler historically didn't make use of any target features, but this has changed when support for old CPUs that don't support long nops was added. llvm-svn: 175919
* Split out the command handling for split debug info, we're goingEric Christopher2013-02-221-4/+0
| | | | | | | | | to want to propagate some information through the module into the back end and so need to pass it through to codegen. Also make the methods file static so we can use them in other places. llvm-svn: 175916
* Remove the SplitDebug action and replace with a set of commandsEric Christopher2013-02-211-14/+4
| | | | | | | in the compilation setup. Note that this doesn't currently work for -no-integrated-as. llvm-svn: 175813
* Driver and option support for -gsplit-dwarf. This is a part ofEric Christopher2013-02-051-0/+14
| | | | | | the DWARF5 split dwarf proposal. llvm-svn: 174349
* [driver] Don't try to generate diagnostic information for dsymutil crashes.Chad Rosier2013-02-011-0/+1
| | | | | | Part of rdar://13134273 llvm-svn: 174203
* [driver] Associate a JobAction with each result file. This enables the driverChad Rosier2013-01-241-0/+1
| | | | | | | to delete result files for only those commands that fail. Part of rdar://12984531 llvm-svn: 173361
* Add support for passing the main file name down to the assemblerEric Christopher2012-12-181-5/+7
| | | | | | | | for location information. Part of PR14624 llvm-svn: 170391
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-041-1/+0
| | | | | | | | | | | | | uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. llvm-svn: 169237
* Reapply a subset of r167567 to clean up Darwin-specific code for invoking gcc.Bob Wilson2012-11-231-57/+7
| | | | | | | | | | | Unlike my previous attempt at this, this patch leaves intact the check for whether clang can handle the input file type, and for non-Darwin toolchains it will invoke gcc for things it cannot handle. For Darwin toolchains, the behavior reported in pr14338 still occurs with this patch, but that is a definite improvement from what happens currently, where it just crashes with an assertion failure. llvm-svn: 168505
* Revert r167567, restoring the ability of clang to run gcc in cases where itNick Lewycky2012-11-151-7/+57
| | | | | | can't handle the input file type. This resulted in PR14338. llvm-svn: 168024
* Rip out a bunch of code for invoking gcc from clang.Bob Wilson2012-11-081-57/+7
| | | | llvm-svn: 167567
* getArchTypeForDarwinArchName is only used in the clang driver, copy it there.Rafael Espindola2012-10-311-0/+2
| | | | | | I will remove it from llvm in the next commit. llvm-svn: 167156
* During LTO, we call 'dsymutil' when we compile source files. This necessitatesBill Wendling2012-10-021-1/+2
| | | | | | | | | | clang specifying a temporary file that it later cleans up so that it can survive the linking stage. However, when we compile object files during LTO we don't call 'dsymutil'. That's done at a different stage (if at all). We rely upon the linker to specify a unique name for the temporary file it generates. <rdar://problem/12401423> llvm-svn: 165028
OpenPOWER on IntegriCloud