summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Driver: fix an assertion with `-print-prog-name=`Saleem Abdulrasool2018-05-011-1/+7
| | | | | | | | | Fix an assertion when -print-prog-name= is invoked without parameter. Returns an empty string. Patch by Christian Bruel! llvm-svn: 331296
* Implement P0482R2, support for char8_t type.Richard Smith2018-05-011-0/+3
| | | | | | | | | | | | This is not yet part of any C++ working draft, and so is controlled by the flag -fchar8_t rather than a -std= flag. (The GCC implementation is controlled by a flag with the same name.) This implementation is experimental, and will be removed or revised substantially to match the proposal as it makes its way through the C++ committee. llvm-svn: 331244
* [Driver, CodeGen] rename options to disable an FP cast optimizationSanjay Patel2018-04-301-3/+3
| | | | | | | | | | | | | | As suggested in the post-commit thread for rL331056, we should match these clang options with the established vocabulary of the corresponding sanitizer option. Also, the use of 'strict' is well-known for these kinds of knobs, and we can improve the descriptive text in the docs. So this intends to match the logic of D46135 but only change the words. Matching LLVM commit to match this spelling of the attribute to follow shortly. Differential Revision: https://reviews.llvm.org/D46236 llvm-svn: 331209
* IWYU for llvm-config.h in clang. See r331124 for details.Nico Weber2018-04-303-1/+2
| | | | llvm-svn: 331177
* Remove unnecessary indirection. No behavior change.Nico Weber2018-04-301-12/+6
| | | | llvm-svn: 331176
* Remove unused includes of clang/Config/config.hNico Weber2018-04-285-5/+0
| | | | | | | | | | | | | | | | | | | | Found by opening config.h.cmake in vim, finding all defined macros with /define\(01\)\? \zs[A-Za-z0-9_]*<cr> :%s//\=setreg('A', submatch(0), 'V')/gn<cr> :put A<cr> and then joining them all with |, and passing that to git grep -E that_pattern 'clang/*.h' 'clang/*.cpp' 'clang/*.c' and diffing that output with the result of git grep Config/config.h 'clang/*.h' 'clang/*.cpp' 'clang/*.c' No intended behavior change. llvm-svn: 331124
* s/LLVM_ON_WIN32/_WIN32/, clangNico Weber2018-04-274-5/+5
| | | | | | | | | | | LLVM_ON_WIN32 is set exactly with MSVC and MinGW (but not Cygwin) in HandleLLVMOptions.cmake, which is where _WIN32 defined too. Just use the default macro instead of a reinvented one. See thread "Replacing LLVM_ON_WIN32 with just _WIN32" on llvm-dev and cfe-dev. No intended behavior change. llvm-svn: 331069
* [Driver, CodeGen] add options to enable/disable an FP cast optimizationSanjay Patel2018-04-271-0/+5
| | | | | | | | | | | | | | | | | | | | | | As discussed in the post-commit thread for: rL330437 ( http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20180423/545906.html ) We need a way to opt-out of a float-to-int-to-float cast optimization because too much existing code relies on the platform-specific undefined result of those casts when the float-to-int overflows. The LLVM changes associated with adding this function attribute are here: rL330947 rL330950 rL330951 Also as suggested, I changed the LLVM doc to mention the specific sanitizer flag that catches this problem: rL330958 Differential Revision: https://reviews.llvm.org/D46135 llvm-svn: 331041
* [Driver] Don't enable "-fregister-global-dtors-with-atexit" by defaultAkira Hatanaka2018-04-271-1/+1
| | | | | | | | | when compiling the kernel or kexts. Destructors should be registered with atexit by default only when we are compiling userland code. llvm-svn: 331010
* [ConfigFiles] Update argument strings when merging argrument listsSerge Pavlov2018-04-261-1/+4
| | | | | | | | | | | Implementation of `InputArgList` assumes its field `ArgStrings` contains strings for each argument exactly in the same order. This condition was broken when arguments from config file and from invocation were merged. This change fixes https://bugs.llvm.org/show_bug.cgi?id=37196 (Clang config files can crash argument handling). llvm-svn: 330926
* Switch to Clang's isDigit function.Richard Trieu2018-04-251-4/+4
| | | | | | | | std::isdigit can be overloaded, causing the template deduction to fail. Use Clang's isDigit function which to avoid this. Switch the other calls for consistency. llvm-svn: 330887
* Include <cctype> to get std::isdigit, fixes MSVC STL buildReid Kleckner2018-04-251-0/+1
| | | | llvm-svn: 330886
* [RISCV] More validations on the input value of -march=Ana Pazos2018-04-251-20/+270
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Supporting additional rules for parsing ISA string. - RISC-V ISA strings must be lowercase. E.g.: rv32IMC is not supported, rv32imc is correct. - Multi-letter extensions are to be separated by a single underscore '_'. The extension prefix counts as a letter. This means extensions that start with 's', 'sx' and 'sx' are all multi-letter. E.g.: xasb is a single non-standard extension named 'xasb' xa_sb are two extensions, the non-standard user level extension 'xa', and the supervisor level extension 'sb'. - Standard user-level extensions are specified following a canonical order, according to Table 22.1 in RISC-V User-Level ISA V2.2. - Non-standard user-level 'x' extensions, standard supervisor-level 's' extensions and non-standard supervisor-level 'sx' extensions are also specified following a canonical order according to Table 22.1 in RISC-V User-Level ISA V2.2: 'x' extensions, follwed by 's' extensions and then 'sx' extensions. - Extensions might have a version number. Underscores may be used to separate ISA subset components to improve readability and to provide disambiguation. E.g.: rv32i2_m3_a1_f2_d2 - Version numbers are divided into major and minor numbers, separated by a 'p'. If the minor version is 0, then 'p0' can be omitted. - Additional checks for dependent extensions and invalid extensions combinations. E.g.: 'e' requires rv32 'e' can't be combined with 'f' nor 'd' 'q' requires rv64 - TODO items have also been marked with comments in the code. Reviewers: asb, kito-cheng Reviewed By: asb Subscribers: edward-jones, mgrang, zzheng, rbar, johnrusso, simoncook, jordy.potman.lists, sabuasal, niosHD, shiva0217, cfe-commits Differential Revision: https://reviews.llvm.org/D45284 llvm-svn: 330880
* [driver][darwin] Do not infer -simulator environment for OS version env varsAlex Lorenz2018-04-251-3/+16
| | | | | | | | with non-simulator SDKs rdar://37955008 llvm-svn: 330878
OpenPOWER on IntegriCloud