summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver
Commit message (Collapse)AuthorAgeFilesLines
...
* This diff includes changes for supporting the following types.Leonard Chan2018-06-041-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | // Primary fixed point types signed short _Accum s_short_accum; signed _Accum s_accum; signed long _Accum s_long_accum; unsigned short _Accum u_short_accum; unsigned _Accum u_accum; unsigned long _Accum u_long_accum; // Aliased fixed point types short _Accum short_accum; _Accum accum; long _Accum long_accum; This diff only allows for declaration of the fixed point types. Assignment and other operations done on fixed point types according to http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1169.pdf will be added in future patches. The saturated versions of these types and the equivalent _Fract types will also be added in future patches. The tests included are for asserting that we can declare these types. Fixed the test that was failing by not checking for dso_local on some targets. Differential Revision: https://reviews.llvm.org/D46084 llvm-svn: 333923
* Revert "This diff includes changes for supporting the following types."Leonard Chan2018-06-021-5/+0
| | | | | | | This reverts commit r333814, which fails for a test checking the bit width on ubuntu. llvm-svn: 333815
* This diff includes changes for supporting the following types.Leonard Chan2018-06-021-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | ``` // Primary fixed point types signed short _Accum s_short_accum; signed _Accum s_accum; signed long _Accum s_long_accum; unsigned short _Accum u_short_accum; unsigned _Accum u_accum; unsigned long _Accum u_long_accum; // Aliased fixed point types short _Accum short_accum; _Accum accum; long _Accum long_accum; ``` This diff only allows for declaration of the fixed point types. Assignment and other operations done on fixed point types according to http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1169.pdf will be added in future patches. The saturated versions of these types and the equivalent `_Fract` types will also be added in future patches. The tests included are for asserting that we can declare these types. Differential Revision: https://reviews.llvm.org/D46084 llvm-svn: 333814
* [OpenMP] Fix typo in NVPTX linker, NFC.Jonas Hahnfeld2018-06-011-1/+1
| | | | | | | Clang calls "nvlink" for linking multiple object files with OpenMP target functions, so correct this information when printing errors. llvm-svn: 333757
* [Driver] Clean up tmp files when deleting Compilation objectsDavid Stenberg2018-05-312-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In rL327851 the createUniqueFile() and createTemporaryFile() variants that do not return the file descriptors were changed to create empty files, rather than only check if the paths are free. This change was done in order to make the functions race-free. That change led to clang-tidy (and possibly other tools) leaving behind temporary assembly files, of the form placeholder-*, when using a target that does not support the internal assembler. The temporary files are created when building the Compilation object in stripPositionalArgs(), as a part of creating the compilation database for the arguments after the double-dash. The files are created by Driver::GetNamedOutputPath(). Fix this issue by cleaning out temporary files at the deletion of Compilation objects. This fixes https://bugs.llvm.org/show_bug.cgi?id=37091. Reviewers: klimek, sepavloff, arphaman, aaron.ballman, john.brawn, mehdi_amini, sammccall, bkramer, alexfh, JDevlieghere Reviewed By: aaron.ballman, JDevlieghere Subscribers: erichkeane, lebedev.ri, Ka-Ka, cfe-commits Differential Revision: https://reviews.llvm.org/D45686 llvm-svn: 333637
* Fix -Wunused in NDEBUG introduced by HIP r333484Sam McCall2018-05-301-3/+2
| | | | llvm-svn: 333514
* Sema: Add a flag for rejecting member pointers with incomplete base types.Peter Collingbourne2018-05-301-0/+4
| | | | | | | | | | Codebases that need to be compatible with the Microsoft ABI can pass this flag to avoid issues caused by the lack of a fixed ABI for incomplete member pointers. Differential Revision: https://reviews.llvm.org/D47503 llvm-svn: 333498
* Add HIP toolchainYaxun Liu2018-05-304-15/+492
| | | | | | | | | | | | | | This patch adds HIP toolchain to support HIP language mode. It includes: Create specific compiler jobs for HIP. Choose specific libraries for HIP. With contribution from Greg Rodgers. Differential Revision: https://reviews.llvm.org/D45212 llvm-svn: 333484
* Add action builder for HIPYaxun Liu2018-05-301-114/+218
| | | | | | | | | | To support separate compile/link and linking across device IR in different source files, a new HIP action builder is introduced. Basically it compiles/links host and device code separately, and embed fat binary in host linking stage through linker script. Differential Revision: https://reviews.llvm.org/D46476 llvm-svn: 333483
* [Driver] Rename DefaultTargetTriple to TargetTriplePetr Hosek2018-05-291-17/+17
| | | | | | | | | | | While this value is initialized with the DefaultTargetTriple, it can be later overriden using the -target flag so TargetTriple is a more accurate name. This change also provides an accessor which could be accessed from ToolChain implementations. Differential Revision: https://reviews.llvm.org/D47357 llvm-svn: 333468
* [RISCV] Add -mrelax/-mno-relax flags to enable/disable RISCV linker relaxationShiva Chen2018-05-291-0/+5
| | | | | | Differential Revision: https://reviews.llvm.org/D44888 llvm-svn: 333385
* [Sparc] Use the leon arch for Leon3's when using an external assemblerDaniel Cederman2018-05-241-4/+19
| | | | | | | | | | | | | | Summary: This allows the use of the casa instruction available in most Leon3's. Reviewers: jyknight Reviewed By: jyknight Subscribers: joerg, fedor.sergeev, jrtc27, cfe-commits Differential Revision: https://reviews.llvm.org/D47138 llvm-svn: 333157
* [CUDA] Fixed the list of GPUs supported by CUDA-9.Artem Belevich2018-05-231-2/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D47268 llvm-svn: 333098
* Reland r332885, "CodeGen, Driver: Start using direct split dwarf emission in ↵Peter Collingbourne2018-05-221-14/+6
| | | | | | | | | clang." As well as two follow-on commits r332906, r332911 with a fix for test clang/test/CodeGen/split-debug-filename.c. llvm-svn: 333013
* Revert "CodeGen, Driver: Start using direct split dwarf emission in clang."Amara Emerson2018-05-221-6/+14
| | | | | | This reverts commit r332885 as it broke several greendragon buildbots. llvm-svn: 332973
* Revert "Revert r332955 "GNUstep Objective-C ABI version 2""David Chisnall2018-05-221-1/+8
| | | | llvm-svn: 332963
* Revert r332955 "GNUstep Objective-C ABI version 2"Bjorn Pettersson2018-05-221-8/+1
| | | | | | | Reverted due to buildbot failures. Seems like isnumber() is some Apple addition to cctype. llvm-svn: 332957
* GNUstep Objective-C ABI version 2David Chisnall2018-05-221-1/+8
| | | | | | | | | | | | | | | | | | | | | Summary: This includes initial support for the (hopefully final) updated Objective-C ABI, developed here: https://github.com/davidchisnall/clang-gnustep-abi-2 It also includes some cleanups and refactoring from older GNU ABIs. The current version is ELF only, other formats to follow. Reviewers: rjmccall, DHowett-MSFT Reviewed By: rjmccall Subscribers: smeenai, cfe-commits Differential Revision: https://reviews.llvm.org/D46052 llvm-svn: 332950
* CodeGen, Driver: Start using direct split dwarf emission in clang.Peter Collingbourne2018-05-211-14/+6
| | | | | | | | Fixes PR37466. Differential Revision: https://reviews.llvm.org/D47093 llvm-svn: 332885
* [OPENMP-SIMD] Fix PR37536: Fix definition of _OPENMP macro.Alexey Bataev2018-05-211-0/+2
| | | | | | | | if `-fopenmp-simd` is specified alone, `_OPENMP` macro should not be defined. If `-fopenmp-simd` is specified along with the `-fopenmp`, `_OPENMP` macro should be defined with the value `201511`. llvm-svn: 332852
* Do not enable RTTI with -fexceptions, for PS4Sunil Srivastava2018-05-183-48/+15
| | | | | | | | | | | | | | | | | | | NFC for targets other than PS4. This patch is a change in behavior for PS4, in that PS4 will no longer enable RTTI when -fexceptions is specified (RTTI and Exceptions are disabled by default on PS4). RTTI will remain disabled except for types being thrown or caught. Also, '-fexceptions -fno-rtti' (previously prohibited on PS4) is now accepted, as it is for other targets. This patch removes some PS4 specific code, making the code cleaner. Also, in the test file rtti-options.cpp, PS4 tests where the behavior is the same as the generic x86_64-linux are removed, making the test cleaner. Differential Revision: https://reviews.llvm.org/D46982 llvm-svn: 332784
* Fix unused variable warning in r332724Eric Liu2018-05-181-0/+1
| | | | llvm-svn: 332734
* [HIP] Support offloading by linker scriptYaxun Liu2018-05-183-5/+135
| | | | | | | | | | | | To support linking device code in different source files, it is necessary to embed fat binary at host linking stage. This patch emits an external symbol for fat binary in host codegen, then embed the fat binary by lld through a linker script. Differential Revision: https://reviews.llvm.org/D46472 llvm-svn: 332724
* [sanitizer] Don't add --export-dynamic for MyriadWalter Lee2018-05-171-0/+5
| | | | | | | | | | | This is to work around a bug in some versions of gnu ld, where --export-dynamic implies -shared even if -static is explicitly given. Myriad supports static linking only, so --export-dynamic is never needed. Differential Revision: https://reviews.llvm.org/D46452 llvm-svn: 332635
* [Driver] Only use -lc++ on FuchsiaPetr Hosek2018-05-111-2/+0
| | | | | | | | | The fact that libc++ depends on libc++abi and libunwind is an internal detail that's captured by the libc++.so linker script. Differential Revision: https://reviews.llvm.org/D46768 llvm-svn: 332138
* [HIP] Set proper triple and offload kind for the toolchainYaxun Liu2018-05-112-10/+42
| | | | | | | | Also introduce --hip-link option to indicate HIP for linking. Differential Revision: https://reviews.llvm.org/D46475 llvm-svn: 332123
* [HIP] Diagnose unsupported host tripleYaxun Liu2018-05-111-3/+5
| | | | | | Differential Revision: https://reviews.llvm.org/D46487 llvm-svn: 332122
* [HIP] Let clang-offload-bundler support HIPYaxun Liu2018-05-112-3/+15
| | | | | | | | | | When bundle/unbundle intermediate files for HIP, there may be multiple sub archs, therefore BoundArch needs to be included in the target and output file names for clang-offload-bundler. Differential Revision: https://reviews.llvm.org/D46473 llvm-svn: 332121
* Support XRay in the NetBSD driverKamil Rytarowski2018-05-111-20/+25
| | | | | | | | | | | | | | | | | | | | Summary: While there, perform a small cleanup, reducing delta with drivers for other OSes. Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka, dberris Reviewed By: dberris Subscribers: llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D46721 llvm-svn: 332071
* Permit -fxray-instrument for NetBSD/amd64Kamil Rytarowski2018-05-111-1/+2
| | | | | | | | | | | | | | | | | Summary: Use the same branch as FreeBSD and OpenBSD. Sponsored by <The NetBSD Foundation> Reviewers: joerg, dberris, vitalybuka Reviewed By: vitalybuka Subscribers: emaste, llvm-commits Differential Revision: https://reviews.llvm.org/D46737 llvm-svn: 332070
* Add support of the next Ubuntu (Ubuntu 18.10 - Cosmic Canimal)Sylvestre Ledru2018-05-101-0/+1
| | | | | | Patch by Adam Conrad llvm-svn: 331965
* [CUDA] Added -f[no-]cuda-short-ptr optionArtem Belevich2018-05-092-2/+7
| | | | | | | | | The option enables use of 32-bit pointers for accessing const/local/shared memory. The feature is disabled by default. Differential Revision: https://reviews.llvm.org/D46148 llvm-svn: 331938
* Revert "[Driver] Use -fuse-line-directives by default in MSVC mode"Martin Storsjo2018-05-091-2/+2
| | | | | | | | | | | | This reverts commit SVN r331666. It was afterwards pointed out in https://reviews.llvm.org/D46520 that #line directives lose information about what parts come from a system header. That means the result of -E usually won't compile, since Windows headers are typically full of warnings and default-error warnings. llvm-svn: 331858
* Remove \brief commands from doxygen comments.Adrian Prantl2018-05-0913-54/+54
| | | | | | | | | | | | | | | | | | | This is similar to the LLVM change https://reviews.llvm.org/D46290. We've been running doxygen with the autobrief option for a couple of years now. This makes the \brief markers into our comments redundant. Since they are a visual distraction and we don't want to encourage more \brief markers in new code either, this patch removes them all. Patch produced by for i in $(git grep -l '\@brief'); do perl -pi -e 's/\@brief //g' $i & done for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done Differential Revision: https://reviews.llvm.org/D46320 llvm-svn: 331834
* [HIP] Add hip offload kindYaxun Liu2018-05-083-17/+34
| | | | | | | | | There are quite differences in HIP action builder and action job creation, which justifies to define a separate offload kind. Differential Revision: https://reviews.llvm.org/D46471 llvm-svn: 331811
* Add a mno-outline flag to disable the MachineOutlinerJessica Paquette2018-05-081-1/+2
| | | | | | | | | | | Since we're working on turning the MachineOutliner by default under -Oz for AArch64, it makes sense to have an -mno-outline flag available. This currently doesn't do much (it basically just undoes -moutline). When the MachineOutliner is on by default under AArch64, this flag should set -mllvm -enable-machine-outliner=never. llvm-svn: 331810
* [Driver] Don't add -dwarf-column-info when using -gcodeview on non-msvc targetsMartin Storsjo2018-05-081-1/+1
| | | | | | | | | | | | | | -dwarf-column-info is omitted if -gcodeview is specified for msvc targets at the moment, but since -gcodeview is an option that can be specified for any target, there's little reason to restrict this handling to msvc targets. This allows getting proper codeview debug info by passing -gcodeview for e.g. MinGW targets as well. Differential Revision: https://reviews.llvm.org/D46287 llvm-svn: 331807
* Change -foutline to -moutlineJessica Paquette2018-05-081-1/+1
| | | | | | | | | Nitpicky, but the MachineOutliner is a machine-level pass, and so we should reflect that by using "m" instead of "n". Figured we should get this in before people get used to the letter f. :) llvm-svn: 331806
* [CFI] Force LLVM to die if the implicit blacklist files cannot be found.Peter Collingbourne2018-05-071-0/+4
| | | | | | | | | | | | | | Currently LLVM CFI tries to use an implicit blacklist file, currently in /usr/lib64/clang/<version>/share. If the file is not there, LLVM happily continues, which causes CFI to add checks to files/functions that are known to fail, generating binaries that fail. This CL causes LLVM to die (I hope) if it can't find these implicit blacklist files. Patch by Caroline Tice! Differential Revision: https://reviews.llvm.org/D46403 llvm-svn: 331674
* [Driver] Use -fuse-line-directives by default in MSVC modeMartin Storsjo2018-05-071-2/+2
| | | | | | | | Don't use the GNU extension form of line markers in MSVC mode. Differential Revision: https://reviews.llvm.org/D46520 llvm-svn: 331666
* [mips] Improve handling of -fno-[pic/PIC] optionAleksandar Beserminji2018-05-072-3/+20
| | | | | | | | | | | | | | | In order to disable PIC and to match GCC behaviour, -mno-abicalls option is neccessary. When -fno-[pic/PIC] is used witout -mno-abicalls, warning is reported. An error is reported when -fno-pic or -fno-PIC is used in combination with -mabicalls. In this commit, test case is added. Depends on D44381. Differential Revision: https://reviews.llvm.org/D44684 llvm-svn: 331640
* Revert "[mips] Improve handling of -fno-[pic/PIC] option"Aleksandar Beserminji2018-05-072-20/+3
| | | | | | This reverts commit r331636. Forgot to add the test case. llvm-svn: 331639
* [mips] Improve handling of -fno-[pic/PIC] optionAleksandar Beserminji2018-05-072-3/+20
| | | | | | | | | | | | | In order to disable PIC and to match GCC behaviour, -mno-abicalls option is neccessary. When -fno-[pic/PIC] is used witout -mno-abicalls, warning is reported. An error is reported when -fno-pic or -fno-PIC is used in combination with -mabicalls. Depends on D44381. Differential Revision: https://reviews.llvm.org/D44684 llvm-svn: 331636
* [clang-cl] Print /showIncludes to stderr, if used in combination with /E, ↵Erich Keane2018-05-041-7/+2
| | | | | | | | | | | | | | | | | /EP or /P This replicates 'cl.exe' behavior and allows for both preprocessor output and dependency information to be extraced with a single compiler invocation. This is especially useful for compiler caching with tools like Mozilla's sccache. See: https://github.com/mozilla/sccache/issues/246 Patch By: fxb Differential Revision: https://reviews.llvm.org/D46394 llvm-svn: 331533
* [Driver] Don't warn about unused inputs in config filesMartin Storsjo2018-05-041-3/+7
| | | | | | | | | This avoids warnings about unused linker parameters, just like other flags are ignored if they're from config files. Differential Revision: https://reviews.llvm.org/D46286 llvm-svn: 331504
* Enable -fsanitize=function on FreeBSD.Fangrui Song2018-05-031-0/+1
| | | | llvm-svn: 331440
* Fix -Wunused-variable warning in Clang.cppKarl-Johan Karlsson2018-05-031-1/+1
| | | | llvm-svn: 331438
* [Driver] Infer Android sysroot location.Dan Albert2018-05-021-0/+9
| | | | | | | | | | | | | | | | Summary: Android toolchains include their headers and libraries in a self-contained directory within the toolchain. Reviewers: srhines Reviewed By: srhines Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D45291 llvm-svn: 331390
* [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
* Add -foutline option to enable the MachineOutliner in AArch64Jessica Paquette2018-05-021-0/+5
| | | | | | | | | | | | | Since we've been working on productizing the MachineOutliner in AArch64, it makes sense to provide a more user-friendly way to enable it. This allows users of AArch64 to enable the outliner using -foutline instead of -mllvm -enable-machine-outliner. Other, less mature implementations (e.g, x86-64) can still enable the pass using the -mllvm option. Also add a test to make sure it works. llvm-svn: 331370
OpenPOWER on IntegriCloud