summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver
Commit message (Collapse)AuthorAgeFilesLines
* Have -fms-no-extensions turn off -fms-compatibilityDouglas Gregor2011-10-241-2/+6
| | | | llvm-svn: 142798
* Pack struct better.Benjamin Kramer2011-10-223-3/+3
| | | | llvm-svn: 142725
* lib/Driver/Tools.cpp: Use PathV2::is_absolute() to add ↵NAKAMURA Takumi2011-10-221-1/+1
| | | | | | -fdebug-compilation-dir. pwd[0] might not be '/' on Win32 hosts. llvm-svn: 142720
* Take DW_AT_comp_dir from $PWD when it's present and starts with a '/'. This isNick Lewycky2011-10-211-0/+10
| | | | | | | closer to what GCC does, except that GCC also checks that the inodes for $PWD and '.' match. llvm-svn: 142633
* Frontend: Support -iframework.Daniel Dunbar2011-10-181-4/+0
| | | | llvm-svn: 142418
* [driver] Make the driver to link the simulator arclite lib when passing ↵Argyrios Kyrtzidis2011-10-181-3/+5
| | | | | | | | -mios-simulator-version-min. rdar://10218700 llvm-svn: 142372
* Revert r142311, -mios-simulator-version-min does not work correctly.Argyrios Kyrtzidis2011-10-181-0/+51
| | | | llvm-svn: 142322
* Remove the hack where we sniff the __IPHONE_OS_VERSION_MIN_REQUIRED define.Argyrios Kyrtzidis2011-10-171-51/+0
| | | | | | We can use -mios-simulator-version-min now. rdar://10218700 llvm-svn: 142311
* Wire up support for the controlling the extended dwarf .file directive. WithNick Lewycky2011-10-171-0/+15
| | | | | | | r142300 but not this patch, clang -S may emit .s files that assemblers other than llvm-mc can't parse. llvm-svn: 142301
* Implement -static-libstdc++ for linux.Rafael Espindola2011-10-171-0/+6
| | | | llvm-svn: 142290
* Implement -static-libgcc on linux and refactor the code responsible for addingRafael Espindola2011-10-171-31/+27
| | | | | | libgcc to the link line into a helper function. llvm-svn: 142269
* Fix a silly bug introduced in r142133.Chandler Carruth2011-10-161-2/+2
| | | | llvm-svn: 142134
* Clean up some cruft in the library path searching logic by makingChandler Carruth2011-10-161-27/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'libdir' mean the actual library directory, not the GCC subdirectory of the library directory. That was just a confusing pattern. Instead, supply proper GCC subdirectories when scanning for various triple-based subdirectories with a GCC installation in them. This also makes it much more obvious how multiarch installations, which have a triple-based prefix as well as suffix work. Also clean up our handling of these triple-prefixed trees by using them in both a multiarch pattern and a non-multiarch pattern whenever they exist. Note that this *does not* match what GCC does on Debian, the only truly multiarch installation I've been able to get installed and test on. GCC appears to have a bug, and ends up searching paths like '/lib/../../lib32' which makes no sense what-so-ever. Instead, I've tried to encode the rational logic that seems clearly intended by GCC's pattern. GCC ends up with patterns like: /lib/../../lib32 /usr/lib/../../lib32 /usr/lib/x86_64-linux-gnu/../..lib32 Only the last one makes any sense having a '/../..' in it, so in Clang, that's the only one which gets a '/../..' in it. I *think* this will fix Debian multiarch links. I'm committing without baking this logic into our test suite so I can test on a few different systems. If all goes well (and no one screams) I'll check in some more comprehensive tests for multiarch behavior tomorrow. llvm-svn: 142133
* Fix the CXX_INCLUDE_ROOT case that was out of date with ScanLibDirForGCCTriple.Rafael Espindola2011-10-141-1/+1
| | | | llvm-svn: 141980
* Use Triple.isOSDarwin() instead of comparing against Triple::Darwin.Bob Wilson2011-10-144-17/+19
| | | | | | | | | There are now separate Triple::MacOSX and Triple::IOS values for the OS so comparing against Triple::Darwin will fail to match those. Note that I changed the expected output for the Driver/rewrite-objc.m test, which had previously not been passing Darwin-specific options with the macosx triple. llvm-svn: 141944
* Rename -Wc++0x-compat, -Wc++0x-extensions and -Wc++0x-narrowing from c++0x toRichard Smith2011-10-131-1/+3
| | | | | | | c++11. The old names are kept for backwards-compatibility. Patch by Ahmed Charles! Names for backwards-compatible DiagGroups removed by me. llvm-svn: 141913
* Add triple for RHEL 5 to the libpath collecting logic.Benjamin Kramer2011-10-131-0/+1
| | | | llvm-svn: 141887
* The Objective-C rewriter uses the fragile ABI, always.Douglas Gregor2011-10-121-1/+3
| | | | llvm-svn: 141795
* Driver: Add support for a new -nostdlibinc option.Daniel Dunbar2011-10-111-0/+2
| | | | | | | | | | | | - This disables the system include directories, but not the compiler builtin directories. Useful for projects that want to use things like the intrinsic headers, but are otherwise freestanding. - I'm willing to reconsider the option naming, I also considered providing an explicit -builtinc (which would match -nobuiltininc), but this is more consistent with existing options. llvm-svn: 141692
* Frontend: Replace -nostdinc by -nostdsysteminc (which is just system includeDaniel Dunbar2011-10-111-3/+8
| | | | | | paths). The -nostdinc behavior is now -nostdsysteminc + -nobuiltininc. llvm-svn: 141691
* Link in Scrt1.o instead of crt1.o when -pie is specified.Roman Divacky2011-10-101-2/+4
| | | | llvm-svn: 141573
* Partially revert r141374: allow use of libc++ prior to Mac OS X 10.7.Bob Wilson2011-10-101-5/+0
| | | | | | | Apple only supports libc++ on OS X 10.7 and later but for the open-source compiler that restriction doesn't make sense. llvm-svn: 141566
* OpenCL: add driver/frontend support for precompiled headersPeter Collingbourne2011-10-091-0/+1
| | | | llvm-svn: 141516
* Fix "Uninitialized" warnings.NAKAMURA Takumi2011-10-081-3/+3
| | | | llvm-svn: 141487
* WhitespaceNAKAMURA Takumi2011-10-081-1/+1
| | | | llvm-svn: 141486
* [arcmt] Ignore linking errors when doing ARC migration, rdar://10247606Argyrios Kyrtzidis2011-10-071-0/+12
| | | | llvm-svn: 141434
* Clang driver changes for iOS 5.0 and OS X Lion support.Bob Wilson2011-10-072-3/+40
| | | | | | | | Check whether the libc++ library is available when using -stdlib=libc++, and also adjust the check for whether to link with -lgcc_s.1. Patch by Ted Kremenek and Daniel Dunbar. llvm-svn: 141374
* More cleanup using StringSwitch.Chad Rosier2011-10-071-65/+35
| | | | llvm-svn: 141373
* Use StringSwitch. Thanks for Chandler for the suggestion.Bob Wilson2011-10-071-41/+20
| | | | llvm-svn: 141344
* Use strpbrk(3) instead of open coding it.Benjamin Kramer2011-10-061-8/+1
| | | | llvm-svn: 141328
* Remove DISABLE_ARM_DARWIN_USE_MOVT ifdefs. Radar 9456730.Bob Wilson2011-10-061-8/+0
| | | | llvm-svn: 141320
* Rearrange for readability. No functional change.Bob Wilson2011-10-061-3/+4
| | | | llvm-svn: 141309
* Add a missing check for cortex-a9.Bob Wilson2011-10-061-1/+2
| | | | llvm-svn: 141308
* Add -Wlanguage-extension-token option for ext_token_used warning.Ivan Krasin2011-10-061-0/+1
| | | | llvm-svn: 141268
* Driver & AST: Implement support for -fpack-struct and -fpack-struct= commandDaniel Dunbar2011-10-051-0/+12
| | | | | | | line options. - <rdar://problem/10120602>, PR9631 llvm-svn: 141211
* [driver] For consistency, handle all shell special characters handled by theChad Rosier2011-10-051-1/+1
| | | | | | quoting code. llvm-svn: 141205
* [driver] The -v option doesn't quoted the command line arguments for historicalChad Rosier2011-10-051-1/+8
| | | | | | | reasons. However, it does seems practical to quote strings that need it. rdar://10221951 llvm-svn: 141202
* Use the InstalledDir correctly, and test it correctly as well. =/ ShouldChandler Carruth2011-10-051-1/+1
| | | | | | have noticed this previously, sorry. llvm-svn: 141167
* Teach Clang to cope with GCC installations that have unusual patchChandler Carruth2011-10-051-3/+5
| | | | | | | "versions". Currently, these are just dropped on the floor, A concrete version number will always win out. llvm-svn: 141159
* Implement the feature I was originally driving toward when I startedChandler Carruth2011-10-051-0/+1
| | | | | | | | | | | | | | this saga. Teach the driver to detect a GCC installed along side Clang using the existing InstalledDir support in the Clang driver. This makes a lot of Clang's behavior more automatic when it is installed along side GCC. Also include the first test cases (more to come, honest) which test both the install directory behavior, and the version sorting behavior to show that we're actually searching for the best candidate GCC installation now. llvm-svn: 141145
* Hoist the other messy part out of an inner loop and into a helperChandler Carruth2011-10-041-43/+45
| | | | | | function, cleaning up along the way. llvm-svn: 141134
* Hoist the first chunk of this into a helper function. No functionalityChandler Carruth2011-10-041-55/+68
| | | | | | change. llvm-svn: 141131
* [driver] Improve r141053 by only emitting the warning if the original inputChad Rosier2011-10-041-15/+1
| | | | | | | was assembly. Otherwise, something like -save-temps causes the integrated assembler to warn. llvm-svn: 141127
* Fix Windows+MinGW which introduces noise into path separators.Chandler Carruth2011-10-041-1/+5
| | | | | | | | | There should be a better solution to this; Michael and I are continuing to discuss exactly what it should be. The one solution I'm very uncomfortable with is making the FileCheck tests use a regex for each path separator. llvm-svn: 141126
* Now that multiple prefixes are much cheaper to search for GCCChandler Carruth2011-10-041-0/+1
| | | | | | | | | | | | | installations, support them when installed directly under the system root ('/lib/gcc/...' essentially). With this, Clang can correctly detect and use a cross-compiling GCC installation within a system root and use it. Again, test cases will be coming in later commits, as I'm going to write a few test cases that exercise nearly all of this logic. llvm-svn: 141121
* Rework the search for a GCC installation still further. This combinesChandler Carruth2011-10-041-50/+85
| | | | | | | | | | | | | | | | | | | | | | two fundamental changes, as they ended up being interrelated. The first is to walk from the root down through the filesystem so that we prune subtrees which do not exist early. This greatly reduces the filesystem traffic of this routine. We store the "best" GCC version we encounter, and look at all of the GCC installations available. Also, we look through GCC versions by scanning the directory rather than using a hard-coded list of versions. This has several benefits. It makes it much more efficient to locate a GCC installation even in the presence of a large number of different options by simply reading the directory once. It also future-proofs us as new GCC versions are released and installed. We no longer have a hard coded list of version numbers, and won't need to manually updated it. We can still filter out known-bad versions as needed. Currently I've left in filtering for all GCC installations prior to 4.1.1, as that was the first one supported previously. llvm-svn: 141120
* Add a comment explaining that I have a better plan for implementing theChandler Carruth2011-10-041-0/+2
| | | | | | | | | | | | | GCC installation search that requires fewer filesystem operations. Planning to implement that next as the current approcah while thorough (and so far looks correct) does a very unfortunate number of filesystem operations. I'm motivated to fix this in no small part because I would like to support a much larger space of triples and GCC versions, which would explode the current algorithm. llvm-svn: 141073
* Invert the loop for detecting installed GCC trees. This make the loopChandler Carruth2011-10-041-36/+19
| | | | | | | | | | | | | | | | | | | find the newest GCC available, among other goodness. It makes the entire system much less prone to error from prefixes and/or system roots pruning early the set of triples and GCC versions available. Also, improve some comments and simplify the forms of some of the loops. This causes the driver to stat directories more often than is strictly necessary, but the alternatives which I looked at that still accomplished this goal needed quite a bit more code and were likely not much faster. Test cases for this, now that our behavior here is significantly more principled and predictable, should come tomorrow as I walk back through VMs looking for edge cases that are missed after this. llvm-svn: 141072
* Fuse the two halves of the GCC installation detection. This isChandler Carruth2011-10-041-54/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | significantly cleaner (IMO) and more principled. We now walk down each layer of the directory hierarchy searching for the GCC install. This change does in fact introduce a significant behavior change in theory, although in practice I don't know of any distro that will be impacted by it negatively, and Debian may (untested) get slightly better through it. Specifically, the logic now looks exhaustively for patterns such as: /usr/lib/<triple>/gcc/<triple> Previously, this would only be selected if there was *also* a '/usr/lib/gcc/<triple>' directory, or if '<triple>' were the excat DefaultHostTriple in the driver. There is a 4-deep nested loop here, but it doesn't do terribly many filesystem operations, as we skip at each layer of that layer's directory doesn't exist. There remains a significant FIXME in this logic: it would be much better to first build up a set of candidate components for each of the four layers with a bottom-up pruning such as this, but then select the final installation using a top-down algorithm in order to find the newest GCC installation available, regardless of which particular path leads to it. llvm-svn: 141071
* Rip out flags for controlling C++ "production mode" separately.Bob Wilson2011-10-041-4/+1
| | | | | | | This is old leftover cruft from the days when C++ was not yet ready for prime time. llvm-svn: 141063
OpenPOWER on IntegriCloud