summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove sanitizer context workaround no longer necessaryBrad Smith2019-02-231-3/+1
| | | | | | The base linker is now lld. llvm-svn: 354721
* AMDGPU: Don't emit debugger subtarget featuresMatt Arsenault2019-02-211-9/+2
| | | | | | Keep the flag around for compatability. llvm-svn: 354624
* [Driver] Fix float ABI default for Android ARMv8.Dan Albert2019-02-211-1/+1
| | | | | | | | | | | | | | | | Summary: Android doesn't regress back to soft float after ARMv7 :) Reviewers: srhines, pirama Reviewed By: srhines, pirama Subscribers: javed.absar, kristof.beyls, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58477 llvm-svn: 354622
* [Clang Driver] Add support for "-static-pie" argument to the Clang driver.Siva Chandra2019-02-202-13/+25
| | | | | | | | | | | | Summary: This change mimics GCC's support for the "-static-pie" argument. Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58307 llvm-svn: 354502
* [OPENMP][NVPTX]Use faster teams reduction algorithm.Alexey Bataev2019-02-201-0/+2
| | | | | | | A faster way to reduce the values in teams reductions was found, the codegen is updated to use this faster algorithm and new runtime functions. llvm-svn: 354479
* [ARM] Add pre-defined macros for ROPI and RWPIOliver Stannard2019-02-181-0/+7
| | | | | | | | | This adds ACLE-defined macros to test for code being compiled in the ROPI and RWPI position-independence modes. Differential revision: https://reviews.llvm.org/D23610 llvm-svn: 354265
* [RISCV] Default enable RISCV linker relaxationShiva Chen2019-02-171-0/+12
| | | | | | Differential Revision: https://reviews.llvm.org/D47127 llvm-svn: 354222
* [Driver][Gnu] Support -nolibc flagPetr Hosek2019-02-171-1/+2
| | | | | | | | | This can be used to disable libc linking. This flag is supported by GCC since version 9 as well as some Clang target toolchains. Differential Revision: https://reviews.llvm.org/D58326 llvm-svn: 354210
* [Driver][Fuchsia] Support -nolibc flagPetr Hosek2019-02-171-1/+2
| | | | | | | | | | | This can be used to disable libc linking. This flag is supported by GCC since version 9 as well as some Clang target toolchains. This change also includes tests for all -no* flags which previously weren't covered. Differential Revision: https://reviews.llvm.org/D58325 llvm-svn: 354208
* [Driver] Default all Android ARM targets to NEON.Dan Albert2019-02-151-3/+1
| | | | | | | | | | | | | | | | | | | | Summary: There are an insignificant number of ARM Android devices that don't support NEON. Default to using NEON since that will improve performance on the majority of devices. Users that need to target non-NEON devices can still explicitly disable NEON. Reviewers: srhines, pirama, kristof.beyls Reviewed By: pirama Subscribers: efriedma, javed.absar, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58153 llvm-svn: 354166
* Fixed failure on Darwin due to r354064Ana Pazos2019-02-151-1/+0
| | | | | | | | | | | | | | | | | Summary: instrprof-darwin-exports.c test fails on Darwin due to r354064. Updated clang list of exported symbols to fix the issue. Reviewers: vsk Reviewed By: vsk Subscribers: davidxl, efriedma Differential Revision: https://reviews.llvm.org/D58259 llvm-svn: 354089
* [Driver][Darwin] Emit an error when using -pg on OS without support for it.Volodymyr Sapsai2019-02-141-14/+19
| | | | | | | | | | | | | | | | | Instead of letting a program fail at runtime, emit an error during compilation. rdar://problem/12206955 Reviewers: dexonsmith, bob.wilson, steven_wu Reviewed By: steven_wu Subscribers: jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D57991 llvm-svn: 354084
* [Driver] Pass +reserve-x25 to backend if -ffixed-x25 is specifiedPetr Hosek2019-02-131-0/+3
| | | | | | This was accidentally omitted in r353957 breaking the Clang test. llvm-svn: 353960
* [AArch64] Support reserving arbitrary general purpose registersPetr Hosek2019-02-131-0/+42
| | | | | | | | | | | | This is a follow up to D48580 and D48581 which allows reserving arbitrary general purpose registers with the exception of registers with special purpose (X8, X16-X18, X29, X30) and registers used by LLVM (X0, X19). This change also generalizes some of the existing logic to rely entirely on values generated from tablegen. Differential Revision: https://reviews.llvm.org/D56305 llvm-svn: 353957
* [HIP] Handle compile -m options and propagate into LLCAaron Enye Shi2019-02-131-2/+20
| | | | | | | | | | | Allow the compile options for -m such as -mxnack/-mno-xnack, -msram-ecc/-mno-sram-ecc, -mcode-object-v3/-mno-code-object-v3 to propagate into LLC args. Fix an issue where -mattr was pushed even when it was empty. Also add lit tests to verify features are properly passed. Differential Revision: https://reviews.llvm.org/D57977 Reviewers: yaxunl, kzhuravl llvm-svn: 353952
* [MinGW] Add the profiling library when necessaryMartin Storsjo2019-02-131-0/+2
| | | | | | | | | Profiling still doesn't seem to work properly, but this at least hooks up the library and eases completing whatever is missing. Differential Revision: https://reviews.llvm.org/D58107 llvm-svn: 353917
* Revert r353880 "[HIP] Handle compile -m options and propagate into LLC"Reid Kleckner2019-02-121-19/+2
| | | | | | This was still causing test failures in the clang test suite. llvm-svn: 353893
* [HIP] Handle compile -m options and propagate into LLCAaron Enye Shi2019-02-121-2/+19
| | | | | | | | | | | Allow the compile options for -m such as -mxnack/-mno-xnack, -msram-ecc/-mno-sram-ecc, -mcode-object-v3/-mno-code-object-v3 to propagate into LLC args. Also add lit tests to verify features are properly passed. Differential Revision: https://reviews.llvm.org/D57977 Reviewers: yaxunl, kzhuravl llvm-svn: 353880
* Disable PIC/PIE for MSP430 targetAnton Korobeynikov2019-02-121-0/+4
| | | | | | | | | | Relocatable code generation is meaningless on MSP430, as the platform is too small to use shared libraries. Patch by Dmitry Mikushev! Differential Revision: https://reviews.llvm.org/D56927 llvm-svn: 353877
* [WebAssembly] Make thread-related options consistentHeejin Ahn2019-02-114-9/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: There have been three options related to threads and users had to set all three of them separately to get the correct compilation results. This makes sure the relationship between the options makes sense and sets necessary options for users if only part of the necessary options are specified. This does: - Remove `-matomics`; this option alone does not enable anything, so removed it to not confuse users. - `-mthread-model posix` sets `-target-feature +atomics` - `-pthread` sets both `-target-feature +atomics` and `-mthread-model posix` Also errors out when explicitly given options don't match, such as `-pthread` is given with `-mthread-model single`. Reviewers: dschuff, sbc100, tlively, sunfish Subscribers: jgravelle-google, jfb, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57874 llvm-svn: 353761
* Use llvm::is_contained. NFCFangrui Song2019-02-103-6/+4
| | | | llvm-svn: 353635
* [clang-cl] support /Oy- on aarch64Martin Storsjo2019-02-071-4/+4
| | | | | | | | | | MSVC supports /Oy- on aarch64, so clang-cl should too. Patch by Nathan Froyd! Differential Revision: https://reviews.llvm.org/D57838 llvm-svn: 353402
* Basic CUDA-10 support.Artem Belevich2019-02-051-0/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D57771 llvm-svn: 353232
* Do not use frame pointer by default for MSP430Anton Korobeynikov2019-02-051-0/+1
| | | | | | | | | | | This is suggested by 3.3.9 of MSP430 EABI document. We do allow user to manually enable frame pointer. GCC toolchain uses the same behavior. Patch by Dmitry Mikushev! Differential Revision: https://reviews.llvm.org/D56925 llvm-svn: 353212
* [NewPM] Add support for new-PM plugins to clangPhilip Pfaffe2019-02-021-0/+7
| | | | | | | | | | | | | | | Summary: This adds support for new-PM plugin loading to clang. The option `-fpass-plugin=` may be used to specify a dynamic shared object file that adheres to the PassPlugin API. Tested: created simple plugin that registers an EP callback; with optimization level > 0, the pass is run as expected. Committed on behalf of Marco Elver Differential Revision: https://reviews.llvm.org/D56935 llvm-svn: 352972
* Make clang/test/Index/pch-from-libclang.c pass in more placesNico Weber2019-01-311-11/+28
| | | | | | | | | | | | | | | - fixes the test on macOS with LLVM_ENABLE_PIC=OFF - together with D57343, gets the test to pass on Windows - makes it run everywhere (it seems to just pass on Linux) The main change is to pull out the resource directory computation into a function shared by all 3 places that do it. In CIndexer.cpp, this now works no matter if libclang is in lib/ or bin/ or statically linked to a binary in bin/. Differential Revision: https://reviews.llvm.org/D57345 llvm-svn: 352803
* [CUDA] Propagate detected version of CUDA to cc1Artem Belevich2019-01-312-3/+19
| | | | | | | | | | | | | ..and use it to control that parts of CUDA compilation that depend on the specific version of CUDA SDK. This patch has a placeholder for a 'new launch API' support which is in a separate patch. The list will be further extended in the upcoming patch to support CUDA-10.1. Differential Revision: https://reviews.llvm.org/D57487 llvm-svn: 352798
* [clang] [Driver] [NetBSD] Append -rpath for shared compiler-rt runtimesMichal Gorny2019-01-301-0/+7
| | | | | | | | | | | | Append appropriate -rpath when using shared compiler-rt runtimes, e.g. '-fsanitize=address -shared-libasan'. There's already a similar logic in CommonArgs.cpp but it uses non-standard arch-suffixed installation directory while we want our driver to work with standard installation paths. Differential Revision: https://reviews.llvm.org/D57303 llvm-svn: 352610
* Rollback unwindlib patch.Sterling Augustine2019-01-292-85/+28
| | | | llvm-svn: 352524
* Add --unwindlib=[libgcc|compiler-rt] to parallel --rtlib=Sterling Augustine2019-01-282-28/+85
| | | | | | | | | | | | | | | | Summary: "clang++ hello.cc --rtlib=compiler-rt" now works without specifying additional unwind or exception handling libraries. Reviewers: rsmith Subscribers: srhines, dberris, aheejin, llvm-commits Differential Revision: https://reviews.llvm.org/D57128 llvm-svn: 352404
* Add -fapply-global-visibility-to-externs for -cc1Scott Linder2019-01-282-1/+4
| | | | | | | | | | | | | Introduce an option to request global visibility settings be applied to declarations without a definition or an explicit visibility, rather than the existing behavior of giving these default visibility. When the visibility of all or most extern definitions are known this allows for the same optimisations -fvisibility permits without updating source code to annotate all declarations. Differential Revision: https://reviews.llvm.org/D56868 llvm-svn: 352391
* Revert r352181 as it's breaking the botsAnton Korobeynikov2019-01-251-4/+0
| | | | llvm-svn: 352186
* Disable PIC/PIE for MSP430 target by default.Anton Korobeynikov2019-01-251-0/+4
| | | | | | | | | | Relocatable code generation is meaningless on MSP430, as the platform is too small to use shared libraries. Patch by Dmitry Mikushev! Differential Revision: https://reviews.llvm.org/D56927 llvm-svn: 352181
* Test commit: fix typo.Pierre Gousseau2019-01-241-1/+1
| | | | llvm-svn: 352042
* [Driver] Don't pass default value to getCompilerRTArgStringPetr Hosek2019-01-214-7/+7
| | | | | | | | Using static library is already a default. Differential Revision: https://reviews.llvm.org/D56043 llvm-svn: 351710
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-19102-408/+306
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [mips] Add '-mrelax-pic-calls', '-mno-relax-pic-calls'Vladimir Stefanovic2019-01-181-0/+8
| | | | | | | | | | | These two options enable/disable emission of R_{MICRO}MIPS_JALR fixups along with PIC calls. The linker may then try to turn PIC calls into direct jumps. By default, these fixups do get emitted by the backend, use '-mno-relax-pic-calls' to omit them. Differential revision: https://reviews.llvm.org/D56878 llvm-svn: 351579
* Enable IAS for OpenBSD SPARC.Brad Smith2019-01-151-1/+1
| | | | llvm-svn: 351245
* [Nios2] Remove Nios2 backendCraig Topper2019-01-151-19/+0
| | | | | | | | As mentioned here http://lists.llvm.org/pipermail/llvm-dev/2019-January/129121.html This backend is incomplete and has not been maintained in several months. Differential Revision: https://reviews.llvm.org/D56690 llvm-svn: 351230
* [MSP430] Provide a toolchain descriptionAnton Korobeynikov2019-01-156-0/+347
| | | | | | | | | | | | | | | This is an initial implementation for msp430 toolchain including -mmcu option support -mhwmult options support -integrated-as by default The toolchain uses msp430-elf-as as a linker and supports msp430-gcc toolchain tree. Patch by Kristina Bessonova! Differential Revision: https://reviews.llvm.org/D56658 llvm-svn: 351228
* [Solaris] Move enabling IAS for SPARC from the Solaris toolchain to Generic_GCC.Brad Smith2019-01-152-2/+6
| | | | llvm-svn: 351217
* [WebAssembly] Support multilibs for wasm32 and add a wasm OS that uses itDan Gohman2019-01-151-3/+35
| | | | | | | | | | | | This adds support for multilib paths for wasm32 targets, following [Debian's Multiarch conventions], and also adds an experimental OS name in order to test it. [Debian's Multiarch conventions]: https://wiki.debian.org/Multiarch/ Differential Revision: https://reviews.llvm.org/D56553 llvm-svn: 351164
* [NetBSD] Enable additional sanitizer typesMichal Gorny2019-01-121-0/+4
| | | | | | Differential Revision: https://reviews.llvm.org/D56607 llvm-svn: 351002
* [Darwin][Driver] Don't pass a file as object_path_lto during ThinLTOSteven Wu2019-01-112-7/+25
| | | | | | | | | | | | | | | | | | | | | | Summary: After r327851, Driver::GetTemporaryPath will create the file rather than just create a potientially unqine filename. If clang driver pass the file as parameter as -object_path_lto, ld64 will pass it back to libLTO as GeneratedObjectsDirectory, which is going to cause a LLVM ERROR if it is not a directory. Now during thinLTO, pass a temp directory path to linker instread. rdar://problem/47194182 Reviewers: arphaman, dexonsmith Reviewed By: arphaman Subscribers: mehdi_amini, inglorion, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D56608 llvm-svn: 350970
* [LTO] Add option to enable LTOUnit splitting, and disable unless neededTeresa Johnson2019-01-112-0/+13
| | | | | | | | | | | | | | | | | | | | Summary: Adds a new -f[no]split-lto-unit flag that is disabled by default to control module splitting during ThinLTO. It is automatically enabled for -fsanitize=cfi and -fwhole-program-vtables. The new EnableSplitLTOUnit codegen flag is passed down to llvm via a new module flag of the same name. Depends on D53890. Reviewers: pcc Subscribers: ormris, mehdi_amini, inglorion, eraman, steven_wu, dexonsmith, cfe-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D53891 llvm-svn: 350949
* Properly support -shared-libgcc.Sterling Augustine2019-01-101-6/+3
| | | | | | This revision was revied in D55016. llvm-svn: 350900
* [HIP] Use nul instead of /dev/null when running on windowsYaxun Liu2019-01-101-1/+7
| | | | | | | | When clang is running on windows, /dev/null is not available. Use nul as empty input file instead. Differential Revision: https://reviews.llvm.org/D56225 llvm-svn: 350885
* [OpenMP] Add flag for preventing the extension to 64 bits for the collapse ↵Gheorghe-Teodor Bercea2019-01-091-0/+4
| | | | | | | | | | | | | | | | loop counter Summary: Introduce a compiler flag for cases when the user knows that the collapsed loop counter can be safely represented using at most 32 bits. This will prevent the emission of expensive mathematical operations (such as the div operation) on the iteration variable using 64 bits where 32 bit operations are sufficient. Reviewers: ABataev, caomhin Reviewed By: ABataev Subscribers: hfinkel, kkwli0, guansong, cfe-commits Differential Revision: https://reviews.llvm.org/D55928 llvm-svn: 350758
* [Driver] Fix libcxx detection on Darwin with clang run as ./clangIlya Biryukov2019-01-091-4/+5
| | | | | | | | | | | | | | | | | | | | | | Summary: By using '..' instead of fs::parent_path. The intention of the code was to go from 'path/to/clang/bin' to 'path/to/clang/include'. In most cases parent_path works, however it would fail when clang is run as './clang'. This was noticed in Chromium's bug tracker, see https://bugs.chromium.org/p/chromium/issues/detail?id=919761 Reviewers: arphaman, thakis, EricWF Reviewed By: arphaman, thakis Subscribers: christof, cfe-commits Differential Revision: https://reviews.llvm.org/D56446 llvm-svn: 350714
* [Driver] Default to -fno-addrsig on Android.Dan Albert2019-01-081-0/+1
| | | | | | | | | | | | | | Summary: The Android NDK still uses GNU binutils by default. Reviewers: srhines, pirama Reviewed By: srhines Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56456 llvm-svn: 350668
OpenPOWER on IntegriCloud