summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.h
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* clang support for Bitrig (an OpenBSD fork); patch by David Hill.Eli Friedman2012-08-081-0/+30
| | | | llvm-svn: 161546
* Restructure how the driver communicates information about theJohn McCall2012-06-201-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | target Objective-C runtime down to the frontend: break this down into a single target runtime kind and version, and compute all the relevant information from that. This makes it relatively painless to add support for new runtimes to the compiler. Make the new -cc1 flag, -fobjc-runtime=blah-x.y.z, available at the driver level as a better and more general alternative to -fgnu-runtime and -fnext-runtime. This new concept of an Objective-C runtime also encompasses what we were previously separating out as the "Objective-C ABI", so fragile vs. non-fragile runtimes are now really modelled as different kinds of runtime, paving the way for better overall differentiation. As a sort of special case, continue to accept the -cc1 flag -fobjc-runtime-has-weak, as a sop to PLCompatibilityWeak. I won't go so far as to say "no functionality change", even ignoring the new driver flag, but subtle changes in driver semantics are almost certainly not intended. llvm-svn: 158793
* Add PPC support for translating gcc-style -mcpu options into LLVM ↵Hal Finkel2012-06-111-0/+1
| | | | | | | | | | | | | | -target-cpu options. This functionality is based on what is done on ARM, and enables selecting PPC CPUs in a way compatible with gcc's driver. Also, mirroring gcc (and what is done on x86), -mcpu=native support was added. This uses the host cpu detection from LLVM (which will also soon be updated by refactoring code currently in backend). In order for this to work, the target needs a list of valid CPUs -- we now accept all CPUs accepted by LLVM. A few preprocessor defines for common CPU types have been added. llvm-svn: 158334
* [driver] Don't try to generate diagnostic information for linker crashes.Chad Rosier2012-03-071-0/+12
| | | | | | rdar://10993648 llvm-svn: 152180
* Fix copy-and-paste error in commentDavid Chisnall2012-02-151-1/+1
| | | | llvm-svn: 150587
* First pass at Solaris toolchain support. This version compiles and links helloDavid Chisnall2012-02-151-0/+29
| | | | | | | | world on Solaris 11 for both x86 and x86-64 using the built-in assembler and Solaris (not GNU) ld, however it currently relies on a hard-coded GCC location to find crtbegin.o and crtend.o, as well as libgcc and libgcc_eh. llvm-svn: 150580
* Have the driver pass CPU and target feature information to cc1as.Jim Grosbach2012-02-101-0/+1
| | | | | | | | | | When creating the MCSubtargetInfo, the assembler driver uses the CPU and feature string to construct a more accurate model of what instructions are and are not legal. rdar://10840476 llvm-svn: 150273
* Remove the ToolTriple logic in NetBSD, which was completely broken byJoerg Sonnenberger2012-01-261-8/+4
| | | | | | | | the recent refactoring. All interesting NetBSD release have a GNU as version on i386 that supports --32, so don't bother with the conditional setting of it. llvm-svn: 149087
* Unweaken vtables as per ↵David Blaikie2011-12-201-0/+2
| | | | | | http://llvm.org/docs/CodingStandards.html#ll_virtual_anch llvm-svn: 146959
* Hexagon backend supportTony Linthicum2011-12-121-0/+38
| | | | llvm-svn: 146413
* Add the depfile as a result file so that it is deleted if we crash,Peter Collingbourne2011-11-061-1/+2
| | | | | | and prevent the diagnostic preprocessor run from writing a depfile. llvm-svn: 143846
* Add support for a verifier to the driver. Currently only verifies debugEric Christopher2011-08-231-0/+15
| | | | | | | | | | | output on darwin so is hard coded there. As a note this will need a little bit of refactoring in the class hierarchy to separate it out for different verifiers based on input type. Fixes rdar://8256258. llvm-svn: 138343
* [driver] Clang doesn't support -mkernel/-fapple-kext for i386, so it's Chad Rosier2011-08-171-0/+1
| | | | | | | | automatically invoking llvm-gcc's cc1plus, which doesn't support all options supported by Clang. Therefore, filter out unsupported options. rdar://9964354 llvm-svn: 137842
* Fix typo. From Damjan Marion.Joerg Sonnenberger2011-06-211-1/+1
| | | | llvm-svn: 133511
* Make the triple an explicit argument of FindTargetProgramPath.Joerg Sonnenberger2011-05-161-3/+11
| | | | | | | | | | Preserve the original triple in the NetBSD toolchain when using -m32 or -m64 and the resulting effective target is different from the triple it started with. This allows -m32 to use the same assembler/linking in cross-compiling mode and avoids confusion about passing down target specific flags in that case like --32. llvm-svn: 131404
* Driver/Darwin/ARM: Kernel/kext code has more strict alignment requirements.Daniel Dunbar2011-03-171-1/+2
| | | | llvm-svn: 127815
* Add NetBSD target support. Patch by Joerg Sonnenberger.Benjamin Kramer2011-02-021-0/+29
| | | | llvm-svn: 124736
* Add support for soft/hard float options to the Sparc targetBruno Cardoso Lopes2010-11-091-0/+1
| | | | llvm-svn: 118514
OpenPOWER on IntegriCloud