summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert [test][Driver] Fix Clang :: Driver/cl-response-file.cReid Kleckner2019-06-211-1/+1
| | | | | | | | | This reverts r363985 (git commit d5f16d6cfccc4b0b13b6c01d16c673886d53e695) This test can't use printf on Windows because the path contains backslashes which must not be interpreted as escapes by printf. llvm-svn: 364089
* [RISC-V] Add -msave-restore and -mno-save-restore to clang driverSam Elliott2019-06-211-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The GCC RISC-V toolchain accepts `-msave-restore` and `-mno-save-restore` to control whether libcalls are used for saving and restoring the stack within prologues and epilogues. Clang currently errors if someone passes -msave-restore or -mno-save-restore. This means that people need to change build configurations to use clang. This patch adds these flags, so that clang invocations can now match gcc. As the RISC-V backend does not currently have a `save-restore` target feature, we emit a warning if someone requests `-msave-restore`. LLVM does not error if we pass the (unimplemented) target features `+save-restore` or `-save-restore`. Reviewers: asb, luismarques Reviewed By: asb Subscribers: rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63498 llvm-svn: 364018
* [test][Driver] Fix Clang :: Driver/cl-response-file.cRainer Orth2019-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clang :: Driver/cl-response-file.c currently FAILs on Solaris: Command Output (stderr): -- /vol/llvm/src/clang/dist/test/Driver/cl-response-file.c:10:11: error: CHECK: expected string not found in input // CHECK: "-I" "{{.*}}\\Inputs\\cl-response-file\\" "-D" "FOO=2" ^ Looking at the generated response file reveals that this is no surprise: /I/vol/llvm/src/clang/dist/test/Driver\Inputs with no newline at the end. The echo command used to create it boils down to echo 'a\cb' However, one cannot expect \c to be emitted literally: e.g. bash's builtin echo has \c suppress further output I've tried various combinations of builtin echo, /usr/bin/echo, GNU echo if different, the same for printf, and the backslash unescaped and quoted (a\cb and a\\cb). The only combination that worked reliably on Solaris, Linux, and macOS was printf 'a\\cb' so this is what this patch uses. Tested on amd64-pc-solaris2.11 and x86_64-pc-linux-gnu. Differential Revision: https://reviews.llvm.org/D63600 llvm-svn: 363985
* AMDGPU: Disable errno by defaultMatt Arsenault2019-06-181-0/+6
| | | | llvm-svn: 363682
* [Remarks][Driver] Use the specified format in the remarks file extensionFrancis Visoiu Mistrih2019-06-172-1/+2
| | | | | | | By default, use `.opt.yaml`, but when a format is specified with `-fsave-optimization-record=<format>`, use `.opt.<format>`. llvm-svn: 363627
* [Remarks] Extend -fsave-optimization-record to specify the formatFrancis Visoiu Mistrih2019-06-172-0/+12
| | | | | | | | | Use -fsave-optimization-record=<format> to specify a different format than the default, which is YAML. For now, only YAML is supported. llvm-svn: 363573
* Promote -fdebug-compilation-dir from a cc1 flag to clang and clang-cl driver ↵Nico Weber2019-06-172-1/+6
| | | | | | | | | | | | | | | | | | | | | flags The flag is useful when wanting to create .o files that are independent from the absolute path to the build directory. -fdebug-prefix-map= can be used to the same effect, but it requires putting the absolute path to the build directory on the build command line, so it still requires the build command line to be dependent on the absolute path of the build directory. With this flag, "-fdebug-compilation-dir ." makes it so that both debug info and the compile command itself are independent of the absolute path of the build directory, which is good for build determinism (in the sense that the build is independent of which directory it happens in) and for caching compile results. (The tradeoff is that the debugger needs explicit configuration to know the build directory. See also http://dwarfstd.org/ShowIssue.php?issue=171130.2) Differential Revision: https://reviews.llvm.org/D63387 llvm-svn: 363548
* [Clang] Harmonize Split DWARF options with llcAaron Puchert2019-06-151-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: With Split DWARF the resulting object file (then called skeleton CU) contains the file name of another ("DWO") file with the debug info. This can be a problem for remote compilation, as it will contain the name of the file on the compilation server, not on the client. To use Split DWARF with remote compilation, one needs to either * make sure only relative paths are used, and mirror the build directory structure of the client on the server, * inject the desired file name on the client directly. Since llc already supports the latter solution, we're just copying that over. We allow setting the actual output filename separately from the value of the DW_AT_[GNU_]dwo_name attribute in the skeleton CU. Fixes PR40276. Reviewers: dblaikie, echristo, tejohnson Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D59673 llvm-svn: 363496
* [Clang] Rename -split-dwarf-file to -split-dwarf-outputAaron Puchert2019-06-153-15/+15
| | | | | | | | | | | | | | | | | | Summary: This is the first in a series of changes trying to align clang -cc1 flags for Split DWARF with those of llc. The unfortunate side effect of having -split-dwarf-output for single file Split DWARF will disappear again in a subsequent change. The change is the result of a discussion in D59673. Reviewers: dblaikie, echristo Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D63130 llvm-svn: 363494
* Fixed the --print-supported-cpus testZiang Wan2019-06-141-0/+2
| | | | | | | | | | | Add constraints for the test that require specific backend targets to be registered. Remove trailing whitespace in the doc. Differential Revision: https://reviews.llvm.org/D63105 llvm-svn: 363475
* Add --print-supported-cpus flag for clang.Ziang Wan2019-06-141-0/+16
| | | | | | | | | | | | This patch allows clang users to print out a list of supported CPU models using clang [--target=<target triple>] --print-supported-cpus Then, users can select the CPU model to compile to using clang --target=<triple> -mcpu=<model> a.c It is a handy feature to help cross compilation. llvm-svn: 363464
* AMDGPU: Use AMDGPU toolchain for other OSesMatt Arsenault2019-06-141-1/+6
| | | | | | | This would need more work to actually support them, but this is less wrong than the default. llvm-svn: 363390
* [AMDGPU] gfx1011/gfx1012 clang supportStanislav Mekhanoshin2019-06-142-0/+18
| | | | | | Differential Revision: https://reviews.llvm.org/D63308 llvm-svn: 363345
* [AMDGPU] gfx1010 wave32 clang supportStanislav Mekhanoshin2019-06-131-0/+6
| | | | | | Differential Revision: https://reviews.llvm.org/D63209 llvm-svn: 363341
* [WebAssembly] Modernize include path handlingSam Clegg2019-06-131-0/+2
| | | | | | | | | | Move include path construction from InitHeaderSearch::AddDefaultIncludePaths in the Driver which appears to be the more modern/correct way of doing things. Differential Revision: https://reviews.llvm.org/D63030 llvm-svn: 363241
* Make sure a test from r363036 does not write into a working directoryIlya Biryukov2019-06-111-2/+2
| | | | | | | | | | It breaks if build directory is not writable. This change is required to fix our integrate. Also add a flush() call, otherwise time trace option does not produce the full output. llvm-svn: 363052
* [Support][Test] Time profiler: add regression testAnton Afanasyev2019-06-111-0/+28
| | | | | | | | | | | | | | | | | | Summary: Add output to `llvm::errs()` when `-ftime-trace` option is enabled, add regression test checking this option works as expected. Reviewers: thakis, aganea Subscribers: cfe-commits, llvm-commits Tags: #clang, #llvm This is recommit of r362821 Differential Revision: https://reviews.llvm.org/D61914 llvm-svn: 363036
* [WebAssembly] Cleanup toolchain test files. NFC.Sam Clegg2019-06-102-17/+40
| | | | | | | | | | | | Summary: Split up long lines to improve test readability. Subscribers: dschuff, jgravelle-google, aheejin, sunfish, jfb, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63081 llvm-svn: 362959
* Relax test so that the clang binary doesn't need to be named "clang".Peter Collingbourne2019-06-071-1/+1
| | | | llvm-svn: 362836
* Driver, IRGen: Set partitions on GlobalValues according to ↵Peter Collingbourne2019-06-071-0/+5
| | | | | | | | -fsymbol-partition flag. Differential Revision: https://reviews.llvm.org/D62636 llvm-svn: 362829
* Revert "[Support][Test] Time profiler: add regression test"Anton Afanasyev2019-06-071-23/+0
| | | | | | | This reverts commit 44282a60c90fdded249d57d91b12c6c0907102ec. This breaks buildbot. llvm-svn: 362824
* [Support][Test] Time profiler: add regression testAnton Afanasyev2019-06-071-0/+23
| | | | | | | | | | | | | | | | | | Summary: Add output to `llvm::errs()` when `-ftime-trace` option is enabled, add regression test checking this option works as expected. Reviewers: thakis, aganea Subscribers: cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D61914 > llvm-svn: 362792 llvm-svn: 362821
* Revert rL362792 : [Support][Test] Time profiler: add regression testSimon Pilgrim2019-06-071-23/+0
| | | | | | | | | | | | | | | | | | Summary: Add output to `llvm::errs()` when `-ftime-trace` option is enabled, add regression test checking this option works as expected. Reviewers: thakis, aganea Subscribers: cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D61914 ........ Breaks buildbots - @anton-afanasyev please can you take a look? llvm-svn: 362816
* [Support][Test] Time profiler: add regression testAnton Afanasyev2019-06-071-0/+23
| | | | | | | | | | | | | | | | Summary: Add output to `llvm::errs()` when `-ftime-trace` option is enabled, add regression test checking this option works as expected. Reviewers: thakis, aganea Subscribers: cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D61914 llvm-svn: 362792
* [ARM] Fix bugs introduced by the fp64/d32 rework.Simon Tatham2019-06-072-186/+199
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change D60691 caused some knock-on failures that weren't caught by the existing tests. Firstly, selecting a CPU that should have had a restricted FPU (e.g. `-mcpu=cortex-m4`, which should have 16 d-regs and no double precision) could give the unrestricted version, because `ARM::getFPUFeatures` returned a list of features including subtracted ones (here `-fp64`,`-d32`), but `ARMTargetInfo::initFeatureMap` threw away all the ones that didn't start with `+`. Secondly, the preprocessor macros didn't reliably match the actual compilation settings: for example, `-mfpu=softvfp` could still set `__ARM_FP` as if hardware FP was available, because the list of features on the cc1 command line would include things like `+vfp4`,`-vfp4d16` and clang didn't realise that one of those cancelled out the other. I've fixed both of these issues by rewriting `ARM::getFPUFeatures` so that it returns a list that enables every FP-related feature compatible with the selected FPU and disables every feature not compatible, which is more verbose but means clang doesn't have to understand the dependency relationships between the backend features. Meanwhile, `ARMTargetInfo::handleTargetFeatures` is testing for all the various forms of the FP feature names, so that it won't miss cases where it should have set `HW_FP` to feed into feature test macros. That in turn caused an ordering problem when handling `-mcpu=foo+bar` together with `-mfpu=something_that_turns_off_bar`. To fix that, I've arranged that the `+bar` suffixes on the end of `-mcpu` and `-march` cause feature names to be put into a separate vector which is concatenated after the output of `getFPUFeatures`. Another side effect of all this is to fix a bug where `clang -target armv8-eabi` by itself would fail to set `__ARM_FEATURE_FMA`, even though `armv8` (aka Arm v8-A) implies FP-Armv8 which has FMA. That was because `HW_FP` was being set to a value including only the `FPARMV8` bit, but that feature test macro was testing only the `VFP4FPU` bit. Now `HW_FP` ends up with all the bits set, so it gives the right answer. Changes to tests included in this patch: * `arm-target-features.c`: I had to change basically all the expected results. (The Cortex-M4 test in there should function as a regression test for the accidental double-precision bug.) * `arm-mfpu.c`, `armv8.1m.main.c`: switched to using `CHECK-DAG` everywhere so that those tests are no longer sensitive to the order of cc1 feature options on the command line. * `arm-acle-6.5.c`: been updated to expect the right answer to that FMA test. * `Preprocessor/arm-target-features.c`: added a regression test for the `mfpu=softvfp` issue. Reviewers: SjoerdMeijer, dmgreen, ostannard, samparker, JamesNagurne Reviewed By: ostannard Subscribers: srhines, javed.absar, kristof.beyls, hiraditya, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D62998 llvm-svn: 362791
* [X86] -march=cooperlake (clang)Pengfei Wang2019-06-071-0/+4
| | | | | | | | | | Support intel -march=cooperlake in clang Patch by Shengchen Kan (skan) Differential Revision: https://reviews.llvm.org/D62835 llvm-svn: 362781
* [X86] Add ENQCMD instructionsPengfei Wang2019-06-061-0/+5
| | | | | | | | | | | | For more details about these instructions, please refer to the latest ISE document: https://software.intel.com/en-us/download/intel-architecture-instruction-set-extensions-programming-reference. Patch by Tianqing Wang (tianqing) Differential Revision: https://reviews.llvm.org/D62282 llvm-svn: 362685
* [ARM] Allow "-march=foo+fp" to vary with fooSjoerd Meijer2019-06-052-2/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now, when clang processes an argument of the form "-march=foo+x+y+z", then instead of calling getArchExtFeature() for each of the extension names "x", "y", "z" and appending the returned string to its list of low-level subtarget features, it will call appendArchExtFeatures() which does the appending itself. The difference is that appendArchExtFeatures can add _more_ than one low-level feature name to the output feature list if it has to, and also, it gets told some information about what base architecture and CPU the extension is going to go with, which means that "+fp" can now mean something different for different CPUs. Namely, "+fp" now selects whatever the _default_ FPU is for the selected CPU and/or architecture, as defined in the ARM_ARCH or ARM_CPU_NAME macros in ARMTargetParser.def. On the clang side, I adjust DecodeARMFeatures to call the new appendArchExtFeatures function in place of getArchExtFeature. This means DecodeARMFeatures needs to be passed a CPU name and an ArchKind, which meant changing its call sites to make those available, and also sawing getLLVMArchSuffixForARM in half so that you can get an ArchKind enum value out of it instead of a string. Also, I add support here for the extension name "+fp.dp", which will automatically look through the FPU list for something that looks just like the default FPU except for also supporting double precision. Differential Revision: https://reviews.llvm.org/D60697 llvm-svn: 362601
* [Clang] Disable new PM for tests that use optimization level -O1, -O2 and -O3Petr Hosek2019-06-053-29/+29
| | | | | | | | | | Tests that use -O1, -O2 and -O3 would often produce different results with the new pass manager which makes these tests fail. Disable new PM explicitly for these tests. Differential Revision: https://reviews.llvm.org/D58375 llvm-svn: 362580
* Initial support for vectorization using MASSV (IBM MASS vector library)Nemanja Ivanovic2019-06-052-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Part 2 (the Clang portion) of D59881. This patch (first of two patches) enables the vectorizer to recognize the IBM MASS vector library routines. This patch specifically adds support for recognizing the -vector-library=MASSV option, and defines mappings from IEEE standard scalar math functions to generic PowerPC MASS vector counterparts. For instance, the generic PowerPC MASS vector entry for double-precision cbrt function is __cbrtd2_massv. The second patch will further lower the generic PowerPC vector entries to PowerPC subtarget-specific entries. For instance, the PowerPC generic entry cbrtd2_massv is lowered to cbrtd2_P9 for Power9 subtarget. The overall support for MASS vector library is presented as such in two patches for ease of review. Patch by Jeeva Paudel. Differential revision: https://reviews.llvm.org/D59881 llvm-svn: 362571
* [ARM] Fix recent breakage of -mfpu=none.Simon Tatham2019-06-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The recent change D60691 introduced a bug in clang when handling option combinations such as `-mcpu=cortex-m4 -mfpu=none`. Those options together should select Cortex-M4 but disable all use of hardware FP, but in fact, now hardware FP instructions can still be generated in that mode. The reason is because the handling of FPUVersion::NONE disables all the same feature names it used to, of which the base one is `vfp2`. But now there are further features below that, like `vfp2d16fp` and (following D60694) `fpregs`, which also need to be turned off to disable hardware FP completely. Added a tiny test which double-checks that compiling a simple FP function doesn't access the FP registers. Reviewers: SjoerdMeijer, dmgreen Reviewed By: dmgreen Subscribers: lebedev.ri, javed.absar, kristof.beyls, hiraditya, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D62729 llvm-svn: 362380
* Revise test case due to the change from CUDA 10+.Michael Liao2019-05-311-1/+1
| | | | llvm-svn: 362232
* [X86] Add VP2INTERSECT instructionsPengfei Wang2019-05-311-0/+5
| | | | | | | | | | Support intel AVX512 VP2INTERSECT instructions in clang Patch by Xiang Zhang (xiangzhangllvm) Differential Revision: https://reviews.llvm.org/D62367 llvm-svn: 362196
* Redirect test output to /dev/nullRichard Trieu2019-05-311-5/+5
| | | | llvm-svn: 362187
* Mark test as requiring an ARM target.Douglas Yung2019-05-301-0/+1
| | | | llvm-svn: 362140
* Follow up of r362096Sjoerd Meijer2019-05-302-35/+2
| | | | | | | | The new tests were failing, because I missed dependent patch D60697. I have removed the failing cases for now, which I will restore once D60697 is in. llvm-svn: 362100
* [ARM] Add CLI support for Armv8.1-M and MVESjoerd Meijer2019-05-302-0/+99
| | | | | | | | | | | | Given the existing infrastructure in LLVM side for +fp and +fp.dp, this is more or less trivial, needing only one tiny source change and a couple of tests. Patch by Simon Tatham. Differential Revision: https://reviews.llvm.org/D60699 llvm-svn: 362096
* [Driver] Render target options (e.g. -fuse-init-array) for -fembed-bitcodeFangrui Song2019-05-301-0/+8
| | | | | | | | | | | | | | | | | | | | | Modern ELF platforms use -fuse-init-array to emit .init_array instead of .ctors . ld.bfd and gold --ctors-in-init-array merge .init_array and .ctors into .init_array but lld doesn't do that. If crtbegin*.o crtend*.o don't provide .ctors/.dtors, such .ctors in user object files can lead to crash (see PR42002. The first and the last elements in .ctors/.dtors are ignored - they are traditionally provided by crtbegin*.o crtend*.o). Call addClangTargetOptions() to ensure -fuse-init-array is rendered on modern ELF platforms. On Hexagon, this renders -target-feature +reserved-r19 for -ffixed-r19. Reviewed By: compnerd Differential Revision: https://reviews.llvm.org/D62509 llvm-svn: 362052
* [Driver] -static-pie: add -z textFangrui Song2019-05-301-0/+6
| | | | | | | | | | | | | | | | | | | | | | | This matches gcc -static-pie. The intention is to prevent dynamic relocations in read-only segments. In ld.bfd and gold, -z notext is the default. If text relocations are needed: * -z notext: allow and emit DF_TEXTREL. DF_TEXTREL is not emitted if there is no text relocation. * -z text: error In lld, -z text is the default (this change is a no-op). * -z text: error on text relocations * -z notext: allow text relocations, and emit DF_TEXTREL no matter whether text relocations exist. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D62606 llvm-svn: 362050
* Fix test added in r361903 to work on Windows.Douglas Yung2019-05-291-3/+3
| | | | llvm-svn: 361937
* [Driver] Search the toolchain dir with -print-file-namePetr Hosek2019-05-291-0/+19
| | | | | | | | | | This is useful when looking for directories or files relative to the toolchain root, e.g. include/c++/v1. This change also adds a test to make sure this functionality doesn't regress in the future. Differential Revision: https://reviews.llvm.org/D62558 llvm-svn: 361903
* [Driver] Fix -working-directory issuesMichael J. Spencer2019-05-281-1/+9
| | | | | | | | | | | | | | | | Currently the `-working-directory` option does not actually impact the working directory for all of the clang driver, it only impacts how files are looked up to make sure they exist. This means that that clang passes the wrong paths to -fdebug-compilation-dir and -coverage-notes-file. This patch fixes that by changing all the places in the driver where we convert to absolute paths to use the VFS, and then calling setCurrentWorkingDirectory on the VFS. This also changes the default VFS for `Driver` to use a virtualized working directory, instead of changing the process's working directory. Differential Revision: https://reviews.llvm.org/D62271 llvm-svn: 361885
* Driver: support `/Zc:char8_t` and `/Zc:char8_t-`Saleem Abdulrasool2019-05-281-0/+7
| | | | | | | Update the `cl` emulation to support the `/Zc:char8_t[-]?` options as per the MSVC 2019.1 toolset. These are aliases for `-fchar8_t` and `-fno-char8_t`. llvm-svn: 361859
* [ARM] Replace fp-only-sp and d16 with fp64 and d32.Simon Tatham2019-05-281-25/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Those two subtarget features were awkward because their semantics are reversed: each one indicates the _lack_ of support for something in the architecture, rather than the presence. As a consequence, you don't get the behavior you want if you combine two sets of feature bits. Each SubtargetFeature for an FP architecture version now comes in four versions, one for each combination of those options. So you can still say (for example) '+vfp2' in a feature string and it will mean what it's always meant, but there's a new string '+vfp2d16sp' meaning the version without those extra options. A lot of this change is just mechanically replacing positive checks for the old features with negative checks for the new ones. But one more interesting change is that I've rearranged getFPUFeatures() so that the main FPU feature is appended to the output list *before* rather than after the features derived from the Restriction field, so that -fp64 and -d32 can override defaults added by the main feature. Reviewers: dmgreen, samparker, SjoerdMeijer Subscribers: srhines, javed.absar, eraman, kristof.beyls, hiraditya, zzheng, Petar.Avramovic, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D60691 llvm-svn: 361845
* [Driver] Change layout of per-target runtimes to resemble multiarchPetr Hosek2019-05-2727-24/+24
| | | | | | | | | | | | | | | | | | | | | | | 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-2610-13/+13
| | | | | | | | | | | | 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
* [Driver] Move the "-o OUT -x TYPE SRC.c" flags to the end of -cc1Reid Kleckner2019-05-233-54/+58
| | | | | | | | | | | New -cc1 arguments, such as -faddrsig, have started appearing after the input name. I personally find it convenient for the input to be the last argument to the compile command line, since I often need to edit it when running crash reproduction scripts. Differential Revision: https://reviews.llvm.org/D62270 llvm-svn: 361530
* lld-link, clang: Treat non-existent input files as possible spellos for ↵Nico Weber2019-05-232-18/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | option flags OptTable treats arguments starting with / that aren't a known option as filenames. This means lld-link's and clang-cl's typo correction for unknown flags didn't do spell checking for misspelled options that start with /. I first tried changing OptTable, but that got pretty messy, see PR41787 comments 2 and 3. Instead, let lld-link's and clang's (including clang-cl's) "file not found" diagnostic check if a non-existent file looks like it could be a mis-spelled option, and if so add a "did you mean" suggestion to the "file not found" diagnostic. While here, make formatting of a few diagnostics a bit more self-consistent. Fixes PR41787. Differential Revision: https://reviews.llvm.org/D62276 llvm-svn: 361518
* [runtimes] Move libunwind, libc++abi and libc++ to lib/$target/c++ and ↵Petr Hosek2019-05-222-2/+3
| | | | | | | | | | | | | | | | | 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
* Add back --sysroot support for darwin header search.James Y Knight2019-05-222-1/+45
| | | | | | | | | | | | | | | | Before e97b5f5cf37e ([clang][Darwin] Refactor header search path logic into the driver), both --sysroot and -isysroot worked to specify where to look for system and C++ headers on Darwin. However, that change caused clang to start ignoring --sysroot. This fixes the regression, and adds tests. (I also note that on all other platforms, clang seems to almost completely ignore -isysroot, but that's another issue...) Differential Revision: https://reviews.llvm.org/D62268 llvm-svn: 361429
OpenPOWER on IntegriCloud