summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/ToolChain.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Refactor a bit of duplicated code to useIntegratedAs.Rafael Espindola2013-03-181-0/+6
| | | | llvm-svn: 177299
* Add ARM v6m, v7m, and v7em architectures for Cortex-M series processors.Bob Wilson2013-03-041-4/+6
| | | | | | <rdar://problem/11314476> llvm-svn: 176458
* Tidy up lists of Cortex-A series processors, adding entries for A7.Bob Wilson2013-03-041-1/+3
| | | | | | Also fix a missing entry for cortex-r5 in one copy of getLLVMArchSuffixForARM. llvm-svn: 176457
* Fix confused use of llvm::StringSwitch for armv7r architecture.Bob Wilson2013-03-041-1/+1
| | | | | | | | | svn 170909 added support for cortex-r5 but in this case it was done incorrectly. The last argument to StringSwitch.Cases() is the replacement value, so by adding "cortex-r5" it changed the default cpu for armv7r to cortex-r5 instead of cortex-r4. llvm-svn: 176456
* Adding armv7l default to cortex-a8Renato Golin2013-02-051-0/+1
| | | | llvm-svn: 174466
* Add ARM cortex-r5 subtarget as available mcpuQuentin Colombet2012-12-211-1/+1
| | | | llvm-svn: 170909
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-041-2/+1
| | | | | | | | | | | | | 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
* Fix the '-fuse-init-array' option to actually be an option.Chandler Carruth2012-11-211-1/+2
| | | | | | | | | | | | | | | | | | Previously, this flag to CC1 was never exposed at the clang driver layer, and if you happened to enable it (by being on Android or GCC 4.7 platform), you couldn't *disable* it, because there was no 'no' variant. The whole thing was confusingly implemented. Now, the target-specific flag processing gets the driver arg list, and we use standard hasFlag with a default based on the GCC version and/or Android platform. The user can still pass the 'no-' variant to forcibly disable the flag, or pass the positive variant to clang itself to enable the flag. The test has also been substantially cleaned up and extended to cover these use cases. llvm-svn: 168473
* Driver/Darwin: The -arch argument values aren't exactly the arch names from aDaniel Dunbar2012-11-081-0/+15
| | | | | | | | triple. - Translate the special case of powerpc to its expected -arch name. llvm-svn: 167571
* Remove first argument from Arg::getValue; it's been unused since r105760.Richard Smith2012-11-011-4/+4
| | | | llvm-svn: 167211
* Driver: Link crtfastmath.o if it's available and -ffast-math is specified.Benjamin Kramer2012-10-041-0/+22
| | | | | | | | | | | | crtfastmath.o contains routines to set the floating point flags to a faster, unsafe mode. Linking it in speeds up code dealing with denormals significantly (PR14024). For now this is only enabled on linux where I can test it and crtfastmath.o is widely available. We may want to provide a similar file with compiler-rt eventually and/or enable it on other platforms too. llvm-svn: 165240
* Remove useless parameter "WantFile" from Driver::GetProgramPath().Simon Atanasyan2012-10-031-2/+2
| | | | | | | | | This parameter is useless because nowhere used explicitly and always gets its default value - "false". The patch reviewed by Rafael Espindola. llvm-svn: 165149
* Add armv7s and some other arm variants supported by Mach-O files.Bob Wilson2012-09-291-1/+5
| | | | llvm-svn: 164905
* Implement ToolChain::IsUnwindTablesDefault to reduce code duplication a bit.Rafael Espindola2012-09-231-0/+4
| | | | llvm-svn: 164473
* This patch introduces A15 as a target in Clang.Silviu Baranga2012-09-131-1/+1
| | | | llvm-svn: 163804
* Rename the GCC Objective-C runtime to gcc from gnu-fragile and the GNUstepDavid Chisnall2012-07-031-1/+1
| | | | | | runtime to gnustep from gnu. Fix EH for the GCC runtime. llvm-svn: 159684
* Restructure how the driver communicates information about theJohn McCall2012-06-201-20/+4
| | | | | | | | | | | | | | | | | | | | | | | | 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 a -fuse-init-array option to cc1 and map to the UseInitArray targetRafael Espindola2012-06-191-0/+3
| | | | | | | | | option. On the driver, check if we are using libraries from gcc 4.7 or newer and if so pass -fuse-init-array to the frontend. The crtbegin*.o files in gcc 4.7 no longer call the constructors listed in .ctors, so we have to use .init_array. llvm-svn: 158694
* ARM backend knows about cortex-m4. The front end should too.Jim Grosbach2012-03-291-0/+1
| | | | llvm-svn: 153678
* Duplicated code is bad. At least make it consistent.Bob Wilson2012-03-211-71/+38
| | | | | | | | | | The getARMTargetCPU and getLLVMArchSuffixForARM functions exist in both Toolchain.cpp and Tools.cpp. This stuff needs a thorough overhaul. In the meantime, this patch at least makes them consistent. One version had been converted to use StringSwitch, and the other version had new Cortex M-series processors added. llvm-svn: 153202
* For Darwin, do not let -mcpu override the -arch option. <rdar://11059238>Bob Wilson2012-03-211-5/+9
| | | | | | | | | | | | On Darwin the architecture and the corresponding Mach-O slice is typically specified with -arch. If not, it defaults to the current host architecture. Do not use -mcpu to override the -arch value. This is only an issue when people need to use specialized code for a non-default CPU (hopefully guarded by run-time checks to detect the current processor). The -mcpu option is still used for the -target-cpu option to clang, but this patch causes it to not be used to set the architecture in the target triple. llvm-svn: 153197
* Add new code migrator support for migrating existing Objective-C code to useTed Kremenek2012-03-061-0/+2
| | | | | | | | | | | the new Objective-C NSArray/NSDictionary/NSNumber literal syntax. This introduces a new library, libEdit, which provides a new way to support migration of code that improves on the original ARC migrator. We now believe that most of its functionality can be refactored into the existing libraries, and thus this new library may shortly disappear. llvm-svn: 152141
* Revert r149083 which is not the direction we're going in the ClangChandler Carruth2012-01-311-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | driver based on discussions with Doug Gregor. There are several issues: 1) The patch was not reviewed prior to commit and there were review comments. 2) The design of the functionality (triple-prefixed tool invocation) isn't the design we want for Clang going forward: it focuses on the "user triple" rather than on the "toolchain triple", and forces that bit of state into the API of every single toolchain instead of handling it automatically in the common base classes. 3) The tests provided are not stable. They fail on a few Linux variants (Gentoo among them) and on mingw32 and some other environments. I *am* interested in the Clang driver being able to invoke triple-prefixed tools, but we need to design that feature the right way. This patch just extends the previous hack without fixing the underlying problems with it. I'm working on a new design for this that I will mail for review by tomorrow. I am aware that this removes functionality that NetBSD relies on, but this is ToT, not a release. This functionality hasn't been properly designed, implemented, and tested yet. We can't "regress" until we get something that really works, both with the immediate use cases and with long term maintenance of the Clang driver. For reference, the original commit log: Keep track of the original target the user specified before normalization. This used to be captured in DefaultTargetTriple and is used for the (optional) $triple-$tool lookup for cross-compilation. Do this properly by making it an attribute of the toolchain and use it in combination with the computed triple as index for the toolchain lookup. llvm-svn: 149337
* Keep track of the original target the user specified beforeJoerg Sonnenberger2012-01-261-2/+3
| | | | | | | | | | normalization. This used to be captured in DefaultTargetTriple and is used for the (optional) $triple-$tool lookup for cross-compilation. Do this properly by making it an attribute of the toolchain and use it in combination with the computed triple as index for the toolchain lookup. llvm-svn: 149083
* Switch the ToolChain types to all store a Driver reference rather thanChandler Carruth2012-01-251-6/+5
| | | | | | | | | | a HostInfo reference. Nothing about the HostInfo was used by any toolchain except digging out the driver from it. This just makes that a lot more direct. The change was accomplished entirely mechanically. It's one step closer to removing the shim full of buggy copy/paste code that is HostInfo. llvm-svn: 148945
* Split the Windows toolchain definition into its own file. This isChandler Carruth2011-12-171-0/+34
| | | | | | | | | | | | | | | especially nice as the Windows toolchain needs the windows header files, and has lots of platform specific hooks in it. To facilitate the split, hoist a bunch of file-level static helpers into class-level static helpers. Spiff up their doxygen comments while there as they're now more likely to be looked up via docs. Hopefully, this will be followed by further breaking apart of the toolchain definitions. Most of the large and complex ones should likely live on their own. I'm looking at you Darwin. ;] llvm-svn: 146840
* Driver: Add a --rtlib={compiler-rt,libgcc} argument which I plan to use to allowDaniel Dunbar2011-12-071-0/+16
| | | | | | dual support for compiler-rt on Linux, during bringup. llvm-svn: 146094
* Switch the C++ include interface in the ToolChain to use the same namingChandler Carruth2011-11-041-3/+3
| | | | | | | as the system include interface before I start adding implementations of it to individual ToolChain implementations. llvm-svn: 143751
* Sink the strange '-stdlib=...' flag handling into the C++ includeChandler Carruth2011-11-041-1/+10
| | | | | | | | | | | | | | | | | | | | handling logic of the generic ToolChain. This flag, despite its name, has *nothing* to do with the GCC flag '-nostdlib' that relates (exclusively) to the linking behavior. It is a most unfortunate name in that regard... It is used to tell InitHeaderSearch.cpp *which* set of C++ standard library header search paths to use -- those for libstdc++ from GCC's installation, or those from a libc++ installation. As this logic is hoisted out of the Frontend, and into the Driver as part of this ToolChain, the generic method will be overridden for the platform, where it can implement this logic directly. As such, hiding the CC1 option passing in the generic space is a natural fit despite the odd naming. Also, expand on the comments to clarify whats going on, and tidy up the Tools.cpp code now that its simpler. llvm-svn: 143687
* Sink the handling of -fobjc-arc-cxxlib to live with the other -fobjc-arcChandler Carruth2011-11-041-16/+1
| | | | | | | | implementation in the driver. This cleans up the signature and semantics of the include flag adding component of the toolchain. Another step to ready it for holding all the InitHeaderSearch logic. llvm-svn: 143686
* Add a system include management interface to the toolchain, and call itChandler Carruth2011-11-041-1/+6
| | | | | | | | | | | and the C++ include management routine from the proper place when forming preprocessor options in the driver. This is the first step to teaching the driver to manage all of the header search paths. Currently, these methods remain just stubs in the abstract toolchain. Subsequent patches will flesh them out with implementations for various toolchains based on the current code in InitHeaderSearch.cpp. llvm-svn: 143684
* Use Triple.isOSDarwin() instead of comparing against Triple::Darwin.Bob Wilson2011-10-141-2/+1
| | | | | | | | | There are now separate Triple::MacOSX and Triple::IOS values for the OS so comparing against Triple::Darwin will fail to match those. Note that I changed the expected output for the Driver/rewrite-objc.m test, which had previously not been passing Darwin-specific options with the macosx triple. llvm-svn: 141944
* [driver] Default to arm mode when using the integrated assembler.Chad Rosier2011-09-201-4/+9
| | | | | | rdar://10125227 llvm-svn: 140179
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-231-9/+9
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* Call objc_terminate() instead of abort() when a cleanup throws anJohn McCall2011-07-061-0/+2
| | | | | | | exception in Objective-C; in Objective-C++ we still use std::terminate(). This is only available in very recent runtimes. llvm-svn: 134456
* Change the driver's logic about Objective-C runtimes: abstract out aJohn McCall2011-07-061-0/+19
| | | | | | | | | | | | structure to hold inferred information, then propagate each invididual bit down to -cc1. Separate the bits of "supports weak" and "has a native ARC runtime"; make the latter a CodeGenOption. The tool chain is still driving this decision, because it's the place that has the required deployment target information on Darwin, but at least it's better-factored now. llvm-svn: 134453
* Fix the default libc++ header search path to be sysrooted. Radar 9639692.Bob Wilson2011-06-211-6/+2
| | | | | | | | | The -cxx-isystem path is not prefixed with the sysroot directory, so it's not a good way for the driver to set the system default C++ search path. Instead, add -stdlib as a cc1 option and teach the frontend how to find the headers. The driver can then just pass -stdlib through to "cc1". llvm-svn: 133547
* Automatic Reference Counting.John McCall2011-06-151-1/+8
| | | | | | | | | | Language-design credit goes to a lot of people, but I particularly want to single out Blaine Garst and Patrick Beard for their contributions. Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself, in no particular order. llvm-svn: 133103
* Driver/Darwin: Sketch initial support for a -mios-simulator-version-min= flagDaniel Dunbar2011-04-301-3/+3
| | | | | | and associated deployment target environment variable. llvm-svn: 130591
* fix a bunch of comment typos found by codespell. Patch byChris Lattner2011-04-151-1/+1
| | | | | | Luis Felipe Strano Moraes! llvm-svn: 129559
* Add clang support for cortex-m0 cpus. Patch by James Orr.Bob Wilson2011-03-211-0/+8
| | | | llvm-svn: 128018
* Remove the storage for -cxx-system-include. Make libcxx toolchainJoerg Sonnenberger2011-02-221-1/+2
| | | | | | use -nostdinc++ and -cxx-isystem. llvm-svn: 126223
* Remove stray emacs mode markers in all these files that was causing emacs toNick Lewycky2010-12-311-1/+1
| | | | | | | open them in fundamental-mode instead of c++-mode. Also twiddle whitespace for consistency in ToolChains.cpp. llvm-svn: 122646
* Driver: implement driver automagic support for -lcc_kextShantonu Sen2010-09-171-0/+5
| | | | | | | | | Rewrite linker arguments to use libclang_rt.cc_kext.a instead of gcc-specific libcc_kext.a Resolves Radar 7808495 llvm-svn: 114193
* Driver: Fix spelling of AddCXXStdlibLibArgs, which I copy-n-pasto'd.Daniel Dunbar2010-09-171-2/+2
| | | | llvm-svn: 114147
* Driver: Add a toolchain hook for whether the system has native LLVM support.Daniel Dunbar2010-09-171-0/+4
| | | | llvm-svn: 114137
* Driver: Add a -stdlib= argument which can be used to select the C++ standardDaniel Dunbar2010-09-141-0/+19
| | | | | | | | | | | library to use. - This is currently useful for testing libc++; you can now use 'clang++ -stdlib=libc++ t.cpp' to compile using it if installed. - In the future could also be used to select other standard library choices if alternatives become available (for example, to use an alternate C library). llvm-svn: 113891
* Driver: Factor out some code for handling the C++ standard library.Daniel Dunbar2010-09-141-0/+25
| | | | llvm-svn: 113890
* Driver: Move Clang "triple" computation routines to method on theDaniel Dunbar2010-08-231-0/+136
| | | | | | | | | | | ToolChain. This fixes a potenial bad cast when running Clang on PPC code, since the tool chain in effect is not a subclass of the Darwin one, but we were treating it like it was. - This introduces some gross code duplication, but the right fix for it is to just move the Driver to start depending on the targets in libBasic, so I am not planning on fixing it immediately. llvm-svn: 111856
* Driver: Move HostInfo::lookupTypeForExtension to ↵Daniel Dunbar2010-08-021-0/+4
| | | | | | ToolChain::LookupTypeForExtension. llvm-svn: 110024
OpenPOWER on IntegriCloud