Commit Graph

185 Commits

Author SHA1 Message Date
Bob Wilson 11403367c0 Make -findirect-virtual-calls and -fterminated-vtables aliases of -fapple-kext.
Outside the driver, they were already treated that way, but the driver was not
giving them the same special treatment as -fapple-kext, e.g., falling back to
llvm-gcc for i386/Darwin kexts.  Radar 9868422.

llvm-svn: 137639
2011-08-15 19:13:06 +00:00
Bob Wilson 08b3756633 Remove duplicate option.
llvm-svn: 137638
2011-08-15 19:13:02 +00:00
NAKAMURA Takumi c77574a2e3 Fix "Uninitialized" warnings on g++-4.4.
In fact, they are false warnings but it seems g++-4.4 might be unable to know they must be false.

llvm-svn: 137568
2011-08-14 00:37:22 +00:00
Bob Wilson 0d45f58cbb Reject -mkernel for i386/Darwin C++ code; fall back to llvm-gcc instead.
Since -mkernel implies -fapple-kext, this just extends the current behavior
for -fapple-kext to apply for -mkernel as well.  Radar 9933387.

llvm-svn: 137566
2011-08-13 23:48:55 +00:00
Chad Rosier 53ea71674c If no -miphoneos-version-min specified, see if we can set the default based on
-isysroot.
rdar://9837120

llvm-svn: 137075
2011-08-08 23:39:34 +00:00
Chris Lattner 0e62c1cc0b remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports
them into the clang namespace.

llvm-svn: 135852
2011-07-23 10:55:15 +00:00
Chad Rosier 5371243dab If -ccc-host-triple i386-pc-win32-macho or -ccc-host-triple
x86_64-pc-win32-macho is used in conjunction with -no-integrated-as go ahead and
use the Darwin system assembler.
rdar://9785470

llvm-svn: 135604
2011-07-20 19:14:30 +00:00
John McCall 9de1978f6e Call objc_terminate() instead of abort() when a cleanup throws an
exception in Objective-C;  in Objective-C++ we still use std::terminate().
This is only available in very recent runtimes.

llvm-svn: 134456
2011-07-06 01:22:26 +00:00
John McCall 24fc0decfe Change the driver's logic about Objective-C runtimes: abstract out a
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
2011-07-06 00:26:06 +00:00
Chandler Carruth 42f96b78ec Make the GCC version proliferation worse by N+1 for the sake of
ArchLinux. =/ Fixes PR10246.

llvm-svn: 134299
2011-07-02 00:51:03 +00:00
Dylan Noblesmith afed776fa9 fix autoconf build from r133710
Sorry! This commit worked in CMake, but
CXX_INCLUDE_ROOT is defined in a different
config.h for autoconf.

llvm-svn: 133715
2011-06-23 13:50:47 +00:00
Eric Christopher c235d0c635 Build and use libcompiler_rt whenever possible.
Patch by Jean-Daniel Dupas!

llvm-svn: 133624
2011-06-22 17:41:40 +00:00
Daniel Dunbar 471c4f8299 Driver/Darwin: Honor -Xarch_FOO when the arch matches either the toolchain or
the architecture being bound.
 - Fixes things like -Xarch_armv7.

llvm-svn: 133490
2011-06-21 00:20:17 +00:00
NAKAMURA Takumi 0df100e1aa Be aware of (x86_64-redhat-linux6E-)g++44 on RHEL5.
AFAIK, RHEL5 (and its clones) provides g++44 as the package "gcc44-c++".
By default, g++-4.1.1 is available, though, its libstdc++ would not be suitable to clang++.

llvm-svn: 133156
2011-06-16 12:43:57 +00:00
John McCall 31168b077c Automatic Reference Counting.
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
2011-06-15 23:02:42 +00:00
Chandler Carruth 2561f09c9b Revert "hack in my new variables for GCC"
Very sorry for the accidental commit of WIP code.

llvm-svn: 132745
2011-06-08 10:14:38 +00:00
Chandler Carruth 0169ec0988 hack in my new variables for GCC
llvm-svn: 132743
2011-06-08 10:13:14 +00:00
Benjamin Kramer f90b5de834 Toolchain support for Ubuntu Oneiric. Patch by Michael Wild!
llvm-svn: 132669
2011-06-05 16:08:59 +00:00
Roman Divacky 00859c29bf Make -m32 work on FreeBSD/PowerPC64.
llvm-svn: 132634
2011-06-04 07:37:31 +00:00
Rafael Espindola 304902141e We were looking at /usr/lib only if the distro had multilib. This is bogus:
we look in /usr/lib to find crt1.o, and that depends only on where libc
is installed.

This fixes the case of using a different gcc installation in a distro
without multilib.

llvm-svn: 132551
2011-06-03 15:39:42 +00:00
Rafael Espindola d8f92c8dcc Add support for centos.
llvm-svn: 132550
2011-06-03 15:23:24 +00:00
Eric Christopher 55d4989304 80-col cleanup.
llvm-svn: 132543
2011-06-03 13:28:31 +00:00
NAKAMURA Takumi 8b73b3e981 Untabify and fix whitespace.
llvm-svn: 132531
2011-06-03 03:49:51 +00:00
Rafael Espindola 0ddfbe230f We already have support for using c++ headers from a custom location.
Before this patch we would still link with the system libstdc++. It worked
fine most of the time, but would break if the used headers were a lot newer
than the system libraries.

This patch changes the driver to use the libraries corresponding to the
headers the user selected.

This fixes, for example, using 4.5 headers in a system with gcc 4.1.

