summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/MSVCToolChain.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [Driver] Add support for Windows 10 SDKIgor Kudrin2015-09-241-66/+96
| | | | | | | | | | | | | | | | Summary: With Windows 10 SDK, Include and Lib directories now contain an additional subfolder with the name that corresponds to the full version of the SDK, for example: - C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\um - C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\um\x64 Reviewers: ruiu, rnk Subscribers: majnemer, cfe-commits Differential Revision: http://reviews.llvm.org/D12832 llvm-svn: 248463
* [Driver] Use UniversalCRT on Windows if availableReid Kleckner2015-09-111-13/+88
| | | | | | | | | | | | | | | | | | | | 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
* [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
* [clang-cl] Handle -O correctlyDavid Majnemer2015-07-271-0/+98
| | | | | | | | | | | | | | | We had multiple bugs here: - We didn't support multiple optimization options in one argument. e.g. -O2y- - We didn't correctly expand -O[12dx] to their respective options. - We treated -O1 as clang -O1 instead of clang -Os. - We treated -Ox as clang -O3 instead of clang -O2. In fact, cl's -Ox option is *less* powerful than cl's -O2 option despite -Ox described as "Full Optimization". This fixes PR24003. llvm-svn: 243261
* Driver: enable support for -fsanitize=cfi on Windows.Peter Collingbourne2015-07-081-3/+0
| | | | | | | | | There are known issues, but the current implementation is good enough for the check-cfi test suite. Differential Revision: http://reviews.llvm.org/D11030 llvm-svn: 241728
* Pedantically rename all Tool subclasses to be nouns, not verbs. NFCDouglas Katzman2015-06-231-2/+2
| | | | | | | | | | | | | | | | | | Classes in Tools.h inherit ultimately from Tool, which is a noun, but subclasses of Tool were named for their operation, such as "Compile", wherein the constructor call "Compile(args...)" could be misconstrued as actually causing a compile to happen. Likewise various other methods were not harmonious with their effect, in that "BuildLinker()" returned a "new namespace::Link(...)" instead of a "new namespace::Linker(...)" which it now does. Exceptions: Clang and ClangAs are un-renamed. Those are their rightful names. And there is no particulary great way to name the "Lipo-er" and a few others. Differential Revision: http://reviews.llvm.org/D10595 llvm-svn: 240455
* [Sanitizers] Provide better diagnostic for sanitizers unsupported for target ↵Alexey Samsonov2015-06-191-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | triple. Introduce ToolChain::getSupportedSanitizers() that would return the set of sanitizers available on given toolchain. By default, these are sanitizers which don't necessarily require runtime support and are not toolchain- or architecture-dependent. Sanitizers (ASan, DFSan, TSan, MSan etc.) which cannot function without runtime library are marked as supported only on platforms for which we actually build these runtimes. This would allow more fine-grained checks in the future: for instance, we have to restrict availability of -fsanitize=vptr to Mac OS 10.9+ (PR23539). Update test cases accrodingly: add tests for certain unsupported configurations, remove test cases for -fsanitize=vptr + PS4 integration, as we don't build the runtime for PS4 at the moment. This change was first submitted as r239953 and reverted in r239958. The problem was and still is in Darwin toolchains, which get the knowledge about target platform too late after initializaition, while now we require this information when ToolChain::getSanitizerArgs() is called. r240170 works around this issue. llvm-svn: 240179
* Revert "[Sanitizers] Provide better diagnostic for sanitizers unsupported ↵Alexey Samsonov2015-06-171-9/+0
| | | | | | | | | for target triple." This reverts commit r239953, while I'm investigating assertion failure from http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check/9994/ llvm-svn: 239958
* [Sanitizers] Provide better diagnostic for sanitizers unsupported for target ↵Alexey Samsonov2015-06-171-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | triple. Summary: Introduce ToolChain::getSupportedSanitizers() that would return the set of sanitizers available on given toolchain. By default, these are sanitizers which don't necessarily require runtime support (i.e. set from -fsanitize=undefined-trap). Sanitizers (ASan, DFSan, TSan, MSan etc.) which cannot function without runtime library are marked as supported only on platforms for which we actually build these runtimes. This would allow more fine-grained checks in the future: for instance, we have to restrict availability of -fsanitize=vptr to Mac OS 10.9+ (PR23539) Update test cases accrodingly: add tests for certain unsupported configurations, remove test cases for -fsanitize=vptr + PS4 integration, as we don't build the runtime for PS4 at the moment. Test Plan: regression test suite Reviewers: pcc Subscribers: cfe-commits, filcab, eugenis, thakis, kubabrecka, emaste, rsmith Differential Revision: http://reviews.llvm.org/D10467 llvm-svn: 239953
* [Driver] Preserve the object file format in ComputeEffectiveClangTripleDavid Majnemer2015-06-091-2/+8
| | | | | | | | The object file format is sometimes overridden for MSVC targets to use ELF instead of COFF. Make sure we preserve this choice when setting the msvc version number in the triple. llvm-svn: 239388
* [Driver] Inject the MSVC compatibility version into the tripleDavid Majnemer2015-06-081-0/+21
| | | | | | | Encoding the version into the triple will allow us to communicate to LLVM what functions it can expect to depend upon in the implementation. llvm-svn: 239273
* Remove many superfluous SmallString::str() calls.Yaron Keren2015-03-181-2/+2
| | | | | | | | | | | | | | | Now that SmallString is a first-class citizen, most SmallString::str() calls are not required. This patch removes a whole bunch of them, yet there are lots more. There are two use cases where str() is really needed: 1) To use one of StringRef member functions which is not available in SmallString. 2) To convert to std::string, as StringRef implicitly converts while SmallString do not. We may wish to change this, but it may introduce ambiguity. llvm-svn: 232622
* Remove a stray blank line that my sort_include.py script found.Chandler Carruth2015-02-131-1/+0
| | | | llvm-svn: 229093
* Attempt to fix ::sscanf Cygwin build break reported in PR22302Reid Kleckner2015-01-231-1/+3
| | | | llvm-svn: 226925
* Silence warning: "NOMINMAX" redefined.Yaron Keren2014-12-041-1/+3
| | | | llvm-svn: 223391
* Make -fuse-ld=lld work properly on Windows.Zachary Turner2014-12-011-0/+3
| | | | | | | | | | | | Using lld on Windows requires calling link-lld.exe instead of lld.exe. This patch puts this knowledge into clang so that when using the GCC style clang driver, it can properly delegate to lld. Differential Revision: http://reviews.llvm.org/D6428 Reviewed by: Reid Kleckner, Rui Ueyama llvm-svn: 223086
* Removing an unused variable; NFC.Aaron Ballman2014-11-141-1/+0
| | | | llvm-svn: 222048
* Fix C++ compliance issue. string literals must be const char *Zachary Turner2014-10-221-2/+2
| | | | llvm-svn: 220434
* Make a good guess about where MSVC and Windows SDK libraries are for linking.Zachary Turner2014-10-221-0/+65
| | | | | | | | | | | | | When a user has not configured a standard Visual Studio environment by running vcvarsall, clang tries its best to find Visual Studio include files and executables anyway. This patch makes clang also try to find system and Windows SDK libraries for linking against, as well. Reviewed by: Hans Wennborg Differential Revision: http://reviews.llvm.org/D5873 llvm-svn: 220425
* Resubmit "Improve Windows toolchain support for non-standard environments."Zachary Turner2014-10-221-90/+182
| | | | | | | | | | | | | | This resubmits change r220226. That change broke the chromium build bots because chromium it ships an hermetic MSVC toolchain that it expects clang to fallback to by finding it on the path. This patch fixes the issue by bumping up the prioritization of PATH when looking for MSVC binaries. Reviewed by: Hans Wennborg, Reid Kleckner Differential Revision: http://reviews.llvm.org/D5892 llvm-svn: 220424
* Driver: rename Windows to MSVCToolChainSaleem Abdulrasool2014-10-221-0/+335
This renames the Windows toolchain to MSVCToolChain. This is a preparatory step for adding a CrossWindowsToolChain which uses clang/libc++/(ld/lld) without the standard GCC toolchain lookup. NFC. llvm-svn: 220362
OpenPOWER on IntegriCloud