aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/ToolChains.cpp
AgeCommit message (Collapse)Author
2010-09-17Driver: Add a toolchain hook for whether the system has native LLVM support.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114137 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-03Add missing #includeDouglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112974 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-03fix a hard coded version number, PR8031. Patch by 'nobled'.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112970 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-26Driver/Darwin: Pass the right arch specific dir for ARM, when linking.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112124 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-23Driver: Move Clang "triple" computation routines to method on theDaniel Dunbar
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111856 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-23Driver/Darwin: When using the simplified Clang toolchain, make sure to also passDaniel Dunbar
the arch specific gcc lib path. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111839 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-22Add two new enumerations to the unsupported list for Windows so that all casesChandler Carruth
are handled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111773 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-21Visual Studio tools used on win32 hosts when targeting win32.Michael J. Spencer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111748 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-10Run the assembler instead of gcc on Linux.Rafael Espindola
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110635 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-02Driver/Darwin: Change where Darwin computes the host version, to normalize toolDaniel Dunbar
chain construction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110028 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-02Driver/Darwin: Inline some constants.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110026 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-02Driver/FreeBSD: Change how FreeBSD derives the Lib32 variable, to normalize toolDaniel Dunbar
chain construction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110025 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-02Driver: Move HostInfo::lookupTypeForExtension to ↵Daniel Dunbar
ToolChain::LookupTypeForExtension. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110024 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-01Driver: Keep track of a separate "install dir", which is the path where clangDaniel Dunbar
was invoked from (which may not be where the executable itself is). - This allows having e.g., /Developer/usr/bin/clang be a symlink to some other location, while still making sure the Driver finds 'as', 'ld', etc. relative to itself. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109989 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19Driver/Darwin: Add deployment target after doing argument translation, so thatDaniel Dunbar
-mmacosx-version-min works inside a -Xarch_ flag. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108712 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19Driver: Factor out Darwin::AddDeploymentTarget.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108711 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-15Driver/Darwin: Resolve deployment target defaulting to be more predictable;Daniel Dunbar
assume we are targetting OS X unless an explicit option is given. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108426 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-07add driver support for minix, patch by Kees van ReeuwijkChris Lattner
from PR7583 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107788 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-30Driver/Darwin: Add one -L for the DarwinClang toolchain to point into the gccDaniel Dunbar
library directory, as we still rely on a few libraries that are hiding there (in particular libstdc++.dylib). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107353 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-15Driver/FreeBSD: Add libexec to program search paths, to workaround some buildDaniel Dunbar
problem; patch by Ed Schouten. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105996 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-14Driver: Eliminate uses of Arg::getIndex.Daniel Dunbar
Also, fix a memory leak. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105963 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-14Driver: Add DerivedArgList::AddFOOArg helper functions, and switch to using ↵Daniel Dunbar
them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105957 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-11Driver: Add an explicit argument translation phase to the driver itself. We ↵Daniel Dunbar
are going to need this to handle things like -Xassembler, -Xpreprocessor, and -Xlinker which we might have to introspect. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105842 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-04Driver: Add an explicit dsymutil action.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105474 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-20Driver: Switch to using the integrated assembler for standalone assembly jobsDaniel Dunbar
(or -save-temps), when the integrated assembler is enabled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104282 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-10Driver: Only add extra -L paths on darwin if they exist. Unfortunately, thisDaniel Dunbar
means it isn't really possible to write the test case for this code, but this is the kind of thing that really requires testing against the installed compiler anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100935 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-10Driver: Ignore -fobjc-gc and -fobjc-gc-only for platforms which don't ↵Daniel Dunbar
support them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100930 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-10Driver/Darwin/x86: When linking, incorporate -L paths based on the path whereDaniel Dunbar
Clang is installed. This is designed to match gcc, and is important when installed in a non-standard location. - This is gross, but no worse than ever. It will die when we finally move to the compiler-rt based toolchain, any day now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100915 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-20Driver: Fix thinkos that prevented Clang from picking the right deploymentDaniel Dunbar
target when both {MACOSX,IPHONEOS}_DEPLOYMENT_TARGET were set. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99055 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-04add TCE target support, patch by Pekka J!Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97746 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-10Switch to using -fsjlj-exceptions instead of hard-coding it. Notably, this fixesDaniel Dunbar
calls to the UnwindResumeOrRethrow function for C++/Obj-C exception handling, for Darwin ARM. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95787 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02Driver/Darwin: Don't error/warn on conflicting deployment targets. ApparentlyDaniel Dunbar
this is still a popular thing to do. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95093 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-29Driver/Darwin: Fix a crash when diagnosing conflicting deployment targets.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94812 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-27Driver/Darwin: Eliminate invalid uses of DarwinVersion -- this fixes a number ofDaniel Dunbar
defaults when targetting iPhoneOS (blocks, non-fragile ABI, stack protector). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94642 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-27Driver/Darwin: Simplify target version checks.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94641 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-27Driver/Darwin: Eliminate confusing IsIPhoneOS parameter -- this was actuallyDaniel Dunbar
just indicating whether the default target should be iPhoneOS. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94638 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-27Driver/Darwin: Switch to using isTargetIPhoneOS where appropriate.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94637 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-27Driver/Darwin: Track target platform more explicitly in tool chain, eventuallyDaniel Dunbar
this should just be part of the tool chain itself once we have eliminated argument translation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94635 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26Driver/Darwin: Honor IPHONEOS_DEPLOYMENT_TARGET.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94488 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22Driver/Darwin: Update tool chain to use static clang_rt libraries provided byDaniel Dunbar
compiler-rt. This tool chain now works on x86 and ARM, but isn't the x86 default yet. This drastically cleans up the linker invocation, old invocation: -- "/Developer/usr/bin/../libexec/gcc/i686-apple-darwin10/4.2.1/ld" "-dynamic" "-arch" "x86_64" "-macosx_version_min" "10.6.0" "-weak_reference_mismatches" "non-weak" "-o" "a.out" "-lcrt1.10.6.o" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64" "-L/usr/lib/i686-apple-darwin10/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../../i686-apple-darwin10/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../.." "t.o" "-lSystem" "-lgcc" -- New invocation: -- # For 10.6: "/usr/bin/ld" "-dynamic" "-arch" "x86_64" "-macosx_version_min" "10.6.0" "-o" "a.out" "-lcrt1.10.6.o" "t.o" "-lSystem" # For 10.4: "/usr/bin/ld" "-dynamic" "-arch" "x86_64" "-macosx_version_min" "10.4" "-o" "a.out" "-lcrt1.o" "t.o" "-lSystem" "-lgcc_s.10.4" "/Volumes/Data/ddunbar/llvm.obj.64/Debug/lib/clang/1.1/lib/darwin/libclang_rt.10.4.a" -- git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94150 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22Driver/Darwin/ld: Factor out getDarwinArchName, for getting the "Darwin" archDaniel Dunbar
name being used in an driver invocation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94139 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18Remove ../libexec from clang program search path, clang-cc is dead.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93749 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-10Fix a FIXME.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93087 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-08Use -fno-math-errno by default, and remove the IsMathErrnoDefaultDan Gohman
targethook, which is no longer being used. This fixes PR5971. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92987 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-21Add ToolChain::getDriver() and use it instead of going through the HostInfoDaniel Dunbar
object. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91830 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-18Add -dwarf-debug-flags, which provides a way to embed the cc1 level options usedDaniel Dunbar
to compile a translation unit into the debug info for that file. - Used by parts of Darwin build process to check compiler flags, etc. - <rdar://problem/7256886> clang does not emit AT_APPLE_flags git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91661 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-12Un-namespace-qualify llvm_unreachable. It's a macro, so the qualification gaveJeffrey Yasskin
no extra safety anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91207 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19Driver: ArgList doesn't depend on Options.h anymore.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89313 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19Driver: Introduce OptSpecifier class for protecting access to an option id.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89310 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19Driver: Switch to using explicit {getLast,has}ArgNoClaim functions instead ↵Daniel Dunbar
of taking a Claim argument. - Most driver code always claims, and bool arguments don't play nice with the overloads. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89308 91177308-0d34-0410-b5e6-96231b3b80d8