summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/ToolChains/Linux.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* [Driver] Obey computed sysroot when finding libc++ headers.Dan Albert2018-05-021-2/+3
| | | | | | | | | | | | | | | | Summary: A handful of targets will try some default paths if --sysroot is not provided. If that is the case, it should be used for the libc++ header paths. Reviewers: srhines, EricWF Reviewed By: srhines Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D45292 llvm-svn: 331389
* [Driver] Use the per-API level Android library directories.Dan Albert2018-04-171-0/+16
| | | | | | | | | | | | | | | | Summary: Android sysroots contain libraries for each OS version, as well as a handful of unversioned libraries in the typical multiarch directory. Reviewers: srhines, eugenis, george.burgess.iv Reviewed By: eugenis Subscribers: javed.absar, cfe-commits Differential Revision: https://reviews.llvm.org/D45290 llvm-svn: 330213
* hwasan: add -fsanitize=kernel-hwaddress flagAndrey Konovalov2018-04-131-1/+3
| | | | | | | | | This patch adds -fsanitize=kernel-hwaddress flag, that essentially enables -hwasan-kernel=1 -hwasan-recover=1 -hwasan-match-all-tag=0xff. Differential Revision: https://reviews.llvm.org/D45046 llvm-svn: 330044
* [Driver] Allow drivers to add multiple libc++ include pathsPetr Hosek2018-04-101-3/+4
| | | | | | | | | | | 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
* 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
* [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
* [HWASan] Port HWASan to Linux x86-64 (clang)Alex Shlyapnikov2018-03-231-1/+1
| | | | | | | | | | | | 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
* [Driver] Add support for mips32 and scudoSimon Dardis2018-01-251-1/+3
| | | | | | | | | | | r317337 missed that scudo is supported on MIPS32, so permit that option for MIPS32. Reviewers: cryptoad, atanasyan Differential Revision: https://reviews.llvm.org/D42416 llvm-svn: 323412
* [RISCV] Add the RISCV target and compiler driverAlex Bradbury2018-01-111-0/+23
| | | | | | | | | As RV64 codegen has not yet been upstreamed into LLVM, we focus on RV32 driver support (RV64 to follow). Differential Revision: https://reviews.llvm.org/D39963 llvm-svn: 322276
* Revert 320391: Certain targets are failing, pulling back to diagnose.Erich Keane2017-12-111-12/+0
| | | | llvm-svn: 320398
* For Linux/gnu compatibility, preinclude <stdc-predef.h> if the file is availableErich Keane2017-12-111-0/+12
| | | | | | | | | | | | | | | | | | | | As reported in llvm bugzilla 32377. Here’s a patch to add preinclude of stdc-predef.h. The gcc documentation says “On GNU/Linux, <stdc-predef.h> is pre-included.” See https://gcc.gnu.org/gcc-4.8/porting_to.html; The preinclude is inhibited with –ffreestanding. Basically I fixed the failing test cases by adding –ffreestanding which inhibits this behavior. I fixed all the failing tests, including some in extra/test, there's a separate patch for that which is linked here Note: this is a recommit after a test failure took down the original (r318669) Patch By: mibintc Differential Revision: https://reviews.llvm.org/D34158 llvm-svn: 320391
* Hardware-assisted AddressSanitizer (clang part).Evgeniy Stepanov2017-12-091-0/+2
| | | | | | | | | | | | | | Summary: Driver, frontend and LLVM codegen for HWASan. A clone of ASan, basically. Reviewers: kcc, pcc, alekseyshl Subscribers: srhines, javed.absar, cfe-commits Differential Revision: https://reviews.llvm.org/D40936 llvm-svn: 320232
* Revert r318669/318694Erich Keane2017-11-201-13/+0
| | | | | | Broke some libclang tests, so reverting for now. llvm-svn: 318698
* For Linux/gnu compatibility, preinclude <stdc-predef.h> if the file is availableErich Keane2017-11-201-0/+13
| | | | | | | | | | | | | | | | | | | | | | As reported in llvm bugzilla 32377. Here’s a patch to add preinclude of stdc-predef.h. The gcc documentation says “On GNU/Linux, <stdc-predef.h> is pre-included.” See https://gcc.gnu.org/gcc-4.8/porting_to.html; The preinclude is inhibited with –ffreestanding. Basically I fixed the failing test cases by adding –ffreestanding which inhibits this behavior. I fixed all the failing tests, including some in extra/test, there's a separate patch for that which is linked here Patch By: mibintc Differential Revision: https://reviews.llvm.org/D34158 llvm-svn: 318669
* [Driver] add initial support for alpine linuxMartell Malone2017-11-191-3/+8
| | | | | | | | | | | | set -pie as default for musl linux targets add detection of alpine linux append appropriate compile flags for alpine Reviewers: rnk Differential Revision: https://reviews.llvm.org/D39588 llvm-svn: 318608
* [Driver] Add Scudo as a possible -fsanitize= optionKostya Kortchinsky2017-11-031-2/+3
| | | | | | | | | | | | | | | | | | | | | | Summary: This change adds Scudo as a possible Sanitizer option via -fsanitize=. This allows for easier static & shared linking of the Scudo library, it allows us to enforce PIE (otherwise the security of the allocator is moot), and check for incompatible Sanitizers combo. In its current form, Scudo is not compatible with any other Sanitizer, but the plan is to make it work in conjunction with UBsan (-fsanitize=scudo,undefined), which will require additional work outside of the scope of this change. Reviewers: eugenis, kcc, alekseyshl Reviewed By: eugenis, alekseyshl Subscribers: llvm-commits, srhines Differential Revision: https://reviews.llvm.org/D39334 llvm-svn: 317337
* [LSan] Enable -fsanitize=leak for PPC64 Linux.Alex Shlyapnikov2017-10-261-1/+1
| | | | | | | | | | | | Summary: . Reviewers: eugenis Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D39312 llvm-svn: 316636
* Enable -pie and --enable-new-dtags by default on Android.Evgeniy Stepanov2017-10-251-2/+5
| | | | | | | | | | | | | | | Summary: Also enable -no-pie on Gnu toolchain (previously available on Darwin only). Non-PIE executables won't even start on recent Android, and DT_RPATH is ignored by the loader. Reviewers: srhines, danalbert Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D38430 llvm-svn: 316606
* Add -fsanitize=fuzzer-no-link flag to the driver.George Karpenkov2017-08-111-0/+1
| | | | | | | | | | | The flag will perform instrumentation necessary to the fuzzing, but will NOT link libLLVMFuzzer.a library. Necessary when modifying CFLAGS for projects which may produce executables as well as a fuzzable target. Differential Revision: https://reviews.llvm.org/D36600 llvm-svn: 310733
* Fixed warning: enum constant in boolean context.Galina Kistanova2017-06-031-2/+3
| | | | llvm-svn: 304663
* Don't defer to the GCC driver for linking arm-baremetalJonathan Roelofs2017-05-251-43/+0
| | | | | | | | | | | | | | | 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
* Flag -fsanitize=fuzzer to enable libfuzzerGeorge Karpenkov2017-04-241-0/+1
| | | | | | | | | | 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
* [lsan] Enable LSan on arm Linux, clang partMaxim Ostapenko2017-04-111-1/+4
| | | | | | | | This is a compiler part of https://reviews.llvm.org/D29586. Enable LSan on arm Linux. Differential Revision: https://reviews.llvm.org/D31760 llvm-svn: 299921
* [Driver] Consolidate tools and toolchains by target platform. (NFC)David L. Jones2017-03-081-0/+898
Summary: (This is a move-only refactoring patch. There are no functionality changes.) This patch splits apart the Clang driver's tool and toolchain implementation files. Each target platform toolchain is moved to its own file, along with the closest-related tools. Each target platform toolchain has separate headers and implementation files, so the hierarchy of classes is unchanged. There are some remaining shared free functions, mostly from Tools.cpp. Several of these move to their own architecture-specific files, similar to r296056. Some of them are only used by a single target platform; since the tools and toolchains are now together, some helpers now live in a platform-specific file. The balance are helpers related to manipulating argument lists, so they are now in a new file pair, CommonArgs.h and .cpp. I've tried to cluster the code logically, which is fairly straightforward for most of the target platforms and shared architectures. I think I've made reasonable choices for these, as well as the various shared helpers; but of course, I'm happy to hear feedback in the review. There are some particular things I don't like about this patch, but haven't been able to find a better overall solution. The first is the proliferation of files: there are several files that are tiny because the toolchain is not very different from its base (usually the Gnu tools/toolchain). I think this is mostly a reflection of the true complexity, though, so it may not be "fixable" in any reasonable sense. The second thing I don't like are the includes like "../Something.h". I've avoided this largely by clustering into the current file structure. However, a few of these includes remain, and in those cases it doesn't make sense to me to sink an existing file any deeper. Reviewers: rsmith, mehdi_amini, compnerd, rnk, javed.absar Subscribers: emaste, jfb, danalbert, srhines, dschuff, jyknight, nemanjai, nhaehnle, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D30372 llvm-svn: 297250
OpenPOWER on IntegriCloud