summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/HostInfo.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Delete the driver's HostInfo class. This abstraction just never reallyChandler Carruth2012-01-251-670/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | did anything. The two big pieces of functionality it tried to provide was to cache the ToolChain objects for each target, and to figure out the exact target based on the flag set coming in to an invocation. However, it had a lot of flaws even with those goals: - Neither of these have anything to do with the host, or its info. - The HostInfo class was setup as a full blown class *hierarchy* with a separate implementation for each "host" OS. This required dispatching just to create the objects in the first place. - The hierarchy claimed to represent the host, when in fact it was based on the target OS. - Each leaf in the hierarchy was responsible for implementing the flag processing and caching, resulting in a *lot* of copy-paste code and quite a few bugs. - The caching was consistently done based on architecture alone, even though *any* aspect of the targeted triple might change the behavior of the configured toolchain. - Flag processing was already being done in the Driver proper, separating the flag handling even more than it already is. Instead of this, we can simply have the dispatch logic in the Driver which previously created a HostInfo object create the ToolChain objects. Adding caching in the Driver layer is a tiny amount of code. Finally, pulling the flag processing into the Driver puts it where it belongs and consolidates it in one location. The result is that two functions, and maybe 100 lines of new code replace over 10 classes and 800 lines of code. Woot. This also paves the way to introduce more detailed ToolChain objects for various OSes without threading through a new HostInfo type as well, and the accompanying boiler plate. That, of course, was the yak I started to shave that began this entire refactoring escapade. Wheee! llvm-svn: 148950
* Switch the ToolChain types to all store a Driver reference rather thanChandler Carruth2012-01-251-13/+13
| | | | | | | | | | 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
* Remove HostInfo::useDriverDriver(). This was only used in two placesChandler Carruth2012-01-241-66/+0
| | | | | | | | | | | | inside the innards of the Driver implementation, and only ever implemented to return 'true' for the Darwin OSes. Instead use a more direct query on the target triple and a comment to document why the target matters here. If anyone is worried about this predicate getting wider use or improper use, I can make it a local or private predicate in the driver. llvm-svn: 148797
* Hexagon backend supportTony Linthicum2011-12-121-0/+5
| | | | llvm-svn: 146413
* Typo spotted by Ivan Krasin.Chad Rosier2011-08-201-1/+1
| | | | llvm-svn: 138200
* Make the triple an explicit argument of FindTargetProgramPath.Joerg Sonnenberger2011-05-161-5/+10
| | | | | | | | | | 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: Kill the DarwinGCC toolchain.Daniel Dunbar2011-03-181-6/+1
| | | | llvm-svn: 127896
* Add NetBSD target support. Patch by Joerg Sonnenberger.Benjamin Kramer2011-02-021-0/+65
| | | | llvm-svn: 124736
* Remove stray emacs mode marker.Nick Lewycky2010-12-011-1/+1
| | | | llvm-svn: 120554
* Reapply "Driver/Darwin: Time for another spin at switching to the DarwinClang",Daniel Dunbar2010-09-171-0/+1
| | | | | | now that eprintf symbol issue is resolved. llvm-svn: 114166
* Revert "Driver/Darwin: Time for another spin at switching to the DarwinClangDaniel Dunbar2010-09-171-1/+0
| | | | | | toolchain.", while I investigate the totally non-surprising ensuing breakage. llvm-svn: 114164
* Driver/Darwin: Time for another spin at switching to the DarwinClang toolchain.Daniel Dunbar2010-09-171-0/+1
| | | | llvm-svn: 114149
* Driver/Darwin: Switch back to old toolchain, looks like new one isn't quiteDaniel Dunbar2010-08-261-2/+6
| | | | | | ready yet. llvm-svn: 112138
* Driver: Fix thinko where I switched to always using the old toolchain, insteadDaniel Dunbar2010-08-261-1/+1
| | | | | | of always using the new toolchain. llvm-svn: 112125
* Driver/Darwin: Switch to using simplified tool chain by default -- what betterDaniel Dunbar2010-08-231-6/+2
| | | | | | way to see what will break! :) llvm-svn: 111840
* Visual Studio tools used on win32 hosts when targeting win32.Michael J. Spencer2010-08-211-0/+83
| | | | llvm-svn: 111748
* Driver/FreeBSD: Infer the right arch name in the presence of -m32,-m64, for theDaniel Dunbar2010-08-101-0/+12
| | | | | | | cases we care about. - This is eventually going to be unified outside the host specific code. llvm-svn: 110693
* Driver/Darwin: Change where Darwin computes the host version, to normalize toolDaniel Dunbar2010-08-021-14/+2
| | | | | | chain construction. llvm-svn: 110028
* Driver/Darwin: Inline some constants.Daniel Dunbar2010-08-021-10/+1
| | | | llvm-svn: 110026
* Driver/FreeBSD: Change how FreeBSD derives the Lib32 variable, to normalize toolDaniel Dunbar2010-08-021-10/+1
| | | | | | chain construction. llvm-svn: 110025
* Driver: Move HostInfo::lookupTypeForExtension to ↵Daniel Dunbar2010-08-021-48/+0
| | | | | | ToolChain::LookupTypeForExtension. llvm-svn: 110024
* add driver support for minix, patch by Kees van ReeuwijkChris Lattner2010-07-071-0/+58
| | | | | | from PR7583 llvm-svn: 107788
* Driver/Darwin: Support CCC_ENABLE_NEW_DARWIN_TOOLCHAIN as an environmentDaniel Dunbar2010-03-261-4/+6
| | | | | | | override to enable use of the DarwinClang tool chain on all platforms (not just ARM). llvm-svn: 99660
* Remove redundant semicolonDouglas Gregor2010-03-081-1/+1
| | | | llvm-svn: 97930
* add TCE target support, patch by Pekka J!Chris Lattner2010-03-041-0/+46
| | | | llvm-svn: 97746
* Driver/Darwin: Eliminate confusing IsIPhoneOS parameter -- this was actuallyDaniel Dunbar2010-01-271-3/+3
| | | | | | just indicating whether the default target should be iPhoneOS. llvm-svn: 94638
* Driver/Darwin: Track target platform more explicitly in tool chain, eventuallyDaniel Dunbar2010-01-271-3/+2
| | | | | | | this should just be part of the tool chain itself once we have eliminated argument translation. llvm-svn: 94635
* Use Option::matches instead of direct ID comparison.Daniel Dunbar2009-11-191-5/+5
| | | | llvm-svn: 89305
* Revert r83443.Ted Kremenek2009-10-071-7/+1
| | | | llvm-svn: 83451
* Fixup pathnames.Mike Stump2009-10-071-1/+7
| | | | llvm-svn: 83443
* Split Darwin toolchain into Clang and GCC Darwin toolchains with a common base.Daniel Dunbar2009-09-181-7/+7
| | | | llvm-svn: 82213
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-3/+1
| | | | llvm-svn: 81346
* Change Darwin toolchain lookup to use llvm::Triple.Daniel Dunbar2009-09-081-52/+37
| | | | | | - -2+1 FIXMEs. llvm-svn: 81282
* Rename HostInfo::getToolChain to HostInfo::CreateToolChain, and don't recreateDaniel Dunbar2009-09-081-28/+28
| | | | | | the default tool chain when binding the default architecture. llvm-svn: 81279
* Delete trailing whitespace.Daniel Dunbar2009-09-081-53/+53
| | | | llvm-svn: 81278
* Darwin: Pass -iphoneos-version-min to ld when building for ARM.Daniel Dunbar2009-09-041-2/+9
| | | | llvm-svn: 81019
* Rename Darwin_X86 toolchain to just Darwin, this can support all platforms.Daniel Dunbar2009-09-041-3/+3
| | | | llvm-svn: 81016
* Second half of, clang, AuroraUX toolchain support.Edward O'Callaghan2009-08-221-0/+55
| | | | llvm-svn: 79713
* OpenBSD support.Daniel Dunbar2009-06-291-0/+57
| | | | | | - Patch by Jonathan Gray! llvm-svn: 74453
* Fix typo in prev commit.Daniel Dunbar2009-06-161-1/+1
| | | | llvm-svn: 73556
* Darwin/Driver: Also look at -arch command line options when finding the defaultDaniel Dunbar2009-06-161-8/+26
| | | | | | tool chain. llvm-svn: 73555
* PR4308: Fix support for -m32/-m64 on Linux.Eli Friedman2009-06-031-7/+22
| | | | | | I'll look into cleaning this up a bit as a followup. llvm-svn: 72794
* ARM is a legitimate Darwin architecture; don't assert.Eli Friedman2009-05-281-1/+2
| | | | llvm-svn: 72538
* Fix for PR4140: Add the start of a Linux toolchain (basically, just Eli Friedman2009-05-261-0/+58
| | | | | | barely enough to get the given usage of -print-file-name working). llvm-svn: 72412
* Fix use after free, found by Benjamin Kramer.Daniel Dunbar2009-05-231-3/+3
| | | | llvm-svn: 72333
* (llvm up) Use llvm::Triple for storing target triples.Daniel Dunbar2009-05-221-73/+62
| | | | | | | - This commit has some messy stuff in it to extend string lifetimes, but that will go away once we switch to using the enum'd Triple interfaces. llvm-svn: 72243
* DragonFly ToolChain definition for driver.Daniel Dunbar2009-05-021-0/+63
| | | | | | - Patch by Alex Hornung! llvm-svn: 70635
* Quick and dirty (!) fix to make sure we use powerpc in triples.Daniel Dunbar2009-04-011-6/+12
| | | | | | | | | - PR3922 - I have a clean solution for this in flight, but it may take a while to come to fruition so we'll take a quick fix for now. llvm-svn: 68241
* Comment fix.Daniel Dunbar2009-03-301-1/+1
| | | | llvm-svn: 68069
* Driver: Sketch FreeBSD tool chain.Daniel Dunbar2009-03-301-0/+69
| | | | | | - Patch by Ed Schouten! llvm-svn: 68061
OpenPOWER on IntegriCloud