aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver
AgeCommit message (Collapse)Author
2013-03-28Rename clang::driver::tools::linuxtools to clang::driver::tools::gnutools.Thomas Schwinge
This is about the GNU Binutils' assembler and linker, so reflect that in the name. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178272 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-28Rename LinuxDistro to Distro.Thomas Schwinge
The concept of such a software distribution is not tied to the Linux kernel; for example Debian GNU/Linux, Debian GNU/Hurd, and Debian GNU/kFreeBSD all share the same source packages and generally the same user-space configuration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178270 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-28Add support for gcc-compatible -mpopcntd -mno-popcntd PPC optionsHal Finkel
gcc provides -mpopcntd and -mno-popcntd for controlling the popcntd target feature; support these options as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178235 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-28[Mips] Handle pseudo-target flags '-EL' and '-EB' and properly adjustSimon Atanasyan
toolchain flags for MIPS targets. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178232 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-28Add support for gcc-compatible -mmfcrf -mno-mfcrf PPC optionsHal Finkel
gcc provides -mmfcrf and -mno-mfcrf for controlling what we call the mfocrf target feature. Also, PPC is now making use of the static function AddTargetFeature used by the Mips Driver code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178227 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-27<rdar://problem/13509689> Introduce -module-file-info option that provides ↵Douglas Gregor
information about a particular module file. This option can be useful for end users who want to know why they ended up with a ton of different variants of the "std" module in their module cache. This problem should go away over time, as we reduce the need for module variants, but it will never go away entirely. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178148 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26[driver] Do not generate crash diagnostics if the compilation command failedChad Rosier
to execute as the crash will surely reoccur while generating the diagnostics. rdar://13362359 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178089 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25<rdar://problem/13434605> Periodically prune the module cache so that it ↵Douglas Gregor
does not grow forever. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177918 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25[analyzer] Adds cplusplus.NewDelete checker that check for memory leaks, ↵Anton Yartsev
double free, and use-after-free problems of memory managed by new/delete. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177849 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-24Reject -no-integrated-as on windows.Rafael Espindola
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177840 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-23Revert svn r176894 and r177658.Bob Wilson
Changing -ccc-install-dir to affect cc1's resource-dir setting broke our internal LNT tests. After discussing the situation with Jim, we've decided to pursue an alternate approach. We really want the resource-dir to be located relative to clang, even when using -ccc-install-dir, but we're going to add a fallback setting for the libc++ headers if they don't exist alongside the compiler. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177815 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-23If a .syms file is available alongside a sanitizer runtime, pass it to theRichard Smith
linker via --dynamic-list instead of using --export-dynamic. This reduces the size of the dynamic symbol table, and thus of the binary (in some cases by up to ~30%). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177783 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-21<rdar://problem/13477190> Give the Clang module cache directory some ↵Douglas Gregor
structure, so it's easier to find. We now put the Clang module cache in <system-temp-directory>/org.llvm.clang/ModuleCache. Perhaps some day there will be other caches under <system-temp-directory>/org.llvm.clang>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177671 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-21Avoid warnings from compilers that think you can drop off the end of a fully ↵Benjamin Kramer
covered switch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177656 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-21[ASan] Let the users to invoke `clang -fsanitize=address` to link binaries ↵Alexander Potapenko
targeting the iOS simulator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177633 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-20Split ubsan runtime into three pieces (clang part):Richard Smith
* libclang_rt-san-* is sanitizer_common, and is linked in only if no other sanitizer runtime is present. * libclang_rt-ubsan-* is the piece of the runtime which doesn't depend on a C++ ABI library, and is always linked in. * libclang_rt-ubsan_cxx-* is the piece of the runtime which depends on a C++ ABI library, and is only linked in when linking a C++ binary. This change also switches us to using -whole-archive for the ubsan runtime (which is made possible by the above split), and switches us to only linking the sanitizer runtime into the main binary and not into DSOs (which is made possible by using -whole-archive). The motivation for this is to only link a single copy of sanitizer_common into any binary. This is becoming important now because we want to share more state between multiple sanitizers in the same process (for instance, we want a single shared output mutex). The Darwin ubsan runtime is unchanged; because we use a DSO there, we don't need this complexity. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177605 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-20Fix redundant comparison in gcc::Common::ConstructJob.Hans Wennborg
We were checking "Arch == llvm::Triple::x86_64 || Arch == llvm::Triple::x86_64", but the rhs should actually check for powerpc64. Found while experimenting with a potential new Clang warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177496 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-20Remove the Tools DensMap from the toolchain.Rafael Espindola
Each toolchain has a set of tools, but they are all of known types. It can have a linker, an assembler, a "clang" (compile, analyze, ...) a non-clang compiler, etc. Instead of keeping a map, just have member variable for each type of tool. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177479 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-19Go back to using the integrated assembler on windows ever when passedRafael Espindola
-no-integrated-as. It is the only assembler we have there. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177398 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-19[ASan] Make -fsanitize=address always imply -fsanitize=init-orderAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177391 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-19Finish refactoring the tool selection logic.Rafael Espindola
The general pattern now is that Foobar::constructTool only creates tools defined in the tools::foobar namespace and then delegates to the parent. The remaining duplicated code is now in the tools themselves. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177368 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18Centralize the logic for using the integrated assembler.Rafael Espindola
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177360 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18Centralize the recording of which tools have been constructed.Rafael Espindola
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177319 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18Objective-C modern translator. Don't put line infoFariborz Jahanian
into the pre-preprocessed file to be passed to modern translator when compiling in no debug mode. // rdar://13138170 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177311 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18Use early returns when checking if we already constructed a tool and whenRafael Espindola
delegating to Generic_GCC::SelectTool (it already updates the tool map). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177305 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18Remove unused argument.Rafael Espindola
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177303 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18Pass an ArgList to every toolchain constructor. Remove the useIntegratedAsRafael Espindola
argument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177301 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18Inline ShouldUseIntegratedAssembler and move the documentation toRafael Espindola
useIntegratedAs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177300 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18Refactor a bit of duplicated code to useIntegratedAs.Rafael Espindola
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177299 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18Remove unused argument.Rafael Espindola
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177293 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18Remove unused argument.Rafael Espindola
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177287 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18Make sure to use same EABI version for external assembler as for integrated as.Anton Korobeynikov
Patch by Andrew Turner! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177252 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-15Take in account the triplet 'powerpc-linux-gnuspe' for PowerPC SPE. Done for ↵Sylvestre Ledru
the port of Debian on this arch. More information on: http://wiki.debian.org/PowerPCSPEPort Patch by Roland Stigge git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177161 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-14[ASan] Make -fsanitize=address imply -fsanitize=init-order (if the latter is ↵Alexey Samsonov
not explicitly disabled). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177061 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-12[driver] Only enable -fmodules-autolink if we are using the integrated ↵Ted Kremenek
assembler. Fixes <rdar://problem/13289240> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176897 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-12Driver: -ccc-install-dir should affect cc1 -resource-dirJim Grosbach
-ccc-install-dir is supposed to cause the compiler to behave as-if it were installed in the indicated location. It almost does, but misses anything that's relying on the resource directory (libc++ header search, in particular). The resource dir is resolved too early, before command line args are handled. The fix is simply to move handling of the resource dir until after we know if a -ccc-install-dir is present. rdar://13402696 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176894 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-12Revert "Disallow using -fmodules with -no-integrated-as."Ted Kremenek
Per comment from Benjamin Kramer, this isn't portable (yet). I'll come up with a better fix. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176876 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-11Disallow using -fmodules with -no-integrated-as.Ted Kremenek
Modules enables features such as auto-linking, and we simply do not want to support a matrix of subtly enabled/disabled features depending on whether or not a user is using the integrated assembler. It isn't clear if this is the best place to do this check. For one thing, these kind of errors are not caught by the serialized diagnostics. Fixes <rdar://problem/13289240> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176826 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-07Minor refactor of how we get compilation phases.Matthew Curtis
There is now a single function to get the list of phases for a given output Type. No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176628 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-07Add flags for additional control over coverage generation. Pick the versionNick Lewycky
string to be emitted, and two properties about the files themselves. Use $PWD to absolut-ify the path to the coverage file. Yes, this is what GCC does. Reverts my own r175706. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176617 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-06Driver: add support for new style multiarch in Ubuntu 13.04Dmitri Gribenko
Patch by Sanne Wouda. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176557 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-04Add ARM v6m, v7m, and v7em architectures for Cortex-M series processors.Bob Wilson
<rdar://problem/11314476> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176458 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-04Tidy up lists of Cortex-A series processors, adding entries for A7.Bob Wilson
Also fix a missing entry for cortex-r5 in one copy of getLLVMArchSuffixForARM. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176457 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-04Fix confused use of llvm::StringSwitch for armv7r architecture.Bob Wilson
svn 170909 added support for cortex-r5 but in this case it was done incorrectly. The last argument to StringSwitch.Cases() is the replacement value, so by adding "cortex-r5" it changed the default cpu for armv7r to cortex-r5 instead of cortex-r4. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176456 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-04Check for warnings in a bunch of the linker invocations, and add oneChandler Carruth
with both -static-libgcc and -static on the commandline. Fix a warning in the latter case due to a backwards short circuiting || operator in the driver. No real functionality changed here, just allows the driver to properly consume -static-libgcc when -static is also specified. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176429 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-03Default to enabling default-synthesized ivars on all platformsDavid Chisnall
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176419 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-28Fix global overflow in types::lookupTypeForTypeSpecifier.Evgeniy Stepanov
memcpy() is allowed to read entire contents of both memory areas. Found with AddressSanitizer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176237 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-27[driver] The failure of any phase (e.g., preprocess, compile, assemble) for aChad Rosier
single translation unit should prevent later phases from executing. Otherwise, this generates lots of noise in build systems. This a fallout from r173825. Patch by Matthew Curtis <mcurtis@codeaurora.org>. rdar://13298009 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176198 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-27[Mips] Add two new aliases for MIPS ABI names 32 (means o32 abi) and 64Simon Atanasyan
(means n64 abi) to improve compatibility with GNU tools. Patch by Jia Liu <proljc@gmail.com>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176187 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-27[Sanitizer] Change driver behavior when linking with -fsanitize=thread and ↵Alexey Samsonov
-fsanitize=memory. TSan/MSan also provide their versions of new/delete and should use the same strategy as ASan. Share the code that sets linker flags for all sanitizers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176178 91177308-0d34-0410-b5e6-96231b3b80d8