summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Add some more options that aren't handled by llvm-gcc on fallback.Eric Christopher2011-08-181-1/+5
| | | | | | This is going to be made a table. llvm-svn: 137907
* Fix else style. No functionality change intended.Chad Rosier2011-08-171-5/+4
| | | | llvm-svn: 137896
* Fix iterator end for r137842.Chad Rosier2011-08-171-1/+1
| | | | llvm-svn: 137849
* [driver] Clang doesn't support -mkernel/-fapple-kext for i386, so it's Chad Rosier2011-08-171-0/+14
| | | | | | | | automatically invoking llvm-gcc's cc1plus, which doesn't support all options supported by Clang. Therefore, filter out unsupported options. rdar://9964354 llvm-svn: 137842
* Reject -mkernel for i386/Darwin C++ code; fall back to llvm-gcc instead.Bob Wilson2011-08-131-1/+2
| | | | | | | 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
* Add support of -x objc-cpp-output, -x objc++-cpp-output to the Driver.Nico Weber2011-08-131-2/+4
| | | | | | Matches gcc, and is also required for using ccache with clang. llvm-svn: 137563
* When the compiler crashes, the compiler driver now produces diagnostic Chad Rosier2011-08-021-2/+2
| | | | | | | | | information including the fully preprocessed source file(s) and command line arguments. The developer is asked to attach this diagnostic information to a bug report. rdar://9575623 llvm-svn: 136702
* Driver: When compiling i386 -fapple-kext code, we fallback to llvmgcc.Chad Rosier2011-08-011-1/+4
| | | | | | | | Unfortunately, llvmgcc doesn't always work when writing temporary output to /dev/null. Therefore, create a temp file that is later deleted. rdar://9837692 llvm-svn: 136644
* Introduce the "-index-header-map" option, to give special semanticsDouglas Gregor2011-07-281-1/+2
| | | | | | | for quoted header lookup when dealing with not-yet-installed frameworks. Fixes <rdar://problem/9824020>. llvm-svn: 136331
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-231-71/+72
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* Avoid warning on "clang -c -Dfoo test.i". Lines like these are createdRafael Espindola2011-07-211-0/+6
| | | | | | | when using ccache and libtool.m4 assumes that the compiler cannot print warnings about options it knows about. llvm-svn: 135723
* Temporarily revert r135614 while I fix the cmake build.Chad Rosier2011-07-201-2/+2
| | | | llvm-svn: 135621
* When the compiler crashes, the compiler driver now produces diagnostic ↵Chad Rosier2011-07-201-2/+2
| | | | | | | | | information including the fully preprocessed source file(s) and command line arguments. The developer is asked to attach this diagnostic information to a bug report. llvm-svn: 135614
* introduce a centralized place to introduce and inject llvm types into theChris Lattner2011-07-201-1/+1
| | | | | | | | clang namespace. There are a number of LLVM types that are used pervasively and it doesn't make sense to keep qualifying them. Start with casting operators. llvm-svn: 135574
* [arcmt] Add some additional driver flags to optionally emit or save the ↵Argyrios Kyrtzidis2011-07-191-0/+3
| | | | | | | | | | | pre-migration ARC errors. -arcmt-migrate-emit-errors : Emits the pre-migration ARC errors but it doesn't affect anything else -arcmt-migrate-report-output : Writes out the pre-migration ARC errors to the provided plist file rdar://9791454 llvm-svn: 135491
* Implement -MG. Fixes PR9613Peter Collingbourne2011-07-121-2/+8
| | | | llvm-svn: 134996
* [arcmt] Introduce new '-ccc-arcmt-migrate <path>' ARC migration driver option.Argyrios Kyrtzidis2011-07-091-1/+7
| | | | | | | | | | | | | | | | | | | | This is a new mode of migration, where we avoid modifying the original files but we emit temporary files instead. <path> will be used to keep migration process metadata. Currently the temporary files that are produced are put in the system's temp directory but we can put them in the <path> if is necessary. Also introduce new ARC migration functions in libclang whose only purpose, currently, is to accept <path> and provide pairs of original file/transformed file to map from the originals to the files after transformations are applied. Finally introduce the c-arcmt-test utility that exercises the new libclang functions, update arcmt-test, and add tests for the whole process. rdar://9735086. llvm-svn: 134844
* [arcmt] Add -ccc-arcmt-check/-ccc-arcmt-modify driver option aliases.Argyrios Kyrtzidis2011-07-071-4/+4
| | | | llvm-svn: 134591
* 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-061-0/+2
| | | | | | | exception in Objective-C; in Objective-C++ we still use std::terminate(). This is only available in very recent runtimes. llvm-svn: 134456
* Change the driver's logic about Objective-C runtimes: abstract out aJohn McCall2011-07-061-51/+58
| | | | | | | | | | | | 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
* 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
* 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-211-0/+1
| | | | | | | | | 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
* 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
* 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-151-3/+41
| | | | | | | | | | 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
* 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
* 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-041-0/+2
| | | | 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
* 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
* When given one of the applicable coverage flags, try to link againstNick Lewycky2011-05-241-6/+42
| | | | | | libprofile_rt.a. On Darwin, don't try to link -lgcov. llvm-svn: 132006
OpenPOWER on IntegriCloud