summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver
Commit message (Collapse)AuthorAgeFilesLines
...
* [Driver] Don't forward -m[no-]unaligned-access options to GCC when ↵Chad Rosier2018-04-111-0/+7
| | | | | | | | assembling/linking Differential Revision: https://reviews.llvm.org/D45092 llvm-svn: 329810
* [PowerPC] Option for secure plt modeStrahinja Petrovic2018-04-112-0/+17
| | | | | | | | | This patch enables option for secure plt mode in clang (-msecure-plt). Differential Revision: https://reviews.llvm.org/D44921 llvm-svn: 329795
* Adding fuzzer flags support to OpenBSD driverDean Michael Berris2018-04-111-1/+4
| | | | | | | | | | | | | | Summary: - Following-up the sanitizer's part commit https://reviews.llvm.org/rCRT329631, we enable fuzzer flags. Reviewers: brad, thakis, dberris Reviewed By: dberris Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D44878 llvm-svn: 329779
* [XRay][clang+compiler-rt] Support build-time mode selectionDean Michael Berris2018-04-112-6/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch implements the `-fxray-modes=` flag which allows users building with XRay instrumentation to decide which modes to pre-package into the binary being linked. The default is the status quo, which will link all the available modes. For this to work we're also breaking apart the mode implementations (xray-fdr and xray-basic) from the main xray runtime. This gives more granular control of which modes are pre-packaged, and picked from clang's invocation. This fixes llvm.org/PR37066. Note that in the future, we may change the default for clang to only contain the profiling implementation under development in D44620, when that implementation is ready. Reviewers: echristo, eizan, chandlerc Reviewed By: echristo Subscribers: mgorny, mgrang, cfe-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D45474 llvm-svn: 329772
* Revert "Handle the default case"Petr Hosek2018-04-101-2/+0
| | | | | | This reverts commit r329758. llvm-svn: 329760
* Handle the default casePetr Hosek2018-04-101-0/+2
| | | | | | | | This was omitted in D45422 resulting in a warning. Differential Revision: https://reviews.llvm.org/D45499 llvm-svn: 329758
* [Driver] Handle the default case missed in r329748.Chad Rosier2018-04-101-0/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D45499 llvm-svn: 329754
* [Driver] Allow drivers to add multiple libc++ include pathsPetr Hosek2018-04-1021-59/+89
| | | | | | | | | | | This allows toolchain drivers to add multiple libc++ include paths akin to libstdc++. This is useful in multiarch setup when some headers might be in target specific include directory. There should be no functional change. Differential Revision: https://reviews.llvm.org/D45422 llvm-svn: 329748
* [CUDA] Added --[no-]cuda-include-ptx=sm_XX|all option.Artem Belevich2018-04-101-0/+19
| | | | | | | | | | | | | | Currently we always include PTX into the fatbin along with the GPU code.It about doubles the size of the GPU binary we need to carry in the executable. These options allow control inclusion of PTX into GPU binary. This patch does not change the defaults, though we may consider making no-PTX the default in the future. Differential Revision: https://reviews.llvm.org/D45495 llvm-svn: 329737
* [XRay][llvm+clang] Consolidate attribute list filesDean Michael Berris2018-04-091-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This change consolidates the always/never lists that may be provided to clang to externally control which functions should be XRay instrumented by imbuing attributes. The files follow the same format as defined in https://clang.llvm.org/docs/SanitizerSpecialCaseList.html for the sanitizer blacklist. We also deprecate the existing `-fxray-instrument-always=` and `-fxray-instrument-never=` flags, in favour of `-fxray-attr-list=`. This fixes http://llvm.org/PR34721. Reviewers: echristo, vlad.tsyrklevich, eugenis Reviewed By: vlad.tsyrklevich Subscribers: llvm-commits, cfe-commits Differential Revision: https://reviews.llvm.org/D45357 llvm-svn: 329543
* [Driver] Update GCC libraries detection logic for Gentoo.Manoj Gupta2018-04-072-23/+80
| | | | | | | | | | | | | | | | | Summary: 1. Find GCC's LDPATH from the actual GCC config file. 2. Avoid picking libraries from a similar named tuple if the exact tuple is installed. Reviewers: mgorny, chandlerc, thakis, rnk Reviewed By: mgorny, rnk Subscribers: cfe-commits, mgorny Differential Revision: https://reviews.llvm.org/D45233 llvm-svn: 329512
* Recommit r329442: Generate Libclang invocation reproducers using a newAlex Lorenz2018-04-071-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | -cc1gen-reproducer driver option The recommit fixes: - An MSAN failure (CCPrintOptions wasn't initialized in the Driver) - Ensures that the strings in the libclang invocation files are escaped Original message: This commit is a follow up to the previous work that recorded Libclang invocations into temporary files: r319702. It adds a new -cc1 mode to clang: -cc1gen-reproducer. The goal of this mode is to generate Clang reproducer files for Libclang tool invocation. The JSON format in the invocation files is not really intended to be stable, so Libclang and Clang should be of the same version when generating reproducers. The new mode emits the information about the temporary files and Libclang-specific information to stdout using JSON. rdar://35322614 Differential Revision: https://reviews.llvm.org/D40983 llvm-svn: 329465
* Revert r329442 "Generate Libclang invocation reproducers using a newAlex Lorenz2018-04-061-10/+2
| | | | | | | | -cc1gen-reproducer driver option" The tests are failing on some bots llvm-svn: 329447
* Generate Libclang invocation reproducers using a new -cc1gen-reproducerAlex Lorenz2018-04-061-2/+10
| | | | | | | | | | | | | | | | | | | | driver option This commit is a follow up to the previous work that recorded Libclang invocations into temporary files: r319702. It adds a new -cc1 mode to clang: -cc1gen-reproducer. The goal of this mode is to generate Clang reproducer files for Libclang tool invocation. The JSON format in the invocation files is not really intended to be stable, so Libclang and Clang should be of the same version when generating reproducers. The new mode emits the information about the temporary files and Libclang-specific information to stdout using JSON. rdar://35322614 Differential Revision: https://reviews.llvm.org/D40983 llvm-svn: 329442
* Fix typos in clangAlexander Kornienko2018-04-065-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found via codespell -q 3 -I ../clang-whitelist.txt Where whitelist consists of: archtype cas classs checkk compres definit frome iff inteval ith lod methode nd optin ot pres statics te thru Patch by luzpaz! (This is a subset of D44188 that applies cleanly with a few files that have dubious fixes reverted.) Differential revision: https://reviews.llvm.org/D44188 llvm-svn: 329399
* [XRay][clang] Add a flag to enable/disable linking XRay deps explicitlyDean Michael Berris2018-04-061-0/+4
| | | | | | | | | | | | | | | | | | | | Summary: This change introduces `-fxray-link-deps` and `-fnoxray-link-deps`. The `-fnoxray-link-deps` allows for directly controlling which specific XRay runtime to link. The default is for clang to link the XRay runtime that is shipped with the compiler (if there are any), but users may want to explicitly add the XRay dependencies from other locations or other means. Reviewers: eizan, echristo, chandlerc Reviewed By: eizan Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D45354 llvm-svn: 329376
* [XRay][clang] Consolidate runtime and link-time flag processing (NFC)Dean Michael Berris2018-04-065-81/+37
| | | | | | | | | | | | | | | | | | | Summary: This change fixes http://llvm.org/PR36985 to define a single place in CommonArgs.{h,cpp} where XRay runtime flags and link-time dependencies are processed for all toolchains that support XRay instrumentation. This is a refactoring of the same functionality spread across multiple toolchain definitions. Reviewers: echristo, devnexen, eizan Reviewed By: eizan Subscribers: emaste, cfe-commits Differential Revision: https://reviews.llvm.org/D45243 llvm-svn: 329372
* CMake option to allow enabling experimental new pass manager by defaultPetr Hosek2018-04-061-1/+1
| | | | | | | | | This CMake flag allows setting the default value for the -f[no]-experimental-new-pass-manager flag. Differential Revision: https://reviews.llvm.org/D44330 llvm-svn: 329366
* Disable -fmerge-all-constants as default.Manoj Gupta2018-04-051-3/+3
| | | | | | | | | | | | | | | | | | | Summary: "-fmerge-all-constants" is a non-conforming optimization and should not be the default. It is also causing miscompiles when building Linux Kernel (https://lkml.org/lkml/2018/3/20/872). Fixes PR18538. Reviewers: rjmccall, rsmith, chandlerc Reviewed By: rsmith, chandlerc Subscribers: srhines, cfe-commits Differential Revision: https://reviews.llvm.org/D45289 llvm-svn: 329300
* Enable msan unconditionally on Linux.Evgeniy Stepanov2018-04-041-2/+1
| | | | | | | | | | | | | | | | | | Memory sanitizer compatibility are already done in MemorySanitizer::doInitialization. It verifies whether the necessary offsets exist and bails out if not. For this reason it is no good to duplicate two checks in two projects. This patch removes clang check and postpones msan compatibility validation till MemorySanitizer::doInitialization. Another reason for this patch is to allow using msan with any CPU (given compatible runtime) and custom mapping provided via the arguments added by https://reviews.llvm.org/D44926. Patch by vit9696. Differential Revision: https://reviews.llvm.org/D44927 llvm-svn: 329241
* AArch64: Implement support for the shadowcallstack attribute.Peter Collingbourne2018-04-042-1/+12
| | | | | | | | | | | | The implementation of shadow call stack on aarch64 is quite different to the implementation on x86_64. Instead of reserving a segment register for the shadow call stack, we reserve the platform register, x18. Any function that spills lr to sp also spills it to the shadow call stack, a pointer to which is stored in x18. Differential Revision: https://reviews.llvm.org/D45239 llvm-svn: 329236
* [Driver] Include the Android multiarch includes.Dan Albert2018-04-041-1/+22
| | | | | | | | | | | | | | | | Summary: Most Android headers live in a single directory, but a small handful live in multiarch directories. Reviewers: srhines Reviewed By: srhines Subscribers: javed.absar, cfe-commits Differential Revision: https://reviews.llvm.org/D44995 llvm-svn: 329234
* [XRay][clang] Allow clang to build XRay instrumented binaries in OpenBSDDean Michael Berris2018-04-042-1/+30
| | | | | | | | | | | | | | | | | | | Summary: This patch was originally reviewed in D45126. It enables clang to add the XRay runtime and the link-time dependencies for XRay instrumentation in OpenBSD. Landing for devnexen. Reviewers: brad, dberris Subscribers: dberris, krytarowski, cfe-commits Author: devnexen Differential Revision: https://reviews.llvm.org/D45126 llvm-svn: 329183
* Add the -fsanitize=shadow-call-stack flagVlad Tsyrklevich2018-04-032-1/+6
| | | | | | | | | | | | | | | | | Summary: Add support for the -fsanitize=shadow-call-stack flag which causes clang to add ShadowCallStack attribute to functions compiled with that flag enabled. Reviewers: pcc, kcc Reviewed By: pcc, kcc Subscribers: cryptoad, cfe-commits, kcc Differential Revision: https://reviews.llvm.org/D44801 llvm-svn: 329122
* [driver][darwin] Do not infer -simulator environment for non-simulator SDKsAlex Lorenz2018-04-031-5/+19
| | | | | | rdar://36369832 llvm-svn: 329110
* [Hexagon] Remove -mhvx-double and the corresponding subtarget featureKrzysztof Parzyszek2018-04-031-18/+8
| | | | | | | Specifying the HVX vector length should be done via the -mhvx-length option. llvm-svn: 329077
* [Driver] Wire up the -f[no-]rtlib-add-rpath flag and testsPetr Hosek2018-04-021-0/+4
| | | | | | | | | | D30700 added the -f[no-]rtlib-add-rpath flag, but that flag was never wired up in the driver and tests were updated to check whether it actually does anything. This patch wires up the flag and updates test. Differential Revision: https://reviews.llvm.org/D45145 llvm-svn: 329032
* [PATCH] [RISCV] Verify the input value of -march=Shiva Chen2018-03-281-6/+67
| | | | | | | | | | | | | | Summary: This patch doing more check and verify the -march= string and will issue an error if it's a invalid combination. Reviewers: asb, apazos Differential Revision: https://reviews.llvm.org/D44189 Patch by Kito Cheng. llvm-svn: 328690
* [Driver] Add fuzzer-no-link into the list of supported Fuchsia sanitizersPetr Hosek2018-03-271-0/+1
| | | | | | | | This is needed in addition to fuzzer in order to use libFuzzer. Differential Revision: https://reviews.llvm.org/D44947 llvm-svn: 328672
* [clang] Change std::sort to llvm::sort in response to r327219Mandeep Singh Grang2018-03-271-5/+5
| | | | | | | | | | | r327219 added wrappers to std::sort which randomly shuffle the container before sorting. This will help in uncovering non-determinism caused due to undefined sorting order of objects having the same key. To make use of that infrastructure we need to invoke llvm::sort instead of std::sort. llvm-svn: 328636
* [HWASan] Port HWASan to Linux x86-64 (clang)Alex Shlyapnikov2018-03-232-2/+2
| | | | | | | | | | | | Summary: Porting HWASan to Linux x86-64, the third of the three patches, clang part. Reviewers: eugenis Subscribers: cryptoad, cfe-commits Differential Revision: https://reviews.llvm.org/D44745 llvm-svn: 328361
* [CUDA] Disable LTO for device-side compilations.Artem Belevich2018-03-212-5/+10
| | | | | | | | | | | | | | This fixes host-side LTO during CUDA compilation. Before, LTO pipeline construction was clashing with CUDA pipeline construction. At the moment there's no point doing LTO on device side as each device-side TU is a complete program. We will need to figure out compilation pipeline construction for the device-side LTO when we have working support for multi-TU device-side CUDA compilation. Differential Revision: https://reviews.llvm.org/D44691 llvm-svn: 328161
* [Driver] Fix some Clang-tidy modernize and Include What You Use warnings; ↵Eugene Zelenko2018-03-205-94/+110
| | | | | | other minor fixes (NFC). llvm-svn: 328044
* [OpenMP] Add flag for linking runtime bitcode libraryGheorghe-Teodor Bercea2018-03-131-0/+38
| | | | | | | | | | | | | | Summary: This patch adds an additional flag to the OpenMP device offloading toolchain to link in the runtime library bitcode. Reviewers: Hahnfeld, ABataev, carlo.bertolli, caomhin, grokos, hfinkel Reviewed By: ABataev, grokos Subscribers: jholewinski, guansong, cfe-commits Differential Revision: https://reviews.llvm.org/D43197 llvm-svn: 327460
* Revert revision 327438.Gheorghe-Teodor Bercea2018-03-131-38/+0
| | | | llvm-svn: 327447
* [OpenMP] Add flag for linking runtime bitcode libraryGheorghe-Teodor Bercea2018-03-131-0/+39
| | | | | | | | | | | | | | Summary: This patch adds an additional flag to the OpenMP device offloading toolchain to link in the runtime library bitcode. Reviewers: Hahnfeld, ABataev, carlo.bertolli, caomhin, grokos, hfinkel Reviewed By: ABataev, grokos Subscribers: jholewinski, guansong, cfe-commits Differential Revision: https://reviews.llvm.org/D43197 llvm-svn: 327438
* [Driver] Update the comment about incompatible sanitizersPetr Hosek2018-03-121-1/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D44371 llvm-svn: 327249
* [Driver] Pass Default=false to hasFlag.Akira Hatanaka2018-03-101-1/+1
| | | | | | I forgot to do this in r326530. llvm-svn: 327204
* Don't use -pie in relocatable link.Evgeniy Stepanov2018-03-091-1/+2
| | | | | | | | | | | | | | Summary: Android, in particular, got PIE enabled by default in r316606. It resulted in relocatable links passing both -r and -pie to the linker, which is not allowed. Reviewers: srhines Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D44229 llvm-svn: 327165
* [Driver] Enable SafeStack by default on FuchsiaPetr Hosek2018-03-072-0/+9
| | | | | | | | This is already used throughout the entire system, so make it a default. Differential Revision: https://reviews.llvm.org/D44065 llvm-svn: 326867
* [Driver] Automatically disable incompatible default sanitizersPetr Hosek2018-03-071-13/+23
| | | | | | | | | | When a sanitizer incompatible with one of the default sanitizers is explicitly enabled, automatically disable all the conflicting default sanitizers. Differential Revision: https://reviews.llvm.org/D44064 llvm-svn: 326860
* [msvc] Allow MSVC toolchain driver to find the aarch64 / arm64 cross-compiler.Reid Kleckner2018-03-051-0/+6
| | | | | | | | | | | | | | | Starting with the Fall Creators Update, Windows 10 Desktop can run on machines that are powered by aarch64 processors. Microsoft call the aarch64 architecture "arm64". This patch maps ArchType::aarch64 to "arm64" to allow the MSVC toolchain driver to find the aarch64 / arm64 cross-compiler. Patch by Chris January Differential Revision: https://reviews.llvm.org/D44087 llvm-svn: 326744
* [Bash-autocompletion] Fixed formattingYuka Takahashi2018-03-051-3/+4
| | | | | | Fixed a trivial formatting and indent. llvm-svn: 326685
* [Bash-autocompletion] Pass all flags in shell command-line to ClangYuka Takahashi2018-03-051-19/+31
| | | | | | | | | | | | | | | | | | | | Previously, we passed "#" to --autocomplete to indicate to enable cc1 flags. For example, when -cc1 or -Xclang was passed to bash, bash executed `clang --autocomplete=#-<flag they want to complete>`. However, this was not a good implementation because it depends -Xclang and -cc1 parsing to shell. So I changed this to pass all flags shell has, so that Clang can handle them internally. I had to change many testcases because API spec changed quite a lot. Reviewers: teemperor, v.g.vassilev Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D39342 llvm-svn: 326684
* OpenBSD Driver basic sanitiser supportKamil Rytarowski2018-03-032-1/+24
| | | | | | | | | | | | | | | | | | Summary: Basic support of Sanitiser to follow-up ubsan support in compiler-rt. Needs to use lld instead of base ld to be fully workable. Patch by: David CARLIER Reviewers: krytarowski, vitalybuka, kettenis Reviewed By: vitalybuka Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D43961 llvm-svn: 326648
* Better OpenBSD frontend supportKamil Rytarowski2018-03-033-3/+9
| | | | | | | | | | | | | | | | | | Summary: - Like other *BSD, conditioning certain flags to pass - To prepare future OpenBSD sanitisers. Patch by: David CARLIER Reviewers: dlj, krytarowski, vitalybuka Reviewed By: vitalybuka Subscribers: krytarowski, cfe-commits Differential Revision: https://reviews.llvm.org/D43818 llvm-svn: 326645
* Add an option to disable tail-call optimization for escaping blocks.Akira Hatanaka2018-03-021-0/+3
| | | | | | | | | | | | | This makes it easier to debug crashes and hangs in block functions since users can easily find out where the block is called from. The option doesn't disable tail-calls from non-escaping blocks since non-escaping blocks are not as hard to debug as escaping blocks. rdar://problem/35758207 Differential Revision: https://reviews.llvm.org/D43841 llvm-svn: 326530
* [Driver] Pass -f[no-]emulated-tls and set up ExplicitEmulatedTLSChih-Hung Hsieh2018-03-011-7/+3
| | | | | | | | | | Since LLVM r326341, default EmulatedTLS mode is decided in backend according to target triple. Any front-end should pass -f[no]-emulated-tls to backend and set up ExplicitEmulatedTLS only when the flags are used. Differential Revision: https://reviews.llvm.org/D43965 llvm-svn: 326499
* [OpenMP] Extend NVPTX SPMD implementation of combined constructsCarlo Bertolli2018-02-281-0/+5
| | | | | | | | Differential Revision: https://reviews.llvm.org/D43852 This patch extends the SPMD implementation to all target constructs and guards this implementation under a new flag. llvm-svn: 326368
* [Hexagon] Add -ffixed-r19 driver option and translate it to +reserved-r19Krzysztof Parzyszek2018-02-281-5/+9
| | | | llvm-svn: 326366
OpenPOWER on IntegriCloud