summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver
Commit message (Collapse)AuthorAgeFilesLines
...
* [OpenMP] Pass -v to PTXAS if it was passed to the driver.Gheorghe-Teodor Bercea2017-08-071-0/+4
| | | | | | | | | | | | | | Summary: When compiling code being offloaded by OpenMP to an NVIDIA GPU, pass the -v to PTXAS if it was passed to the CLANG driver. Reviewers: arpith-jacob, caomhin, carlo.bertolli, ABataev, jlebar, hfinkel, tstellar Reviewed By: jlebar Subscribers: Hahnfeld, rengolin, cfe-commits Differential Revision: https://reviews.llvm.org/D29644 llvm-svn: 310295
* [OpenMP] Integrate OpenMP target region cubin into host binaryGheorghe-Teodor Bercea2017-08-077-132/+248
| | | | | | | | | | | | | | Summary: OpenMP device offloading code generation produces a cubin file which is then integrated in the host binary using the host linker. Reviewers: arpith-jacob, caomhin, carlo.bertolli, ABataev, Hahnfeld, jlebar, rnk, hfinkel, tstellar Reviewed By: hfinkel Subscribers: sfantao, rnk, rengolin, cfe-commits Differential Revision: https://reviews.llvm.org/D29654 llvm-svn: 310291
* Non-functional change. Fix previous patch D34784.Gheorghe-Teodor Bercea2017-08-071-4/+8
| | | | llvm-svn: 310282
* [OpenMP] Add flag for specifying the target device architecture for OpenMP ↵Gheorghe-Teodor Bercea2017-08-073-3/+87
| | | | | | | | | | | | | | | | | | | | | | | | | device offloading Summary: OpenMP has the ability to offload target regions to devices which may have different architectures. A new -fopenmp-target-arch flag is introduced to specify the device architecture. In this patch I use the new flag to specify the compute capability of the underlying NVIDIA architecture for the OpenMP offloading CUDA tool chain. Only a host-offloading test is provided since full device offloading capability will only be available when [[ https://reviews.llvm.org/D29654 | D29654 ]] lands. Reviewers: hfinkel, Hahnfeld, carlo.bertolli, caomhin, ABataev Reviewed By: hfinkel Subscribers: guansong, cfe-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D34784 llvm-svn: 310263
* Enable LLVM asan support for NetBSD/i386Kamil Rytarowski2017-08-071-1/+2
| | | | | | | | | | | | | | | | | | | Summary: Verified to work and useful to run check-asan, as this target tests 32-bit and 64-bit execution. Sponsored by <The NetBSD Foundation> Reviewers: joerg, filcab, dim, vitalybuka Reviewed By: vitalybuka Subscribers: #sanitizers, cfe-commits Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36378 llvm-svn: 310245
* [libFuzzer] add -fsanitize-coverage-pc-table to -fsanitize=fuzzerKostya Serebryany2017-08-041-1/+2
| | | | llvm-svn: 310136
* Revert r304953 for release 5.0.0Stefan Maksimovic2017-08-041-2/+0
| | | | | | | | | | This is causing failures when compiling clang with -O3 as one of the structures used by clang is passed by value and uses the fastcc calling convention. Faliures manifest for stage2 mips build. llvm-svn: 310057
* [Driver] Error if ARM mode was selected explicitly for M-profile CPUs.Florian Hahn2017-08-041-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: M-class profiles do not support ARM execution mode, so providing -marm/-mno-thumb does not make sense in combination with -mcpu/-march options that support the M-profile. This is a follow-up patch to D35569 and it seemed pretty clear that we should emit an error in the driver in this case. We probably also should warn/error if the provided -mcpu/-march options do not match, e.g. -mcpu=cortex-m0 -march=armv8-a is invalid, as cortex-m0 does not support armv8-a. But that should be a separate patch I think. Reviewers: echristo, richard.barton.arm, rengolin, labrinea, charles.baylis Reviewed By: rengolin Subscribers: aemerson, javed.absar, kristof.beyls, cfe-commits Differential Revision: https://reviews.llvm.org/D35826 llvm-svn: 310047
* [mips] Code formatting fix. NFCSimon Atanasyan2017-08-041-1/+1
| | | | llvm-svn: 310037
* [Driver][Fuchsia] Pass --hash-style=gnu to the linkerPetr Hosek2017-08-041-2/+4
| | | | | | | | | The .gnu_hash format is superior, and all versions of the Fuchsia dynamic linker support it. Differential Revision: https://reviews.llvm.org/D36254 llvm-svn: 310017
* [Driver][Darwin] Pass -munwind-table when !UseSjLjExceptions.Akira Hatanaka2017-08-0313-14/+17
| | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes a bug where clang/llvm doesn't emit an unwind table for a function when it is marked noexcept. Without this patch, the following code terminates with an uncaught exception on ARM64: int foo1() noexcept { try { throw 0; } catch (int i) { return 0; } return 1; } int main() { return foo1(); } rdar://problem/32411865 Differential Revision: https://reviews.llvm.org/D35693 llvm-svn: 310006
* Enable AddressSanitizer for Fuchsia targetsPetr Hosek2017-08-032-14/+18
| | | | | | | | Patch by Roland McGrath Differential Revision: https://reviews.llvm.org/D35922 llvm-svn: 309999
* [mips] Revert r309942 & r309940Simon Dardis2017-08-031-8/+0
| | | | | | | | This reverts commit r309942 & commit r309940. A revert was requested following post commit review. llvm-svn: 309978
* Revert r304836.Nico Weber2017-08-031-4/+0
| | | | | | See discussion in https://reviews.llvm.org/D33900#824172 llvm-svn: 309960
* [mips] Implement -muninit-const-in-rodataSimon Dardis2017-08-031-0/+8
| | | | | | | | | | | This option when combined with -mgpopt and -membedded-data places all uninitialized constant variables in the read-only section. Reviewers: atanasyan, nitesh.jain Differential Revision: https://reviews.llvm.org/D35917 llvm-svn: 309940
* [mips] Add support -m(no-)embedded-data optionSimon Dardis2017-08-031-1/+14
| | | | | | | | | | | Add support for the -membedded-data option which places constant data in the .rodata section, rather than the .sdata section. Reviewers: atanasyan, nitesh.jain Differential Revision: https://reviews.llvm.org/D35914 llvm-svn: 309935
* [UBSan] Provide default blacklist filename for UBSanHan Shen2017-08-021-0/+2
| | | | | | | | | | | | | | | | | Summary: This is to provide a default blacklist filename for UBSan. While UBSan is turned on, it's better that clang pick up a blacklist file (when exists), just as what ASan / MSan does, so we do not end up adding the "-fsanitize-blacklist" option to every command line. Reviewers: chandlerc, echristo, vsk, eugenis Reviewed By: vsk, eugenis Subscribers: vsk, eugenis, echristo, cfe-commits Differential Revision: https://reviews.llvm.org/D35849 llvm-svn: 309873
* [ubsan] Have -fsanitize=vptr emit a null check if -fsanitize=null isn't ↵Vedant Kumar2017-08-021-7/+0
| | | | | | | | | | | | | | | | | | available In r309007, I made -fsanitize=null a hard prerequisite for -fsanitize=vptr. I did not see the need for the two checks to have separate null checking logic for the same pointer. I expected the two checks to either always be enabled together, or to be mutually compatible. In the mailing list discussion re: r309007 it became clear that that isn't the case. If a codebase is -fsanitize=vptr clean but not -fsanitize=null clean, it's useful to have -fsanitize=vptr emit its own null check. That's what this patch does: with it, -fsanitize=vptr can be used without -fsanitize=null. Differential Revision: https://reviews.llvm.org/D36112 llvm-svn: 309846
* [Driver] Disable static C++ library support on FuchsiaPetr Hosek2017-08-021-8/+1
| | | | | | | | Don't support or build static C++ libraries for Fuchsia. Differential Revision: https://reviews.llvm.org/D36202 llvm-svn: 309778
* [Driver] Make sure the deployment target is earlier than iOS 11 whenAkira Hatanaka2017-07-311-23/+23
| | | | | | | | | | it is inferred from -isysroot. This fixes a change that was inadvertently introduced in r309607. rdar://problem/32230613 llvm-svn: 309633
* [Driver] Allow users to silence the warning that is issued when theAkira Hatanaka2017-07-311-9/+11
| | | | | | | | | | deployment target is earlier than iOS 11 and the target is 32-bit. This is a follow-up to r306922. rdar://problem/32230613 llvm-svn: 309607
* Also pass -pie back to the linker when linking on OpenBSD.Brad Smith2017-07-301-0/+2
| | | | llvm-svn: 309523
* [sanitizer-coverage] clang flags pumbing for -fsanitize-coverage=pc-tableKostya Serebryany2017-07-281-1/+4
| | | | llvm-svn: 309338
* Update to use enum classes for various ARM *Kind enumsFlorian Hahn2017-07-275-19/+18
| | | | | | | | | | | | | | Summary: This updates the relevant Clang parts for the LLVM change D35882. Reviewers: rengolin, chandlerc, javed.absar, rovka Reviewed By: rovka Subscribers: aemerson, cfe-commits, kristof.beyls Differential Revision: https://reviews.llvm.org/D35884 llvm-svn: 309289
* [PowerPC] Pass CPU to assembler with -no-integrated-asNemanja Ivanovic2017-07-273-6/+26
| | | | | | | | | This just adds the CPU to a list of commands passed to GAS when not using the integrated assembler. Differential Revision: https://reviews.llvm.org/D33820 llvm-svn: 309256
* [Bash-autocompletion] Show HelpText with possible flagsYuka Takahashi2017-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | Summary: `clang --autocomplete=-std` will show ``` -std: Language standard to compile for -std= Language standard to compile for -stdlib= C++ standard library to use ``` after this change. However, showing HelpText with completion in bash seems super tricky, so this feature will be used in other shells (fish, zsh...). Reviewers: v.g.vassilev, teemperor, ruiu Subscribers: cfe-commits, hiraditya Differential Revision: https://reviews.llvm.org/D35759 llvm-svn: 309113
* Update after LLVM change r309087George Rimar2017-07-261-1/+2
| | | | llvm-svn: 309088
* [ubsan] Null-check pointers in -fsanitize=vptr (PR33881)Vedant Kumar2017-07-251-0/+7
| | | | | | | | | | | | | | | | | | | The instrumentation generated by -fsanitize=vptr does not null check a user pointer before loading from it. This causes crashes in the face of UB member calls (this=nullptr), i.e it's causing user programs to crash only after UBSan is turned on. The fix is to make run-time null checking a prerequisite for enabling -fsanitize=vptr, and to then teach UBSan to reuse these run-time null checks to make -fsanitize=vptr safe. Testing: check-clang, check-ubsan, a stage2 ubsan-enabled build Differential Revision: https://reviews.llvm.org/D35735 https://bugs.llvm.org/show_bug.cgi?id=33881 llvm-svn: 309007
* Introduce -nostdlib++ flag to disable linking the C++ standard library.Nico Weber2017-07-2520-51/+68
| | | | | | | | | | | | | | | Projects that want to statically link their own C++ standard library currently need to pass -nostdlib or -nodefaultlibs, which also disables linking of the builtins library, -lm, and so on. Alternatively, they could use `clang` instead of `clang++`, but that already disables implicit addition of -lm on some toolchains. Add a dedicated flag -nostdlib++ that disables just linking of libc++ / libstdc++. This is analogous to -nostdinc++. https://reviews.llvm.org/D35780 llvm-svn: 308997
* [mips] Add support for -m(no-)extern-data.Simon Dardis2017-07-241-0/+11
| | | | | | | | | | | Add support for -m(no-)extern-data when using -mgpopt in the driver. It is enabled by default in the backend. Reviewers: atanasyan, slthakur Differential Revision: https://reviews.llvm.org/D35550 llvm-svn: 308879
* [Driver] Fuchsia defaults to -fno-math-errnoPetr Hosek2017-07-231-0/+1
| | | | | | | | Patch by Roland McGrath Differential Revision: https://reviews.llvm.org/D35747 llvm-svn: 308855
* Remove Driver::UseStdLib.Nico Weber2017-07-232-4/+2
| | | | | | | | | All but one place are checking options::OPT_nostdlib instead of looking at this field, so convert that one other place to doing that as well. No behavior change. llvm-svn: 308848
* Remove Bitrig: Clang ChangesErich Keane2017-07-215-276/+0
| | | | | | | | Bitrig code has been merged back to OpenBSD, thus the OS has been abandoned. Differential Revision: https://reviews.llvm.org/D35708 llvm-svn: 308797
* Test commitAndrey Kasaurov2017-07-211-1/+1
| | | | llvm-svn: 308744
* Test commitNikolay Haustov2017-07-211-1/+1
| | | | llvm-svn: 308741
* [Driver] Consider -fno-sanitize=... state when filtering out ↵Petr Hosek2017-07-211-1/+1
| | | | | | | | | | | | | | | | -fsanitize-coverage=... The driver ignores -fsanitize-coverage=... flags when also given -fsanitize=... flags for sanitizer flavors that don't support the coverage runtime. This logic failed to account for subsequent -fno-sanitize=... flags that disable the sanitizer flavors that conflict with -fsanitize-coverage=... flags. Patch by Roland McGrath Differential Revision: https://reviews.llvm.org/D35603 llvm-svn: 308707
* [mips] Add support for -m(no-)local-sdataSimon Dardis2017-07-201-0/+13
| | | | | | | | | | | Teach the driver to support -mlocal-sdata. The backend already matches GCC's default behaviour. Reviewers: atanasyan, slthakur Differential Revision: https://reviews.llvm.org/D35549 llvm-svn: 308683
* Reland "[mips] Teach the driver to accept -m(no-)gpopt."Simon Dardis2017-07-201-0/+24
| | | | | | | | | | | | | | This patch teaches the driver to pass -mgpopt by default to the backend when it is supported, i.e. we are using -mno-abicalls. Reviewers: atanasyan, slthakur Differential Revision: https://reviews.llvm.org/D35548 This version fixes a logic error that generated warnings incorrectly and gets rid of spurious arguments to the backend when -mgpopt is not used. llvm-svn: 308619
* [Sema] Improve diagnostic message for unavailable C++17 alignedAkira Hatanaka2017-07-191-4/+13
| | | | | | | | | | | | | | | | | | allocation functions. This changes the error message Sema prints when an unavailable C++17 aligned allocation function is selected. Original message: "... possibly unavailable on x86_64-apple-macos10.12" New message: "... only available on macOS 10.13 or newer" This is a follow-up to r306722. rdar://problem/32664169 Differential Revision: https://reviews.llvm.org/D35520 llvm-svn: 308496
* Revert "Reland "[mips] Teach the driver to accept -m(no-)gpopt.""Simon Dardis2017-07-191-27/+0
| | | | | | This reverts r308458. Investigating further buildbot breakage. llvm-svn: 308459
* Reland "[mips] Teach the driver to accept -m(no-)gpopt."Simon Dardis2017-07-191-0/+27
| | | | | | | | | | | | | This patch teaches the driver to pass -mgpopt by default to the backend when it is supported, i.e. we are using -mno-abicalls. Reviewers: atanasyan, slthakur Differential Revision: https://reviews.llvm.org/D35548 This version fixes a logic error that generated warnings incorrectly. llvm-svn: 308458
* Revert "[mips] Teach the driver to accept -m(no-)gpopt."Simon Dardis2017-07-191-26/+0
| | | | | | Revert r308431 and r308432, these caused broke some buildbots. llvm-svn: 308436
* [mips] Teach the driver to accept -m(no-)gpopt.Simon Dardis2017-07-191-0/+26
| | | | | | | | | | | This patch teaches the driver to pass -mgpopt by default to the backend when it is supported, i.e. we are using -mno-abicalls. Reviewers: atanasyan, slthakur Differential Revision: https://reviews.llvm.org/D35548 llvm-svn: 308431
* [Driver] Always use -z rodynamic for FuchsiaPetr Hosek2017-07-181-0/+3
| | | | | | | | Fuchsia uses read-only .dynamic section. Differential Revision: https://reviews.llvm.org/D35582 llvm-svn: 308390
* Enable TLS support on OpenBSD, but default to the emulatated TLS model.Brad Smith2017-07-171-3/+4
| | | | llvm-svn: 308155
* [Bash-autocompletion] Add support for -W<warning> and -Wno<warning>Yuka Takahashi2017-07-161-0/+7
| | | | | | | | | | Summary: `-W[tab]` will autocomplete warnings defined in this link: https://clang.llvm.org/docs/DiagnosticsReference.html#wweak-vtables Differential Revision: https://reviews.llvm.org/D35447 llvm-svn: 308139
* Unconditionally use .init_array instead of .ctors on Solaris.Aaron Ballman2017-07-143-3/+4
| | | | | | Patch by Fedor Sergeev llvm-svn: 308038
* [Driver] Respect -target when determining target platform on AppleAkira Hatanaka2017-07-141-19/+49
| | | | | | | | | | | | | | platforms. Set the target OS based on -target if it is present on the command line and -arch is not. With this commit, "-target x86_64-apple-ios8.0" does the same thing as "-arch x86_64 -mios-version-min=8.0". rdar://problem/21012522 llvm-svn: 307982
* [PS4] Disable LTO unit features under ThinLTO, like for Darwin.Paul Robinson2017-07-131-4/+5
| | | | llvm-svn: 307964
* Reland "[Driver] Update Fuchsia driver path handling"Petr Hosek2017-07-122-17/+82
| | | | | | | | | | | | | | | | | Several improvements to the Fuchsia driver: * Search for C++ library headers and libraries in directories that are part of the toolchain distribution rather than sysroot. * Use LLVM support utlities to construct paths to make sure the driver is also usable on Windows for cross-compiling. * Change the driver to inherit directly from ToolChain rather than Generic_GCC since we don't need any of the GCC related multilib logic. Differential Revision: https://reviews.llvm.org/D35328 llvm-svn: 307856
OpenPOWER on IntegriCloud