summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "[Driver] Compute effective target triples once per job (NFCI)"Vedant Kumar2016-07-277-338/+187
| | | | | | | This reverts commit r275895 in order to address some post-commit review feedback from Eric Christopher (see: the list thread for r275895). llvm-svn: 276936
* Refactor how include paths are appended to the command arguments.Samuel Antao2016-07-271-57/+30
| | | | | | | | | | | | | | | Summary: This patch aims at removing redundancy in the way include paths for the regular and offloading toolchains are appended to the arguments list in the clang tool. This was suggested by @rsmith in response to r275931. Reviewers: rsmith, tra Subscribers: rsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D22518 llvm-svn: 276929
* Add flags to toggle preservation of assembly commentsNirav Dave2016-07-271-0/+4
| | | | | | | | | | | | Summary: Add -fpreserve-as-comments and -fno-preserve-as-comments. Reviewers: echristo, rnk Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D22883 llvm-svn: 276907
* [ARM] Pass thumb as architecture to the underlying tools, when targeting windowsRenato Golin2016-07-271-1/+3
| | | | | | | | This makes sure that the thumb section flag gets set by the assembler. Patch by Martin Storsjö. llvm-svn: 276869
* [ARM] Pass -mimplcit-it= to integrated assemblerOliver Stannard2016-07-271-0/+21
| | | | | | Differential Revision: https://reviews.llvm.org/D22761 llvm-svn: 276851
* Support setting default value for -rtlib at build timeJonas Hahnfeld2016-07-273-18/+29
| | | | | | | | | | | | | | | | | This patch introduces a new cmake variable: CLANG_DEFAULT_RTLIB, thru which we can specify a default value for -rtlib (libgcc or compiler-rt) at build time, just like how we set the default C++ stdlib thru CLANG_DEFAULT_CXX_STDLIB. With these two options, we can configure clang to build binaries on Linux that have no runtime dependence on any gcc libs (libstdc++ or libgcc_s). Patch by Lei Zhang! Differential Revision: https://reviews.llvm.org/D22663 llvm-svn: 276848
* Fix for compiling with clang <= 3.7 and g++6 headersVedant Kumar2016-07-271-3/+3
| | | | | | | | | | | Make integers explicitly unsigned, so the tuple constructor will resolve properly when but with clang 3.6, 3.7 and gcc 6.1.1 libstdc++ headers. Patch by Frederich Munch! Differential Revision: https://reviews.llvm.org/D22798 llvm-svn: 276831
* Modules: follow up to r276769.Manman Ren2016-07-261-0/+1
| | | | | | | | In r276769, I forgot to forward the driver option, add that here. rdar://26675801 llvm-svn: 276797
* [Myriad]: better compatibility with vendor sourceDouglas Katzman2016-07-251-9/+3
| | | | | | | | - Accept ma{2100,2150,2150} for -mcpu - Define more preprocessor macros - Don't append "le/" to little-endian lib dirs llvm-svn: 276646
* Update description for CLANG_DEFAULT_CXX_STDLIB and add comment. NFCJonas Hahnfeld2016-07-251-0/+2
| | | | | | | We agreed to call it "platform default" instead of "architecture default". (see D17286) llvm-svn: 276618
* [MSVCToolChain] Guard hardcoded Windows paths with LLVM_ON_WIN32David Majnemer2016-07-251-0/+2
| | | | | | | Paths like C:/foo will never work on UNIX platforms, don't bother implicitly adding them to the search path. llvm-svn: 276606
* [Driver] Switch some getenv calls to llvm::sys::Process::GetEnvDavid Majnemer2016-07-242-27/+29
| | | | | | No functional change is intended. llvm-svn: 276573
* [Profile] Enable profile merging with -fprofile-generat[=<dir>]Xinliang David Li2016-07-221-1/+1
| | | | | | | This patch enables raw profile merging for this option which is the new intended behavior. llvm-svn: 276484
* Add support of the latest Ubuntu (Yakkety Yak - 16.10)Sylvestre Ledru2016-07-191-1/+3
| | | | llvm-svn: 275975
* [driver][mips] Support MIPS targets in modern Android NDKSimon Atanasyan2016-07-191-17/+81
| | | | | | Initial patch provided by Duane Sand. llvm-svn: 275949
* Append clang system include path for offloading tool chains.Samuel Antao2016-07-191-1/+19
| | | | | | | | | | | | | | | Summary: This patch adds clang system include path when offloading tool chains, e.g. CUDA, are used in the current compilation. This fixes an issue detected by @rsmith in response to r275645. Reviewers: rsmith, tra Subscribers: rsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D22490 llvm-svn: 275931
* Allow iOS and tvOS version numbers with 2-digit major version numbers.Bob Wilson2016-07-181-2/+2
| | | | | | rdar://problem/26921601 llvm-svn: 275905
* [Driver] Compute effective target triples once per job (NFCI)Vedant Kumar2016-07-187-187/+338
| | | | | | | | | | Compute an effective target triple exactly once in ConstructJob(), and then simply pass around references to it. This eliminates wasteful re-computation of effective triples (e.g in getARMFloatABI()). Differential Revision: https://reviews.llvm.org/D22290 llvm-svn: 275895
* [Driver] Make Driver::DefaultTargetTriple private (NFCI)Vedant Kumar2016-07-181-3/+3
| | | | | | | | | | | | No in-tree targets access this `DefaultTargetTriple` directly, and usage of default triples is generally discouraged. Make the field private. This is part of en effort to make the clang driver use effective triples more pervasively. Differential Revision: https://reviews.llvm.org/D22289 llvm-svn: 275894
* [NFC] Header cleanupMehdi Amini2016-07-187-9/+8
| | | | | | | | | | Summary: Removed unused headers, replaced some headers with forward class declarations Patch by: Eugene <claprix@yandex.ru> Differential Revision: https://reviews.llvm.org/D20100 llvm-svn: 275882
* Support -masm= flag for x86 assembly targets.Yunzhong Gao2016-07-182-0/+21
| | | | | | | | | | | | | | | | | | | For assembly files without .intel_syntax or .att_syntax directives, allow the -masm= flag to supply a default assembly dialect. For example, C:\TMP> type intel.s .text mov al,0 C:\TMP> clang -masm=intel -c intel.s Without this patch, one would need to pass an "-mllvm -x86-asm-syntax=" flag directly to the backend. C:\TMP> clang -mllvm --x86-asm-syntax=intel -c intel.s Differentials Review: http://reviews.llvm.org/D22285 llvm-svn: 275877
* [Driver] Add flags for enabling both types of PGO InstrumentationSean Silva2016-07-161-7/+26
| | | | | | | | | | | | The flags: Enable IR-level instrumentation -fprofile-generate or -fprofile-generate= When applying profile data: -fprofile-use=/path/to/profdata Patch by Jake VanAdrighem! Differential Revision: https://reviews.llvm.org/D21823 llvm-svn: 275668
* Remove extra semi-colon. Fixes warning and Werror bots.Eric Christopher2016-07-161-1/+1
| | | | llvm-svn: 275655
* Use std::string instead of StringRef when generating the auxiliar triple in ↵Samuel Antao2016-07-161-1/+1
| | | | | | the frontend tool. llvm-svn: 275651
* Attempt to fix breakage caused by r275645 for Windows bots.Samuel Antao2016-07-151-1/+1
| | | | llvm-svn: 275650
* [CUDA][OpenMP] Create generic offload actionSamuel Antao2016-07-155-162/+541
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch replaces the CUDA specific action by a generic offload action. The offload action may have multiple dependences classier in “host” and “device”. The way this generic offloading action is used is very similar to what is done today by the CUDA implementation: it is used to set a specific toolchain and architecture to its dependences during the generation of jobs. This patch also proposes propagating the offloading information through the action graph so that that information can be easily retrieved at any time during the generation of commands. This allows e.g. the "clang tool” to evaluate whether CUDA should be supported for the device or host and ptas to easily retrieve the target architecture. This is an example of how the action graphs would look like (compilation of a single CUDA file with two GPU architectures) ``` 0: input, "cudatests.cu", cuda, (host-cuda) 1: preprocessor, {0}, cuda-cpp-output, (host-cuda) 2: compiler, {1}, ir, (host-cuda) 3: input, "cudatests.cu", cuda, (device-cuda, sm_35) 4: preprocessor, {3}, cuda-cpp-output, (device-cuda, sm_35) 5: compiler, {4}, ir, (device-cuda, sm_35) 6: backend, {5}, assembler, (device-cuda, sm_35) 7: assembler, {6}, object, (device-cuda, sm_35) 8: offload, "device-cuda (nvptx64-nvidia-cuda:sm_35)" {7}, object 9: offload, "device-cuda (nvptx64-nvidia-cuda:sm_35)" {6}, assembler 10: input, "cudatests.cu", cuda, (device-cuda, sm_37) 11: preprocessor, {10}, cuda-cpp-output, (device-cuda, sm_37) 12: compiler, {11}, ir, (device-cuda, sm_37) 13: backend, {12}, assembler, (device-cuda, sm_37) 14: assembler, {13}, object, (device-cuda, sm_37) 15: offload, "device-cuda (nvptx64-nvidia-cuda:sm_37)" {14}, object 16: offload, "device-cuda (nvptx64-nvidia-cuda:sm_37)" {13}, assembler 17: linker, {8, 9, 15, 16}, cuda-fatbin, (device-cuda) 18: offload, "host-cuda (powerpc64le-unknown-linux-gnu)" {2}, "device-cuda (nvptx64-nvidia-cuda)" {17}, ir 19: backend, {18}, assembler 20: assembler, {19}, object 21: input, "cuda", object 22: input, "cudart", object 23: linker, {20, 21, 22}, image ``` The changes in this patch pass the existent regression tests (keeps the existent functionality) and resulting binaries execute correctly in a Power8+K40 machine. Reviewers: echristo, hfinkel, jlebar, ABataev, tra Subscribers: guansong, andreybokhanko, tcramer, mkuron, cfe-commits, arpith-jacob, carlo.bertolli, caomhin Differential Revision: https://reviews.llvm.org/D18171 llvm-svn: 275645
* XRay: Remove duplicate checks for xray instrumentation flagsDean Michael Berris2016-07-151-10/+0
| | | | llvm-svn: 275570
* Use hasFlag instead of hasArgDean Michael Berris2016-07-141-2/+2
| | | | | | | | | | | | Summary: Fix the build to use hasFlag instead of hasArg for checking some flags. Reviewers: echristo Subscribers: mehdi_amini, cfe-commits Differential Revision: http://reviews.llvm.org/D22338 llvm-svn: 275377
* Add C++ dependencies to xray runtimeDean Michael Berris2016-07-141-2/+17
| | | | | | | | | | | | | | | | Summary: Depends on D21982 which implements the in-memory logging implementation of the XRay runtime. These additional changes also depends on D20352 which adds the bulk of XRay flags/dependencies when using the `-fxray-instrument` flag from Clang. Reviewers: echristo, rnk, aaron.ballman Subscribers: mehdi_amini, cfe-commits Differential Revision: http://reviews.llvm.org/D21983 llvm-svn: 275368
* Add XRay flags to Clang. We implement two flags to control the XRay behaviour:Aaron Ballman2016-07-131-0/+37
| | | | | | | | | | | -fxray-instrument: enables XRay annotation of IR -fxray-instruction-threshold: configures the threshold for function size (looking at IR instructions), and allow LLVM to decide whether to add the nop sleds later on in the process. Also implements the related xray_always_instrument and xray_never_instrument function attributes. Patch by Dean Michael Berris. llvm-svn: 275330
* Reapply SVN r274797.Saleem Abdulrasool2016-07-101-12/+0
| | | | | | | | | | | | | | | Original Commit Message Driver: Stop linking to C++ when using sanitizers on Darwin Sanitizers on Darwin are built as dynamic libraries, not static libraries. Sanitizers will have their C++ dependency satisfied internally (LC_LOAD_DYLIB) in the libclang_rt dylib. As long as the sanitizers stay dynamic and not static, linking against C++ when enabling a sanitizer becomes over linkage. Patch by Dave Lee! llvm-svn: 275032
* [clang-cl] Add support for /ZdDavid Majnemer2016-07-091-6/+13
| | | | | | | | | | MASM (ML.exe and ML64.exe) and older versions of MSVC (CL.exe) support a flag called /Zd which is more-or-less -gline-tables-only. It seems nicer to support this flag instead of exposing -gline-tables-only. llvm-svn: 274991
* [OpenCL] Add missing -cl-no-signed-zeros option into driverYaxun Liu2016-07-081-0/+3
| | | | | | | | | | | | Add OCL option -cl-no-signed-zeros to driver options. Also added to opencl.cl testcases. Patch by Aaron En Ye Shi. Differential Revision: http://reviews.llvm.org/D22067 llvm-svn: 274923
* Revert "Driver: Stop linking to C++ when using sanitizers on Darwin"Saleem Abdulrasool2016-07-081-0/+12
| | | | | | | This reverts SVN r274797. It broke the Green Dragon bot. Revert it until the failure can be addressed. llvm-svn: 274814
* Driver: Stop linking to C++ when using sanitizers on DarwinSaleem Abdulrasool2016-07-071-12/+0
| | | | | | | | | | | Sanitizers on Darwin are built as dynamic libraries, not static libraries. Sanitizers will have their C++ dependency satisfied internally (LC_LOAD_DYLIB) in the libclang_rt dylib. As long as the sanitizers stay dynamic and not static, linking against C++ when enabling a sanitizer becomes over linkage. Patch by Dave Lee! llvm-svn: 274797
* [CUDA] s/OPT_nocuda_version_chec/OPT_no_cuda_version_check/.Justin Lebar2016-07-072-2/+2
| | | | | | Fix build breakage. llvm-svn: 274782
* [CUDA] Check that our CUDA install supports the requested architectures.Justin Lebar2016-07-073-2/+96
| | | | | | | | | | | | | | | Summary: Raise an error if you're using a CUDA installation that's too old for the requested architectures. In practice, this means that you need a CUDA 8 install to compile for sm_6*. Reviewers: tra Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D21869 llvm-svn: 274781
* [CUDA] Add missing namespace qualification on CudaArch in Action.cpp.Justin Lebar2016-07-061-1/+1
| | | | | | Fix build breakage with MSVC. llvm-svn: 274689
* [CUDA] Rename member variables in CudaInstallationDetector.Justin Lebar2016-07-062-40/+39
| | | | | | | | | | | | | | Summary: Remove the "Cuda" prefix from these variables -- it's clear that they related to CUDA given their containing type. Reviewers: tra Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D21868 llvm-svn: 274682
* [CUDA] Add utility functions for dealing with CUDA versions / architectures.Justin Lebar2016-07-063-50/+22
| | | | | | | | | | | | | | | | | | Summary: Currently our handling of CUDA architectures is scattered all around clang. This patch centralizes it. A key advantage of this centralization is that you can now write a C++ switch on e.g. CudaArch and get a compile error if you don't handle one of the enum values. Reviewers: tra Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D21867 llvm-svn: 274681
* [CUDA] Add support for CUDA 8 and sm_60-62.Justin Lebar2016-07-062-0/+8
| | | | | | | | | | | | Summary: Also add sm_32, which was missing. Reviewers: tra Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D21778 llvm-svn: 274680
* [Sparc] Allow LEON cpu models to be selected with -mcpuJacob Baungard Hansen2016-07-041-0/+8
| | | | | | | | | | | | Summary: This change exposes the recently added LEON CPUs (D19359) in the LLVM Sparc backend to Clang, allowing the cpu's to be selected using the -mcpu flag. Reviewers: jyknight, lero_chris Subscribers: jyknight, cfe-commits Differential Revision: http://reviews.llvm.org/D21683 llvm-svn: 274487
* [Driver] Delete some dead code (NFC)Vedant Kumar2016-07-011-3/+0
| | | | llvm-svn: 274379
* Driver: support -L for MSVC toolchain under the GNU driverSaleem Abdulrasool2016-07-011-0/+4
| | | | | | | When not using clang in the CL emulation mode, honour the -L flags as additional library paths to pass to the linker invocation. llvm-svn: 274356
* [OpenCL] Allow -cl-std and other standard -cl- options in driverYaxun Liu2016-06-291-0/+34
| | | | | | | | | | | | Allow -cl-std and other standard -cl- options from cc1 to driver. Added a test for the options moved. Patch by Aaron En Ye Shi. Differential Revision: http://reviews.llvm.org/D21031 llvm-svn: 274150
* Use ArgList::hasFlag to check if -miamcu/-mno-iamcu is passed. NFC.Andrey Turetskiy2016-06-292-27/+22
| | | | | | Differential Revision: http://reviews.llvm.org/D21641 llvm-svn: 274119
* [Driver][AArch64] Add support for Broadcom Vulcan core.Pankaj Gode2016-06-291-1/+1
| | | | | | | | Adding support for new Broadcom Vulcan core (ARMv8.1A). Differential Revision: http://reviews.llvm.org/D21501 llvm-svn: 274114
* [Driver] Add method to redirect output of Compilation.Nikolay Haustov2016-06-281-0/+5
| | | | | | | | | | | | | | | | | Summary: Currently output of child process, however in my use case, it needs to be captured and presented to the user. Add Redirect method to Compilation and use existing infrastructure for redirecting output of commands. Reviewers: tstellarAMD Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D21224 llvm-svn: 273997
* [clang-cl] Implement support for /stdDavid Majnemer2016-06-271-4/+19
| | | | | | | /std: supports two arguments, c++14 and c++latest. Currently, c++latest maps to c++1z but this might change down the road. llvm-svn: 273841
* Add support for musl-libc on ARM Linux.Rafael Espindola2016-06-242-2/+21
| | | | | | Patch by Lei Zhang! llvm-svn: 273735
OpenPOWER on IntegriCloud