summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/Inputs
Commit message (Collapse)AuthorAgeFilesLines
...
* Add support for openSUSE ARM TriplesIsmail Donmez2017-04-2110-0/+0
| | | | | | | | | | | | | | Summary: Add support for armv6hl-suse-linux-gnueabi and armv7hl-suse-linux-gnueabi triples used by openSUSE/SUSE. Reviewers: cfe-commits, rovka, compnerd, rengolin Reviewed By: rengolin Subscribers: aemerson, rengolin, bkramer, chandlerc Differential Revision: https://reviews.llvm.org/D32347 llvm-svn: 300969
* Add arch-specific directory to search pathPirama Arumuga Nainar2017-03-034-0/+0
| | | | | | | | | | | | | | | | | Summary: This change adds an arch-specific subdirectory in <ResourceDir>/lib/<OS> to the linker search path. This path also gets added as '-rpath' for native compilation if a runtime is linked in as a shared object. This allows arch-specific libraries to be installed alongside clang. Reviewers: danalbert, cbergstrom, javed.absar Subscribers: srhines Differential Revision: https://reviews.llvm.org/D30015 llvm-svn: 296927
* [Driver] Add openSuse AArch64 TripleKostya Kortchinsky2017-01-105-0/+0
| | | | | | | | | | | | | | | | Summary: openSuse has AArch64 support, with images running on the Raspberry Pi 3. The libraries and headers live under the aarch64-suse-linux subdirectory, which is currently not in the AArch64 triples list. Address this by adding the corresponding string to AArch64Triples. Reviewers: chandlerc, bruno, bkramer, rengolin Subscribers: aemerson, rengolin, cfe-commits Differential Revision: https://reviews.llvm.org/D28238 llvm-svn: 291598
* [Driver] Driver changes to support CUDA compilation on Windows.Justin Lebar2017-01-055-0/+0
| | | | | | | | | | | | | | | | | | | | | Summary: For the most part this is straightforward: Just add a CudaInstallation object to the MSVC and MinGW toolchains. CudaToolChain has to override computeMSVCVersion so that Clang::constructJob passes the right version flag to cc1. We have to modify IsWindowsMSVC and friends in Clang::constructJob to be true when compiling CUDA device code on Windows for the same reason. Depends on: D28319 Reviewers: tra Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D28320 llvm-svn: 291131
* [Driver] Fix finding multilib gcc install on Gentoo (with gcc-config)Michal Gorny2016-12-124-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Fix the gcc-config code to support multilib gcc installs properly. This solves two problems: -mx32 using the 64-bit gcc directory (due to matching installation triple), and -m32 not respecting gcc-config at all (due to mismatched installation triple). In order to fix the former issue, split the multilib scan out of Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple() (the code is otherwise unchanged), and call it for each installation found via gcc-config. In order to fix the latter issue, split the gcc-config processing out of Generic_GCC::GCCInstallationDetector::init() and repeat it for all triples, including extra and biarch triples. The only change in the gcc-config code itself is adding the call to multilib scan. Convert the gentoo_linux_gcc_multi_version_tree test input to multilib x86_64+32+x32 install, and add appropriate tests to linux-header-search and linux-ld. Differential Revision: https://reviews.llvm.org/D26887 llvm-svn: 289436
* [CUDA] Driver changes to support CUDA compilation on MacOS.Justin Lebar2016-11-185-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Compiling CUDA device code requires us to know the host toolchain, because CUDA device-side compiles pull in e.g. host headers. When we only supported Linux compilation, this worked because CudaToolChain, which is responsible for device-side CUDA compilation, inherited from the Linux toolchain. But in order to support MacOS, CudaToolChain needs to take a HostToolChain pointer. Because a CUDA toolchain now requires a host TC, we no longer will create a CUDA toolchain from Driver::getToolChain -- you have to go through CreateOffloadingDeviceToolChains. I am *pretty* sure this is correct, and that previously any attempt to create a CUDA toolchain through getToolChain() would eventually have resulted in us throwing "error: unsupported use of NVPTX for host compilation". In any case hacking getToolChain to create a CUDA+host toolchain would be wrong, because a Driver can be reused for multiple compilations, potentially with different host TCs, and getToolChain will cache the result, causing us to potentially use a stale host TC. So that's the main change in this patch. In addition, we have to pull CudaInstallationDetector out of Generic_GCC and into a top-level class. It's now used by the Generic_GCC and MachO toolchains. Reviewers: tra Subscribers: rryan, hfinkel, sfantao Differential Revision: https://reviews.llvm.org/D26774 llvm-svn: 287285
* [Myriad] add empty file to simulated bin dirDouglas Katzman2016-10-251-0/+0
| | | | llvm-svn: 285144
* [Driver] Support obtaining active toolchain from gcc-config on GentooMichal Gorny2016-10-259-0/+12
| | | | | | | | | | | Support using gcc-config to determine the correct GCC toolchain location on Gentoo. In order to do that, attempt to read gcc-config configuration form [[sysroot]]/etc/env.d/gcc, if no custom toolchain location is provided. Differential Revision: https://reviews.llvm.org/D25661 llvm-svn: 285074
* Add a dummy file in each subdirectory in test/Driver/Inputs/hexagon_treeKrzysztof Parzyszek2016-10-176-0/+24
| | | | | | | | | | Git does not store empty subdirectories (while SVN does). Git clone of the clang repository did not create the fake Hexagon installation tree used for testing the driver. This only became evident after a change in the Hexagon toolchain that started checking for existence of certain directories. llvm-svn: 284402
* Hexagon: add dummy files to test dir so git keeps them.Tim Northover2016-10-172-0/+0
| | | | | | Should fix hexagon-elf-toolchain.c tests on Git. llvm-svn: 284401
* [CUDA] Added support for CUDA-8Artem Belevich2016-09-282-0/+0
| | | | | | Differential Revision: https://reviews.llvm.org/D24946 llvm-svn: 282610
* Driver: avoid failing in the backendSaleem Abdulrasool2016-09-263-0/+0
| | | | | | | | Avoid failing in the backend when the rewrite map does not exist. Rather check that the map exists in the frontend before handing it off to the backend. Add the missing rewrite maps that the tests were referencing. llvm-svn: 282379
* [CUDA] Fix libdevice selection.Artem Belevich2016-08-021-0/+0
| | | | | | | | | | | 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
* [driver][mips] Support MIPS targets in modern Android NDKSimon Atanasyan2016-07-1926-0/+0
| | | | | | Initial patch provided by Duane Sand. llvm-svn: 275949
* [CUDA] Check that our CUDA install supports the requested architectures.Justin Lebar2016-07-077-0/+1
| | | | | | | | | | | | | | | 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
* [Driver] Adapt Linux::GCCVersion::Parse to match GCC 5 installationsBryan Chan2016-06-173-0/+0
| | | | | | | | | | | | | | | | | 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
* Revert "Strip Android version when looking up toolchain paths."Chandler Carruth2016-06-112-0/+0
| | | | | | | This reverts commit r272413. The tests here have been failing on several different build bots for over 10 hours. llvm-svn: 272454
* Strip Android version when looking up toolchain paths.Josh Gao2016-06-102-0/+0
| | | | | | | | | | | | | | | | Summary: Android target triples can include a version number in the abi field (e.g. 'aarch64-linux-android21'), used for checking for availability. However, the driver was searching for toolchain binaries using the passed in triple as a prefix. Reviewers: srhines, danalbert, t.p.northover Subscribers: t.p.northover, aemerson, tberghammer, danalbert, srhines, cfe-commits Differential Revision: http://reviews.llvm.org/D21163 llvm-svn: 272413
* [driver][arm] add armv7 and thumb include and lib pathsChih-Hung Hsieh2016-06-0164-0/+0
| | | | | | | | | | | 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] Revert support for CodeSourcery MIPS toolchainSimon Atanasyan2016-05-28178-0/+0
| | | | | | This is revert of r270366. The support for CS toolchain were dropped too early. llvm-svn: 271109
* [driver][mips] Follow-up to r270373. Add missed folder.Simon Atanasyan2016-05-221-0/+0
| | | | llvm-svn: 270380
* [driver][mips] Support new versions of MIPS CodeScape toolchainsSimon Atanasyan2016-05-22261-0/+0
| | | | llvm-svn: 270373
* [driver][mips] Drop support for outdated version of CodeSourcery MIPS toolchainSimon Atanasyan2016-05-22178-0/+0
| | | | llvm-svn: 270366
* Teach header search about GCC 4.9 header search paths in Gentoo, theyChandler Carruth2016-05-084-0/+0
| | | | | | now use the full GCC version in their weird suffix. llvm-svn: 268874
* clang-cl: Add more tests for the interaction of /FI and /Yc /Yu.Nico Weber2016-03-232-0/+0
| | | | | | | | | | | | Most things even work; see the included FIXMEs for things that need polishing. Also don't warn about unused flags for the `/Yuh2.h /FIh1.h /FIh2.h`. The common case is that the pch was built with `/Ych2.h /FIh1.h /FIh2.h`, so h1.h is in the PCH, and we shouldn't warn about /FIh1.h not having an effect. (If we wanted to get fancy, we could store the list of -include flags in the pch and then check that it matches later on.) llvm-svn: 264178
* clang-cl: Add a test for the interaction of /Yc and /showIncludes.Nico Weber2016-03-123-0/+1
| | | | | | | | We almost get this right, but not completely (see FIXME). It looks like /FI headers generally aren't included in /showIncludes yet, but they should be. But it seems good to have test coverage for the bits that already work. llvm-svn: 263344
* clang-cl: Implement initial limited support for precompiled headers.Nico Weber2016-03-012-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the gcc precompiled header model, one explicitly runs clang with `-x c++-header` on a .h file to produce a gch file, and then includes the header with `-include foo.h` and if a .gch file exists for that header it gets used. This is documented at http://clang.llvm.org/docs/UsersManual.html#precompiled-headers cl.exe's model is fairly different, and controlled by the two flags /Yc and /Yu. A pch file is generated as a side effect of a regular compilation when /Ycheader.h is passed. While the compilation is running, the compiler keeps track of #include lines in the main translation unit and writes everything up to an `#include "header.h"` line into a pch file. Conversely, /Yuheader.h tells the compiler to skip all code in the main TU up to and including `#include "header.h"` and instead load header.pch. (It's also possible to use /Yc and /Yu without an argument, in that case a `#pragma hrdstop` takes the role of controlling the point where pch ends and real code begins.) This patch implements limited support for this in that it requires the pch header to be passed as a /FI force include flag – with this restriction, it can be implemented almost completely in the driver with fairly small amounts of code. For /Yu, this is trivial, and for /Yc a separate pch action is added that runs before the actual compilation. After r261774, the first failing command makes a compilation stop – this means if the pch fails to build the main compilation won't run, which is what we want. However, in /fallback builds we need to run the main compilation even if the pch build fails so that the main compilation's fallback can run. To achieve this, add a ForceSuccessCommand that pretends that the pch build always succeeded in /fallback builds (the main compilation will then fail to open the pch and run the fallback cl.exe invocation). If /Yc /Yu are used in a setup that clang-cl doesn't implement yet, clang-cl will now emit a "not implemented yet; flag ignored" warning that can be disabled using -Wno-clang-cl-pch. Since clang-cl doesn't yet serialize some important things (most notably `pragma comment(lib, ...)`, this feature is disabled by default and only enabled by an internal driver flag. Once it's more stable, this internal flag will disappear. (The default stdafx.h setup passes stdafx.h as explicit argument to /Yc but not as /FI – instead every single TU has to `#include <stdafx.h>` as first thing it does. Implementing support for this should be possible with the approach in this patch with minimal frontend changes by passing a --stop-at / --start-at flag from the driver to the frontend. This is left for a follow-up. I don't think we ever want to support `#pragma hdrstop`, and supporting it with this approach isn't easy: This approach relies on the driver knowing the pch filename in advance, and `#pragma hdrstop(out.pch)` can set the output filename, so the driver can't know about it in advance.) clang-cl now also honors /Fp and puts pch files in the same spot that cl.exe would put them, but the pch file format is of course incompatible. This has ramifications on /fallback, so /Yc /Yu aren't passed through to cl.exe in /fallback builds. http://reviews.llvm.org/D17695 llvm-svn: 262420
* Add whole-program vtable optimization feature to Clang.Peter Collingbourne2016-02-241-0/+0
| | | | | | | | | This patch introduces the -fwhole-program-vtables flag, which enables the whole-program vtable optimization feature (D16795) in Clang. Differential Revision: http://reviews.llvm.org/D16821 llvm-svn: 261767
* [CUDA] Invoke ptxas and fatbinary during compilation.Justin Lebar2016-01-141-0/+0
| | | | | | | | | | | | | | | | | | | | Summary: Previously we compiled CUDA device code to PTX assembly and embedded that asm as text in our host binary. Now we compile to PTX assembly and then invoke ptxas to assemble the PTX into a cubin file. We gather the ptx and cubin files for each of our --cuda-gpu-archs and combine them using fatbinary, and then embed that into the host binary. Adds two new command-line flags, -Xcuda_ptxas and -Xcuda_fatbinary, which pass args down to the external tools. Reviewers: tra, echristo Subscribers: cfe-commits, jhen Differential Revision: http://reviews.llvm.org/D16082 llvm-svn: 257809
* [Hexagon] Update default paths and argumentsKrzysztof Parzyszek2015-12-148-8/+0
| | | | | | | | | - Removed support for hexagonv3 and earlier. - Added handling of hexagonv55 and hexagonv60. - Added handling of target features (hvx, hvx-double). - Updated paths to reflect current directory layout. llvm-svn: 255502
* Driver: add multilibs for ARM EBSaleem Abdulrasool2015-12-114-0/+0
| | | | | | | | This improves the coverage for the multilib directories used for ARM. Also add tests covering the internal triple (thumbv7-*). The Juno board can be run in this configuration. llvm-svn: 255328
* [Myriad]: insert -L paths into linker cmd only when they exist.Douglas Katzman2015-11-184-0/+0
| | | | | | Differential Revision: http://reviews.llvm.org/D14754 llvm-svn: 253467
* [CUDA] Detect and link with CUDA's libdevice bitcode library.Artem Belevich2015-11-172-0/+0
| | | | | | | | | | | - 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
* Re-recommit: Add support for the new mips-mti-linux toolchain.Vasileios Kalintiris2015-11-1210-0/+0
| | | | | | | | 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
* Extend linux header search to find libc++ headers in c++/vN for any N.Evgeniy Stepanov2015-11-099-0/+0
| | | | llvm-svn: 252514
* Revert "[mips] Add support for the new mips-mti-linux toolchain."Vasileios Kalintiris2015-10-3010-0/+0
| | | | | | | This reverts commits r251633. I'll investigate the test failure off trunk in order to keep the buildbots clean. llvm-svn: 251698
* [mips] Add support for the new mips-mti-linux toolchain.Vasileios Kalintiris2015-10-2910-0/+0
| | | | | | | | | | The original commit in r249137 added the mips-mti-linux toolchain. However, the newly added tests of that commit failed in few buildbots. This commit re-applies the original changes but XFAILs the test file which caused the buildbot failures. This will allow us to examine what's going wrong without having to commit/revert large changes. llvm-svn: 251633
* Driver: support -fuse-ld= on cross windowsSaleem Abdulrasool2015-10-281-0/+0
| | | | | | | Update the linker selection to support the `-fuse-ld=` option for selecting a linker. llvm-svn: 251493
* Teach MyriadToolchain how to find its C++ header paths.James Y Knight2015-10-161-0/+0
| | | | | | | Also move the addLibStdCXXIncludePaths helper function from Linux to Generic_GCC. llvm-svn: 250536
* Bring back r250262: PS4 toolchainFilipe Cabecinhas2015-10-142-0/+0
| | | | | | | | | | | | | | There was a minor problem with a test. Sorry for the noise yesterday. This patch adds missing pieces to clang, including the PS4 toolchain definition, added warnings, PS4 defaults, and Driver changes needed for our compiler. A patch by Filipe Cabecinhas, Pierre Gousseau and Katya Romanova! Differential Revision: http://reviews.llvm.org/D13482 llvm-svn: 250293
* Revert-to-green r250262 (PS4 toolchain patch)Sean Silva2015-10-142-0/+0
| | | | | | | It is breaking llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast e.g. http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/1362 llvm-svn: 250273
* I took care of the build problem in the commit 250252.Ekaterina Romanova2015-10-142-0/+0
| | | | | | | | | | | | | | Resubmitting the patch. This patch adds missing pieces to clang, including the PS4 toolchain definition, added warnings, PS4 defaults, and Driver changes needed for our compiler. A patch by Filipe Cabecinhas, Pierre Gousseau and Katya Romanova! Differential Revision: http://reviews.llvm.org/D13482 llvm-svn: 250262
* reverting my patch, cause build problemsEkaterina Romanova2015-10-142-0/+0
| | | | llvm-svn: 250257
* This patch adds missing pieces to clang, including the PS4 toolchainEkaterina Romanova2015-10-132-0/+0
| | | | | | | | | | | definition, added warnings, PS4 defaults, and Driver changes needed for our compiler. A patch by Filipe Cabecinhas, Pierre Gousseau and Katya Romanova! Differential Revision: http://reviews.llvm.org/D13482 llvm-svn: 250252
* Remove support for the mips-mti-linux toolchain.Vasileios Kalintiris2015-10-0510-0/+0
| | | | | | | There are two remaining buildbot failures that we'll have to investigate before submitting this again. llvm-svn: 249298
* Re-commit "Add support for the new mips-mti-linux toolchain."Vasileios Kalintiris2015-10-0510-0/+0
| | | | | | | | | | | r249137 added support for the new mips-mti-linux toolchain. However, the new tests of that commit, broke some buildbots because they didn't use the correct regular expressions to capture the filename of Clang & LLD. This commit re-applies the changes of r249137 and fixes the tests in r249137 in order to match the filenames of the Clang and LLD executable. llvm-svn: 249294
* Revert "Add support for the new mips-mti-linux toolchain."Vasileios Kalintiris2015-10-0210-0/+0
| | | | | | | This reverts commit r249137 because it broke the Windows buildbots and a Linux buildbot for LLD. llvm-svn: 249141
* Add support for the new mips-mti-linux toolchain.Vasileios Kalintiris2015-10-0210-0/+0
| | | | | | | | | | | | | | | | | | | | Summary: This new toolchain uses primarily LLVM-based tools, eg. compiler-rt, lld, libcxx, etc. Because of this, it doesn't require neither an existing GCC installation nor a GNU environment. Ideally, in a follow-up patch we would like to add a new --{llvm|clang}-toolchain option (similar to --gcc-toolchain) in order to allow the use of this toolchain with independent Clang builds. For the time being, we use the --sysroot option just to test the correctness of the paths generated by the driver. Reviewers: atanasyan, dsanders, rsmith Subscribers: jfb, tberghammer, danalbert, srhines, dschuff, cfe-commits Differential Revision: http://reviews.llvm.org/D13340 llvm-svn: 249137
* Revert "This patch adds missing pieces to clang, including the PS4 toolchain ↵Greg Bedwell2015-09-252-1/+0
| | | | | | | | definition, added warnings, PS4 defaults, and Driver changes needed for our compiler." This reverts commit r248546 to get our bot green again while we discuss the best way forward. llvm-svn: 248578
* This patch adds missing pieces to clang, including the PS4 toolchainEkaterina Romanova2015-09-242-0/+1
| | | | | | | | | | | definition, added warnings, PS4 defaults, and Driver changes needed for our compiler. A patch by Filipe Cabecinhas, Pierre Gousseau and Katya Romanova! Differential Revision: http://reviews.llvm.org/D11279 llvm-svn: 248546
OpenPOWER on IntegriCloud