summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver
Commit message (Collapse)AuthorAgeFilesLines
...
* Reapply "Frontend support for Nios2 target"Nikolai Bozhenov2017-06-091-0/+19
| | | | | | | | | | | | | | Summary: - Implements TargetInfo class for Nios2 target. - Enables handling of -march and -mcpu options for Nios2 target. - Definition of Nios2 builtin functions. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D33356 Author: belickim <mateusz.belicki@intel.com> llvm-svn: 305066
* [sanitizer-coverage] one more flavor of coverage: ↵Kostya Serebryany2017-06-081-3/+7
| | | | | | -fsanitize-coverage=inline-8bit-counters. Experimental so far, not documenting yet. Reapplying revisions 304630, 304631, 304632, 304673, see PR33308 llvm-svn: 305026
* Revert "Frontend support for Nios2 target"Nikolai Bozhenov2017-06-081-19/+0
| | | | | | As it breaks many buildbots. llvm-svn: 305002
* Frontend support for Nios2 target.Nikolai Bozhenov2017-06-081-0/+19
| | | | | | | | | | | | | | Summary: - Implements TargetInfo class for Nios2 target. - Enables handling of -march and -mcpu options for Nios2 target. - Definition of Nios2 builtin functions. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D33356 Author: belickim <mateusz.belicki@intel.com> llvm-svn: 304994
* [sanitizer-coverage] Allow using KASAN instrumentation with sancovAlexander Potapenko2017-06-081-2/+2
| | | | llvm-svn: 304984
* Reapply r304929 [mips] Add runtime options to enable/disable madd/sub.fmtPetar Jovanovic2017-06-071-0/+7
| | | | | | | | | | | | | | | | | The test in r304929 broke multiple buildbots as it expected mips target to be registered and available (which is not necessarily true). Updating the test with this condition. Original commit: [mips] Add runtime options to enable/disable madd.fmt and msub.fmt Add options to clang: -mmadd4 and -mno-madd4, use it to enable or disable generation of madd.fmt and similar instructions respectively, as per GCC. Patch by Stefan Maksimovic. llvm-svn: 304953
* Revert r304929 [mips] Add runtime options to enable/disable madd/sub.fmtPetar Jovanovic2017-06-071-7/+0
| | | | | | | | | | | | | | | Revert r304929 since the test broke buildbots. Original commit: [mips] Add runtime options to enable/disable madd.fmt and msub.fmt Add options to clang: -mmadd4 and -mno-madd4, use it to enable or disable generation of madd.fmt and similar instructions respectively, as per GCC. Patch by Stefan Maksimovic. llvm-svn: 304935
* [mips] Add runtime options to enable/disable madd.fmt and msub.fmtPetar Jovanovic2017-06-071-0/+7
| | | | | | | | | | | Add options to clang: -mmadd4 and -mno-madd4, use it to enable or disable generation of madd.fmt and similar instructions respectively, as per GCC. Patch by Stefan Maksimovic. Differential Revision: https://reviews.llvm.org/D33401 llvm-svn: 304929
* Only print registered targets for `--version`Dimitry Andric2017-06-071-4/+4
| | | | | | | | | | | | | | | | | | | Summary: In D33900, I added printing of the registered targets in clang's `PrintVersion` function, which is not only used for `--version` output, but also for `-v` (verbose mode) and `-###`. Especially the latter seems to trip up some test cases, so it is probably better to only print the registered targets for `--version`. Reviewers: nemanjai, mehdi_amini Reviewed By: nemanjai Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D33981 llvm-svn: 304899
* Update libdeps to add BinaryFormat, introduced in r304864.NAKAMURA Takumi2017-06-071-0/+1
| | | | llvm-svn: 304869
* Print registered targets in clang's version informationDimitry Andric2017-06-061-0/+5
| | | | | | | | | | | | | | | | | | | | | Summary: Other llvm tools display their registered targets when showing version information, but for some reason clang has never done this. To support this, D33899 adds the llvm parts, which make it possible to print version information to arbitrary raw_ostreams. This change adds a call to printRegisteredTargetsForVersion in clang's PrintVersion, and adds a raw_ostream parameter to two other PrintVersion functions. Reviewers: beanz, chandlerc, dberris, mehdi_amini, zturner Reviewed By: mehdi_amini Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D33900 llvm-svn: 304836
* [Driver] Don't force .exe suffix for lldShoaib Meenai2017-06-061-3/+1
| | | | | | | | | | | When cross-compiling to Windows using lld, we want the driver to invoke it as lld-link rather than lld-link.exe. On Windows, the LLVM fs functions take care of adding the .exe suffix where necessary, so we can just drop the addition in the toolchain entirely. Differential Revision: https://reviews.llvm.org/D33923 llvm-svn: 304761
* Revert "[sanitizer-coverage] one more flavor of coverage: ↵Renato Golin2017-06-051-7/+3
| | | | | | | | -fsanitize-coverage=inline-8bit-counters. Experimental so far, not documenting yet. (clang part)" This reverts commit r304631, as it broke ARM/AArch64 bots for 2 days. llvm-svn: 304697
* Fixed warning: enum constant in boolean context.Galina Kistanova2017-06-031-2/+3
| | | | llvm-svn: 304663
* [sanitizer-coverage] one more flavor of coverage: ↵Kostya Serebryany2017-06-031-3/+7
| | | | | | -fsanitize-coverage=inline-8bit-counters. Experimental so far, not documenting yet. (clang part) llvm-svn: 304631
* [clang-cl] Implement /diagnostic: flagReid Kleckner2017-05-311-2/+23
| | | | | | | | | | | | | | This flag has three possible values: caret, column, and classic. "caret" corresponds to clang's default mode, "column" removes the caret and code snippet, and "classic" emits nothing. Documentation is here: https://docs.microsoft.com/en-us/cpp/build/reference/diagnostics-compiler-diagnostic-options Implements the last part of PR33237 llvm-svn: 304316
* Fix incorrect spelling of calling conv flag and add -Wno-msvc-not-found to testReid Kleckner2017-05-311-4/+4
| | | | llvm-svn: 304308
* [clang-cl] Improve default calling convention flag handlingReid Kleckner2017-05-311-8/+30
| | | | | | | | | Ignore default CC flags that don't make sense for the target arch. This is consistent with MSVC. Addresses part of PR33237 llvm-svn: 304305
* [OpenMP][Driver] Put target binary for each offload target into aAlexey Bataev2017-05-301-6/+6
| | | | | | | | | | | | | | separate section, by Sergey Dmitriev Linker script that is generated by the clang driver for creating fat binary puts target binaries for all offload targets into a single ELF section .omp_offloading. This is not convenient because it greatly complicates operations with the final fat binary once it is linked. For example extracting target binary for a particular target from such fat executable would not be an easy task if you have more than one offload target. Attached patch changes clang driver to put target binary for each offload target into a separate ELF section .omp_offloading.<target triple>. Differential Revision: https://reviews.llvm.org/D33254 llvm-svn: 304229
* Appease more buildbots about r303873Jonathan Roelofs2017-05-251-0/+1
| | | | llvm-svn: 303898
* Don't defer to the GCC driver for linking arm-baremetalJonathan Roelofs2017-05-256-43/+346
| | | | | | | | | | | | | | | Also comes with a cmake cache for building the runtime bits: $ cmake <normal cmake flags> \ -DBAREMETAL_ARMV6M_SYSROOT=/path/to/sysroot \ -DBAREMETAL_ARMV7M_SYSROOT=/path/to/sysroot \ -DBAREMETAL_ARMV7EM_SYSROOT=/path/to/sysroot \ -C /path/to/clang/cmake/caches/BaremetalARM.cmake \ /path/to/llvm https://reviews.llvm.org/D33259 llvm-svn: 303873
* Driver must return non-zero code on errors in command lineSerge Pavlov2017-05-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is recommit of r302775, reverted in r302777 due to a fail in clang-tidy. Original mesage is below. Now if clang driver is given wrong arguments, in some cases it continues execution and returns zero code. This change fixes this behavior. The fix revealed some errors in clang test set. File test/Driver/gfortran.f90 added in r118203 checks forwarding gfortran flags to GCC. Now driver reports error on this file, because the option -working-directory implemented in clang differs from the option with the same name implemented in gfortran, in clang the option requires argument, in gfortran does not. In the file test/Driver/arm-darwin-builtin.c clang is called with options -fbuiltin-strcat and -fbuiltin-strcpy. These option were removed in r191435 and now clang reports error on this test. File arm-default-build-attributes.s uses option -verify, which is not supported by driver, it is cc1 option. Similarly, the file split-debug.h uses options -fmodules-embed-all-files and -fmodule-format=obj, which are not supported by driver. Other revealed errors are mainly mistypes. Differential Revision: https://reviews.llvm.org/D33013 llvm-svn: 303756
* [GSoC] Shell autocompletion for clangYuka Takahashi2017-05-231-0/+7
| | | | | | | | | | | | | | | | | Summary: This is a first patch for GSoC project, bash-completion for clang. To use this on bash, please run `source clang/utils/bash-autocomplete.sh`. bash-autocomplete.sh is code for bash-completion. Simple flag completion and path completion is available in this patch. Reviewers: teemperor, v.g.vassilev, ruiu, Bigcheese, efriedma Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D33237 llvm-svn: 303670
* Added LLVM_FALLTHROUGH to address gcc warning: this statement may fall through.Galina Kistanova2017-05-231-0/+1
| | | | llvm-svn: 303604
* clang-cl: Fix path-based MSVC version detectionHans Wennborg2017-05-171-2/+9
| | | | | | | | | The code wasn't taking the architecture-specific subdirectory into account. Differential Revision: https://reviews.llvm.org/D33258 llvm-svn: 303267
* Reverted r302775Serge Pavlov2017-05-111-2/+0
| | | | llvm-svn: 302777
* Driver must return non-zero code on errors in command lineSerge Pavlov2017-05-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now if clang driver is given wrong arguments, in some cases it continues execution and returns zero code. This change fixes this behavior. The fix revealed some errors in clang test set. File test/Driver/gfortran.f90 added in r118203 checks forwarding gfortran flags to GCC. Now driver reports error on this file, because the option -working-directory implemented in clang differs from the option with the same name implemented in gfortran, in clang the option requires argument, in gfortran does not. In the file test/Driver/arm-darwin-builtin.c clang is called with options -fbuiltin-strcat and -fbuiltin-strcpy. These option were removed in r191435 and now clang reports error on this test. File arm-default-build-attributes.s uses option -verify, which is not supported by driver, it is cc1 option. Similarly, the file split-debug.h uses options -fmodules-embed-all-files and -fmodule-format=obj, which are not supported by driver. Other revealed errors are mainly mistypes. Differential Revision: https://reviews.llvm.org/D33013 llvm-svn: 302775
* [Myriad] Pass -Xclang and -mllvm flags to moviCompileJames Y Knight2017-05-101-3/+5
| | | | | | | | Patch by Walter Lee. Differential Revision: https://reviews.llvm.org/D33020 llvm-svn: 302738
* [asan] A clang flag to enable ELF globals-gc.Evgeniy Stepanov2017-05-091-0/+10
| | | | | | | | | | | | This feature is subtly broken when the linker is gold 2.26 or earlier. See the following bug for details: https://sourceware.org/bugzilla/show_bug.cgi?id=19002 Since the decision needs to be made at compilation time, we can not test the linker version. The flag is off by default on ELF targets, and on otherwise. llvm-svn: 302591
* Remove unnecessary calls to MakeArgString.Evgeniy Stepanov2017-05-092-14/+14
| | | | llvm-svn: 302590
* [WebAssembly] Fix location and -flavor when running lldSam Clegg2017-05-091-1/+4
| | | | | | | | | | | | | Add the toolchain installation directory to the program path so that lld can be found. Change -flavor to wasm. Although this new flavor hasn't yet landed in upstream lld yet there are no point in passing wasm objects the gnu flavor. Differential Revision: https://reviews.llvm.org/D32976 llvm-svn: 302558
* [Driver] Don't enable -fsanitize-use-after-scope when ASan is disabledVedant Kumar2017-05-081-6/+5
| | | | | | | | | | | | When enabling any sanitizer, -fsanitize-use-after-scope is enabled by default. This doesn't actually turn ASan on, because we've been getting lucky and there are extra checks in BackendUtil that stop this from happening. However, this has been causing a behavior change: extra lifetime markers are emitted in some cases where they aren't needed or expected. llvm-svn: 302468
* [sanitizer-coverage] implement -fsanitize-coverage=no-prune,... instead of a ↵Kostya Serebryany2017-05-051-1/+4
| | | | | | hidden -mllvm flag. clang part. llvm-svn: 302320
* Multilib: add dump methodsJonathan Roelofs2017-05-051-0/+8
| | | | llvm-svn: 302296
* Document that Multilib flags must be actual flagsJonathan Roelofs2017-05-051-10/+12
| | | | | | | | This is because -print-multi-lib depends on them being flags for correctness. Fixes a case of this in the arm-android multilib selection logic. llvm-svn: 302207
* Driver: only inject libstdc++ paths when needed on CrossWindowsSaleem Abdulrasool2017-05-041-1/+1
| | | | | | | | When building with libc++ don't bother with injecting the libstdc++ search paths into the linker search path. This will make it easier to switch between ld and lld. llvm-svn: 302184
* Add support of the next Ubuntu (Ubuntu 17.10 - Artful Aardvark)Sylvestre Ledru2017-05-041-0/+1
| | | | llvm-svn: 302143
* [sanitizer-coverage] add a deprecation warning to the old sanitizer-coverage ↵Kostya Serebryany2017-05-031-2/+10
| | | | | | flag combinations llvm-svn: 301994
* The -coverage-file flag was removed in r280306, and this piece was missed; NFC.Aaron Ballman2017-05-011-1/+1
| | | | llvm-svn: 301796
* Enable -fno-split-dwarf-inlining even when -gsplit-dwarf isn't specified.David Blaikie2017-04-281-4/+6
| | | | | | | | | | | | | | Since -gsplit-dwarf is specified on a backend compile (in ThinLTO parlance) it isn't passed during the frontend compile (because no ELF object/dwo file is produced then), yet the -fno-split-dwarf-inlining value needs to be encoded in the LLVM DebugInfo metadata to have effect... So let it be specified & it'll be silently ignored if -gsplit-dwarf isn't used in the end, otherwise it'll be used on a per-cu basis depending on where it's specified in the frontend compile actions. llvm-svn: 301684
* [Hexagon] Handle -O4 when checking optimization levelKrzysztof Parzyszek2017-04-251-1/+2
| | | | llvm-svn: 301364
* [Hexagon] Set -ffp-contract=fast at -O3 unless explicitly specifiedKrzysztof Parzyszek2017-04-252-0/+37
| | | | llvm-svn: 301361
* Flag -fsanitize=fuzzer to enable libfuzzerGeorge Karpenkov2017-04-245-0/+38
| | | | | | | | | | Previously, adding libfuzzer to a project was a multi-step procedure, involving libfuzzer compilation, linking the library, and specifying coverage flags. With this change,libfuzzer can be enabled by adding a single -fsanitize=fuzzer flag instead. llvm-svn: 301212
* Move Split DWARF handling to an MC option/command line argument rather than ↵David Blaikie2017-04-211-2/+1
| | | | | | | | | | | | | | | | | | | using metadata Since Split DWARF needs to name the actual .dwo file that is generated, it can't be known at the time the llvm::Module is produced as it may be merged with other Modules before the object is generated and that object may be generated with any name. By passing the Split DWARF file name when LLVM is producing object code the .dwo file name in the object file can match correctly. The support for Split DWARF for implicit modules remains the same - using metadata to store the dwo name and dwo id so that potentially multiple skeleton CUs referring to different dwo files can be generated from one llvm::Module. llvm-svn: 301063
* Add support for openSUSE ARM TriplesIsmail Donmez2017-04-211-1/+3
| | | | | | | | | | | | | | 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
* Enable leak sanitizer builds for darwinFrancis Ricci2017-04-201-0/+3
| | | | | | | | | | | | | | Summary: Support for leak sanitizer on darwin has been added to compiler-rt, this patch adds compiler support. Reviewers: dexonsmith, compnerd Subscribers: alekseyshl, kubamracek, cfe-commits Differential Revision: https://reviews.llvm.org/D32192 llvm-svn: 300894
* [AVR] Add -mmcu option to the driverLeslie Zhai2017-04-201-0/+6
| | | | | | | | | | | | | | A patch by Peter Wu! Reviewers: jroelofs, xiangzhai Reviewed By: jroelofs, dylanmckay, xiangzhai Subscribers: dlj, dylanmckay, cfe-commits Differential Revision: https://reviews.llvm.org/D29827 llvm-svn: 300818
* [sanitizer-coverage] deprecate -fsanitize-coverage=trace-bbKostya Serebryany2017-04-191-5/+4
| | | | llvm-svn: 300767
* [sanitizer-coverage] deprecate -fsanitize-coverage=8bit-countersKostya Serebryany2017-04-191-4/+3
| | | | llvm-svn: 300744
* [sanitizer-coverage] deprecate some of the stale coverage variantsKostya Serebryany2017-04-191-27/+5
| | | | llvm-svn: 300738
OpenPOWER on IntegriCloud