summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/cl-fallback.c
Commit message (Collapse)AuthorAgeFilesLines
* Add Windows Control Flow Guard checks (/guard:cf).Andrew Paverd2019-10-281-1/+2
| | | | | | | | | | | | | | | | | | | Summary: A new function pass (Transforms/CFGuard/CFGuard.cpp) inserts CFGuard checks on indirect function calls, using either the check mechanism (X86, ARM, AArch64) or or the dispatch mechanism (X86-64). The check mechanism requires a new calling convention for the supported targets. The dispatch mechanism adds the target as an operand bundle, which is processed by SelectionDAG. Another pass (CodeGen/CFGuardLongjmp.cpp) identifies and emits valid longjmp targets, as required by /guard:cf. This feature is enabled using the `cfguard` CC1 option. Reviewers: thakis, rnk, theraven, pcc Subscribers: ychen, hans, metalcanine, dmajor, tomrittervg, alex, mehdi_amini, mgorny, javed.absar, kristof.beyls, hiraditya, steven_wu, dexonsmith, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D65761
* clang-cl: Pass /Zc:threadSafeInit through to MSVC with /fallback (PR30948)Hans Wennborg2016-11-091-0/+6
| | | | llvm-svn: 286324
* Add support to clang-cl driver for /GS switchEtienne Bergeron2016-06-151-1/+6
| | | | | | | | | | | | | | | | | | | Summary: This patch is adding command-line support for the MSVC buffer security check. The buffer security check is turned on with the '/GS' compiler switch. https://msdn.microsoft.com/en-us/library/8dbf701c.aspx The MSVC buffer security check in implemented here: http://reviews.llvm.org/D20346 Reviewers: hans, rnk Subscribers: chrisha, cfe-commits, rnk, hans, thakis Differential Revision: http://reviews.llvm.org/D20347 llvm-svn: 272832
* [MSVC Compat] Only warn for unknown clang-cl argumentsEhsan Akhgari2016-01-251-0/+3
| | | | | | | | | | | | | | | | | Summary: MSVC's driver accepts all unknown arguments but warns about them. clang by default rejects all unknown arguments. This causes issues specifically with build systems such as autoconf which liberally pass things such as $LDFLAGS to the compiler and expect everything to work. This patch teaches clang-cl to ignore unknown driver arguments. Reviewers: rnk Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D16511 llvm-svn: 258720
* [clang-cl] Only respect /Oy- for x86_32David Majnemer2015-08-251-5/+5
| | | | | | | 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-5/+10
| | | | | | | | | | | | | | | 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
* [clang-cl] Add fallback support for /ZlDavid Majnemer2015-07-251-1/+2
| | | | llvm-svn: 243207
* Erase REQUIRES: shell-preserves-root from more tests, see r242312.Yaron Keren2015-07-151-3/+0
| | | | llvm-svn: 242321
* Driver: Handle /GR- in a compatible way with MSVCDavid Majnemer2014-07-011-4/+5
| | | | | | | | | | | | | | | | | There are slight differences between /GR- and -fno-rtti which made mapping one to the other inappropriate. -fno-rtti disables dynamic_cast, typeid, and does not emit RTTI related information for the v-table. /GR- does not generate complete object locators and thus will not reference them in vftables. However, constructs like dynamic_cast and typeid are permitted. This should bring our implementation of RTTI up to semantic parity with MSVC modulo bugs. llvm-svn: 212138
* clang-cl: Map /EHs- to -fno-exceptionsReid Kleckner2014-06-271-1/+3
| | | | | | | | | | | | | | | This isn't 100% compatible with MSVC, but it's close enough. MSVC's /EH flag doesn't really control exceptions so much as how to clean up after an exception is thrown. The upshot is that cl.exe /EHs- will compile try, throw, and catch statements with a warning, but clang-cl will reject such constructs with a hard error. We can't compile such EH constructs anyway, but this may matter to consumers of the AST. Reviewers: hans Differential Revision: http://reviews.llvm.org/D4317 llvm-svn: 211909
* clang-cl: Fall back immediately if /GR and /fallback were both passedReid Kleckner2014-05-141-0/+10
| | | | | | | None of our tests use /fallback, so this lets us gradually add RTTI support without breaking projects using /fallback. llvm-svn: 208787
* clang-cl: /fallback only applies to C or C++ filesHans Wennborg2014-04-251-0/+7
| | | | | | We would previously hit an assert if using /fallback with an .ll file. llvm-svn: 207234
* clang-cl: make /Gw map to -fdata-sectionsDavid Majnemer2014-04-071-1/+3
| | | | | | Note that /Gy no longer implies -fdata-sections. llvm-svn: 205716
* clang-cl: Forward /Gy or /Gy- when falling back to cl.exeHans Wennborg2014-03-251-2/+4
| | | | llvm-svn: 204723
* clang-cl: Pass /Z7 when we fallback to cl with debug info enabledReid Kleckner2014-02-191-1/+2
| | | | | | | Clang itself only emits CodeView line tables, so it seems more consistent to ask cl.exe for the same format. llvm-svn: 201721
* clang-cl /fallback: turn the note into a warningHans Wennborg2014-02-191-2/+2
| | | | llvm-svn: 201626
* Fix the Driver/cl-fallback.c testHans Wennborg2014-02-181-1/+1
| | | | | | On machines that have cl.exe on PATH, the note will print the full path. llvm-svn: 201613
* clang-cl /fallback: emit a note when falling backHans Wennborg2014-02-181-0/+6
| | | | | | This makes it a lot easier to see what's going on from the output. llvm-svn: 201604
* clang-cl: Ignore /fallback when not actually compiling (PR18456)Hans Wennborg2014-01-131-0/+5
| | | | | | For example, don't fall back in /P (preprocess) mode. llvm-svn: 199153
* clang-cl: pass /FI options to fallbackHans Wennborg2013-09-271-1/+2
| | | | | | | We started parsing /FI in r191442, and now we can pass it on to the fallback too. llvm-svn: 191537
* clang-cl: fix passing optimization level to cl.exe in /fallback modeHans Wennborg2013-09-241-1/+17
| | | | | | | | | We were previously mostly passing it through, but -O0 and -O3 are not valid options to cl.exe. We should translate -O0 to /Od and -O3 to /Ox. -O{1,2,s} get passed through. llvm-svn: 191323
* clang-cl: pass /nologo when falling back to cl.exeHans Wennborg2013-09-241-0/+1
| | | | llvm-svn: 191316
* clang-cl: print diagnostics as "error(clang): foo" in /fallback modeHans Wennborg2013-09-241-0/+1
| | | | | | | | | | | | | | | This solves two problems: 1) MSBuild will not flag the build as unsuccessful just because we print an error in the output, since "error(clang):" doesn't seem to match the regex it's using. 2) It becomes more clear that the diagnostic is coming from clang as supposed to cl.exe. Differential Revision: http://llvm-reviews.chandlerc.com/D1735 llvm-svn: 191250
* clang-cl: implement /fallback modeHans Wennborg2013-09-191-0/+22
When this flag is enabled, clang-cl falls back to cl.exe if it cannot compile the code itself for some reason. The idea is to use this to help build projects that almost compile with clang-cl, except for some files that can then be built with the fallback mechanism. Differential Revision: http://llvm-reviews.chandlerc.com/D1711 llvm-svn: 191034
OpenPOWER on IntegriCloud