summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver
Commit message (Collapse)AuthorAgeFilesLines
...
* [mips][mt][7/7] Add driver option for the MIPS MT ASE.Simon Dardis2017-07-121-0/+1
| | | | | | | | Reviewers: atanasyan, slthakur Differential Revision: https://reviews.llvm.org/D35254 llvm-svn: 307847
* Revert "[Driver] Update Fuchsia driver path handling"Petr Hosek2017-07-122-82/+17
| | | | | | | | The tests are failing on Windows. This reverts commit 429fe8229496f639df6b0b4734beedb1d4317aa5. llvm-svn: 307845
* [Driver] Update Fuchsia driver path handlingPetr 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/D32613 llvm-svn: 307830
* NetBSD uses soft-float by default, unless the environment is EABIHF orJoerg Sonnenberger2017-07-111-0/+12
| | | | | | GNUEABIHF. llvm-svn: 307665
* [Bash-autocompletion] Auto complete cc1 options if -cc1 is specifiedYuka Takahashi2017-07-081-1/+10
| | | | | | | | | | | | | | Summary: We don't want to autocomplete flags whose Flags class has `NoDriverOption` when argv[1] is not `-cc1`. Another idea for this implementation is to make --autocomplete a cc1 option and handle it in clang Frontend, by porting --autocomplete handler from Driver to Frontend, so that we can handle Driver options and CC1 options in unified manner. Differential Revision: https://reviews.llvm.org/D34770 llvm-svn: 307479
* Recommit [driver][macOS] Pick the system version for theAlex Lorenz2017-07-071-1/+22
| | | | | | | | | | | | | | | | | | | | deployment target if the SDK is newer than the system This commit reverts the revert commit r305891. Now the change from r305678 should be correct because `llvm::sys::getProcessTriple` now returns the correct macOS version of the system after the LLVM change r307372. Original commit message: This commit improves the driver by making sure that it picks the system version for the deployment target when the version of the macOS SDK is newer than the system version. rdar://29449467 Differential Revision: https://reviews.llvm.org/D34175 llvm-svn: 307388
* [driver][mips] Pass long-calls feature flag to the MIPS backendSimon Atanasyan2017-07-071-0/+2
| | | | | | | | Check the `-mlong-calls` command line option and pass the `long-calls` feature flag to the backend. Handling of this feature flag in the backend needs to be implemented by a separate commit. llvm-svn: 307386
* [OpenMP] Extend CLANG target options with device offloading kind.Gheorghe-Teodor Bercea2017-07-0618-32/+73
| | | | | | | | | | | | | | Summary: Pass the type of the device offloading when building the tool chain for a particular target architecture. This is required when supporting multiple tool chains that target a single device type. In our particular use case, the OpenMP and CUDA tool chains will use the same ```addClangTargetOptions ``` method. This enables the reuse of common options and ensures control over options only supported by a particular tool chain. Reviewers: arpith-jacob, caomhin, carlo.bertolli, ABataev, jlebar, hfinkel, tstellar, Hahnfeld Reviewed By: hfinkel Subscribers: jgravelle-google, aheejin, rengolin, jfb, dschuff, sbc100, cfe-commits Differential Revision: https://reviews.llvm.org/D29647 llvm-svn: 307272
* [OpenMP] Customize CUDA-based tool chain selectionGheorghe-Teodor Bercea2017-07-061-2/+16
| | | | | | | | | | | | | | Summary: This patch provides a generic way of selecting CUDA based tool chains as host-device pairs. Reviewers: arpith-jacob, caomhin, carlo.bertolli, ABataev, Hahnfeld, jlebar, hfinkel, tstellar Reviewed By: Hahnfeld Subscribers: rengolin, cfe-commits Differential Revision: https://reviews.llvm.org/D29658 llvm-svn: 307271
* [driver][mips] Use AddTargetFeature to check arguments and add feature ↵Simon Atanasyan2017-07-051-7/+2
| | | | | | flags. NFC llvm-svn: 307152
* [driver][mips] Remove redundant curly brackets. NFCSimon Atanasyan2017-07-051-3/+2
| | | | llvm-svn: 307151
* Enable LLVM asan support for NetBSD/amd64Kamil Rytarowski2017-07-043-0/+15
| | | | | | | | | | | | | | | | | | | | | | Summary: Enable LLVM asan sanitizer for NetBSD/amd64. Don't generate -ldl for dlopen(3)-like functions on NetBSD. These features are available in libc on NetBSD. Sponsored by <The NetBSD Foundation> Reviewers: joerg, eugenis, kcc, dim Reviewed By: dim Subscribers: #clang, #sanitizers Tags: #clang, #sanitizers Differential Revision: https://reviews.llvm.org/D34960 llvm-svn: 307104
* Add an option group for deprecated warnings. Add the removedJoerg Sonnenberger2017-07-011-0/+6
| | | | | | | | | | -fslp-vectorize-aggressive and -fno-slp-vectorize-aggressive flags back under this group and test for the warning. Document the future removal in the ReleaseNotes. Differential Revision: https://reviews.llvm.org/D34926 llvm-svn: 306965
* fix trivial typos; NFCHiroshi Inoue2017-07-011-1/+1
| | | | llvm-svn: 306954
* Un-revert "[Driver] Add -fdiagnostics-hotness-threshold"Brian Gesiak2017-07-011-0/+6
| | | | | | | | Summary: Un-revert https://reviews.llvm.org/D34868, but with a slight tweak to the documentation to fix an error -- I had used the wrong syntax for a link. llvm-svn: 306948
* Revert "[Driver] Add -fdiagnostics-hotness-threshold"Brian Gesiak2017-07-011-6/+0
| | | | | | | Summary: The commit caused a documentation breakage. llvm-svn: 306946
* [Driver] Add -fdiagnostics-hotness-thresholdBrian Gesiak2017-07-011-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Depends on https://reviews.llvm.org/D34867. Add a Clang frontend option to enable optimization remark hotness thresholds, which were added to LLVM in https://reviews.llvm.org/D34867. This prevents diagnostics that do not meet a minimum hotness threshold from being output. When generating optimization remarks for large codebases with a ton of cold code paths, this option can be used to limit the optimization remark output at a reasonable size. Discussion of this change can be read here: http://lists.llvm.org/pipermail/llvm-dev/2017-June/114377.html Reviewers: anemet, davidxl, hfinkel Reviewed By: anemet Subscribers: fhahn, cfe-commits Differential Revision: https://reviews.llvm.org/D34868 llvm-svn: 306945
* Fix indentation.Akira Hatanaka2017-07-011-7/+7
| | | | | | | | This is an attempt to fix a failing bot: http://lab.llvm.org:8011/builders/ubuntu-gcc7.1-werror llvm-svn: 306944
* Update clang support for -mexecute-only/-mpure-code for backend change to ↵Eric Christopher2017-07-011-3/+1
| | | | | | use subtarget feature rather than command line option. llvm-svn: 306928
* [Driver] Check that the iOS deployment target is iOS 10 or earlier ifAkira Hatanaka2017-07-011-2/+26
| | | | | | | | | | | | | | | | | | | | | the target is 32-bit. The following changes are made to the driver since 32-bit apps do not run on iOS 11 or later: - If the deployment target is set explicitly, either with a command-line option or an environment variable, the driver should report an error if the version is greater than iOS 10. - In the case where the deployment target is not set explicitly and the default is inferred from the target triple or SDK version, it should use a maximum default of iOS 10.99.99. rdar://problem/32230613 Differential Revision: https://reviews.llvm.org/D34529 llvm-svn: 306922
* Driver: honor -nostdinc and -isystem-after on CrossWindowsSaleem Abdulrasool2017-06-301-4/+10
| | | | | | | | | | This changes CrossWindows to look for -nostdinc instead of -nostdlibinc. In addition, fixes a bug where -isystem-after options would be dropped when called with -nostdinc. Patch by Dave Lee! llvm-svn: 306829
* [Driver] Actually report errors during parsing instead of stopping when ↵Benjamin Kramer2017-06-302-15/+32
| | | | | | | | | | | | | | there's an error somewhere. This is a more principled version of r303756. That change was both very brittle about the state of the Diags object going into the driver and also broke tooling in funny ways. In particular it prevented tools from capturing diagnostics properly and made the compilation database logic fail to provide arguments to the tool, falling back to scanning directories for JSON files. llvm-svn: 306822
* Fix heap use after free introduced by r306769.Daniel Jasper2017-06-301-1/+1
| | | | llvm-svn: 306804
* Remove Clang support for '-fvectorize-slp-aggressive' which used LLVM'sChandler Carruth2017-06-301-5/+0
| | | | | | | | | | | | | | | | | | basic block vectorizer. This vectorizer has had no known users for many, many years and is completely surpassed by the normal '-fvectorize-slp'-controlled SLP vectorizer in LLVM. Hal proposed this back in 2014 to no objections: http://lists.llvm.org/pipermail/llvm-dev/2014-November/079091.html While this patch completely removes the flag, Joerg is working on a patch that will add it back in a way that warns users and ignores the flag in a clear and well factored way (so that we can keep doing this going forward). Differential Revision: https://reviews.llvm.org/D34846 llvm-svn: 306786
* Unified logic for computing target ABI in backend and front end by moving ↵Eric Christopher2017-06-301-35/+6
| | | | | | | | | | this common code to Support/TargetParser. Modeled Triple::GNU after front end code (aapcs abi) and updated tests that expect apcs abi. Patch by Ana Pazos! llvm-svn: 306769
* Insert llvm_unreachable at the end of a function to silence gcc'sAkira Hatanaka2017-06-291-0/+1
| | | | | | | | | | -Werror=return-type error. This is an attempt to fix the following failing bot: http://lab.llvm.org:8011/builders/ubuntu-gcc7.1-werror llvm-svn: 306739
* [libFuzzer] Add Fuzzer to the list of sanitizers which support coverage.George Karpenkov2017-06-291-1/+1
| | | | | | | | | Without this change, additional coverage flags specified after -fsanitize=fuzzer would get discarded. https://reviews.llvm.org/D34794 llvm-svn: 306734
* [libFuzzer] Do not link in libFuzzer with -fsanitize=fuzzer when producing a ↵George Karpenkov2017-06-292-2/+3
| | | | | | | | shared object https://reviews.llvm.org/D34791 llvm-svn: 306733
* [Sema] Issue diagnostics if a new/delete expression generates a call toAkira Hatanaka2017-06-292-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | a c++17 aligned allocation/deallocation function that is unavailable in the standard library on Apple platforms. The aligned functions are implemented only in the following versions or later versions of the OSes, so clang issues diagnostics if the deployment target being targeted is older than these: macosx: 10.13 ios: 11.0 tvos: 11.0 watchos: 4.0 The diagnostics are issued whenever the aligned functions are selected except when the selected function has a definition in the same file. If there is a user-defined function available somewhere else, option -Wno-aligned-allocation-unavailable can be used to silence the diagnostics. rdar://problem/32664169 Differential Revision: https://reviews.llvm.org/D34574 llvm-svn: 306722
* [OpenMP] Pass -fopenmp-is-device to preprocessing and machine specific code ↵Gheorghe-Teodor Bercea2017-06-291-3/+5
| | | | | | | | | | | | | | | | generation stages Summary: The preprocessing and code generation and optimization stages of the compiler are also passed the "-fopenmp-is-device" flag. This is used to trigger machine specific preprocessing and code generation when performing device offloading to an NVIDIA GPU via OpenMP directives. Reviewers: arpith-jacob, caomhin, carlo.bertolli, Hahnfeld, hfinkel, tstellar Reviewed By: Hahnfeld Subscribers: Hahnfeld, rengolin Differential Revision: https://reviews.llvm.org/D29645 llvm-svn: 306691
* [OpenMP] Add support for auxiliary triple specificationGheorghe-Teodor Bercea2017-06-291-0/+17
| | | | | | | | | | | | | | Summary: Device offloading requires the specification of an additional flag containing the triple of the //other// architecture the code is being compiled on if such an architecture exists. If compiling for the host, the auxiliary triple flag will contain the triple describing the device and vice versa. Reviewers: arpith-jacob, sfantao, caomhin, carlo.bertolli, ABataev, Hahnfeld, jlebar, hfinkel, tstellar Reviewed By: Hahnfeld Subscribers: rengolin, cfe-commits Differential Revision: https://reviews.llvm.org/D29339 llvm-svn: 306689
* Remove a redundant call to ArgList::hasFlag. NFC.Vedant Kumar2017-06-281-7/+6
| | | | llvm-svn: 306497
* Reapply "Frontend support for Nios2 target"Nikolai Bozhenov2017-06-271-0/+19
| | | | | | | | | | | | | | Summary: - Implements TargetInfo class for Nios2 target. - Enables handling of -march and -mcpu options for Nios2 target. - Definition of Nios2 builtin functions. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D33356 Author: belickim <mateusz.belicki@intel.com> llvm-svn: 306383
* [mips] Enable IAS by default for Android 64-bit MIPS target (N64)Petar Jovanovic2017-06-261-3/+5
| | | | | | | | | IAS is already used for MIPS64 in majority of Android projects. Android MIPS64 uses N64 ABI. Set IAS as a default now. Differential Revision: https://reviews.llvm.org/D34514 llvm-svn: 306280
* Add support for Ananas platformEd Schouten2017-06-254-0/+192
| | | | | | | | | | | | | | | | | Ananas is a home-brew operating system, mainly for amd64 machines. After using GCC for quite some time, it has switched to clang and never looked back - yet, having to manually patch things is annoying, so it'd be much nicer if this was in the official tree. More information: https://github.com/zhmu/ananas/ https://rink.nu/projects/ananas.html Submitted by: Rink Springer Differential Revision: https://reviews.llvm.org/D32936 llvm-svn: 306239
* [ubsan] Disable the object size check at -O0Vedant Kumar2017-06-231-1/+17
| | | | | | | | | | | | This check currently isn't able to diagnose any issues at -O0, not is it likely to [1]. Disabling the check at -O0 leads to substantial compile time and binary size savings. [1] [cfe-dev] Disabling ubsan's object size check at -O0 Differential Revision: https://reviews.llvm.org/D34563 llvm-svn: 306181
* Sort the autocomplete candidates before printing them out.Rui Ueyama2017-06-231-0/+7
| | | | | | | | | | Currently, autocompleted options are displayed in the same order as we wrote them in .td files. This patch sort them out in clang so that they are sorted alphabetically. This should improve usability. Differential Revision: https://reviews.llvm.org/D34557 llvm-svn: 306116
* Revert "Revert r305164/5/7."Saleem Abdulrasool2017-06-232-15/+59
| | | | | | | | | | | | | | | | | | | | | | | Restore the `-gz` option to the driver with some minor tweaks to handle the additional case for `-Wa,--compress-debug-sections`. This intends to make the compression of the debug information controllable from the driver. The following is the behaviour: -gz enable compression (ambiguous for format, will default to zlib-gnu) -gz=none disable compression -gz=zlib-gnu enable compression (deprecated GNU style zlib compression) -gz=zlib enable compression (zlib based compression) Although -Wa,-compress-debug-sections works, it should be discouraged when using the driver to invoke the assembler. However, we permit the assembler to accept the GNU as style argument --compress-debug-sections to maintain compatibility. Note, -gz/-gz= does *NOT* imply -g. That is, you need to additionally specific -g for debug information to be generated. llvm-svn: 306115
* [WebAssembly] Add default -allow-undefined-file to linker argsSam Clegg2017-06-231-2/+3
| | | | | | | | | | | Also, don't use the outdated lib32/lib64 naming of files within the sysroot. The more modern/flexible approach IIUC is to use seperate sysroots or /lib/<target-tripple> and /include/<target-tripple>. Differential Revision: https://reviews.llvm.org/D33565 llvm-svn: 306074
* Revert r305678: [driver][macOS] Pick the system version for theAlex Lorenz2017-06-211-22/+1
| | | | | | | | | | | | | deployment target if the SDK is newer than the system This commit also reverts follow-up commits r305680 and r305685 that have buildbot fixes. The change in r305678 wasn't correct because it relied on `llvm::sys::getProcessTriple`, which uses a pre-configured OS version. We should lookup the actual macOS version of the system on which the compiler is running. llvm-svn: 305891
* [GSoC] Flag value completion for clangYuka Takahashi2017-06-202-5/+23
| | | | | | | | | | | | This is patch for GSoC project, bash-completion for clang. To use this on bash, please run `source clang/utils/bash-autocomplete.sh`. bash-autocomplete.sh is code for bash-completion. In this patch, Options.td was mainly changed in order to add value class in Options.inc. llvm-svn: 305805
* Add missing OS check to r305678Alex Lorenz2017-06-191-2/+4
| | | | | | | That commit failed on non-macOS buildbots as I've forgotten to make sure that the system on which Clang is running on is actually macOS. llvm-svn: 305680
* [driver][macOS] Pick the system version for the deployment targetAlex Lorenz2017-06-191-1/+20
| | | | | | | | | | | | | | if the SDK is newer than the system This commit improves the driver by making sure that it picks the system version for the deployment target when the version of the macOS SDK is newer than the system version. rdar://29449467 Differential Revision: https://reviews.llvm.org/D34175 llvm-svn: 305678
* Fix a bug that warnings generated with -M or -MM flagsYuka Takahashi2017-06-161-0/+3
| | | | | | | | | This is a patch for bug: https://bugs.llvm.org/show_bug.cgi?id=6817 Warnings should not be emitted with -M and -MM flags, because this mode is only used for generate MakeFiles. llvm-svn: 305561
* Revert r305164/5/7.Daniel Jasper2017-06-122-59/+15
| | | | | | | | | | | | | | cc1as does not currently access the "--" version of this flag. At the very least this needs to be fixed and proper test cases need to be added. Simple reproducer: clang -Wa,--compress-debug-sections /tmp/test.cc Result: error: unknown argument: '--compress-debug-sections' llvm-svn: 305182
* test: attempt to repair build botsSaleem Abdulrasool2017-06-111-4/+7
| | | | | | | Split the no-ias tests and give them a target to ensure that they go down the GNU toolchain path. Adjust the no compression support tests. llvm-svn: 305167
* Driver: add support for `-gz` and `-gz=`Saleem Abdulrasool2017-06-112-0/+52
| | | | | | | | | | | | | | | | | These options control the behaviour of the compression of debug info sections on ELF targets. Our behaviour slightly diverges from the behaviour of GCC. `-gz` maps to the `-compress-debug-sections` rather than `-compress-debug-sections=zlib` or `-compress-debug-sections=zlib-gnu`. This small divergence allows us to be compatible across versions of binutils (=zlib support was introduced in 2.26, while earlier versions only support =zlib-gnu). This also allows users to not have to worry about the version of the assembler they may be using if they are not using the IAS. Previously, users would have had to go through the internal option `-compress-debug-sectionss` and pass that through to the assembler, which is no longer needed. llvm-svn: 305165
* Driver: pass along [-]-[no]compress-debug-sections unfilteredSaleem Abdulrasool2017-06-111-15/+4
| | | | | | | | | | | | Rather than validating the flags, pass them through without any validation. Arguments passed via -Wa or -Xassembler are passed directly to the assembler without validation. The validation was previously required since we did not provide proper driver level support for controlling the debug compression on ELF targets. A subsequent change will add support for the `-gz` and `-gz=` flags which provide proper driver level control of the ELF compressed debug sections. llvm-svn: 305164
* Add -frewrite-imports flag.Richard Smith2017-06-092-1/+8
| | | | | | | | If specified, when preprocessing, the contents of imported .pcm files will be included in preprocessed output. The resulting preprocessed file can then be compiled standalone without the module sources or .pcm files. llvm-svn: 305116
* Revert of r305066 "Reapply Frontend support for Nios2 target"Nikolai Bozhenov2017-06-091-19/+0
| | | | llvm-svn: 305068
OpenPOWER on IntegriCloud