summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver
Commit message (Collapse)AuthorAgeFilesLines
* Somehow the -fgnu-runtime option itself got lost in all that shuffling.John McCall2011-07-061-2/+4
| | | | | | Restore it. llvm-svn: 134459
* Call objc_terminate() instead of abort() when a cleanup throws anJohn McCall2011-07-063-0/+11
| | | | | | | exception in Objective-C; in Objective-C++ we still use std::terminate(). This is only available in very recent runtimes. llvm-svn: 134456
* Missing header from last commit; accidental change.John McCall2011-07-061-1/+0
| | | | llvm-svn: 134455
* Change the driver's logic about Objective-C runtimes: abstract out aJohn McCall2011-07-065-54/+91
| | | | | | | | | | | | 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
* Drop "soft" argument that would be considered as file argument by cc1.Joerg Sonnenberger2011-07-051-1/+0
| | | | llvm-svn: 134438
* StringRef'ize clang::drive::Option::getName(), from Zach Wheeler!Douglas Gregor2011-07-053-11/+11
| | | | llvm-svn: 134418
* Make the GCC version proliferation worse by N+1 for the sake ofChandler Carruth2011-07-021-1/+1
| | | | | | ArchLinux. =/ Fixes PR10246. llvm-svn: 134299
* Make clang behave in a gcc-compatible way in the presence of multiple flags ↵Eli Friedman2011-07-021-2/+19
| | | | | | | | for the same x86 target feature (e.g. -mno-sse -msse). gcc uses a somewhat unintuitive algorithm here in that the enabled SSE instructions is based on the order of the *last* flag for *each* feature-level, so that "-mno-sse -msse2" only enables SSE2, but "-mno-sse -msse2 -msse" enables all SSE levels. Issue reported on cfe-dev. llvm-svn: 134296
* Update for llvm commit r134291.Eric Christopher2011-07-021-1/+1
| | | | | | Fixes rdar://9714064 llvm-svn: 134292
* Use existing -fcatch-undefined-behavior option,Fariborz Jahanian2011-06-291-2/+0
| | | | | | replacing -freset-local-blocks. // rdar://9227352 llvm-svn: 134082
* Under a compiler flag, -freset-local-blocks,Fariborz Jahanian2011-06-281-0/+2
| | | | | | | wipe out stack blocks when they go out of scope. // rdar://9227352 llvm-svn: 134045
* Driver/Darwin: -force_load can be specified multiple times.Daniel Dunbar2011-06-281-1/+1
| | | | llvm-svn: 134025
* libprofile_rt may be installed as a dylib on Darwin.Bill Wendling2011-06-271-19/+30
| | | | | | If we cannot find the static library, use the dylib instead. llvm-svn: 133926
* fix autoconf build from r133710Dylan Noblesmith2011-06-231-0/+2
| | | | | | | | Sorry! This commit worked in CMake, but CXX_INCLUDE_ROOT is defined in a different config.h for autoconf. llvm-svn: 133715
* Build and use libcompiler_rt whenever possible.Eric Christopher2011-06-222-20/+23
| | | | | | Patch by Jean-Daniel Dupas! llvm-svn: 133624
* It is possible to request the nonfragile ABI with -fobjc-abi-version=2;John McCall2011-06-221-17/+20
| | | | | | | respect that when deciding whether -objc-exceptions implies the -fexceptions -cc1 option. llvm-svn: 133590
* Driver/Darwin: Fixup version check for -object_path_lto support.Daniel Dunbar2011-06-211-1/+1
| | | | llvm-svn: 133548
* Fix the default libc++ header search path to be sysrooted. Radar 9639692.Bob Wilson2011-06-212-6/+3
| | | | | | | | | 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
* Driver/Darwin: When invoking the linker, automatically pass -object_path_lto soDaniel Dunbar2011-06-211-0/+11
| | | | | | | | | that the linker has a place to put the temporary object file and can leave it around (for the driver to clean up). This is important so that the object file references in the debug info are preserved for possible use by dsymutil. - <rdar://problem/8294279> executable has no debug symbols when compiled with LTO llvm-svn: 133543
* Driver: Factor out IsUsingLTO helper function.Daniel Dunbar2011-06-211-7/+14
| | | | llvm-svn: 133542
* Fix typo. From Damjan Marion.Joerg Sonnenberger2011-06-211-1/+1
| | | | llvm-svn: 133511
* Driver/Darwin: Honor -Xarch_FOO when the arch matches either the toolchain orDaniel Dunbar2011-06-211-1/+6
| | | | | | | the architecture being bound. - Fixes things like -Xarch_armv7. llvm-svn: 133490
* Add support for -Wa,--noexecstack when building from a non-assembly file. ForNick Lewycky2011-06-211-0/+2
| | | | | | | an assembly file it worked correctly, while for a .c file it would given an error about how --noexecstack is not a supported argument to -Wa. llvm-svn: 133489
* [arcmt] Remove '-arcmt-modify-in-memory', it turned out less useful than we ↵Argyrios Kyrtzidis2011-06-171-5/+1
| | | | | | hoped it would be. llvm-svn: 133315
* Add support for -force_load flag, for compat with Apple gcc. rdar://9555962 .Eli Friedman2011-06-161-0/+1
| | | | llvm-svn: 133218
* Be aware of (x86_64-redhat-linux6E-)g++44 on RHEL5.NAKAMURA Takumi2011-06-161-0/+3
| | | | | | | 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
* The ARC Migration Tool. All the credit goes to Argyrios and FariborzJohn McCall2011-06-151-0/+20
| | | | | | for this. llvm-svn: 133104
* Automatic Reference Counting.John McCall2011-06-154-5/+163
| | | | | | | | | | 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
* Introduce a -cc1-level option to turn off related result typeDouglas Gregor2011-06-141-0/+5
| | | | | | inference, to be used (only) by the Objective-C rewriter. llvm-svn: 133025
* Eliminate the -f[no]objc-infer-related-result-type flags; there's noDouglas Gregor2011-06-131-6/+0
| | | | | | reason to allow the user to control these semantics through a flag. llvm-svn: 132919
* Implement Objective-C Related Result Type semantics.Douglas Gregor2011-06-111-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Related result types apply Cocoa conventions to the type of message sends and property accesses to Objective-C methods that are known to always return objects whose type is the same as the type of the receiving class (or a subclass thereof), such as +alloc and -init. This tightens up static type safety for Objective-C, so that we now diagnose mistakes like this: t.m:4:10: warning: incompatible pointer types initializing 'NSSet *' with an expression of type 'NSArray *' [-Wincompatible-pointer-types] NSSet *array = [[NSArray alloc] init]; ^ ~~~~~~~~~~~~~~~~~~~~~~ /System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:72:1: note: instance method 'init' is assumed to return an instance of its receiver type ('NSArray *') - (id)init; ^ It also means that we get decent type inference when writing code in Objective-C++0x: auto array = [[NSMutableArray alloc] initWithObjects:@"one", @"two",nil]; // ^ now infers NSMutableArray* rather than id llvm-svn: 132868
* Revert "hack in my new variables for GCC"Chandler Carruth2011-06-081-20/+24
| | | | | | Very sorry for the accidental commit of WIP code. llvm-svn: 132745
* hack in my new variables for GCCChandler Carruth2011-06-081-24/+20
| | | | llvm-svn: 132743
* Sort -lgcc after -lgcc_s for NetBSD, otherwise shared libraries on i386Joerg Sonnenberger2011-06-071-1/+1
| | | | | | may pick it up. This would create bad text relocations. llvm-svn: 132736
* Toolchain support for Ubuntu Oneiric. Patch by Michael Wild!Benjamin Kramer2011-06-051-3/+6
| | | | llvm-svn: 132669
* Adjust the linker for PowerPC64/-m32 on FreeBSD too.Roman Divacky2011-06-041-0/+5
| | | | llvm-svn: 132635
* Make -m32 work on FreeBSD/PowerPC64.Roman Divacky2011-06-042-0/+7
| | | | llvm-svn: 132634
* On linux, -nostdlib was causing a --start-group with no --end-group to be passedNick Lewycky2011-06-041-3/+3
| | | | | | to the linker. llvm-svn: 132629
* Identifiers with _CapitalLetter are reserved, so don't use them. Prefer theNick Lewycky2011-06-041-7/+7
| | | | | | | common C++ pattern of using the same name for the constructor argument as you do for the member. Noticed by inspection. llvm-svn: 132626
* We were looking at /usr/lib only if the distro had multilib. This is bogus:Rafael Espindola2011-06-031-2/+7
| | | | | | | | | | 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
* Add support for centos.Rafael Espindola2011-06-031-4/+9
| | | | llvm-svn: 132550
* 80-col cleanup.Eric Christopher2011-06-031-5/+11
| | | | llvm-svn: 132543
* Untabify and fix whitespace.NAKAMURA Takumi2011-06-031-17/+17
| | | | llvm-svn: 132531
* We already have support for using c++ headers from a custom location.Rafael Espindola2011-06-021-26/+53
| | | | | | | | | | | | | 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
* Add Debian wheezy/sid to ToolChains.cpp. Patch by Michael Wild. PR10064.Eli Friedman2011-06-021-4/+9
| | | | llvm-svn: 132489
* Change how we link libprofile_rt.a. While at it, refactor the code a bit.Rafael Espindola2011-06-021-40/+23
| | | | llvm-svn: 132474
* Add -fno-gnu89-inline.Rafael Espindola2011-06-021-1/+3
| | | | llvm-svn: 132468
* Implement -fgnu89-inline. Fixes PR10041.Rafael Espindola2011-06-021-0/+3
| | | | llvm-svn: 132460
* Add the necessary -L option for finding libprofile_rt.a. It might be a goodRafael Espindola2011-06-011-0/+5
| | | | | | | idea at some point to split out the directories where we install our runtime libraries. llvm-svn: 132425
* Driver/Clang: Simplify code to use arch enumerations.Daniel Dunbar2011-05-311-13/+12
| | | | llvm-svn: 132338
OpenPOWER on IntegriCloud