summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/ToolChains.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* [EfficiencySanitizer] [MIPS64] Enables esan clang driver options for MIPS64Sagar Thakur2016-09-071-1/+1
| | | | | | | Reviewed by bruening Differential: D23800 llvm-svn: 280806
* ARM-Darwin: ignore and diagnose attempts to omit frame pointer.Tim Northover2016-08-231-0/+12
| | | | | | | | | | iOS (and other 32-bit ARM variants) always require a valid frame pointer to improve backtraces. Previously the -fomit-frame-pointer and -momit-leaf-frame-pointer options were being silently discarded via hacks in the backend. It's better if Clang configures itself to emit the correct IR and warns about (ignored) attempts to override this. llvm-svn: 279546
* [Darwin] Stop linking libclang_rt.eprintf.aChris Bieneman2016-08-171-8/+13
| | | | | | | | | | | | | | | | | Summary: The eprintf library was added before the general OS X builtins library existed as a place to store one builtin function. Since we have for several years had an actual mandated builtin library for OS X > 10.5, we should just merge eprintf into the main library. This change will resolve PR28855. As a follow up I'll also patch compiler-rt to not generate the eprintf library anymore. Reviewers: ddunbar, bob.wilson Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D23531 llvm-svn: 278988
* [CUDA] Fix CUDA install version parsing.Justin Lebar2016-08-151-2/+2
| | | | | | | | | | | | | | | | Summary: getAsInteger returns true on error. Oops. No test because the behavior at the moment is identical with or without this change. Reviewers: tra Subscribers: cfe-commits, Prazek Differential Revision: https://reviews.llvm.org/D23340 llvm-svn: 278733
* Don't enable PIE on i686-unknown-cloudabi.Ed Schouten2016-08-111-0/+13
| | | | | | | | We're only going to provide support for using PIE on architectures that provide PC-relative addressing. i686 is not one of those, so add the necessary bits for only passing in -pie -zrelro conditionally. llvm-svn: 278395
* Fix two bugs for musl-libc on ARMDiana Picus2016-08-081-2/+11
| | | | | | | | | | | | | | | Bug 1: triples like armv7-pc-linux-musl use the wrong linker name ld-musl-armv7.so.1; the right name should be ld-musl-arm.so.1, disregarding the subarch field. Bug 2: when compiler option -mhard-float is used, we should use the "hardfloat" linker, no matter whether the triple itself mentions "hardfloat". Patch by Lei Zhang! Differential Revision: https://reviews.llvm.org/D22904 llvm-svn: 277985
* [CUDA] Fix libdevice selection.Artem Belevich2016-08-021-16/+31
| | | | | | | | | | | This makes clang's libdevice selection match that of NVCC as described in http://docs.nvidia.com/cuda/libdevice-users-guide/basic-usage.html#version-selection If required libdevice variant is not found, driver now fails with an error. Differential Revision: https://reviews.llvm.org/D23037 llvm-svn: 277542
* Retry: [Driver] Compute effective target triples once per job (NFCI)Vedant Kumar2016-07-271-7/+0
| | | | | | | | | | | | | | | | Compute an effective triple once per job. Cache the triple in the prevailing ToolChain for the duration of the job. Clients which need effective triples now look them up in the ToolChain. This eliminates wasteful re-computation of effective triples (e.g in getARMFloatABI()). While we're at it, delete MachO::ComputeEffectiveClangTriple. It was a no-op override. Differential Revision: https://reviews.llvm.org/D22596 llvm-svn: 276937
* Revert "[Driver] Compute effective target triples once per job (NFCI)"Vedant Kumar2016-07-271-28/+20
| | | | | | | This reverts commit r275895 in order to address some post-commit review feedback from Eric Christopher (see: the list thread for r275895). llvm-svn: 276936
* Support setting default value for -rtlib at build timeJonas Hahnfeld2016-07-271-9/+14
| | | | | | | | | | | | | | | | | This patch introduces a new cmake variable: CLANG_DEFAULT_RTLIB, thru which we can specify a default value for -rtlib (libgcc or compiler-rt) at build time, just like how we set the default C++ stdlib thru CLANG_DEFAULT_CXX_STDLIB. With these two options, we can configure clang to build binaries on Linux that have no runtime dependence on any gcc libs (libstdc++ or libgcc_s). Patch by Lei Zhang! Differential Revision: https://reviews.llvm.org/D22663 llvm-svn: 276848
* [Myriad]: better compatibility with vendor sourceDouglas Katzman2016-07-251-9/+3
| | | | | | | | - Accept ma{2100,2150,2150} for -mcpu - Define more preprocessor macros - Don't append "le/" to little-endian lib dirs llvm-svn: 276646
* Add support of the latest Ubuntu (Yakkety Yak - 16.10)Sylvestre Ledru2016-07-191-1/+3
| | | | llvm-svn: 275975
* [driver][mips] Support MIPS targets in modern Android NDKSimon Atanasyan2016-07-191-17/+81
| | | | | | Initial patch provided by Duane Sand. llvm-svn: 275949
* Allow iOS and tvOS version numbers with 2-digit major version numbers.Bob Wilson2016-07-181-2/+2
| | | | | | rdar://problem/26921601 llvm-svn: 275905
* [Driver] Compute effective target triples once per job (NFCI)Vedant Kumar2016-07-181-20/+28
| | | | | | | | | | Compute an effective target triple exactly once in ConstructJob(), and then simply pass around references to it. This eliminates wasteful re-computation of effective triples (e.g in getARMFloatABI()). Differential Revision: https://reviews.llvm.org/D22290 llvm-svn: 275895
* Reapply SVN r274797.Saleem Abdulrasool2016-07-101-12/+0
| | | | | | | | | | | | | | | Original Commit Message Driver: Stop linking to C++ when using sanitizers on Darwin Sanitizers on Darwin are built as dynamic libraries, not static libraries. Sanitizers will have their C++ dependency satisfied internally (LC_LOAD_DYLIB) in the libclang_rt dylib. As long as the sanitizers stay dynamic and not static, linking against C++ when enabling a sanitizer becomes over linkage. Patch by Dave Lee! llvm-svn: 275032
* Revert "Driver: Stop linking to C++ when using sanitizers on Darwin"Saleem Abdulrasool2016-07-081-0/+12
| | | | | | | This reverts SVN r274797. It broke the Green Dragon bot. Revert it until the failure can be addressed. llvm-svn: 274814
* Driver: Stop linking to C++ when using sanitizers on DarwinSaleem Abdulrasool2016-07-071-12/+0
| | | | | | | | | | | Sanitizers on Darwin are built as dynamic libraries, not static libraries. Sanitizers will have their C++ dependency satisfied internally (LC_LOAD_DYLIB) in the libclang_rt dylib. As long as the sanitizers stay dynamic and not static, linking against C++ when enabling a sanitizer becomes over linkage. Patch by Dave Lee! llvm-svn: 274797
* [CUDA] s/OPT_nocuda_version_chec/OPT_no_cuda_version_check/.Justin Lebar2016-07-071-1/+1
| | | | | | Fix build breakage. llvm-svn: 274782
* [CUDA] Check that our CUDA install supports the requested architectures.Justin Lebar2016-07-071-2/+65
| | | | | | | | | | | | | | | Summary: Raise an error if you're using a CUDA installation that's too old for the requested architectures. In practice, this means that you need a CUDA 8 install to compile for sm_6*. Reviewers: tra Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D21869 llvm-svn: 274781
* [CUDA] Rename member variables in CudaInstallationDetector.Justin Lebar2016-07-061-25/+24
| | | | | | | | | | | | | | Summary: Remove the "Cuda" prefix from these variables -- it's clear that they related to CUDA given their containing type. Reviewers: tra Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D21868 llvm-svn: 274682
* [CUDA] Add support for CUDA 8 and sm_60-62.Justin Lebar2016-07-061-0/+5
| | | | | | | | | | | | Summary: Also add sm_32, which was missing. Reviewers: tra Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D21778 llvm-svn: 274680
* Add support for musl-libc on ARM Linux.Rafael Espindola2016-06-241-2/+17
| | | | | | Patch by Lei Zhang! llvm-svn: 273735
* [driver][mips] Factor out findMIPSMultilibs code into separate functions. NFCSimon Atanasyan2016-06-221-189/+185
| | | | | | | | The findMIPSMultilibs is too long. One more reason for splitting is to escape redundant calls of MultilibSet::FilterOut method which lead to disk access. llvm-svn: 273465
* [Driver] Adapt Linux::GCCVersion::Parse to match GCC 5 installationsBryan Chan2016-06-171-0/+3
| | | | | | | | | | | | | | | | | Summary: Some GCC 5 installations store the libstdc++ includes and GCC-specific files in paths without the minor part of the version number, such as /usr/include/c++/5 /usr/lib64/gcc/x86_64-suse-linux/5 Reviewers: cfe-commits, thiagomacieira, jroelofs Subscribers: tinti, jroelofs Differential Revision: http://reviews.llvm.org/D14727 llvm-svn: 273012
* Compilation for Intel MCU (Part 2/3)Andrey Turetskiy2016-06-161-10/+26
| | | | | | | | | | | | This is the second patch required to support compilation for Intel MCU target (e.g. Intel(R) Quark(TM) micro controller D 2000). When IAMCU triple is used: * Recognize and use IAMCU GCC toolchain * Set up include paths * Forbid C++ Differential Revision: http://reviews.llvm.org/D19274 llvm-svn: 272883
* [CUDA] Don't pass top-level -march down to device cc1 or ptxas.Justin Lebar2016-06-151-1/+3
| | | | | | | | | | | | | | | | | | Summary: Previously if you did e.g. $ clang -march=haswell -x cuda foo.cu we would pass "-march=haswell -march=sm_20" down to the ptxas tool. This causes it to assert, and rightly so! Reviewers: tra Subscribers: cfe-commits, echristo Differential Revision: http://reviews.llvm.org/D21419 llvm-svn: 272857
* Start adding support for Musl.Rafael Espindola2016-06-141-0/+2
| | | | | | | | | | | The two patches together enable clang to support targets like "x86_64-pc-linux-musl" and build binaries against musl-libc instead of glibc. This make it easy for clang to work on some musl-based systems like Alpine Linux and certain flavors of Gentoo. Patch by Lei Zhang. llvm-svn: 272662
* Don't pass --build-id to ld by default.Rafael Espindola2016-06-031-4/+3
| | | | | | | | | | | | We now have a cmake option to change the default: ENABLE_LINKER_BUILD_ID. The reason is that build-id is fairly expensive, so we shouldn't impose it in the regular edit/build cycle. This is similar to gcc, that has an off by default --enable-linker-build-id option. llvm-svn: 271692
* [driver][arm] add armv7 and thumb include and lib pathsChih-Hung Hsieh2016-06-011-1/+51
| | | | | | | | | | | Add a new test android-ndk-standalone.cpp with new Android NDK release tree structure. Detect armv7 sub architecture and thumb mode, to add system include and link search paths. Differential Revision: http://reviews.llvm.org/D20600 llvm-svn: 271427
* [driver][mips] Fix local variable naming. NFCSimon Atanasyan2016-05-281-6/+6
| | | | llvm-svn: 271110
* [driver][mips] Revert support for CodeSourcery MIPS toolchainSimon Atanasyan2016-05-281-4/+66
| | | | | | This is revert of r270366. The support for CS toolchain were dropped too early. llvm-svn: 271109
* [CUDA] Add -fcuda-approx-transcendentals flag.Justin Lebar2016-05-231-0/+4
| | | | | | | | | | | | | | Summary: This lets us emit e.g. sin.approx.f32. See http://docs.nvidia.com/cuda/parallel-thread-execution/#floating-point-instructions-sin Reviewers: rnk Subscribers: tra, cfe-commits Differential Revision: http://reviews.llvm.org/D20493 llvm-svn: 270484
* Driver: support exherbo's multiarch supportSaleem Abdulrasool2016-05-231-26/+59
| | | | | | | | Exherbo has an alternative file system layout to accommodate multiarch. The loader is located at /usr/${triple}/lib/${loader}. Adjust the Linux toolchain to support that on exherbo. llvm-svn: 270392
* [driver][mips] clang-format the code. NFCSimon Atanasyan2016-05-221-27/+27
| | | | llvm-svn: 270374
* [driver][mips] Support new versions of MIPS CodeScape toolchainsSimon Atanasyan2016-05-221-6/+173
| | | | llvm-svn: 270373
* [driver][mips] Use target triple mips-mti-linux-gnu for toolchain detectionSimon Atanasyan2016-05-221-13/+15
| | | | llvm-svn: 270368
* [driver][mips] Rename some variables to better reflect their purpose. NFCSimon Atanasyan2016-05-221-8/+9
| | | | llvm-svn: 270367
* [driver][mips] Drop support for outdated version of CodeSourcery MIPS toolchainSimon Atanasyan2016-05-221-56/+1
| | | | llvm-svn: 270366
* Driver: sink getLinuxDynamicLoader into the ToolchainSaleem Abdulrasool2016-05-221-0/+69
| | | | | | | | The parameter already requires the toolchain, sink the method into the class. This also enables the use of the distro detection logic which will be needed to support Exherbo's multiarch approach. llvm-svn: 270352
* [CUDA] Allow sm_50,52,53 GPUsArtem Belevich2016-05-191-0/+4
| | | | | | | | LLVM accepts them since r233575. Differential Revision: http://reviews.llvm.org/D20405 llvm-svn: 270084
* [driver] Do not pass install dir to the MultilibSet include dirs callbackSimon Atanasyan2016-05-191-41/+25
| | | | | | | | All additional include directories are relative to the toolchain install folder. So let's do not pass this folder to each callback to simplify and slightly reduce the code. llvm-svn: 270069
* [driver] Do not pass target triple to the MultilibSet include dirs callbackSimon Atanasyan2016-05-191-10/+8
| | | | | | | No one callback uses target triple so we can escape passing the unused argument. llvm-svn: 270068
* [driver][mips] Hardcode triple name in case of CodeSourcery toolchain. NFCSimon Atanasyan2016-05-191-1/+1
| | | | | | | | CodeSourcery toolchain is a standalone toolchain which always uses the same triple name in its paths. It is independent from target triple used by the driver. llvm-svn: 270067
* Teach clang to look for libcxx in /usr/local/include/c++ on LinuxYaron Keren2016-05-171-5/+5
| | | | | | | | | | | | As The default CMAKE install prefix is /usr/local ( https://cmake.org/cmake/help/v3.0/variable/CMAKE_INSTALL_PREFIX.html ), sudo ninja install ends up installing clang, LLVM and libcxx under /usr/local. In development scenario, when clang is run from the build location it will not find libcxx at neither (build location)/../include/c++ nor /usr/include/c++. This patch lets development clang find system installed libcxx without adding -isystem /usr/local/include/c++. Also addresses the FIXME by explaining the use-case for these include paths. llvm-svn: 269801
* [PS4] Change the names of some "environmental" things to what ourPaul Robinson2016-05-161-2/+2
| | | | | | | | licensees actually see in the toolchain we deliver to them. This will reduce the set of local patches we have to maintain. The triple is not changing. (The term ORBIS is an internal code name for PS4.) llvm-svn: 269671
* [mips] Enable IAS by default for 32-bit MIPS targets (O32).Daniel Sanders2016-05-141-0/+2
| | | | | | | | | | | | | | | | | | | Summary: The MIPS IAS can now pass 'ninja check-all', recurse, build a bootable linux kernel, and pass a variety of LNT testing. Unfortunately we can't enable it by default for 64-bit targets yet since the N32 ABI is still very buggy and this also means we can't enable it for N64 either because we can't distinguish between N32 and N64 in the relevant code. Reviewers: vkalintiris Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D18759 Differential Revision: http://reviews.llvm.org/D18761 llvm-svn: 269560
* Update clang support on recent HaikuReid Kleckner2016-05-111-0/+32
| | | | | | | | | | | | | | | | | | [ Copied from https://llvm.org/bugs/show_bug.cgi?id=26404 ] clang support on Haiku is lagging a bit, and missing on x86_64. This patch updates support for x86 and add support for x86_64. It should apply directly to trunk and it's harmless in the sense that it only affects Haiku. Reviewers: rnk, rsmith Patch by Jérôme Duval Differential Revision: http://reviews.llvm.org/D16797 llvm-svn: 269201
* [Myriad] Use Generic_ELF::addClangTargetOptions()Douglas Katzman2016-05-091-1/+1
| | | | llvm-svn: 268956
* Proper detection and handling of RHEL and variants.Rafael Espindola2016-05-091-8/+7
| | | | | | | | | | | - Don't consider "/etc/lsb-release" to be Ubuntu only. - Detect SL, too. - Only add "--no-add-needed" for RHEL7 (or Fedora), not for RHEL6 (that's what the compilers shipped with RHEL do). - removed RHEL4 which is now four years past EOL and certainly incapable of building or running any recent version of llvm/clang. llvm-svn: 268914
OpenPOWER on IntegriCloud