summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver
Commit message (Collapse)AuthorAgeFilesLines
* [PPC64, TSAN] Enable thread sanitizer for PPC64Bill Schmidt2015-12-081-1/+1
| | | | | | | | Patch by Simone Atzeni. This enables the -fsanitize=thread flag for PPC64 and PPC64LE. llvm-svn: 255067
* Replace a bunch of duplicate conditions with the call from types::.Eric Christopher2015-12-081-10/+4
| | | | llvm-svn: 254986
* Remove name from FIXME.Eric Christopher2015-12-081-1/+1
| | | | llvm-svn: 254985
* 80-column fixup.Eric Christopher2015-12-081-1/+2
| | | | llvm-svn: 254973
* Update comment.Eric Christopher2015-12-081-2/+2
| | | | llvm-svn: 254972
* 80-col and whitespace fixups.Eric Christopher2015-12-071-9/+12
| | | | llvm-svn: 254958
* [ThinLTO] Option to invoke ThinLTO backend passes and importingTeresa Johnson2015-12-072-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Adds new option -fthinlto-index=<file> to invoke the LTO pipeline along with function importing via clang using the supplied function summary index file. This supports invoking the parallel ThinLTO backend processes in a distributed build environment via clang. Additionally, this causes the module linker to be invoked on the bitcode file being compiled to perform any necessary promotion and renaming of locals that are exported via the function summary index file. Add a couple tests that confirm we get expected errors when we try to use the new option on a file that isn't bitcode, or specify an invalid index file. The tests also confirm that we trigger the expected function import pass. Depends on D15024 Reviewers: joker.eph, dexonsmith Subscribers: joker.eph, davidxl, cfe-commits Differential Revision: http://reviews.llvm.org/D15025 llvm-svn: 254927
* Fix the clang driver when "-nostdlib" is presentSumanth Gundapaneni2015-12-021-2/+1
| | | | | | | | | | This patch is a fix to r252901 which changed the behavior of clang driver. In the presence of "-nostdlib" none of the standard libraries should be passed to link line. Differential Revision: http://reviews.llvm.org/D15130 llvm-svn: 254535
* Teaches clang about Cortex-A35.Christof Douma2015-12-021-1/+1
| | | | | | | | Adds support for the new Cortex-A35 ARMv8-A core. Differential Revision: http://reviews.llvm.org/D15142 llvm-svn: 254505
* Revert Sparc and SparcV9 to external assembler. Now that the CPUJoerg Sonnenberger2015-11-271-3/+0
| | | | | | | | handling is corrected, the primary reason for forcing IAS as default is gone and the remaining issues are still somewhat problematic in common situations. llvm-svn: 254199
* [AArch64] Add command-line options for Statistical Profiling ExtensionOliver Stannard2015-11-261-0/+2
| | | | | | | | | | This adds the "+profile" and +noprofile" suffixes for the -march and -mcpu options, to allow enabling or disabling the options Statistical Profiling Extension to ARMv8.2-A. Differential Revision: http://reviews.llvm.org/D15023 llvm-svn: 254161
* [AArch64] Add command-line options for ARMv8.2-AOliver Stannard2015-11-261-0/+4
| | | | | | | | | | | This adds new values for the -march option (armv8.2a and armv8.2-a, which are aliases of each other), and new suffixes for the -march and -mcpu options (+fp16 and +nofp16), to allow targeting the ARMv8.2-A architecture and it's optional half-precision floating-point extension. Differential Revision: http://reviews.llvm.org/D15022 llvm-svn: 254160
* Driver: protect from empty -L argsMartell Malone2015-11-261-1/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D12466 llvm-svn: 254117
* Fix rewrite of reserved library name in case of -nodefaultlibsNirav Dave2015-11-241-1/+2
| | | | | | | | | | | | The Driver only checked if nostdlib was set when deciding to add reserved_lib_stdcxx, but as nostdlib is always exactly nodefaultlibs and nostartfiles we should be checking one (clearly nodefaultlibs in the case) as well. This appears to be the only such instance of this in the codebase. Differential Revision: http://reviews.llvm.org/D14935 llvm-svn: 253990
* Fix alignment of r253898Martell Malone2015-11-231-10/+8
| | | | llvm-svn: 253899
* Driver: fallback to the location of clang if no sysroot,Martell Malone2015-11-231-15/+11
| | | | | | | | | | | | | | hard coding /usr makes little sense for mingw-w64. If we have portable toolchains having /usr breaks that. If the clang we use is in /usr/bin or /usr/sbin etc this will still detect as though it was hard coded to /usr This makes the most sense going forward for mingw-w64 toolchains on both linux and mac Differential Revision: http://reviews.llvm.org/D14164 llvm-svn: 253898
* Disable frame pointer elimination when using -pg Xinliang David Li2015-11-231-0/+4
| | | | | | | | | | | | | | | | (Re-apply patch after bug fixing) This diff makes sure that the driver does not pass -fomit-frame-pointer or -momit-leaf-frame-pointer to the frontend when -pg is used. Currently, clang gives an error if -fomit-frame-pointer is used in combination with -pg, but -momit-leaf-frame-pointer was forgotten. Also, disable frame pointer elimination in the frontend when -pg is set. Patch by Stefan Kempf. llvm-svn: 253886
* Revert part of r253813Martell Malone2015-11-231-7/+0
| | | | | | The new lld gnu frontend does not support the -target option llvm-svn: 253874
* Revert r253846 (build bot failure))Xinliang David Li2015-11-231-4/+0
| | | | llvm-svn: 253851
* Disable frame pointer elimination when using -pgXinliang David Li2015-11-231-0/+4
| | | | | | | | | | | | | | This diff makes sure that the driver does not pass -fomit-frame-pointer or -momit-leaf-frame-pointer to the frontend when -pg is used. Currently, clang gives an error if -fomit-frame-pointer is used in combination with -pg, but -momit-leaf-frame-pointer was forgotten. Also, disable frame pointer elimination in the frontend when -pg is set. Patch by Stefan Kempf. llvm-svn: 253846
* Driver: Specifically tell the linker the target for mingw-w64Martell Malone2015-11-221-1/+8
| | | | | | | | | Cross compiling from linux and OSX results in Error: Exec format. This is because the linker is expecting ELF formated objects. By passing the target we can explicitly tell the linker that it should be linking COFF objects regardless of the host. llvm-svn: 253813
* Driver: Defer computation of linker path until it is needed.Peter Collingbourne2015-11-204-14/+7
| | | | | | | This allows us to construct Linux toolchains without a valid linker. This is needed for example to build a CUDA device toolchain after r253385. llvm-svn: 253707
* Revert r253582: "clang-cl: Make /W4 imply -Wall -Wextra (PR25563)"Hans Wennborg2015-11-201-20/+0
| | | | | | | | | | The patch expanded the flag *at the end*, breaking invocations like: clang-cl /W4 -Wno-unused-parameter Reverting for now. llvm-svn: 253678
* [Myriad]: handle Preprocess job action (-E)Douglas Katzman2015-11-202-8/+12
| | | | llvm-svn: 253647
* Support CMake's clang_rt.profile library naming schemeChris Bieneman2015-11-201-11/+25
| | | | | | | | | | | | Summary: This code is a bit undesirable, but it gets clang to work with the autoconf and cmake-built libclang_rt.profile libraries. Reviewers: bogner Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D14847 llvm-svn: 253625
* clang-cl: Make /W4 imply -Wall -Wextra (PR25563)Hans Wennborg2015-11-191-0/+20
| | | | llvm-svn: 253582
* [ARM] Support +feature targeting in -mcpu/-marchBradley Smith2015-11-181-8/+32
| | | | llvm-svn: 253471
* [Myriad]: insert -L paths into linker cmd only when they exist.Douglas Katzman2015-11-183-36/+25
| | | | | | Differential Revision: http://reviews.llvm.org/D14754 llvm-svn: 253467
* Fix for use-after-free which caused test failure in cuda-detect.cu.Artem Belevich2015-11-181-1/+1
| | | | | | Return std::string itself instead StringRef to a temporary std::string. llvm-svn: 253410
* [Myriad]: -nostdlib implies -nostartfilesDouglas Katzman2015-11-171-1/+1
| | | | llvm-svn: 253390
* [CUDA] Make CUDA compilation usable by default.Artem Belevich2015-11-172-1/+7
| | | | | | | | | | | | | | | | | | Currently clang requires several additional command line options in order to enable new features needed during CUDA compilation. This patch makes these options default. * Automatically include cuda_runtime.h if we've found a valid CUDA installation. * Disable automatic CUDA header inclusion during unit tests. * Added test case for command line construction. * Enabled target overloads and relaxed call checks that are needed in order to include CUDA headers. * Added CUDA-7.5 installation path to the CUDA installation search list. * Define __CUDA__ macro to indicate CUDA compilation. llvm-svn: 253389
* [CUDA] Detect and link with CUDA's libdevice bitcode library.Artem Belevich2015-11-172-0/+45
| | | | | | | | | | | - added detection of libdevice bitcode file and API to find one appropriate for the GPU we're compiling for. - pass additional cc1 options for linking with detected libdevice bitcode - added -nocudalib to prevent automatic linking with libdevice - added test cases to verify new functionality Differential Revision: http://reviews.llvm.org/D14556 llvm-svn: 253387
* [CUDA] added include paths for both sides of CUDA compilation.Artem Belevich2015-11-175-5/+36
| | | | | | | | | | | | | | | | | | | | | In order to compile a CUDA file clang must be able to find include files for both both host and device. This patch passes AuxToolchain to AddPreprocessingOptions and uses it to add include paths for the opposite side of compilation. We also must be able to find CUDA include files. If the driver found CUDA installation, it adds appropriate include path to CUDA headers. This can be disabled with '-nocudainc'. - Added include paths for the opposite side of compilation. - Added include paths to detected CUDA installation. - Added -nocudainc to prevent adding CUDA include path. - Added test cases to verify new functionality. Differential Revision: http://reviews.llvm.org/D13170 llvm-svn: 253386
* [CUDA] use -aux-triple to pass target triple of opposite side of compilationArtem Belevich2015-11-174-43/+62
| | | | | | | | | | | | | | | | Clang needs to know target triple for both sides of compilation so that preprocessor macros and target builtins from both sides are available. This change augments Compilation class to carry information about toolchains used during different CUDA compilation passes and refactors BuildActions to use it when it constructs CUDA jobs. Removed DeviceTriple from CudaHostAction/CudaDeviceAction as it's no longer needed. Differential Revision: http://reviews.llvm.org/D13144 llvm-svn: 253385
* Use !hasArg with two options instead of !hasArg && !hasArg.Douglas Katzman2015-11-171-92/+52
| | | | | | Thereby fixing a warning about failure to claim all args. llvm-svn: 253372
* ARM: fix mismatch between Clang and backend on exception type.Tim Northover2015-11-171-6/+2
| | | | | | | | | | | | "-arch armv7k" is only normally used with a watchos target, but Clang doesn't stop you from giving a "-miphoneos-version-min" option too, converting the triple to "thumbv7k-apple-ios". In this case the backend will decide to use SjLj exceptions, so Clang needs to agree so it can create the correct predefines. Fortunately, there's a handy function to make the decision for us now. llvm-svn: 253355
* Add trivial utility to append -L arguments to linker step. NFCDouglas Katzman2015-11-172-35/+15
| | | | llvm-svn: 253350
* Derive nacltools::Linker from GnuTool to get response file supportDerek Schuff2015-11-161-2/+2
| | | | | | | It could be derived from gnutools::Linker directly but this way makes it consistent with all the other toolchains around it. llvm-svn: 253259
* [mips] Do not add arch name in the compiler-rt's components.Vasileios Kalintiris2015-11-161-2/+1
| | | | | | | Instead, use the constant "mips" since the libraries are already placed under the multilib's OS suffix. llvm-svn: 253214
* [Myriad]: pass the 'std=' option to moviCompileDouglas Katzman2015-11-161-1/+1
| | | | llvm-svn: 253213
* Update for the gnu flavor being renamed to old-gnu.Rafael Espindola2015-11-161-3/+3
| | | | llvm-svn: 253191
* Make the mingw toolchain accept 'ld' and 'lld' only as values to -fuse-ld.Yaron Keren2015-11-151-0/+2
| | | | | | Post-commit suggestion by Filipe Cabecinhas. llvm-svn: 253161
* Revert "[AArch64] Unconditionally pass subtarget feature reserve-x18 on Darwin."Justin Bogner2015-11-131-5/+3
| | | | | | | | | This reverts r243310, which is redundant as of r253102. Conflicts: lib/Driver/Tools.cpp llvm-svn: 253104
* Add support for driver option -mno-ms-bitfields.Akira Hatanaka2015-11-121-1/+2
| | | | | | | | This option is used to cancel -mms-bitfields on the command line. rdar://problem/15898553 llvm-svn: 252912
* Re-recommit: Add support for the new mips-mti-linux toolchain.Vasileios Kalintiris2015-11-126-27/+253
| | | | | | | | Last time, this caused two Windows buildbots and a single ARM buildbot to fail. I XFAIL'd the failing test on win32,win64 machines in order to see if the ARM buildbot complains again. llvm-svn: 252901
* [ASan] Allow -fsanitize-recover=address.Yury Gribov2015-11-111-1/+1
| | | | | | Differential Revision: http://reviews.llvm.org/D14243 llvm-svn: 252721
* Use the generic Sparc CPU handling for Linux, FreeBSD and OpenBSD, too.Joerg Sonnenberger2015-11-101-29/+26
| | | | | | | | This currently changes the default toward the more historic -Av8/-Av9, but as discussed with James Y Knight, consistency is for now more important than figuring out which default CPU each OS should be using. llvm-svn: 252571
* Use the normal switch over getArch() approach and not a long if chain.Joerg Sonnenberger2015-11-101-13/+23
| | | | llvm-svn: 252562
* [Driver] Use platform-appropriate profiling libraries for WatchOS, TVOSVedant Kumar2015-11-101-2/+10
| | | | | | | | | | | | | When adding profiling instrumentation, use libclang_rt.profile_tvos.a for TVOS targets and libclang_rt.profile_watchos.a for WatchOS targets. I've also fixed up a comment and added an assert() that prevents us from defaulting to an incorrect platform. Differential Revision: http://reviews.llvm.org/D14521 Reviewed-by: t.p.northover llvm-svn: 252558
* Reorganise CPU handling for Sparc. When using -mcpu=v9 and co, __sparcv8Joerg Sonnenberger2015-11-091-3/+38
| | | | | | | | | is not defined for 32bit mode, but __sparcv9 is. Pass down the correct -target-cpu flags to the backend, so that instruction restrictions are applied correctly. Pass down the correct -A flag when not using IAS. The latter is limited to NetBSD targets in this commit. llvm-svn: 252545
OpenPOWER on IntegriCloud