summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/Inputs
Commit message (Collapse)AuthorAgeFilesLines
* [CUDA] Assume the latest known CUDA version if we've found an unknown one.Artem Belevich2020-01-296-0/+1
| | | | | | | | | | | | | | | | | This makes clang somewhat forward-compatible with new CUDA releases without having to patch it for every minor release without adding any new function. If an unknown version is found, clang issues a warning (can be disabled with -Wno-cuda-unknown-version) and assumes that it has detected the latest known version. CUDA releases are usually supersets of older ones feature-wise, so it should be sufficient to keep released clang versions working with minor CUDA updates without having to upgrade clang, too. Differential Revision: https://reviews.llvm.org/D73231 (cherry picked from commit 12fefeef203ab4ef52d19bcdbd4180608a4deae1)
* Avoid unsupported LLD optionsSid Manning2019-12-201-0/+0
| | | | Differential Revision: https://reviews.llvm.org/D70919
* [NFC][Driver] Add dummy compiler-rt sanitizer dylibs for Darwin.Dan Liew2019-12-2031-0/+0
| | | | | | | This adds dummy files to the test resource directory used by the Clang driver tests. rdar://problem/58118584
* [driver][darwin] Pass -platform_version flag to the linker instead of the ↵Alex Lorenz2019-12-172-0/+2
| | | | | | | | | | | -<platform>_version_min flag In Xcode 11, ld added a new flag called -platform_version that can be used instead of the old -<platform>_version_min flags. The new flag allows Clang to pass the SDK version from the driver to the linker. This patch adopts the new -platform_version flag in Clang, and starts using it by default, unless a linker version < 520 is passed to the driver. Differential Revision: https://reviews.llvm.org/D71579
* Add AIX assembler supportstevewan2019-12-023-0/+0
| | | | | | | | | | | | | | | | Summary: A skeleton of AIX toolchain and system linker support has been introduced in D68340, and this is a follow on patch to it. This patch adds support to system assembler invocation to the AIX toolchain. Reviewers: daltenty, hubert.reinterpretcast, jasonliu, Xiangling_L, dlj Reviewed By: daltenty, hubert.reinterpretcast Subscribers: wuzish, nemanjai, kbarton, jfb, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69620
* [Driver] Fix incorrect GNU triplet for PowerPC on SUSE LinuxAaron Puchert2019-11-235-0/+0
| | | | | | | | | | | | | | | Summary: On SUSE distributions for 32-bit PowerPC, gcc is configured as a 64-bit compiler using the GNU triplet "powerpc64-suse-linux", but invoked with "-m32" by default. Thus, the correct GNU triplet for 32-bit PowerPC SUSE distributions is "powerpc64-suse-linux" and not "powerpc-suse-linux". Reviewers: jrtc27, nemanjai, glaubitz Reviewed By: nemanjai Differential Revision: https://reviews.llvm.org/D55326
* [RISCV] Support mutilib in baremetal environmentZakk Chen2019-11-2125-0/+1
| | | | | | | | | | | | 1. Currently only support the set of multilibs same to riscv-gnu-toolchain. 2. Fix testcase typo causes fail on Windows. 3. Fix testcases to set empty sysroot. Reviewers: espindola, asb, kito-cheng, lenary Reviewed By: lenary Differential Revision: https://reviews.llvm.org/D67508
* [Clang] Enable RISC-V support for FuchsiaPetr Hosek2019-11-211-0/+0
| | | | | | | | We don't have a full sysroot yet, so for now we only include compiler support and compiler-rt builtins, the rest of the runtimes will get enabled later. Differential Revision: https://reviews.llvm.org/D70477
* Revert "[RISCV] Support mutilib in baremetal environment"Zakk Chen2019-11-2125-1/+0
| | | | | This reverts commit df876a026981b7a125b31bbb85ba4b1144edb0f9. Clang::riscv32-toolchain.c Clang::riscv64-toolchain.c fails on Windows.
* [RISCV] Support mutilib in baremetal environmentZakk Chen2019-11-2125-0/+1
| | | | | | | | | | | 1. Currently only support the set of multilibs same to riscv-gnu-toolchain. 2. Fix testcase typo causes fail on Windows Reviewers: espindola, asb, kito-cheng, lenary Reviewed By: lenary Differential Revision: https://reviews.llvm.org/D67508
* Revert "[RISCV] Support mutilib in baremetal environment"Nico Weber2019-11-1925-1/+0
| | | | | This reverts commit b6d7bbfa004310777cd41448ffc377aea082fc8c. Driver/riscv64-toolchain.c fails on Windows.
* [RISCV] Support mutilib in baremetal environmentZakk Chen2019-11-1925-0/+1
| | | | | | | | | | Currently only support the set of multilibs same to riscv-gnu-toolchain. Reviewers: espindola, asb, kito-cheng, lenary Reviewed By: lenary Differential Revision: https://reviews.llvm.org/D67508
* Revert "[RISCV] Use compiler-rt if no GCC installation detected"Richard Smith2019-11-134-0/+0
| | | | | | | This change causes test failures for builds configured with -DCLANG_DEFAULT_RTLIB=compiler-rt. This reverts commit 3289352e6bb9d2949c678c625478024bf2a5fbfb.
* [RISCV] Use compiler-rt if no GCC installation detectedEdward Jones2019-11-134-0/+0
| | | | | | | | If a GCC installation is not detected, then this attempts to use compiler-rt and the compiler-rt crtbegin/crtend implementations as a fallback. Differential Revision: https://reviews.llvm.org/D68407
* [RISCV] Improve sysroot computation if no GCC install detectedEdward Jones2019-11-078-0/+2
| | | | | | | | | | If a GCC installed is not detected, the driver would default to the root of the filesystem. This is not ideal when this doesn't match the install directory of the toolchain and can cause undesireable behavior such as picking up system libraries or the system linker when cross-compiling. Differential Revision: https://reviews.llvm.org/D68391
* Add AIX toolchain and basic linker functionalitystevewan2019-10-249-0/+0
| | | | | | | | | | | | | | | | Summary: This patch adds AIX toolchain infrastructure into driver, and enables AIX system linker invocation with some basic functionality support Reviewers: daltenty, hubert.reinterpretcast, jasonliu, Xiangling_L Reviewed By: jasonliu Subscribers: Xiangling_L, jasonliu, ormris, wuzish, nemanjai, mgorny, kbarton, jfb, jsji, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68340
* [Driver] Properly use values-X[ca].o, values-xpg[46].o on SolarisRainer Orth2019-08-058-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Builtins-*-sunos :: compiler_rt_logbf_test.c currently FAILs on Solaris, both SPARC and x86, 32 and 64-bit. It turned out that this is due to different behaviour of logb depending on the C standard compiled for, as documented on logb(3M): RETURN VALUES Upon successful completion, these functions return the exponent of x. If x is subnormal: o For SUSv3-conforming applications compiled with the c99 com- piler driver (see standards(7)), the exponent of x as if x were normalized is returned. o Otherwise, if compiled with the cc compiler driver, -1022, -126, and -16382 are returned for logb(), logbf(), and logbl(), respectively. Studio c99 and gcc control this by linking with the appropriate version of values-xpg[46].o, but clang uses neither of those. The following patch fixes this by following what gcc does, as corrected some time ago in Fix use of Solaris values-Xc.o (PR target/40411) https://gcc.gnu.org/ml/gcc-patches/2018-01/msg02350.html and https://gcc.gnu.org/ml/gcc-patches/2018-01/msg02384.html. Tested on x86_64-pc-solaris2.11, sparcv9-sun-solaris2.11, and x86_64-pc-linux-gnu. Differential Revision: https://reviews.llvm.org/D64793 llvm-svn: 367866
* Add support for openSUSE RISC-V tripleSam Elliott2019-08-015-0/+0
| | | | | | | | | | | | | | | | Reviewers: asb Reviewed By: asb Subscribers: lenary, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, zzheng, edward-jones, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, lebedev.ri, kito-cheng, shiva0217, rogfer01, dexonsmith, rkruppe, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D63497 Patch by Andreas Schwab (schwab) llvm-svn: 367565
* [Driver] Don't pass --dynamic-linker to ld on SolarisRainer Orth2019-07-164-0/+0
| | | | | | | | | | | | | | | | | I noticed that clang currently passes --dynamic-linker to ld. This has been the case since Solaris 11 support was added initially back in 2012 by David Chisnall (r150580). I couldn't find any patch submission, let alone a justification, for this, and it seems completely useless: --dynamic-linker is a gld compatibility form of the option, the native option being -I. First of all, however, the dynamic linker passed is simply the default, so there's no reason at all to specify it in the first place. This patch removes passing the option and adjusts the affected testcase accordingly. Tested on x86_64-pc-solaris2.11 and sparcv9-sun-solaris2.11. Differential Revision: https://reviews.llvm.org/D64493 llvm-svn: 366202
* [CMake][Fuchsia] Define asan+noexcept multilibPetr Hosek2019-07-132-0/+0
| | | | | | | | | | | | | | | | | | Using noexcept multilib with -fno-exceptions can lead to significant space savings when statically linking libc++abi because we don't need all the unwinding and demangling code. When compiling with ASan, we already get a lot of overhead from the instrumentation itself, when statically linking libc++abi, that overhead is even larger. Having the noexcept variant for ASan can help significantly, we've seen more than 50% size reduction in our system image, which offsets the cost of having to build another multilib. Differential Revision: https://reviews.llvm.org/D64140 llvm-svn: 365994
* [Driver] Change layout of per-target runtimes to resemble multiarchPetr Hosek2019-05-2724-0/+0
| | | | | | | | | | | | | | | | | | | | | | | This is a follow up to r361432, changing the layout of per-target runtimes to more closely resemble multiarch. While before, we used the following layout: [RESOURCE_DIR]/<target>/lib/libclang_rt.<runtime>.<ext> Now we use the following layout: [RESOURCE_DIR]/lib/<target>/libclang_rt.<runtime>.<ext> This also more closely resembles the existing "non-per-target" layout: [RESOURCE_DIR]/lib/<os>/libclang_rt.<runtime>-<arch>.<ext> This change will enable further simplification of the driver logic in follow up changes. Differential Revision: https://reviews.llvm.org/D62469 llvm-svn: 361784
* [Driver] Update handling of c++ and runtime directoriesPetr Hosek2019-05-267-0/+0
| | | | | | | | | | | | This is a follow up to r361432 and r361504 which addresses issues introduced by those changes. Specifically, it avoids duplicating file and runtime paths in case when the effective triple is the same as the cannonical one. Furthermore, it fixes the broken multilib setup in the Fuchsia driver and deduplicates some of the code. Differential Revision: https://reviews.llvm.org/D62442 llvm-svn: 361709
* [runtimes] Move libunwind, libc++abi and libc++ to lib/$target/c++ and ↵Petr Hosek2019-05-221-0/+0
| | | | | | | | | | | | | | | | | include/c++ This change is a consequence of the discussion in "RFC: Place libs in Clang-dedicated directories", specifically the suggestion that libunwind, libc++abi and libc++ shouldn't be using Clang resource directory. Tools like clangd make this assumption, but this is currently not true for the LLVM_ENABLE_PER_TARGET_RUNTIME_DIR build. This change addresses that by moving the output of these libraries to lib/$target/c++ and include/c++ directories, leaving resource directory only for compiler-rt runtimes and Clang builtin headers. Differential Revision: https://reviews.llvm.org/D59168 llvm-svn: 361432
* [clang][Darwin] Refactor header search path logic into the driverLouis Dionne2019-05-2126-0/+0
| | | | | | | | | | | | | | | | | | | | | | | Summary: This commit moves the logic for determining system, resource and C++ header search paths from CC1 to the driver. This refactor has already been made for several platforms, but Darwin had been left behind. This refactor tries to implement the previous search path logic with perfect accuracy. In particular, the order of all include paths inside CC1 and all paths that were skipped because nonexistent are conserved after the refactor. This change was also tested against a code base of significant size and revealed no problems. Reviewers: jfb, arphaman Subscribers: nemanjai, javed.absar, kbarton, christof, jkorous, dexonsmith, jsji, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61963 llvm-svn: 361278
* [Driver] Support compiler-rt crtbegin.o/crtend.o for LinuxPetr Hosek2019-04-304-0/+0
| | | | | | | | | | When compiler-rt is selected as the runtime library for Linux targets use its crtbegin.o/crtend.o implemenetation rather than platform one if available. Differential Revision: https://reviews.llvm.org/D59264 llvm-svn: 359603
* [Fuchsia] Support multilib for -fsanitize=address and -fno-exceptionsPetr Hosek2019-04-272-0/+0
| | | | | | | | | | | | | | | This introduces a support for multilibs to Fuchsia driver. Unlike the existing multilibs that are used primarily for handling different architecture variants, we use multilibs to handle different variants of Clang runtime libraries: -fsanitize=address and -fno-exceptions are the two we support initially. This replaces the existing support for sanitized runtimes libraries that was only used by Fuchsia driver and it also refactors some of the logic to allow sharing between GNU and Fuchsia drivers. Differential Revision: https://reviews.llvm.org/D61040 llvm-svn: 359360
* [RISCV] Fix rL357699 by adding missing zero-length filesAlex Bradbury2019-04-043-0/+0
| | | | | | svn add doesn't play very nicely here... llvm-svn: 357702
* [RISCV] Collect library directories and triples for riscv64 triple tooAlex Bradbury2019-04-042-0/+1
| | | | | | | | | | | | When setting up library and tools paths when detecting an accompanying GCC installation only riscv32 was handled. As a consequence when targetting riscv64 neither the linker nor libraries would be found. This adds handling and tests for riscv64. Differential Revision: https://reviews.llvm.org/D53392 Patch by Edward Jones. llvm-svn: 357699
* [Clang] Include the test directory ommited in r355665Petr Hosek2019-03-081-0/+0
| | | | | | This was omitted in r355655 causing the test to fail. llvm-svn: 355666
* [MSP430] Provide a toolchain descriptionAnton Korobeynikov2019-01-155-0/+0
| | | | | | | | | | | | | | | This is an initial implementation for msp430 toolchain including -mmcu option support -mhwmult options support -integrated-as by default The toolchain uses msp430-elf-as as a linker and supports msp430-gcc toolchain tree. Patch by Kristina Bessonova! Differential Revision: https://reviews.llvm.org/D56658 llvm-svn: 351228
* [darwin] parse the SDK settings from SDKSettings.json if it exists andAlex Lorenz2018-12-171-0/+1
| | | | | | | | | | | | | | | | | | | | pass in the -target-sdk-version to the compiler and backend This commit adds support for reading the SDKSettings.json file in the Darwin driver. This file is used by the driver to determine the SDK's version, and it uses that information to pass it down to the compiler using the new -target-sdk-version= option. This option is then used to set the appropriate SDK Version module metadata introduced in r349119. Note: I had to adjust the two ast tests as the SDKROOT environment variable on macOS caused SDK version to be picked up for the compilation of source file but not the AST. rdar://45774000 Differential Revision: https://reviews.llvm.org/D55673 llvm-svn: 349380
* Add Hurd target to Clang driver (2/2)Kristina Brooks2018-11-296-0/+0
| | | | | | | | | | | | | | | This adds Hurd toolchain support to Clang's driver in addition to handling translating the triple from Hurd-compatible form to the actual triple registered in LLVM. (Phabricator was stripping the empty files from the patch so I manually created them) Patch by sthibaul (Samuel Thibault) Differential Revision: https://reviews.llvm.org/D54379 llvm-svn: 347833
* [Driver] Support XRay on FuchsiaPetr Hosek2018-11-224-0/+0
| | | | | | | | This enables support for XRay in Fuchsia Clang driver. Differential Revision: https://reviews.llvm.org/D52160 llvm-svn: 347444
* [Driver] Support g++ headers in include/g++David Greene2018-11-134-0/+0
| | | | | | | | | | ray's gcc installation puts C++ headers in PREFIX/include/g++ without indicating a gcc version at all. Typically this is because the version is encoded somewhere in PREFIX. Differential Revision: https://reviews.llvm.org/D53770 llvm-svn: 346802
* [Driver] Reland again again: Default Android toolchains to libc++.Dan Albert2018-11-051-0/+0
| | | | | | | | Landed more fixes to the compiler-rt Android tests. Original review was https://reviews.llvm.org/D53109. llvm-svn: 346167
* [Driver] Include missing touch files for sanitized library pathsPetr Hosek2018-10-292-0/+0
| | | | | | | | These were forgotten in r345537 causing test failures on Clang builders. Differential Revision: https://reviews.llvm.org/D53833 llvm-svn: 345540
* Revert "[Driver] Reland again: Default Android toolchains to libc++."Dan Albert2018-10-221-0/+0
| | | | | | More compiler-rt test bot breakages... llvm-svn: 344963
* [Driver] Reland again: Default Android toolchains to libc++.Dan Albert2018-10-221-0/+0
| | | | | | | | | Some of the test data went missing last time I tried to submit this, causing the tests to fail when the build did not include libc++. Original review was https://reviews.llvm.org/D53109. llvm-svn: 344946
* [HIP] Remove unused irif bitcode from testAaron Enye Shi2018-10-111-0/+0
| | | | | | | | | | This is part of previous commit [HIP] Replace irif library with hip.amdgcn.bc Reviewers: yaxunl Differential Revision: https://reviews.llvm.org/D52673 llvm-svn: 344285
* [HIP] Replace irif library with hip.amdgcn.bcAaron Enye Shi2018-10-111-0/+0
| | | | | | No longer use irif amdgcn library, instead we will use the previous fence functions from new hip.amdgcn.bc bitcode library. Update hip-device-libs.hip test as well. llvm-svn: 344281
* [DRIVER][OFFLOAD] Do not invoke unbundler on unsupported file types.Alexey Bataev2018-09-281-0/+1
| | | | | | | | | clang-offload-bundler should not be invoked with the unbundling action when the input file type does not match the action type. For example, .so files should be unbundled during linking phase and should be linked only with the host code. llvm-svn: 343335
* Revert "[DRIVER][OFFLOAD] Do not invoke unbundler on unsupported fileAlexey Bataev2018-09-251-1/+0
| | | | | | | | | types." It reverts commit r342991 + several other commits intended to fix the tests. Still have some failed tests, need to investigate it. llvm-svn: 343002
* [DRIVER][OFFLOAD] Do not invoke unbundler on unsupported file types.Alexey Bataev2018-09-251-0/+1
| | | | | | | | | clang-offload-bundler should not be invoked with the unbundling action when the input file type does not match the action type. For example, .so files should be unbundled during linking phase and should be linked only with the host code. llvm-svn: 342991
* [Driver] Check normalized triples for multiarch runtime pathPetr Hosek2018-08-2212-0/+0
| | | | | | | | | | | | | | | | | | | | Previously we only used target triple as provided which matches the GCC behavior, but it also means that all clients have to be consistent in their spelling of target triples since e.g. x86_64-linux-gnu and x86_64-unknown-linux-gnu will result in Clang driver looking at two different paths when searching for runtime libraries. Unfortunatelly, as it turned out many clients aren't consistent in their spelling of target triples, e.g. many Linux distributions use the shorter spelling but config.guess and rustc insist on using the normalized variant which is causing issues. To avoid having to ship multiple copies of runtimes for different triple spelling or rely on symlinks which are not portable, we should also check the normalized triple when constructing paths for multiarch runtimes. Differential Revision: https://reviews.llvm.org/D50547 llvm-svn: 340471
* [Darwin Driver] Fix Simulator builtins and test casesChris Bieneman2018-08-158-0/+0
| | | | | | | | In r339807, I broke linking the builtins libraries for simulator targets, which itself was bad, but turns out it was all completely untested and marked with FIXME in the test suite. This fixes all the test cases so they actually work, and fixes the bug I introduced in r339807. llvm-svn: 339829
* Revert r337635 "[Driver] Sanitizer support based on runtime library presence"Reid Kleckner2018-07-3115-0/+0
| | | | | | | | This change causes issues with distributed build systems, which may only have compiler binaries without any runtime libraries. See discussion about this on https://reviews.llvm.org/D15225. llvm-svn: 338444
* [RISCV] Add driver for riscv32-unknown-elf baremetal targetDavid Bolvansky2018-07-315-0/+1
| | | | | | | | | | | | | | | | | Summary: This patch adds a driver for the baremetal RISC-V target (i.e. riscv32-unknown-elf). For reference, D39963 added basic target info and added support for riscv32-linux-unknown-elf. Patch by: asb (Alex Bradbury) Reviewers: efriedma, phosek, apazos, espindola, mgrang Reviewed By: mgrang Subscribers: jrtc27, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, emaste, mgorny, arichardson, rbar, johnrusso, simoncook, jordy.potman.lists, sabuasal, niosHD, kito-cheng, shiva0217, zzheng, edward-jones, mgrang, cfe-commits Differential Revision: https://reviews.llvm.org/D46822 llvm-svn: 338385
* [OpenEmbedded] Fix lib paths for OpenEmbedded targetsMandeep Singh Grang2018-07-3012-0/+0
| | | | | | | | | | | | | | | | | | | | | Summary: The lib paths are not correctly picked up for OpenEmbedded sysroots (like arm-oe-linux-gnueabi) for 2 reasons: 1. OpenEmbedded sysroots are of the form <sysroot>/usr/lib/<triple>/x.y.z. This form is handled in clang but only for Freescale vendor. 2. 64-bit OpenEmbedded sysroots may not have a /usr/lib dir. So they cannot find /usr/lib64 as it is referenced as /usr/lib/../lib64 in clang. This is a follow-up to the llvm patch: D48861 Reviewers: dlj, rengolin, fedor.sergeev, javed.absar, hfinkel, rsmith Reviewed By: rsmith Subscribers: rsmith, kristof.beyls, cfe-commits Differential Revision: https://reviews.llvm.org/D48862 llvm-svn: 338294
* Add a .keep file to prevent svn from skipping over an empty folder.Jiading Gai2018-07-241-0/+0
| | | | llvm-svn: 337813
* For x86_64, gcc 7.2 under Amazon Linux AMI sets its path to x86_64-amazon-linux.Jiading Gai2018-07-246-0/+0
| | | | | | | | | | | | | | | gcc 7.2 under Amazon Linux AMI sets its paths to x86_64-amazon-linux. Adding this triple to the list of search, plus a test case to cover this. The patch fixes the following bug reported in bugzilla: https://bugs.llvm.org/show_bug.cgi?id=35992 Reviewers: echristo Differential Revision: https://reviews.llvm.org/D46230 llvm-svn: 337811
OpenPOWER on IntegriCloud