summaryrefslogtreecommitdiff
path: root/lib/Driver
Commit message (Collapse)AuthorAge
* clang-cl: Map /EHs- to -fno-exceptionsReid Kleckner2014-06-27
| | | | | | | | | | | | | | | This isn't 100% compatible with MSVC, but it's close enough. MSVC's /EH flag doesn't really control exceptions so much as how to clean up after an exception is thrown. The upshot is that cl.exe /EHs- will compile try, throw, and catch statements with a warning, but clang-cl will reject such constructs with a hard error. We can't compile such EH constructs anyway, but this may matter to consumers of the AST. Reviewers: hans Differential Revision: http://reviews.llvm.org/D4317 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211909 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace GetProgramPath("ld") with GetLinkerPath().Logan Chien2014-06-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211895 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver: Pass -ivfsoverlay to module crashdumpsJustin Bogner2014-06-27
| | | | | | | | When we create a crashdump involving modules, we build a VFS to reproduce the problem with. This updates the reproduction script to use that VFS. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211876 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver: use GNU::Link for the Generic_GCC toolchainSaleem Abdulrasool2014-06-27
| | | | | | | | | | | | | | | | | This changes the behaviour of the driver for linking to match that of the Generic_GCC::Assemble. The default link should use "ld" rather than "gcc" for the linker as gcc does. This avoids the unnecessary round-tripping through gcc. It also is much more reasonable behaviour from the user's perspective. This should have been updated with SVN r195554 which changed the behaviour of Generic_GCC::Assemble. The gcc_forward test needs to be updated to mark the fact that -march is a flag for GCC not ld. This was updated as a typo fix, but added a check for a flag that is not a link flag. The bindings test covers the change for testing, and thus no new test was added. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211866 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver: Fix a misleading comment and test for what it actually didJustin Bogner2014-06-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211806 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver: Remove trailing whitespaceJustin Bogner2014-06-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211805 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-cl: Don't store the cl compiler Tool on the stack (PR20131)Hans Wennborg2014-06-26
| | | | | | | | | | | | | | The Command will refer back to the Tool as its source, so it has to outlive the Command. Having the Tool on the stack would cause us to crash when using "clang-cl -GR -fallback", because if the Command fails, Driver::ExecuteCompilation tries to peek at the Command's source. Differential Revision: http://reviews.llvm.org/D4314 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211802 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement the -fuse-ld= option.Logan Chien2014-06-26
| | | | | | | | | | | | | | | This commit implements the -fuse-ld= option, so that the user can specify -fuse-ld=bfd to use ld.bfd. This commit re-applies r194328 with some test case changes. It seems that r194328 was breaking macosx or mingw build because clang can't find ld.bfd or ld.gold in the given sysroot. We should use -B to specify the executable search path instead. Patch originally by David Chisnall. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211785 91177308-0d34-0410-b5e6-96231b3b80d8
* Add ppc64/power8 as a targetWill Schmidt2014-06-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211778 91177308-0d34-0410-b5e6-96231b3b80d8
* Forward -u to the linker on gnutools toolchainsReid Kleckner2014-06-26
| | | | | | | | | | | | | | | | Summary: The BSDs and Darwin all forward the whole 'u' group, but gcc only forwards -u so far as I can tell. I only forward -u, since that's a minimal change, and many people object to magically recognizing and forwarding linker arguments. Reviewers: chandlerc, joerg Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4304 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211756 91177308-0d34-0410-b5e6-96231b3b80d8
* Align with new GCC options for x86 AndroidAlexey Volkov2014-06-25
| | | | | | | | | | 32-bit: +ssse3 64-bit: +sse4.2 +popcnt Differential Revision: http://reviews.llvm.org/D4287 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211688 91177308-0d34-0410-b5e6-96231b3b80d8
* [Driver] Follow-up to r211598, r211663. Do not build a dynamic linkerSimon Atanasyan2014-06-25
| | | | | | path using sub-strings concatenation. Return the whole string explicitly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211665 91177308-0d34-0410-b5e6-96231b3b80d8
* Tools.cpp: Update getLinuxDynamicLinker() to return Twine instead of ↵NAKAMURA Takumi2014-06-25
| | | | | | StringRef, since r211598 has introduced manipulation of return string. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211663 91177308-0d34-0410-b5e6-96231b3b80d8
* Reformat.NAKAMURA Takumi2014-06-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211661 91177308-0d34-0410-b5e6-96231b3b80d8
* Use appropriate default PIE settings for OpenBSD.Brad Smith2014-06-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211624 91177308-0d34-0410-b5e6-96231b3b80d8
* [Driver][Mips] Support mips64-linux-gnuabi64 / mips64el-linux-gnuabi64 ↵Simon Atanasyan2014-06-24
| | | | | | | | | target triples. The patch fixes the bug #19869. http://llvm.org/bugs/show_bug.cgi?id=19869 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211619 91177308-0d34-0410-b5e6-96231b3b80d8
* Use lowercase windows.h for mingw cross compilation.Logan Chien2014-06-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211604 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips] Correct linux dynamic linker for -mnan=2008Daniel Sanders2014-06-24
| | | | | | | | | | | | | Summary: The dynamic linker is named ld-linux-mipsn8.so.1 when -mnan=2008 is given (or is the default). It remains ld.so.1 for other cases. This is necessary for MIPS32r6/MIPS64r6 since these ISA's default to -mnan=2008. Differential Revision: http://reviews.llvm.org/D4273 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211598 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver: Restore proper naming of crashdump filesJustin Bogner2014-06-24
| | | | | | Based on a review of r211411 by Jordan Rose. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211572 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver: Skip the -ivfsoverlay argument in driver crash diagsJustin Bogner2014-06-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211474 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable WindowsToolChain on all native Windows buildsAlp Toker2014-06-22
| | | | | | | | Make binaries built by MSVC, mingw and clang functionally equivalent. The checks are trivially performed at runtime to eliminate functional differences between supported configurations that used to be hard-coded. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211461 91177308-0d34-0410-b5e6-96231b3b80d8
* WindowsToolChain: decouple build environment from the toolchainAlp Toker2014-06-22
| | | | | | | | | | | Don't try to find the MSVC version that the binaries were built with. Doing so defeats testing by causing invalid test passes on the build servers. Whichever Visual Studio (or clang-cl.exe) edition was used to build the clang package, it's strictly orthogonal and has no relation to software versions available on the user's PC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211459 91177308-0d34-0410-b5e6-96231b3b80d8
* Make WindowsToolChain portableAlp Toker2014-06-22
| | | | | | | | De-conditionalize as much as possible so we can start to fix this code. No change in functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211458 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver: In crashdumps with -fmodule, dump the module dependenciesJustin Bogner2014-06-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211421 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver: Record that we're in crashdump and push flags to ConstructJobJustin Bogner2014-06-20
| | | | | | | | | | | It's more flexible and arguably better layering to set flags to modify compiling for diagnostics in the CC1 job themselves, rather than tweaking the driver flags and letting them propagate. There is one visible change this causes: crash report files will now get preprocessed names (.i and friends). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211411 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver: Remove some superfluous calls to Arg->claim()Justin Bogner2014-06-20
| | | | | | | Args.getLastArg() claims the Arg it returns, so calling claim on these results is unnecessary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211403 91177308-0d34-0410-b5e6-96231b3b80d8
* [PowerPC] Fix ELF interpreter name for powerpc64le-linuxUlrich Weigand2014-06-20
| | | | | | | | | | | | On PowerPC LE the system uses the /lib64/ld64.so.2 dynamic linker name instead of /lib64/ld64.so.1 (to indicate the ELFv2 ABI version). This fixes the clang driver to pass the appropriate -dynamic-linker setting, and adds some more tests to linux-ld.c. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211360 91177308-0d34-0410-b5e6-96231b3b80d8
* [PowerPC] Add MultiarchIncludeDirs for powerpc64leUlrich Weigand2014-06-20
| | | | | | | | | | | | There was already partial support for multi-arch on powerpc64le, but the MultiarchIncludeDirs setting was missing. This patch adds the appropriate definition, and also extends the linux-header-search.cpp test case to verify an Ubuntu 14.04 powerpc64le tree. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211359 91177308-0d34-0410-b5e6-96231b3b80d8
* Make clang-cl accept .lib inputs (PR20065)Hans Wennborg2014-06-18
| | | | | | | | | | Patch by Ehsan Akhgari! (Tiny tweak by me: renamed PathSegment to LibDir.) Differential Revision: http://reviews.llvm.org/D4192 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211189 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver: correct the backend option spellingSaleem Abdulrasool2014-06-18
| | | | | | The backend option does not have an '-enable' prefix. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211177 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for the /Fi argument to clang-cl (PR20036)Hans Wennborg2014-06-17
| | | | | | | | Patch by Ehsan Akhgari! Differential Revision: http://reviews.llvm.org/D4143 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211081 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the integrated assembler by default on OpenBSD/powerpc.Brad Smith2014-06-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211075 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for the /EP argument to clang-clHans Wennborg2014-06-13
| | | | | | | | | | This maps the /EP argument to both -E and -P. Patch by Ehsan Akhgari! Differential Reviion: http://reviews.llvm.org/D4133 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210935 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove top-level Clang -fsanitize= flags for optional ASan features.Alexey Samsonov2014-06-13
| | | | | | | | | | | | | | Init-order and use-after-return modes can currently be enabled by runtime flags. use-after-scope mode is not really working at the moment. The only problem I see is that users won't be able to disable extra instrumentation for init-order and use-after-scope by a top-level Clang flag. But this instrumentation was implicitly enabled for quite a while and we didn't hear from users hurt by it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210924 91177308-0d34-0410-b5e6-96231b3b80d8
* Use dwarf-2 by default on OpenBSD and FreeBSD.Brad Smith2014-06-13
| | | | | | | | The Tools.cpp part of the patch partially based on a patch from FreeBSD's LLVM tree. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210883 91177308-0d34-0410-b5e6-96231b3b80d8
* Include system_error directly.Rafael Espindola2014-06-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210802 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace llvm::error_code with std::error_code.Rafael Espindola2014-06-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210780 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver: use more range-based for loopsSaleem Abdulrasool2014-06-12
| | | | | | | Mechanical change converting some of the simpler for loops into range-based for loops. NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210738 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-cl: accept the /C option with /P (PR19978)Hans Wennborg2014-06-11
| | | | | | (It's also allowed with /EP, but we haven't implemented that option yet.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210695 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver: add -m{,no-}long-calls supportSaleem Abdulrasool2014-06-07
| | | | | | | | | | | | | This mirrors the GCC option for the ARM backend. This option enables the backend option "-enable-arm-long-calls". The default behaviour is that this is disabled due to the slight overhead of the generated calls. If the target of jumps are greater than 64M range of offset-based jumps, then the target address must be loaded into a register to make an indirect jump. The backend support for this has been present, but was not previously controllable by the proper flag. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210398 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement -Wframe-larger-than backend diagnosticAlp Toker2014-06-05
| | | | | | | | | | | | | | | | | | Add driver and frontend support for the GCC -Wframe-larger-than=bytes warning. This is the first GCC-compatible backend diagnostic built around LLVM's reporting feature. This commit adds infrastructure to perform reverse lookup from mangled names emitted after LLVM IR generation. We use that to resolve precise locations and originating AST functions, lambdas or block declarations to produce seamless codegen-guided diagnostics. An associated change, StringMap now maintains unique mangled name strings instead of allocating copies. This is a net memory saving in C++ and a small hit for C where we no longer reuse IdentifierInfo storage, pending further optimisation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210293 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix driver warning about -pthread on Android.Evgeniy Stepanov2014-06-05
| | | | | | | -pthread is no-op on Android. Suppress the unused argument warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210253 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix driver warning about -shared-libasan on Android.Evgeniy Stepanov2014-06-05
| | | | | | | | Asan runtime library is always shared on Android, and -shared-libasan is no-op. Suppress the unused argument warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210252 91177308-0d34-0410-b5e6-96231b3b80d8
* [ubsan] Don't add a --dynamic-list for ubsan symbols when building a sharedRichard Smith2014-06-04
| | | | | | | | | | library. That results in the linker resolving all references to weak symbols in the DSO to the definition from within that DSO. Ironically, this rarely causes observable problems, except that it causes ubsan's own dynamic type check to spuriously fail (because we fail to properly merge type_info object names). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210220 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the last remaining llvm/Config/config.h includesAlp Toker2014-06-04
| | | | | | | | | | | | This corrects long-standing misuses of LLVM's internal config.h. In most cases the public llvm-config.h header was intended and we can now remove the old hacks thanks to LLVM r210144. The config.h header is private, won't be installed and should no longer be included by clang or other modules. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210145 91177308-0d34-0410-b5e6-96231b3b80d8
* Add flags -Rpass-missed and -Rpass-analysis.Diego Novillo2014-05-29
| | | | | | | | | | | | | | | | | | | | | | Summary: These two flags are in the same family as -Rpass, but are used in different situations. -Rpass-missed is used by optimizers to inform the user when they tried to apply an optimization but couldn't (or wouldn't). -Rpass-analysis is used by optimizers to report analysis results back to the user (e.g., why the transformation could not be applied). Depends on D3682. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3683 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209839 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the -mno-global-merge option work for arm64/aarch64. rdar://17024719Bob Wilson2014-05-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209836 91177308-0d34-0410-b5e6-96231b3b80d8
* -pthread does not translate to -lpthread on Android.Evgeniy Stepanov2014-05-28
| | | | | | | | | There is no libpthread.so, and pthread interface is implemented in libc.so. This mirrors gcc behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209731 91177308-0d34-0410-b5e6-96231b3b80d8
* AArch64/ARM64: rename ARM64 components to AArch64Tim Northover2014-05-24
| | | | | | This keeps Clang consistent with backend naming conventions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209579 91177308-0d34-0410-b5e6-96231b3b80d8
* AArch64/ARM64: update Clang after AArch64 removal.Tim Northover2014-05-24
| | | | | | | | | | | A few (mostly CodeGen) parts of Clang were tightly coupled to the AArch64 backend. Now that it's gone, they will not even compile. I've also deduplicated RUN lines in many of the AArch64 tests. This might improve "make check-all" time noticably: some of those NEON tests were monsters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209578 91177308-0d34-0410-b5e6-96231b3b80d8