llvm-svn: 132497
2011-06-02 22:18:46 +00:00
Eli Friedman f7600949f4 Add Debian wheezy/sid to ToolChains.cpp. Patch by Michael Wild. PR10064.
llvm-svn: 132489
2011-06-02 21:36:53 +00:00
Chandler Carruth e5d9d906cb Fix a bug in the most recent openSUSE support patch.
This patch also by Ismail Donmez.

llvm-svn: 131958
2011-05-24 07:51:17 +00:00
Chris Lattner d075c82f8c add opensuse toolchain support, patch by Ismail Donmez!
llvm-svn: 131857
2011-05-22 16:45:07 +00:00
Chris Lattner 84e38557e0 Add Redhat Enterprise Linux to the Linux toolchain, PR9769,
patch by Bryce Lelbach

llvm-svn: 131840
2011-05-22 05:36:06 +00:00
David Chisnall b8f65e25d8 - Fixes openSUSE detection for 11.4 and upcoming 12.1
- Adds gcc 4.6 to gcc list so that linking will work on openSUSE 12.1

Patch by İsmail Dönmez!

llvm-svn: 131637
2011-05-19 13:26:33 +00:00
Eric Christopher b29614b357 Add some support for RHEL5 systems.
llvm-svn: 131505
2011-05-17 23:06:53 +00:00
Joerg Sonnenberger 637603a7cc Make the triple an explicit argument of FindTargetProgramPath.
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
2011-05-16 13:35:02 +00:00
Daniel Dunbar 2f31fb99ef Driver/Darwin: Don't link -lgcc_s.1 when compiling as iOS for the simulator,
that library has never been in the SDK. Fortunately, it shouldn't be necessary,
since that library was also removed in 10.6.

llvm-svn: 130595
2011-04-30 04:25:16 +00:00
Daniel Dunbar a9cbb6b9d5 Driver/Darwin: Reject invalid arch combinations with
-mios-simulator-version-min.

llvm-svn: 130593
2011-04-30 04:20:40 +00:00
Daniel Dunbar b1189434dd Driver/Darwin: Change Darwin toolchain to explicitly track is-ios-sim bit, and
update -mios-simulator-version-min to set it.

llvm-svn: 130592
2011-04-30 04:18:16 +00:00
Daniel Dunbar 9aaeb6400b Driver/Darwin: Sketch initial support for a -mios-simulator-version-min= flag
and associated deployment target environment variable.

llvm-svn: 130591
2011-04-30 04:15:58 +00:00
Nico Weber adf8ba98e7 Let clang detect gcc triple on Ubuntu Natty. Patch by Thomas Jablin.
llvm-svn: 130119
2011-04-25 03:17:35 +00:00
Daniel Dunbar bbd482226e Driver/Darwin: Allow OS X deployment targets like 10.4.11, even though they
can't be represented in the environment define.

llvm-svn: 129939
2011-04-21 21:27:33 +00:00
Daniel Dunbar 5a784c8ed1 Driver: Tweak -Xarch diags a bit more, we can't actually differentiate between
unknown and "required more arguments", but only the latter should be feasible in
practice.

llvm-svn: 129919
2011-04-21 17:41:34 +00:00
Daniel Dunbar 6914a98ccd Driver: Improve -Xarch argument diagnostics a bit.
llvm-svn: 129918
2011-04-21 17:32:21 +00:00
Daniel Dunbar 308cfd045f Driver/Darwin: Switch to using -macosx for OS name in triples.
llvm-svn: 129834
2011-04-19 23:34:17 +00:00
Daniel Dunbar 5c56828d91 Driver/Darwin: Switch to using new style triples.
llvm-svn: 129824
2011-04-19 21:45:47 +00:00
Daniel Dunbar d107638328 Driver/Darwin: Change to use generic iOS runtime library, which we now always need.
llvm-svn: 129734
2011-04-18 23:48:36 +00:00
Ted Kremenek 00abe8ee31 Add ToolChain path support for linker on Slackware.
llvm-svn: 129704
2011-04-18 17:50:19 +00:00
Chris Lattner 57540c5be0 fix a bunch of comment typos found by codespell. Patch by
Luis Felipe Strano Moraes!

llvm-svn: 129559
2011-04-15 05:22:18 +00:00
Eric Christopher 534b6a01e8 Add support for Fedora16, gcc 4.6.0 and Fedora Rawhide.
Patch by Bobby Powers

llvm-svn: 129014
2011-04-06 18:22:53 +00:00
Ted Kremenek 43d47cc397 Add ToolChain support to get Clang to recognize Ubuntu/ppc and Gentoo/ppc64.
llvm-svn: 128944
2011-04-05 22:04:27 +00:00
Bob Wilson d9249414b3 Add clang support for cortex-m0 cpus. Patch by James Orr.
llvm-svn: 128018
2011-03-21 20:40:05 +00:00
Joerg Sonnenberger bc923f3f7d Memorize presence/absence of -nostdlib in Driver.
Drop program paths on NetBSD (unused). Only include lib dir, if
-nostdlib is absent. Use = to allow --sysroot to work.

llvm-svn: 127995
2011-03-21 13:59:26 +00:00
Daniel Dunbar 151a372113 Driver/Darwin: Transparently fallback when compiling i386 -fapple-kext code, we
don't support the ABI yet.

llvm-svn: 127903
2011-03-18 20:14:03 +00:00
Daniel Dunbar 1e1c3ca51c Driver: Give SelectTool access to the action inputs.
llvm-svn: 127902
2011-03-18 20:14:00 +00:00