summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [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
* Let amd64 be used in target triple instead of x86_64 on FreeBSD.Roman Divacky2011-05-241-1/+2
| | | | | | Patch by Dimitry Andric! llvm-svn: 131990
* For non-Darwin, a plain 'char' type is unsigned.Jim Grosbach2011-05-241-0/+1
| | | | llvm-svn: 131967
* Introduce the -fdiagnostics-format=xxx option to control how ClangDouglas Gregor2011-05-211-1/+11
| | | | | | | | | | | | prints the file, line, and column of a diagnostic. We currently support Clang's normal format, MSVC, and Vi formats. Note that we no longer change the diagnostic format based on -fms-extensions. Patch by Andrew Fish! llvm-svn: 131794
* Correction for r131662, the GNU as option is --fatal-warnings.Joerg Sonnenberger2011-05-191-1/+1
| | | | llvm-svn: 131671
* Support -fatal-warnings for the assembler frontendJoerg Sonnenberger2011-05-191-0/+3
| | | | llvm-svn: 131662
* Fix comment.Rafael Espindola2011-05-171-1/+1
| | | | llvm-svn: 131478
* The logic about -static is darwin only. For now assume that all nonRafael Espindola2011-05-171-15/+22
| | | | | | darwin assembler can handle cfi. Add a test. llvm-svn: 131464
* Make the triple an explicit argument of FindTargetProgramPath.Joerg Sonnenberger2011-05-161-5/+10
| | | | | | | | | | 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
* Driver/Darwin: Put dsymutil -o arguments first, so that dysmutil doesn't barfDaniel Dunbar2011-05-091-3/+3
| | | | | | | when POSIXLY_COMPLIANT is set. - Patch by Dave Vasilevsky! llvm-svn: 131084
* Move logic for passing down -mrelax-all / -relax-all into a commonJoerg Sonnenberger2011-05-061-14/+37
| | | | | | | | function. Extend the logic to check if the input was compiled. Use -relax-all as default only if -O0 is used for compilation. Fixes bug 9290. llvm-svn: 130983
* Preserve the full name of the file, so that '-c -o foo.pic.o' producesNick Lewycky2011-05-051-6/+2
| | | | | | foo.pic.gcno instead of foo.gcno. llvm-svn: 130899
* Record where the GCOV data files should be placed.Nick Lewycky2011-05-041-0/+12
| | | | llvm-svn: 130866
* No, fix this use after free properly.Nick Lewycky2011-05-041-3/+2
| | | | llvm-svn: 130833
* Fix use after free through StringRef.Nick Lewycky2011-05-041-2/+3
| | | | llvm-svn: 130828
OpenPOWER on IntegriCloud