summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver
Commit message (Collapse)AuthorAgeFilesLines
* [Shave]: pass -isystem dirs and "-Wa," args to moviAsmDouglas Katzman2015-09-111-4/+5
| | | | llvm-svn: 247474
* Record function attribute "stackrealign" instead of using backend optionAkira Hatanaka2015-09-111-7/+1
| | | | | | | | | | | | -force-align-stack. Also, make changes to the driver so that -mno-stack-realign is no longer an option exposed to the end-user that disallows stack realignment in the backend. Differential Revision: http://reviews.llvm.org/D11815 llvm-svn: 247451
* [modules] Don't load files specified by -fmodule-file= when modules areRichard Smith2015-09-111-1/+4
| | | | | | disabled. (We still allow this via -cc1 / -Xclang, primarily for testing.) llvm-svn: 247384
* [Driver] Use UniversalCRT on Windows if availableReid Kleckner2015-09-113-13/+99
| | | | | | | | | | | | | | | | | | | | Summary: With Visual Studio 2015 release, a part of runtime library was extracted and now comes with Windows Kits. This patch enables clang to use Universal CRT library if %INCLUDE or %LIB environment varaibles are not specified. See also https://llvm.org/bugs/show_bug.cgi?id=24741 Patch by Igor Kudrin Reviewers: zturner, hans, rnk Subscribers: ruiu, cfe-commits Differential Revision: http://reviews.llvm.org/D12695 llvm-svn: 247362
* Driver: Support cfi-icall on all OSs when targeting x86/x86_64.Peter Collingbourne2015-09-102-4/+7
| | | | llvm-svn: 247324
* Re-commit r247218: "Fix Clang-tidy misc-use-override warnings, other minor ↵Hans Wennborg2015-09-101-2/+2
| | | | | | | | fixes" This never broke the build; it was the LLVM side, r247216, that caused problems. llvm-svn: 247302
* [OPENMP] Generate threadprivates as TLS variables by default.Alexey Bataev2015-09-101-4/+1
| | | | | | If target supports TLS all threadprivates are generated as TLS. If target does not support TLS, use runtime calls for proper codegen of threadprivate variables. llvm-svn: 247273
* CFI: Introduce -fsanitize=cfi-icall flag.Peter Collingbourne2015-09-102-1/+2
| | | | | | | | | | This flag causes the compiler to emit bit set entries for functions as well as runtime bitset checks at indirect call sites. Depends on the new function bitset mechanism. Differential Revision: http://reviews.llvm.org/D11857 llvm-svn: 247238
* Revert r247218: "Fix Clang-tidy misc-use-override warnings, other minor fixes"Hans Wennborg2015-09-101-2/+2
| | | | | | | | | | | Seems it broke the Polly build. From http://lab.llvm.org:8011/builders/perf-x86_64-penryn-O3-polly-fast/builds/11687/steps/compile/logs/stdio: In file included from /home/grosser/buildslave/perf-x86_64-penryn-O3-polly-fast/llvm.src/lib/TableGen/Record.cpp:14:0: /home/grosser/buildslave/perf-x86_64-penryn-O3-polly-fast/llvm.src/include/llvm/TableGen/Record.h:369:3: error: looser throw specifier for 'virtual llvm::TypedInit::~TypedInit()' /home/grosser/buildslave/perf-x86_64-penryn-O3-polly-fast/llvm.src/include/llvm/TableGen/Record.h:270:11: error: overriding 'virtual llvm::Init::~Init() noexcept (true)' llvm-svn: 247222
* Fix Clang-tidy misc-use-override warnings, other minor fixesHans Wennborg2015-09-101-2/+2
| | | | | | | | Patch by Eugene Zelenko! Differential Revision: http://reviews.llvm.org/D12741 llvm-svn: 247218
* [Solaris] Use the GCC Installation detector to add the C++ include paths.Rafael Espindola2015-09-092-0/+29
| | | | | | Patch by Xan López! llvm-svn: 247144
* [Shave]: add a -MT option to moviCompile if there wasn't oneDouglas Katzman2015-09-081-9/+21
| | | | | | Differential Revision: http://reviews.llvm.org/D12622 llvm-svn: 247052
* [WebAssembly] Initial WebAssembly support in clangDan Gohman2015-09-035-4/+113
| | | | | | | | | | This implements basic support for compiling (though not yet assembling or linking) for a WebAssembly target. Note that ABI details are not yet finalized, and may change. Differential Revision: http://reviews.llvm.org/D12002 llvm-svn: 246814
* [mips] Added support for choosing between traps and breaks in the integrated ↵Daniel Sanders2015-09-031-0/+6
| | | | | | | | | | | | | | | | assembler macros. Summary: The command line options for these are -Wa,--trap and -Wa,--break. Patch by Scott Egerton. Reviewers: vkalintiris, dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11676 llvm-svn: 246765
* [ARM] Allow passing/returning of __fp16 argumentsOliver Stannard2015-09-031-2/+12
| | | | | | | | | | | | | | | | | | | | | The ACLE (ARM C Language Extensions) 2.0 allows the __fp16 type to be used as a functon argument or return type (ACLE 1.1 did not). The current public release of the AAPCS (2.09) states that __fp16 values should be converted to single-precision before being passed or returned, but AAPCS 2.10 (to be released shortly) changes this, so that they are passed in the least-significant 16 bits of either a GPR (for base AAPCS) or a single-precision register (for AAPCS-VFP). This does not change how arguments are passed if they get passed on the stack. This patch brings clang up to compliance with the latest versions of both of these specs. We can now set the __ARM_FP16_ARGS ACLE predefine, and we have always been able to set the __ARM_FP16_FORMAT_IEEE predefine (we do not support the alternative format). llvm-svn: 246764
* Revert 246755 as it breaks buildbotsOliver Stannard2015-09-031-12/+2
| | | | | | | | | | | | | | | | | | | | | | | | Original commit message: [ARM] Allow passing/returning of __fp16 arguments The ACLE (ARM C Language Extensions) 2.0 allows the __fp16 type to be used as a functon argument or return type (ACLE 1.1 did not). The current public release of the AAPCS (2.09) states that __fp16 values should be converted to single-precision before being passed or returned, but AAPCS 2.10 (to be released shortly) changes this, so that they are passed in the least-significant 16 bits of either a GPR (for base AAPCS) or a single-precision register (for AAPCS-VFP). This does not change how arguments are passed if they get passed on the stack. This patch brings clang up to compliance with the latest versions of both of these specs. We can now set the __ARM_FP16_ARGS ACLE predefine, and we have always been able to set the __ARM_FP16_FORMAT_IEEE predefine (we do not support the alternative format). llvm-svn: 246760
* [ARM] Allow passing/returning of __fp16 argumentsOliver Stannard2015-09-031-2/+12
| | | | | | | | | | | | | | | | | | | | | The ACLE (ARM C Language Extensions) 2.0 allows the __fp16 type to be used as a functon argument or return type (ACLE 1.1 did not). The current public release of the AAPCS (2.09) states that __fp16 values should be converted to single-precision before being passed or returned, but AAPCS 2.10 (to be released shortly) changes this, so that they are passed in the least-significant 16 bits of either a GPR (for base AAPCS) or a single-precision register (for AAPCS-VFP). This does not change how arguments are passed if they get passed on the stack. This patch brings clang up to compliance with the latest versions of both of these specs. We can now set the __ARM_FP16_ARGS ACLE predefine, and we have always been able to set the __ARM_FP16_FORMAT_IEEE predefine (we do not support the alternative format). llvm-svn: 246755
* Remove inadvertent debug output from prior change.Douglas Katzman2015-09-021-1/+0
| | | | llvm-svn: 246715
* Use new utility function to clean leading junk from pathnames. NFCDouglas Katzman2015-09-021-0/+1
| | | | llvm-svn: 246714
* Do not include default sanitizer blacklists into -M/-MM/-MD/-MMD output.Ivan Krasin2015-09-021-2/+11
| | | | | | | | | | | | | | | | | Summary: Do not include default sanitizer blacklists into -M/-MM/-MD/-MMD output. Introduce a frontend option -fdepfile-entry, and only insert them for the user-defined sanitizer blacklists. In frontend, grab ExtraDeps from -fdepfile-entry, instead of -fsanitize-blacklist. Reviewers: rsmith, pcc Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D12544 llvm-svn: 246700
* [Shave]: pass through more clang options to moviCompileDouglas Katzman2015-09-021-0/+1
| | | | llvm-svn: 246652
* [Sparc]: GCCInstallationDetector should not care if little-endianDouglas Katzman2015-09-021-1/+1
| | | | llvm-svn: 246650
* Stop hardcoding GCC paths in crt/ld.so lookup.Rafael Espindola2015-08-313-43/+123
| | | | | | | | | | This patch refactors the code to use the GCC installation detector (modified so that it works in Solaris), and uses ToolChain::GetFilePath everywhere once it works. Patch by Xan López <xan@igalia.com>! llvm-svn: 246473
* Update for several APIs in LLVM that now use StringRefs rather thanChandler Carruth2015-08-303-18/+15
| | | | | | | | const char pointers. In turn, push this through Clang APIs as well, simplifying a number of bits of code that was handling the oddities of nullptrs. llvm-svn: 246375
* Update for API change in LLVM: ARMTargetParser class is just the ARMChandler Carruth2015-08-302-13/+13
| | | | | | namespace. llvm-svn: 246368
* Support Debian s390x multiarch pathsSylvestre Ledru2015-08-282-1/+10
| | | | | | | | | | Summary: Patch by Steven Chamberlain <steven@pyro.eu.org> Reviewers: uweigand Differential Revision: http://reviews.llvm.org/D12430 llvm-svn: 246295
* Add a -gmodules option to the driver and a -dwarf-ext-refs to cc1Adrian Prantl2015-08-271-0/+6
| | | | | | | | | | | | | to enable the use of external type references in the debug info (a.k.a. module debugging). The driver expands -gmodules to "-g -fmodule-format=obj -dwarf-ext-refs" and passes that to cc1. All this does at the moment is set a flag codegenopts. http://reviews.llvm.org/D11958 llvm-svn: 246192
* [CUDA] Improve CUDA compilation pipeline creation.Artem Belevich2015-08-271-36/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current implementation tries to guess which Action will result in a job which needs to incorporate device-side GPU binaries. The guessing was attempting to work around the fact that multiple actions may be combined into a single compiler invocation. If CudaHostAction ends up being combined (and thus bypassed during action list traversal) no device-side actions it pointed to were processed. The guessing worked for most of the usual cases, but fell apart when external assembler was used. This change removes the guessing and makes sure we create and pass device-side jobs regardless of how the jobs get combined. * CudaHostAction is always inserted either at Compile phase or the FinalPhase of current compilation, whichever happens first. * If selectToolForJob combines CudaHostAction with other actions, it passes info about CudaHostAction up to the caller * When it sees that CudaHostAction got combined with other actions (and hence will never be passed to BuildJobsForActions), BuildJobsForActions creates device-side jobs the same way they would be created if CudaHostAction was passed to BuildJobsForActions directly. * Added two more test cases to make sure GPU binaries are passed to correct jobs. Differential Revision: http://reviews.llvm.org/D11280 llvm-svn: 246174
* [ARM] Error out if float-ab=hard and abi=apcs-gnu on macho platforms.Akira Hatanaka2015-08-261-4/+15
| | | | | | | | | | | | | | | | Error out if -mfloat-abi=hard or -mhard-float is specified on the command line and the target ABI is APCS. Previously clang issued no warnings or errors and just passed the option to the backend, which had no effect on code generation for targets using APCS. This commit corrects the patch commited in r245866, which didn't take into account the fact that not all darwin targets use APCS. rdar://problem/22257950 http://reviews.llvm.org/D12344 llvm-svn: 246054
* Change Native Client x86 usr include and link path to match SDK expectationsDerek Schuff2015-08-261-4/+13
| | | | | | | | | | | | GNU multilib style uses x86_64-nacl/include and x86_64-nacl/usr/include but the SDK expects i686-nacl/usr/include for its files. Change the driver to use this. Fixes https://code.google.com/p/nativeclient/issues/detail?id=4108 Differential Revision: http://reviews.llvm.org/D11271 llvm-svn: 246040
* [clang-cl] Only respect /Oy- for x86_32David Majnemer2015-08-251-10/+21
| | | | | | | The /Oy- flag should have no effect for 64-bit X86, it has reliable unwind tables. llvm-svn: 245913
* Use GetLinkerPath utility function to find linker for NaCl toolchainDerek Schuff2015-08-241-1/+1
| | | | | | | | | | | | | | Summary: This is more consistent with other targets and also makes the -fuse-ld flag work. Reviewers: jvoung Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10697 llvm-svn: 245908
* Revert r245866.Akira Hatanaka2015-08-241-4/+0
| | | | | | This commit was causing buildbot failures. llvm-svn: 245871
* [ARM] Error out on apple darwin platforms if float-abi is "hard".Akira Hatanaka2015-08-241-0/+4
| | | | | | | | | | | | | Error out if the user tries to use float-abi="hard" since it isn't supported on darwin platforms. Previously clang issued no warnings or erros and just passed the option to the backend, which had no effect on code generation for targets using apcs. rdar://problem/22257950 Differential Revision: http://reviews.llvm.org/D12155 llvm-svn: 245866
* Stop treating -static as overriding -fPIC: they are distinct.James Y Knight2015-08-211-4/+2
| | | | | | | | | | | | | | | | | For some reason, clang had been treating a command like: clang -static -fPIC foo.c as if it should be compiled without the PIC relocation model. This was incorrect: -static should be affecting only the linking model, and -fPIC only the compilation. This new behavior also matches GCC. This is a follow-up from a review comment on r245447. Differential Revision: http://reviews.llvm.org/D12208 llvm-svn: 245667
* Revert r245344.Evgeniy Stepanov2015-08-201-1/+0
| | | | | | | | That change is causing strange test failures on Fedora 22 (PR24503), and it does not have any effect with Gold linker anyway (PR15823, https://sourceware.org/bugzilla/show_bug.cgi?id=18859). llvm-svn: 245619
* [Sparc] Add '-EL' when invoking gcc to link little-endian binaries.Douglas Katzman2015-08-201-4/+14
| | | | | | Differential Revision: http://reviews.llvm.org/D12201 llvm-svn: 245595
* Silence a "not all control paths return a value" warning; NFC.Aaron Ballman2015-08-201-1/+1
| | | | llvm-svn: 245562
* Properly pass through the PIC mode to the integrated assembler whenJames Y Knight2015-08-191-162/+201
| | | | | | | | | | | | | | | | | | doing assembly-only, and unify the Driver's PIC argument parsing. On a few architectures, parsing of assembly files annoyingly depends on whether PIC is enabled or not. This was handled for external 'as' already (passing -KPIC), but was missed for calls to the standalone internal assembler. The integrated-as.s test needed to be modified to not expect -fsanitize=address to be unused, as now fsanitize *IS* used for assembly, since -fsanitize=memory can sometimes imply -fPIE, which the assembler needs to know (gack!!). Differential Revision: http://reviews.llvm.org/D11845 llvm-svn: 245447
* [ARM] Proper generic cpus handlingVladimir Sukharev2015-08-191-3/+3
| | | | | | | | | | | | | | "generic" cpu was wrongly handled as exact real CPU name of ARMv8.1A architecture. This has been fixed, now it is abstract name, suitable for any arch. Reviewers: rengolin Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D11640 llvm-svn: 245445
* [OPENMP] Link libomp.lib on WindowsAlexey Bataev2015-08-191-0/+21
| | | | | | | Adds libomp.lib for -fopenmp=libomp and libiomp5md.lib for -fopenmp=libiomp5 on Windows Differential Revision: http://reviews.llvm.org/D11932 llvm-svn: 245414
* [sanitizer] Add -lutil to static runtime link flags.Evgeniy Stepanov2015-08-181-0/+1
| | | | | | | This is needed to prevent breakage of -Wl,-as-needed link when interceptors for functions in libutil are added. See PR15823. llvm-svn: 245344
* Tiny cleanup: move some Triple variables up to the top of theJames Y Knight2015-08-151-21/+27
| | | | | | function, and remove a duplicate var. llvm-svn: 245154
* Represent 2 parallel string arrays as one string[][2] array.Douglas Katzman2015-08-141-19/+19
| | | | | | Differential Revision: http://reviews.llvm.org/D11991 llvm-svn: 245063
* Driver: Fix include directories when not using libgcc under mingwMartell Malone2015-08-131-1/+1
| | | | | | | | | | | | | | | Summary: When we want to use mingw-w64 and clang with compiler-rt we should not need to have libgcc installed. This fixes finding includes when libgcc is not installed Reviewers: yaron.keren Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D11808 llvm-svn: 244902
* Don't compare getArchName() to "tce" as a string. NFC.Douglas Katzman2015-08-121-12/+19
| | | | llvm-svn: 244791
* [Driver] Fix handling of -fbuiltin/-fcommon when combined with -mkernelJohn Brawn2015-08-101-18/+10
| | | | | | | | | | | -mkernel enables -fno-builtin and -fno-common by default, but allows -fbuiltin and -fcommon to override that. However "-fbuiltin -fno-builtin" is treated the same as "-fbuiltin" which is wrong, so fix that. Also fixes similar behaviour when -fno-common is default. Differential Revision: http://reviews.llvm.org/D11459 llvm-svn: 244437
* Teach mingw toolchain driver to properly emit static or dynamic linking of ↵Yaron Keren2015-08-091-2/+18
| | | | | | | | | | ligcc. Implemented in MinGW::Linker::AddLibGCC since AddLibgcc is a logic puzzle even before adding one more boolean. A first step towards simplification of AddLibgcc would be to factor out the Android AddLibgcc code into its own routine. llvm-svn: 244407
* Range-forify a loop, delete trailing whitespace. NFCDouglas Katzman2015-08-061-6/+4
| | | | llvm-svn: 244290
* Driver: Strip -header-include-file and -diagnostic-log-file from crash repro ↵Justin Bogner2015-08-051-0/+1
| | | | | | | | | scripts These two arguments tend to refer to a local path that won't exist when we try to reproduce a bug. Strip them. llvm-svn: 244179
OpenPOWER on IntegriCloud