summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Provide -Wnull-conversion separately from -Wconversion.David Blaikie2012-03-141-0/+1
| | | | | | | | | | | | | Like GCC, provide a NULL conversion to non-pointer conversion as a separate flag, on by default. GCC's flag is "conversion-null" which we provide for cross compatibility, but in the interests of consistency (with -Wint-conversion, -Wbool-conversion, etc) the canonical Clang flag is called -Wnull-conversion. Patch by Lubos Lunak. Review feedback by myself, Chandler Carruth, and Chad Rosier. llvm-svn: 152745
* [driver] Clang should report an error for -faltivec on non-ppc.Chad Rosier2012-03-131-0/+8
| | | | | | rdar://10963572 llvm-svn: 152684
* Tweak linkage order for solaris.David Chisnall2012-03-131-1/+2
| | | | llvm-svn: 152627
* Address some of the concerns by Chandler.Bill Wendling2012-03-121-14/+11
| | | | | | | | * s/AddDirectoryList/addDirectoryList/ * Move the call to ::getenv into the function. * FileCheck-ize the testcase. llvm-svn: 152583
* Have clang pay attention to the LIBRARY_PATH environment variable.Bill Wendling2012-03-121-41/+44
| | | | | | | | The LIBRARY_PATH environment variable should be honored by clang. Have the driver pass the directories to the linker. <rdar://problem/9743567> and PR10296. llvm-svn: 152578
* Use VersionTuple to manage macosx versions in the driver. No functionality ↵Benjamin Kramer2012-03-101-5/+2
| | | | | | change. llvm-svn: 152504
* Update comment after r152140. Clarify a bit too.Nico Weber2012-03-091-1/+2
| | | | llvm-svn: 152441
* [analyzer] Rework inlining related command line options.Anna Zaks2012-03-081-1/+1
| | | | | | | | | - Remove -analyzer-inline-call. - Add -analyzer-ipa=[none|inlining] - Add -analyzer-inlining-mode to allow experimentation for different performance tuning methods. llvm-svn: 152351
* Implement -fno-dwarf2-cfi-asm on linux too.Rafael Espindola2012-03-081-10/+7
| | | | llvm-svn: 152316
* [driver] What was implemented in r152130 was actually -fno-inline-functions, notChad Rosier2012-03-061-2/+2
| | | | | | | -fno-inline. Part of rdar://10972766 llvm-svn: 152145
* Add new code migrator support for migrating existing Objective-C code to useTed Kremenek2012-03-061-1/+24
| | | | | | | | | | | the new Objective-C NSArray/NSDictionary/NSNumber literal syntax. This introduces a new library, libEdit, which provides a new way to support migration of code that improves on the original ARC migrator. We now believe that most of its functionality can be refactored into the existing libraries, and thus this new library may shortly disappear. llvm-svn: 152141
* Add clang support for new Objective-C literal syntax for NSDictionary, NSArray,Ted Kremenek2012-03-061-9/+26
| | | | | | | | | | | | | NSNumber, and boolean literals. This includes both Sema and Codegen support. Included is also support for new Objective-C container subscripting. My apologies for the large patch. It was very difficult to break apart. The patch introduces changes to the driver as well to cause clang to link in additional runtime support when needed to support the new language features. Docs are forthcoming to document the implementation and behavior of these features. llvm-svn: 152137
* [driver] Add support for -fno-inline.Chad Rosier2012-03-061-0/+3
| | | | | | rdar://10972766 llvm-svn: 152130
* [analyzer] Turn inlining on by default for better testing exposure.Anna Zaks2012-03-011-0/+2
| | | | | | Fix a test, which was most likely an unintended recursive call. llvm-svn: 151848
* Add a flag -fthread-sanitizer.Kostya Serebryany2012-03-011-0/+4
| | | | | | | | | | This flag enables ThreadSanitizer instrumentation committed to llvm as r150423. The patch includes one test for -fthread-sanitizer and one similar test for -faddress-sanitizer. This patch does not modify the linker flags (as we do it for -faddress-sanitizer) because the run-time library is not yet committed and it's structure in compiler-rt is not 100% clear. The users manual wil be changed in a separate commit. llvm-svn: 151846
* Add -C when linking on Solaris so that the error messages are understandable ↵David Chisnall2012-02-291-0/+3
| | | | | | by actual humans. llvm-svn: 151726
* [driver] Emit an error when trying to use ARC on macosx earlier than 10.6Argyrios Kyrtzidis2012-02-291-0/+3
| | | | | | rdar://10459258 llvm-svn: 151706
* Add -lm by default on Solaris.David Chisnall2012-02-281-0/+1
| | | | llvm-svn: 151653
* It turns out -fno-cxa-atexit just produces broken code, so disable it on ↵David Chisnall2012-02-281-1/+1
| | | | | | Solaris and we'll ship a __cxa_atexit implementation... llvm-svn: 151648
* Some more Solaris fixes. Now successfully building libc++ on Solaris with ↵David Chisnall2012-02-281-5/+10
| | | | | | clang (and linking clang against it). llvm-svn: 151632
* Default to not using __cxa_atexit on Solaris.David Chisnall2012-02-181-0/+1
| | | | llvm-svn: 150883
* Tweak link order on Solaris so that global ctors work.David Chisnall2012-02-161-1/+1
| | | | llvm-svn: 150696
* Remove the unuseful -fdiagnostics-show-nameDavid Blaikie2012-02-151-5/+0
| | | | | | | | | | | | | | This option was added in r129614 and doesn't have any use case that I'm aware of. It's possible that external tools are using these names - and if that's the case we can certainly reassess the functionality, but for now it lets us shave out a few unneeded bits from clang. Move the "StaticDiagNameIndex" table into the only remaining consumer, diagtool. This removes the actual diagnostic name strings from clang entirely. Reviewed by Chris Lattner & Ted Kremenek. llvm-svn: 150612
* Add some Solaris include paths and fix a -lgcc_eh that apparently should be ↵David Chisnall2012-02-151-1/+1
| | | | | | -lgcc_s. llvm-svn: 150602
* First pass at Solaris toolchain support. This version compiles and links helloDavid Chisnall2012-02-151-0/+120
| | | | | | | | world on Solaris 11 for both x86 and x86-64 using the built-in assembler and Solaris (not GNU) ld, however it currently relies on a hard-coded GCC location to find crtbegin.o and crtend.o, as well as libgcc and libgcc_eh. llvm-svn: 150580
* Have the driver pass CPU and target feature information to cc1as.Jim Grosbach2012-02-101-0/+61
| | | | | | | | | | When creating the MCSubtargetInfo, the assembler driver uses the CPU and feature string to construct a more accurate model of what instructions are and are not legal. rdar://10840476 llvm-svn: 150273
* Filter a few more options not recognized by gcc. <rdar://problem/10814020>Bob Wilson2012-02-071-3/+17
| | | | | | | These are new options that gcc doesn't recognize so the clang driver needs to remove them when it falls back to invoking gcc. llvm-svn: 149951
* Rewrite the debug action handling to take -verify into account.Eric Christopher2012-02-061-0/+1
| | | | | | | Add a quiet option for dwarfdump and move it out of NDEBUG only. Still requires an option as we don't want this on by default. llvm-svn: 149894
* Update the command line here and update the comment, we're just goingEric Christopher2012-02-061-0/+2
| | | | | | to leave this as a debug only option for now. llvm-svn: 149890
* Basic: import SmallString<> into clang namespaceDylan Noblesmith2012-02-051-7/+7
| | | | | | | (I was going to fix the TODO about DenseMap too, but that would break self-host right now. See PR11922.) llvm-svn: 149799
* Fix -ftrap-function fallout from llvm r145714. <rdar://problem/10799325>Bob Wilson2012-02-031-6/+1
| | | | | | | | | That llvm change removed the -trap-func backend option, so that using -ftrap-function with clang would cause the backend to complain. Fix it by adding the trap function name to the CodeGenOptions and passing it through to the TargetOptions. llvm-svn: 149679
* [analyzer] Rename the checker as per Ted's comment. Remove the referenceAnna Zaks2012-01-301-1/+0
| | | | | | from the driver. llvm-svn: 149276
* Remove the ToolTriple logic in NetBSD, which was completely broken byJoerg Sonnenberger2012-01-261-4/+2
| | | | | | | | the recent refactoring. All interesting NetBSD release have a GNU as version on i386 that supports --32, so don't bother with the conditional setting of it. llvm-svn: 149087
* Enable several checkers under --analyze for general testing.Ted Kremenek2012-01-261-0/+9
| | | | llvm-svn: 149016
* Delete the driver's HostInfo class. This abstraction just never reallyChandler Carruth2012-01-251-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | did anything. The two big pieces of functionality it tried to provide was to cache the ToolChain objects for each target, and to figure out the exact target based on the flag set coming in to an invocation. However, it had a lot of flaws even with those goals: - Neither of these have anything to do with the host, or its info. - The HostInfo class was setup as a full blown class *hierarchy* with a separate implementation for each "host" OS. This required dispatching just to create the objects in the first place. - The hierarchy claimed to represent the host, when in fact it was based on the target OS. - Each leaf in the hierarchy was responsible for implementing the flag processing and caching, resulting in a *lot* of copy-paste code and quite a few bugs. - The caching was consistently done based on architecture alone, even though *any* aspect of the targeted triple might change the behavior of the configured toolchain. - Flag processing was already being done in the Driver proper, separating the flag handling even more than it already is. Instead of this, we can simply have the dispatch logic in the Driver which previously created a HostInfo object create the ToolChain objects. Adding caching in the Driver layer is a tiny amount of code. Finally, pulling the flag processing into the Driver puts it where it belongs and consolidates it in one location. The result is that two functions, and maybe 100 lines of new code replace over 10 classes and 800 lines of code. Woot. This also paves the way to introduce more detailed ToolChain objects for various OSes without threading through a new HostInfo type as well, and the accompanying boiler plate. That, of course, was the yak I started to shave that began this entire refactoring escapade. Wheee! llvm-svn: 148950
* Add support for -fno-optimize-sibling-calls. Currently only implemented in theNick Lewycky2012-01-231-0/+3
| | | | | | X86 backend in LLVM. llvm-svn: 148689
* [Cygwin] Abandon Cygwin-1.5 and g++-3. Use g++-4.3 and higher on Cygwin-1.7.NAKAMURA Takumi2012-01-211-12/+0
| | | | llvm-svn: 148636
* Reenable DeadStoresChecker under --analyze, and move the ↵Ted Kremenek2012-01-201-0/+2
| | | | | | IdempotentOperationsChecker to the 'experimental' category. Fixes <rdar://problem/10146347>. llvm-svn: 148533
* In the driver, -fmodules enables modules for C/Objective-C but oneDouglas Gregor2012-01-181-2/+10
| | | | | | also needs -fcxx-modules to enable modules for C++/Objective-C++. llvm-svn: 148393
* remove assertions in the Hexagon backend specific clang driverSebastian Pop2012-01-131-51/+28
| | | | | | | | | | | | | | | | | | | Patch from Jyotsna Verma: I have made the changes to remove assertions in the Hexagon backend specific clang driver. Instead of asserting on invalid arch name, it has been modified to use the default value. I have changed the implementation of the CPU flag validation for the Hexagon backend. Earlier, the clang driver performed the check and asserted on invalid inputs. In the new implementation, the driver passes the last CPU flag (or sets to "v4" if not specified) to the compiler (and also to the assembler and linker which perform their own check) instead of asserting on incorrect values. This patch changes the setCPU function for the Hexagon backend in clang/lib/Basic/Targets.cpp which causes the compiler to error out on incorrect CPU flag values. llvm-svn: 148139
* Adjust set of default checkers.Ted Kremenek2012-01-121-2/+0
| | | | llvm-svn: 148055
* Fix -mfpu parsing on ARM.Evgeniy Stepanov2012-01-111-1/+12
| | | | | | | | | - Support gcc-compatible vfpv3 name in addition to vfp3. - Support vfpv3-d16. - Disable neon feature for -mfpu=vfp* (yes, we were emitting Neon instructions for those!). llvm-svn: 147943
* Add support for the androideabi environment to our triple support, andChandler Carruth2012-01-101-0/+10
| | | | | | | | | | for the arm-linux-androideabi triple in particular. Also use this to do a better job of selecting soft FP settings. Patch by Evgeniy Stepanov. llvm-svn: 147872
* Add -g to the cc1as flags only if we're dealing with an originalEric Christopher2012-01-101-6/+15
| | | | | | | | | source file. Otherwise -g -save-temps will error out on the compile of any .c file. Fixes about 4000 of the errors in the clang-tests gdb test suite. llvm-svn: 147819
* Remove extraneous braces.Eric Christopher2012-01-101-2/+1
| | | | llvm-svn: 147818
* Revert r147664; it's breaking clang regression tests.Eli Friedman2012-01-061-1/+1
| | | | llvm-svn: 147681
* Silence GCC warnings.Jakub Staszak2012-01-061-1/+1
| | | | llvm-svn: 147664
* Driver/Darwin: Remove a hack that avoided passing -demangle to iOS linkers.Daniel Dunbar2012-01-041-7/+1
| | | | llvm-svn: 147552
* Fixed by Chandler in r147434.Chad Rosier2012-01-031-1/+0
| | | | llvm-svn: 147489
* Add -fno-modules to the driver, to turn off modules (although they're off by ↵Douglas Gregor2012-01-031-2/+3
| | | | | | default anyway). llvm-svn: 147449
OpenPOWER on IntegriCloud