summaryrefslogtreecommitdiffstats
path: root/lib/Driver/ToolChains
Commit message (Collapse)AuthorAgeFilesLines
* Merging r325651:Simon Dardis2018-04-112-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r325651 | sdardis | 2018-02-21 00:05:05 +0000 (Wed, 21 Feb 2018) | 34 lines [mips] Spectre variant two mitigation for MIPSR2 This patch provides mitigation for CVE-2017-5715, Spectre variant two, which affects the P5600 and P6600. It provides the option -mindirect-jump=hazard, which instructs the LLVM backend to replace indirect branches with their hazard barrier variants. This option is accepted when targeting MIPS revision two or later. The migitation strategy suggested by MIPS for these processors is to use two hazard barrier instructions. 'jalr.hb' and 'jr.hb' are hazard barrier variants of the 'jalr' and 'jr' instructions respectively. These instructions impede the execution of instruction stream until architecturally defined hazards (changes to the instruction stream, privileged registers which may affect execution) are cleared. These instructions in MIPS' designs are not speculated past. These instructions are used with the option -mindirect-jump=hazard when branching indirectly and for indirect function calls. These instructions are defined by the MIPS32R2 ISA, so this mitigation method is not compatible with processors which implement an earlier revision of the MIPS ISA. Implementation note: I've opted to provide this as an -mindirect-jump={hazard,...} style option in case alternative mitigation methods are required for other implementations of the MIPS ISA in future, e.g. retpoline style solutions. Reviewers: atanasyan Differential Revision: https://reviews.llvm.org/D43487 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_60@329799 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r323360:Hans Wennborg2018-01-301-1/+1
| | | | | | | | | | | | ------------------------------------------------------------------------ r323360 | kparzysz | 2018-01-24 19:42:19 +0100 (Wed, 24 Jan 2018) | 2 lines [Hexagon] Accept lowercase b in -hvx-length=64b and -hvx-length=128b ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_60@323769 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r323485:Hans Wennborg2018-01-301-0/+31
| | | | | | | | | | | | | ------------------------------------------------------------------------ r323485 | aemerson | 2018-01-26 01:27:22 +0100 (Fri, 26 Jan 2018) | 3 lines [Driver] Add an -fexperimental-isel driver option to enable/disable GlobalISel. Differential Revision: https://reviews.llvm.org/D42276 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_60@323745 91177308-0d34-0410-b5e6-96231b3b80d8
* [driver][darwin] Take the OS version from -m<os>-version-min argument whenAlex Lorenz2017-12-291-14/+33
| | | | | | | | | | | -target has no OS version This ensures that Clang won't warn about redundant -m<os>-version-min argument for an invocation like `-target x86_64-apple-macos -mmacos-version-min=10.11` git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321559 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Initial support for `-fopenmp-simd` option.Alexey Bataev2017-12-291-0/+4
| | | | | | Added basic support for `-fopenmp-simd` options. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321558 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid int to string conversion in Twine or raw_ostream contexts.Benjamin Kramer2017-12-284-24/+17
| | | | | | | Some output changes from uppercase hex to lowercase hex, no other functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321526 91177308-0d34-0410-b5e6-96231b3b80d8
* [scudo] Add -fsanitize=scudo option to FuchsiaPetr Hosek2017-12-211-0/+1
| | | | | | | | | | | | | | Apparently the -fsanitize flag hadn't been added for Scudo upstream yet. Patch By: flowerhack Reviewers: cryptoad, alekseyshl, mcgrathr, phosek Reviewed By: mcgrathr, phosek Differential Revision: https://reviews.llvm.org/D41413 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321314 91177308-0d34-0410-b5e6-96231b3b80d8
* [darwin][driver] Warn about mismatching -<os>-version-min rather thanAlex Lorenz2017-12-201-4/+21
| | | | | | | | | | | superfluous -<os>-version-min compiler option rdar://35813850 Differential Revision: https://reviews.llvm.org/D41425 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321145 91177308-0d34-0410-b5e6-96231b3b80d8
* [driver][darwin] Set the 'simulator' environment when it's specifiedAlex Lorenz2017-12-191-6/+21
| | | | | | | | | | | in '-target' rdar://35742458 Differential Revision: https://reviews.llvm.org/D41076 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321102 91177308-0d34-0410-b5e6-96231b3b80d8
* [driver][darwin] Take the OS version specified in "-target" as the targetAlex Lorenz2017-12-191-47/+69
| | | | | | | | | | | | | | OS instead of inferring it from SDK / environment The OS version is specified in -target should be used instead of the one in an environment variable / SDK name. rdar://35813850 Differential Revision: https://reviews.llvm.org/D40998 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321099 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang] -foptimization-record-file= should imply -fsave-optimization-recordJonas Devlieghere2017-12-191-0/+1
| | | | | | | | | | | | | | | | | The Clang option -foptimization-record-file= controls which file an optimization record is output to. Optimization records are output if you use the Clang option -fsave-optimization-record. If you specify the first option without the second, you get a warning that the command line argument was unused. Passing -foptimization-record-file= should imply -fsave-optimization-record. This fixes PR33670 Patch by: Dmitry Venikov <venikov@phystech.edu> Differential revision: https://reviews.llvm.org/D39834 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321090 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename sparc-myriad-elf triplet to sparc-myriad-rtemsWalter Lee2017-12-191-4/+5
| | | | | | | | | | | | | Summary: This is to be consistent with latest Movidius MDK releases. Also, don't inherit any gcc paths for shave triple. Reviewers: jyknight Subscribers: emaste, fedor.sergeev Differential Revision: https://reviews.llvm.org/D41295 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321080 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach clang/NetBSD about additional dependencies for sanitizersKamil Rytarowski2017-12-191-0/+6
| | | | | | | | | | | | | | | | | | | | | | Summary: Sanitizers on NetBSD require additional linkage: - libutil for forkpty(3) - libexecinfo for backtrace(3) Sponsored by <The NetBSD Foundation> Reviewers: joerg, eugenis, vitalybuka, kcc Reviewed By: eugenis Subscribers: #sanitizers, cfe-commits Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D41054 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321060 91177308-0d34-0410-b5e6-96231b3b80d8
* [Driver, CodeGen] pass through and apply -fassociative-mathSanjay Patel2017-12-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are 2 parts to getting the -fassociative-math command-line flag translated to LLVM FMF: 1. In the driver/frontend, we accept the flag and its 'no' inverse and deal with the interactions with other flags like -ffast-math -fno-signed-zeros -fno-trapping-math. This was mostly already done - we just need to translate the flag as a codegen option. The test file is complicated because there are many potential combinations of flags here. Note that we are matching gcc's behavior that requires 'nsz' and no-trapping-math. 2. In codegen, we map the codegen option to FMF in the IR builder. This is simple code and corresponding test. For the motivating example from PR27372: float foo(float a, float x) { return ((a + x) - x); } $ ./clang -O2 27372.c -S -o - -ffast-math -fno-associative-math -emit-llvm | egrep 'fadd|fsub' %add = fadd nnan ninf nsz arcp contract float %0, %1 %sub = fsub nnan ninf nsz arcp contract float %add, %2 So 'reassoc' is off as expected (and so is the new 'afn' but that's a different patch). This case now works as expected end-to-end although the underlying logic is still wrong: $ ./clang -O2 27372.c -S -o - -ffast-math -fno-associative-math | grep xmm addss %xmm1, %xmm0 subss %xmm1, %xmm0 We're not done because the case where 'reassoc' is set is ignored by optimizer passes. Example: $ ./clang -O2 27372.c -S -o - -fassociative-math -fno-signed-zeros -fno-trapping-math -emit-llvm | grep fadd %add = fadd reassoc float %0, %1 $ ./clang -O2 27372.c -S -o - -fassociative-math -fno-signed-zeros -fno-trapping-math | grep xmm addss %xmm1, %xmm0 subss %xmm1, %xmm0 Differential Revision: https://reviews.llvm.org/D39812 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@320920 91177308-0d34-0410-b5e6-96231b3b80d8
* [Hexagon] Add front-end support for Hexagon V65Krzysztof Parzyszek2017-12-131-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@320579 91177308-0d34-0410-b5e6-96231b3b80d8
* [Driver][CodeGen] Add -mprefer-vector-width driver option and attribute ↵Craig Topper2017-12-111-0/+23
| | | | | | | | | | | | | | | | during CodeGen. This adds a new command line option -mprefer-vector-width to specify a preferred vector width for the vectorizers. Valid values are 'none' and unsigned integers. The driver will check that it meets those constraints. Specific supported integers will be managed by the targets in the backend. Clang will take the value and add it as a new function attribute during CodeGen. This represents the alternate direction proposed by Sanjay in this RFC: http://lists.llvm.org/pipermail/llvm-dev/2017-November/118734.html The syntax here matches gcc, though gcc treats it as an x86 specific command line argument. gcc only allows values of 128, 256, and 512. I'm not having clang check any values. Differential Revision: https://reviews.llvm.org/D40230 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@320419 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 320391: Certain targets are failing, pulling back to diagnose.Erich Keane2017-12-112-14/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@320398 91177308-0d34-0410-b5e6-96231b3b80d8
* For Linux/gnu compatibility, preinclude <stdc-predef.h> if the file is availableErich Keane2017-12-112-0/+14
| | | | | | | | | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@320391 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix MSVC 'not all control paths return a value' warningSimon Pilgrim2017-12-101-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@320297 91177308-0d34-0410-b5e6-96231b3b80d8
* [driver][darwin] Refactor the target selection code, NFCAlex Lorenz2017-12-092-262/+379
| | | | | | | | | | | | | | | | | | The simulator variant of Darwin's platforms is removed in favor of a new environment field. The code that selects the platform and the version is split into 4 different functions instead of being all in one function. This is an NFC commit, although it slightly improves the "invalid version number" diagnostic by displaying the environment variable instead of -m<os>-version-min if the OS version was derived from the environment. rdar://35813850 Differential Revision: https://reviews.llvm.org/D41035 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@320235 91177308-0d34-0410-b5e6-96231b3b80d8
* Hardware-assisted AddressSanitizer (clang part).Evgeniy Stepanov2017-12-092-0/+10
| | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@320232 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't link NetBSD programs with -ldl in linkXRayRuntimeDepsKamil Rytarowski2017-12-091-1/+2
| | | | | | | | | | | | | | | | | | | Summary: There is no such library on NetBSD, the corresponding functions like dlopen(3) are in libc. Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka, eugenis Reviewed By: vitalybuka Subscribers: dberris, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D41021 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@320220 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a comment in the codeKamil Rytarowski2017-12-081-1/+1
| | | | | | | The -ldl library is missing on NetBSD too, make the comment more generic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@320165 91177308-0d34-0410-b5e6-96231b3b80d8
* [driver] Set the 'simulator' environment for Darwin when compiling forAlex Lorenz2017-12-072-8/+3
| | | | | | | | | | | iOS/tvOS/watchOS simulator rdar://35135215 Differential Revision: https://reviews.llvm.org/D40682 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@320073 91177308-0d34-0410-b5e6-96231b3b80d8
* [WebAssembly] Pass through --undefined to Wasm LLDSam Clegg2017-12-021-0/+1
| | | | | | | | | | | This is a follow-on to D40724 (Wasm entrypoint changes #1, add `--undefined` argument to LLD). Patch by Nicholas Wilson Differential Revision: https://reviews.llvm.org/D40739 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319623 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert [ARM] disable FPU features when using soft floating point.Keith Walker2017-11-301-15/+5
| | | | | | | | This reverts r319420 It is failing the test Driver/arm-mfpu.c so reverting while I investigate the failure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319425 91177308-0d34-0410-b5e6-96231b3b80d8
* [ARM] disable FPU features when using soft floating point.Keith Walker2017-11-301-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | To be compatible with GCC if soft floating point is in effect any FPU specified is effectively ignored, eg, -mfloat-abi=soft -fpu=neon If any floating point features which require FPU hardware are enabled they must be disable. There was some support for doing this for NEON, but it did not handle VFP, nor did it prevent the backend from emitting the build attribute Tag_FP_arch describing the generated code as using the floating point hardware if a FPU was specified (even though soft float does not use the FPU). Disabling the hardware floating point features for targets which are compiling for soft float has meant that some tests which were incorrectly checking for hardware support also needed to be updated. In such cases, where appropriate the tests have been updated to check compiling for soft float and a non-soft float variant (usually softfp). This was usually because the target specified in the test defaulted to soft float. Differential Revision: https://reviews.llvm.org/D40256 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319420 91177308-0d34-0410-b5e6-96231b3b80d8
* Reformat switch statement added in r319297, NFCReid Kleckner2017-11-291-12/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319364 91177308-0d34-0410-b5e6-96231b3b80d8
* [Driver] Turns out the GNU assembler does support falkor/saphira.Chad Rosier2017-11-291-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319323 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix function call to fix buildIsmail Donmez2017-11-291-1/+1
| | | | | | | | | | | ../tools/clang/lib/Driver/ToolChains/Cuda.cpp:80:18: error: reference to non-static member function must be called; did you mean to call it with no arguments? if (Distro(D.getVFS).IsDebian()) ~~^~~~~~ () git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319322 91177308-0d34-0410-b5e6-96231b3b80d8
* Follow up of r319317, add the missing header fileSylvestre Ledru2017-11-291-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319319 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the nvidia-cuda-toolkit Debian package path to search pathSylvestre Ledru2017-11-291-0/+5
| | | | | | | | | | | | | | | | | | | Summary: Reported here: http://bugs.debian.org/882505 Patch by Andreas Beckmann Reviewers: Hahnfeld, tra Reviewed By: tra Subscribers: jlebar, cfe-commits Differential Revision: https://reviews.llvm.org/D40453 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319317 91177308-0d34-0410-b5e6-96231b3b80d8
* Toolchain: Normalize dwarf, sjlj and seh ehMartell Malone2017-11-299-19/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a re-apply of r319294. adds -fseh-exceptions and -fdwarf-exceptions flags clang will check if the user has specified an exception model flag, in the absense of specifying the exception model clang will then check the driver default and append the model flag for that target to cc1 -fno-exceptions has a higher priority then specifying the model move __SEH__ macro definitions out of Targets into InitPreprocessor behind the -fseh-exceptions flag move __ARM_DWARF_EH__ macrodefinitions out of verious targets and into InitPreprocessor behind the -fdwarf-exceptions flag and arm|thumb check remove unused USESEHExceptions from the MinGW Driver fold USESjLjExceptions into a new GetExceptionModel function that gives the toolchain classes more flexibility with eh models Reviewers: rnk, mstorsjo Differential Revision: https://reviews.llvm.org/D39673 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319297 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Toolchain: Normalize dwarf, sjlj and seh eh"Martell Malone2017-11-299-66/+20
| | | | | | | | This reverts rL319294. The windows sanitizer does not like seh on x86. Will re apply with None type for x86 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319295 91177308-0d34-0410-b5e6-96231b3b80d8
* Toolchain: Normalize dwarf, sjlj and seh ehMartell Malone2017-11-299-20/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | adds -fseh-exceptions and -fdwarf-exceptions flags clang will check if the user has specified an exception model flag, in the absense of specifying the exception model clang will then check the driver default and append the model flag for that target to cc1 clang cc1 assumes dwarf is the default if none is passed and -fno-exceptions has a higher priority then specifying the model move __SEH__ macro definitions out of Targets into InitPreprocessor behind the -fseh-exceptions flag move __ARM_DWARF_EH__ macrodefinitions out of verious targets and into InitPreprocessor behind the -fdwarf-exceptions flag and arm|thumb check remove unused USESEHExceptions from the MinGW Driver fold USESjLjExceptions into a new GetExceptionModel function that gives the toolchain classes more flexibility with eh models Reviewers: rnk, mstorsjo Differential Revision: https://reviews.llvm.org/D39673 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319294 91177308-0d34-0410-b5e6-96231b3b80d8
* [WebAssemby] Enable "-mthread-model single" by default, for now.Dan Gohman2017-11-272-0/+9
| | | | | | | | | | | | | | The WebAssembly standard does not yet have threads, and while it's in the process of being standardized, it'll take some time for it to make it through and be available in all popular implementations. With increasing numbers of people using the LLVM wasm backend through LLVM directly rather than through Emscripten, it's increasingly important to have friendly defaults. See also https://bugs.llvm.org/show_bug.cgi?id=35411 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319101 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch CPU names not recognized by GNU assemblerPirama Arumuga Nainar2017-11-271-10/+21
| | | | | | | | | | | | | | | | Summary: Switch CPU names not recognized by GNU assembler to a close CPU that it does recognize. In this patch, kryo, falkor and saphira all get replaced by cortex-a57 when invoking the assembler. In addition, krait was already being replaced by cortex-a15. Reviewers: weimingz Subscribers: srhines, cfe-commits Differential Revision: https://reviews.llvm.org/D40476 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319077 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable additonal features in NetBSDKamil Rytarowski2017-11-261-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Enable for x86_64: - ESan, - KASan, - MSan. Enable for x86_64 and i386: - Scudo. These features are under active development and in various level of completeness. Sponsored by <The NetBSD Foundation> Reviewers: dvyukov, joerg, vitalybuka, eugenis Reviewed By: eugenis Subscribers: llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D40456 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319007 91177308-0d34-0410-b5e6-96231b3b80d8
* [Driver] Make the use of relax relocations a per target optionPetr Hosek2017-11-222-1/+2
| | | | | | | | | | | | | The support for relax relocations is dependent on the linker and different toolchains within the same compiler can be using different linkers some of which may or may not support relax relocations. Give toolchains the option to control whether they want to use relax relocations in addition to the existing (global) build system option. Differential Revision: https://reviews.llvm.org/D39831 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@318816 91177308-0d34-0410-b5e6-96231b3b80d8
* Add -finstrument-function-entry-bare flagHans Wennborg2017-11-211-2/+5
| | | | | | | | | | | | | | | | | This is an instrumentation flag that's similar to -finstrument-functions, but it only inserts calls on function entry, the calls are inserted post-inlining, and they don't take any arugments. This is intended for users who want to instrument function entry with minimal overhead. (-pg would be another alternative, but forces frame pointer emission and affects link flags, so is probably best left alone to be used for generating gcov data.) Differential revision: https://reviews.llvm.org/D40276 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@318785 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenMP] Consistently use cubin extension for nvlinkJonas Hahnfeld2017-11-213-18/+35
| | | | | | | | | | | | This was previously done in some places, but for example not for bundling so that single object compilation with -c failed. In addition cubin was used for all file types during unbundling which is incorrect for assembly files that are passed to ptxas. Tighten up the tests so that we can't regress in that area. Differential Revision: https://reviews.llvm.org/D40250 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@318763 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r318669/318694Erich Keane2017-11-202-15/+0
| | | | | | | Broke some libclang tests, so reverting for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@318698 91177308-0d34-0410-b5e6-96231b3b80d8
* For Linux/gnu compatibility, preinclude <stdc-predef.h> if the file is availableErich Keane2017-11-202-0/+15
| | | | | | | | | | | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@318669 91177308-0d34-0410-b5e6-96231b3b80d8
* [ARM] For assembler files recognize -Xassembler or -Wa, -mthumbPeter Smith2017-11-201-1/+1
| | | | | | | | Attempt to fix warning picked up by buildbot. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@318648 91177308-0d34-0410-b5e6-96231b3b80d8
* [ARM] For assembler files recognize -Xassembler or -Wa, -mthumbPeter Smith2017-11-201-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | The Unified Arm Assembler Language is designed so that the majority of assembler files can be assembled for both Arm and Thumb with the choice made as a compilation option. The way this is done in gcc is to pass -mthumb to the assembler with either -Wa,-mthumb or -Xassembler -mthumb. This change adds support for these options to clang. There is no assembler equivalent of -mno-thumb, -marm or -mno-arm so we don't need to recognize these. Ideally we would do all of the processing in CollectArgsForIntegratedAssembler(). Unfortunately we need to change the triple and at that point it is too late. Instead we look for the option earlier in ComputeLLVMTriple(). Fixes PR34519 Differential Revision: https://reviews.llvm.org/D40127 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@318647 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver: remove `SupportsObjCGC` (NFC)Saleem Abdulrasool2017-11-196-12/+0
| | | | | | This option is not used in the frontend. Remove the method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@318609 91177308-0d34-0410-b5e6-96231b3b80d8
* [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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@318608 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch -mcount and -finstrument-functions to emit EnterExitInstrumenter ↵Hans Wennborg2017-11-141-1/+2
| | | | | | | | | | | | | | | | attributes This updates -mcount to use the new attribute names (LLVM r318195), and switches over -finstrument-functions to also use these attributes rather than inserting instrumentation in the frontend. It also adds a new flag, -finstrument-functions-after-inlining, which makes the cygprofile instrumentation get inserted after inlining rather than before. Differential Revision: https://reviews.llvm.org/D39331 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@318199 91177308-0d34-0410-b5e6-96231b3b80d8
* Add CLANG_DEFAULT_OBJCOPY to allow Clang to use llvm-objcopy for dwarf fissionJake Ehrlich2017-11-111-1/+2
| | | | | | | | | | | | llvm-objcopy is getting to where it can be used in non-trivial ways (such as for dwarf fission in clang). It now supports dwarf fission but this feature hasn't been thoroughly tested yet. This change allows people to optionally build clang to use llvm-objcopy rather than GNU objcopy. By default GNU objcopy is still used so nothing should change. Differential Revision: https://reviews.llvm.org/D39029 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317960 91177308-0d34-0410-b5e6-96231b3b80d8
* AMDGPU/NFC: Move getAMDGPUTargetFeatures to AMDGPU toolchainKonstantin Zhuravlyov2017-11-103-19/+24
| | | | | | | Differential Revision: https://reviews.llvm.org/D39877 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317909 91177308-0d34-0410-b5e6-96231b3b80d8