summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/ToolChains.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Use ld directly on linux. Changes from the previous try:Rafael Espindola2010-11-071-20/+212
| | | | | | | | | | | | | | | | | *) Try to detect as much as possible from the system itself, not the distro. This should make it easier to port to a new distro and more likely to work on a unknown one. *) The distro enum now doesn't include the arch. Just use the existing host detection support in LLVM. *) Correctly handle --sysroot. A small regression is that now clang will pass bitcode file to the linker. This is necessary for the gold plugin support to work. It might be better to detect this at configure/cmake time, but doing it in c++ first is a lot easier. llvm-svn: 118382
* Revert while I debug test failures :-(Rafael Espindola2010-11-031-333/+20
| | | | llvm-svn: 118150
* Switch clang to run ld directly on linux. I tested this on all the linuxRafael Espindola2010-11-031-20/+333
| | | | | | | | | | | | | | | | | | | | | | distros listed by running gcc main.o -o main g++ main.o -o main gcc main.o -o main -static g++ main.o -o main -static gcc f.o -o f.so -shared g++ f.o -o f.so -shared and comparing the ld line with the one created by clang. I also added -m32/m64 in distros that support it. While I tested many distros, there will always be more. If you are hit by this it should be somewhat easy to add your distro. If you are in a hurry, do revert this, but please inform how to detect you distro and the ld command lines produced by the above gcc invocations. Most distros have some patches on gcc :-( llvm-svn: 118149
* Switch to using the integrated assembler by default on x86 and x86-64 ELFRafael Espindola2010-10-291-4/+4
| | | | | | systems. llvm-svn: 117697
* Driver/Darwin: Remove a useless warning about missing runtime libraries. TheseDaniel Dunbar2010-10-111-8/+2
| | | | | | are almost never needed, so the warning isn't very useful. llvm-svn: 116263
* Driver/Darwin: Add a runtime library just for ___eprintf -- when targeting i386Daniel Dunbar2010-09-221-4/+13
| | | | | | some projects still depend on ___eprintf being available. llvm-svn: 114509
* Driver: implement driver automagic support for -lcc_kextShantonu Sen2010-09-171-0/+21
| | | | | | | | | Rewrite linker arguments to use libclang_rt.cc_kext.a instead of gcc-specific libcc_kext.a Resolves Radar 7808495 llvm-svn: 114193
* Driver/DarwinClang: Add GCC libexec paths so we can find the cc1 binaries if weDaniel Dunbar2010-09-171-0/+20
| | | | | | | ever use fallback. - Not necessary for clang as a compiler, but useful for testing purposes. llvm-svn: 114172
* Driver: Fix spelling of AddCXXStdlibLibArgs, which I copy-n-pasto'd.Daniel Dunbar2010-09-171-1/+1
| | | | llvm-svn: 114147
* Driver/DarwinClang: The new toolchain definition is going to drop the -L insideDaniel Dunbar2010-09-171-0/+46
| | | | | | | | | the GCC dir. Unfortunately, this breaks -lstdc++ on SnowLeopard, etc. because the libstdc++ dylib was hiding there. Workaround this by providing the path to the right -lstdc++.6 (the only version used in recent memory) if we can't see an obvious -lstdc++, but can find = -lstdc++.6. llvm-svn: 114146
* Driver: Add a toolchain hook for whether the system has native LLVM support.Daniel Dunbar2010-09-171-0/+4
| | | | llvm-svn: 114137
* Add missing #includeDouglas Gregor2010-09-031-0/+1
| | | | llvm-svn: 112974
* fix a hard coded version number, PR8031. Patch by 'nobled'.Chris Lattner2010-09-031-1/+2
| | | | llvm-svn: 112970
* Driver/Darwin: Pass the right arch specific dir for ARM, when linking.Daniel Dunbar2010-08-261-3/+10
| | | | llvm-svn: 112124
* Driver: Move Clang "triple" computation routines to method on theDaniel Dunbar2010-08-231-0/+38
| | | | | | | | | | | 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/Darwin: When using the simplified Clang toolchain, make sure to also passDaniel Dunbar2010-08-231-1/+27
| | | | | | the arch specific gcc lib path. llvm-svn: 111839
* Add two new enumerations to the unsupported list for Windows so that all casesChandler Carruth2010-08-221-0/+2
| | | | | | are handled. llvm-svn: 111773
* Visual Studio tools used on win32 hosts when targeting win32.Michael J. Spencer2010-08-211-0/+52
| | | | llvm-svn: 111748
* Run the assembler instead of gcc on Linux.Rafael Espindola2010-08-101-0/+20
| | | | llvm-svn: 110635
* Driver/Darwin: Change where Darwin computes the host version, to normalize toolDaniel Dunbar2010-08-021-10/+15
| | | | | | chain construction. llvm-svn: 110028
* Driver/Darwin: Inline some constants.Daniel Dunbar2010-08-021-5/+5
| | | | llvm-svn: 110026
* Driver/FreeBSD: Change how FreeBSD derives the Lib32 variable, to normalize toolDaniel Dunbar2010-08-021-1/+9
| | | | | | chain construction. llvm-svn: 110025
* Driver: Move HostInfo::lookupTypeForExtension to ↵Daniel Dunbar2010-08-021-0/+10
| | | | | | ToolChain::LookupTypeForExtension. llvm-svn: 110024
* Driver: Keep track of a separate "install dir", which is the path where clangDaniel Dunbar2010-08-011-5/+15
| | | | | | | | | 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. llvm-svn: 109989
* Driver/Darwin: Add deployment target after doing argument translation, so thatDaniel Dunbar2010-07-191-9/+12
| | | | | | -mmacosx-version-min works inside a -Xarch_ flag. llvm-svn: 108712
* Driver: Factor out Darwin::AddDeploymentTarget.Daniel Dunbar2010-07-191-10/+16
| | | | llvm-svn: 108711
* Driver/Darwin: Resolve deployment target defaulting to be more predictable;Daniel Dunbar2010-07-151-13/+4
| | | | | | assume we are targetting OS X unless an explicit option is given. llvm-svn: 108426
* add driver support for minix, patch by Kees van ReeuwijkChris Lattner2010-07-071-0/+32
| | | | | | from PR7583 llvm-svn: 107788
* Driver/Darwin: Add one -L for the DarwinClang toolchain to point into the gccDaniel Dunbar2010-06-301-0/+27
| | | | | | | library directory, as we still rely on a few libraries that are hiding there (in particular libstdc++.dylib). llvm-svn: 107353
* Driver/FreeBSD: Add libexec to program search paths, to workaround some buildDaniel Dunbar2010-06-151-0/+2
| | | | | | problem; patch by Ed Schouten. llvm-svn: 105996
* Driver: Eliminate uses of Arg::getIndex.Daniel Dunbar2010-06-141-3/+4
| | | | | | Also, fix a memory leak. llvm-svn: 105963
* Driver: Add DerivedArgList::AddFOOArg helper functions, and switch to using ↵Daniel Dunbar2010-06-141-51/+45
| | | | | | them. llvm-svn: 105957
* Driver: Add an explicit argument translation phase to the driver itself. We ↵Daniel Dunbar2010-06-111-14/+4
| | | | | | are going to need this to handle things like -Xassembler, -Xpreprocessor, and -Xlinker which we might have to introspect. llvm-svn: 105842
* Driver: Add an explicit dsymutil action.Daniel Dunbar2010-06-041-0/+4
| | | | llvm-svn: 105474
* Driver: Switch to using the integrated assembler for standalone assembly jobsDaniel Dunbar2010-05-201-2/+18
| | | | | | (or -save-temps), when the integrated assembler is enabled. llvm-svn: 104282
* Driver: Only add extra -L paths on darwin if they exist. Unfortunately, thisDaniel Dunbar2010-04-101-6/+15
| | | | | | | | 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. llvm-svn: 100935
* Driver: Ignore -fobjc-gc and -fobjc-gc-only for platforms which don't ↵Daniel Dunbar2010-04-101-0/+5
| | | | | | support them. llvm-svn: 100930
* Driver/Darwin/x86: When linking, incorporate -L paths based on the path whereDaniel Dunbar2010-04-101-0/+7
| | | | | | | | | 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. llvm-svn: 100915
* Driver: Fix thinkos that prevented Clang from picking the right deploymentDaniel Dunbar2010-03-201-2/+2
| | | | | | target when both {MACOSX,IPHONEOS}_DEPLOYMENT_TARGET were set. llvm-svn: 99055
* add TCE target support, patch by Pekka J!Chris Lattner2010-03-041-0/+60
| | | | llvm-svn: 97746
* Switch to using -fsjlj-exceptions instead of hard-coding it. Notably, this fixesDaniel Dunbar2010-02-101-0/+6
| | | | | | | calls to the UnwindResumeOrRethrow function for C++/Obj-C exception handling, for Darwin ARM. llvm-svn: 95787
* Driver/Darwin: Don't error/warn on conflicting deployment targets. ApparentlyDaniel Dunbar2010-02-021-5/+14
| | | | | | this is still a popular thing to do. llvm-svn: 95093
* Driver/Darwin: Fix a crash when diagnosing conflicting deployment targets.Daniel Dunbar2010-01-291-4/+6
| | | | llvm-svn: 94812
* Driver/Darwin: Eliminate invalid uses of DarwinVersion -- this fixes a number ofDaniel Dunbar2010-01-271-6/+2
| | | | | | defaults when targetting iPhoneOS (blocks, non-fragile ABI, stack protector). llvm-svn: 94642
* Driver/Darwin: Simplify target version checks.Daniel Dunbar2010-01-271-29/+10
| | | | llvm-svn: 94641
* Driver/Darwin: Eliminate confusing IsIPhoneOS parameter -- this was actuallyDaniel Dunbar2010-01-271-16/+12
| | | | | | just indicating whether the default target should be iPhoneOS. llvm-svn: 94638
* Driver/Darwin: Switch to using isTargetIPhoneOS where appropriate.Daniel Dunbar2010-01-271-3/+3
| | | | llvm-svn: 94637
* Driver/Darwin: Track target platform more explicitly in tool chain, eventuallyDaniel Dunbar2010-01-271-10/+32
| | | | | | | this should just be part of the tool chain itself once we have eliminated argument translation. llvm-svn: 94635
* Driver/Darwin: Honor IPHONEOS_DEPLOYMENT_TARGET.Daniel Dunbar2010-01-261-14/+30
| | | | llvm-svn: 94488
* Driver/Darwin: Update tool chain to use static clang_rt libraries provided byDaniel Dunbar2010-01-221-10/+48
| | | | | | | | | | | | | | | | | | | | 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" -- llvm-svn: 94150
OpenPOWER on IntegriCloud