summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/cl-options.c
Commit message (Collapse)AuthorAgeFilesLines
...
* clang-cl: make /Wall turn on both -Wall and -Wextra (PR25563)Hans Wennborg2015-12-141-1/+1
| | | | | | | | The documentation suggests /Wall should really turn on -Wextra and any other warnings that are not enabled by default. That would correspond to Clang's -Weverything, but is probably not what users want. llvm-svn: 255524
* [clang-cl] Let /W4 map to -Wall -Wextra instead of just -Wall.Nico Weber2015-12-111-1/+2
| | | | | | | | | There's no way to make a flag alias to two flags, so add a /WCL4 flag that maps to the All, Extra diag groups. Fixes PR25563. http://reviews.llvm.org/D15350 llvm-svn: 255382
* Revert r253582: "clang-cl: Make /W4 imply -Wall -Wextra (PR25563)"Hans Wennborg2015-11-201-6/+1
| | | | | | | | | | The patch expanded the flag *at the end*, breaking invocations like: clang-cl /W4 -Wno-unused-parameter Reverting for now. llvm-svn: 253678
* clang-cl: Make /W4 imply -Wall -Wextra (PR25563)Hans Wennborg2015-11-191-1/+6
| | | | llvm-svn: 253582
* clang-cl: Parse the /guard:cf[-] flag (PR25400)Hans Wennborg2015-11-041-0/+2
| | | | llvm-svn: 252056
* Expose -f[no]ms-{compatibility,extensions} in clang-cl (PR25114)Hans Wennborg2015-10-081-0/+4
| | | | | | | | These are enabled by default in clang-cl, because the whole idea is that it should work like cl.exe, but I suppose it can make sense to disable them if someone wants to compile code in a more strict mode. llvm-svn: 249775
* Stop messing with the 'g' group of options in CompilerInvocation.Douglas Katzman2015-10-081-5/+13
| | | | | | | | | | | | | | | | With this change, most 'g' options are rejected by CompilerInvocation. They remain only as Driver options. The new way to request debug info from cc1 is with "-debug-info-kind={line-tables-only|limited|standalone}" and "-dwarf-version={2|3|4}". In the absence of a command-line option to specify Dwarf version, the Toolchain decides it, rather than placing Toolchain-specific logic in CompilerInvocation. Also fix a bug in the Windows compatibility argument parsing in which the "rightmost argument wins" principle failed. Differential Revision: http://reviews.llvm.org/D13221 llvm-svn: 249655
* fix previous commitSaleem Abdulrasool2015-10-031-6/+6
| | | | | | Forgot to add the '='. In cl mode, --target must have an '='. llvm-svn: 249232
* try to fix the ARM self host botsSaleem Abdulrasool2015-10-031-3/+6
| | | | | | | | The default target is ARM on the ARM self host bots. This is problematic since the behaviour on x86, x64 is different from ARM. Explicitly pass the target. This should hopefully fix the ARM bots. llvm-svn: 249229
* clang-cl: Don't warn on /bigobj flagNico Weber2015-09-181-0/+1
| | | | | | | | | | LLVM r217812 made it so that clang-cl implicitly creates bigobj files when needed, independent of this flag. It looks like cl has this flag to produce obj flags compatible with MSVS 2003's linker by default, something we don't care about. Since clang-cl always has /bigobj behavior, don't warn that the flag is unused, just ignore it silently. llvm-svn: 248034
* [clang-cl] Only respect /Oy- for x86_32David Majnemer2015-08-251-2/+2
| | | | | | | The /Oy- flag should have no effect for 64-bit X86, it has reliable unwind tables. llvm-svn: 245913
* [clang-cl] Add support for CL and _CL_ environment variablesDavid Majnemer2015-08-101-0/+6
| | | | | | | | | | cl uses 'CL' and '_CL_' to prepend and append command line options to the given argument vector. There is an additional quirk whereby '#' is transformed into '='. Differential Revision: http://reviews.llvm.org/D11896 llvm-svn: 244473
* Add -gcodeview and -gdwarf to control which type Clang emitsReid Kleckner2015-08-051-0/+13
| | | | | | | | | | | | | | | Summary: By default, 'clang' emits dwarf and 'clang-cl' emits codeview. You can force emission of one or both by passing -gcodeview and -gdwarf to either driver. Reviewers: dblaikie, hans Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D11742 llvm-svn: 244097
* [clang-cl] Handle -O correctlyDavid Majnemer2015-07-271-2/+13
| | | | | | | | | | | | | | | 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
* Erase REQUIRES: shell-preserves-root from remaining tests, see r242312.รพYaron Keren2015-07-151-3/+0
| | | | llvm-svn: 242323
* clang-cl: Add an alias for /wd4910Hans Wennborg2015-06-111-1/+2
| | | | llvm-svn: 239548
* [clang-cl] Map /GA to -ftls-model=local-execDavid Majnemer2015-05-201-0/+3
| | | | | | | The /GA switch informs the compiler that it may assume that all TLS access refers to the executable's index: 0. llvm-svn: 237771
* [clang-cl] Enable C++14 when targeting 2015 compatibilityDavid Majnemer2015-05-181-0/+6
| | | | llvm-svn: 237553
* [clang-cl] Add /Qvec and /Qvec- to control vectorizationDavid Majnemer2015-05-141-0/+6
| | | | llvm-svn: 237335
* Expose -fdiagnostics-parseable-fixits to clang-clHans Wennborg2015-04-211-0/+1
| | | | | | | | Patch by Daniel Cheng! Differential Revision: http://reviews.llvm.org/D9175 llvm-svn: 235456
* clang-cl: support -fsyntax-only (PR23197)Hans Wennborg2015-04-151-0/+1
| | | | | | | This might help running Clang tooling (which appends this option) with clang-cl command-lines. llvm-svn: 234990
* clang-cl: Expose -f[no-]diagnostics-colorHans Wennborg2015-04-121-0/+2
| | | | | | | If we have -f[no-]color-diagnostics, we might as well have these too. llvm-svn: 234702
* clang-cl: support -fno-color-diagnostics (PR23109)Hans Wennborg2015-04-111-0/+2
| | | | | | Patch by Bernard Solomon, tests by me. llvm-svn: 234685
* clang-cl: support -fmacro-backtrace-limitHans Wennborg2015-04-111-3/+4
| | | | | | | Also fix the test for "core options" to actually fail in case an option isn't supported. llvm-svn: 234684
* clang-cl: Support the /fp options (PR23112)Hans Wennborg2015-04-081-1/+18
| | | | | | | | | | | This hooks up the /fp options as aliases for -f[no-]fast-math and -f[no]-trapping-math. It probably doesn't match cl.exe's behaviour completely (e.g. LLVM is currently never as precise as /fp:precise), but it's close enough. Differential revision: http://reviews.llvm.org/D8909 llvm-svn: 234449
* MS ABI: Implement driver-level support for thread-safe staticsDavid Majnemer2015-03-221-0/+8
| | | | | | | | | | | Decide whether or not to use thread-safe statics depending on whether or not we have an explicit request from the driver. If we don't have an explicit request, infer which behavior to use depending on the compatibility version we are targeting. N.B. CodeGen support is still ongoing. llvm-svn: 232906
* clang-cl: Correctly ignore /openmp- (PR22748)Hans Wennborg2015-03-021-2/+4
| | | | llvm-svn: 231026
* clang-cl: Ignore /Fd silentlyReid Kleckner2015-02-251-1/+1
| | | | | | | | | While it's true that we don't create the PDB as requested on the command line, this is a well-documented limitation. Warning about it doesn't help people using legacy build systems with clang-cl, and it makes the clang-cl self-host very noisy. llvm-svn: 230527
* clang-cl: Map /wd4996 to -Wno-deprecated-declarationsReid Kleckner2015-02-171-3/+4
| | | | | | | | | | This is typically used to suppress warnings about calling snprintf and other "deprecated" POSIX functions. Accepting this flag helps avoid tons of useless warnings when trying out clang-cl on a new project. Patch by Scott Graham! llvm-svn: 229583
* Revert "Revert r229082 for a bit, it caused PR22577."David Majnemer2015-02-141-0/+6
| | | | | | | This reverts commit r229123. It was a red herring, the bug was present without r229082. llvm-svn: 229205
* Revert r229082 for a bit, it caused PR22577.Nico Weber2015-02-131-6/+0
| | | | llvm-svn: 229123
* MS ABI: Implement /volatile:msDavid Majnemer2015-02-131-0/+6
| | | | | | | | | | | | The /volatile:ms semantics turn volatile loads and stores into atomic acquire and release operations. This distinction is important because volatile memory operations do not form a happens-before relationship with non-atomic memory. This means that a volatile store is not sufficient for implementing a mutex unlock routine. Differential Revision: http://reviews.llvm.org/D7580 llvm-svn: 229082
* Implement command line options for stack probe spaceHans Wennborg2015-01-201-1/+7
| | | | | | | | | | | | | This code adds the -mstack-probe-size command line option and implements the /Gs compiler switch for clang-cl. This should fix http://llvm.org/bugs/show_bug.cgi?id=21896 Patch by Andrew H! Differential Revision: http://reviews.llvm.org/D6685 llvm-svn: 226601
* clang-cl: Various changes to /Zc: handling.Nico Weber2014-12-231-6/+0
| | | | | | | | | | | | | | | * /Zc:trigraphs and /Zc:trigraphs- are now honored * /Zc:strictStrings is now honored * /Zc:auto is now honored/ignored (clang does the Right Thing for this already) Also add a dedicated test for the various /Zc: flags. clang-cl doesn't always agree with cl.exe on the default values for /Zc flags. For example, I think clang always behaves as if /Zc:inline is passed, and warns if the user explicitly passes /Zc:inline- Fixes PR21974. llvm-svn: 224791
* clang-cl: Fix handling of the /volatile flag (PR21893)Hans Wennborg2014-12-131-1/+2
| | | | | | | | The /volatile:iso flag is our default behaviour, so it can be ignored. Parse /volatile:ms as unsupported. llvm-svn: 224202
* clang-cl: ignore /cgthreads (PR21894)Hans Wennborg2014-12-131-0/+2
| | | | llvm-svn: 224201
* clang-cl: Make /Gd ignored instead of unsupportedHans Wennborg2014-12-131-0/+1
| | | | | | | /Gd is the default calling convention setting, so we don't need to take any action. llvm-svn: 224200
* clang-cl: Add unsupported /Gv option (PR21892)Hans Wennborg2014-12-131-0/+1
| | | | | | We don't currently support any of the calling convention options. llvm-svn: 224199
* clang-cl: Ignore the new /Zo[-] option (PR21571)Hans Wennborg2014-11-141-1/+4
| | | | | | | Also fix the ignored options test which didn't fail properly on unknown options. llvm-svn: 222013
* clang-cl: Add support for /ZpDavid Majnemer2014-07-251-2/+6
| | | | | | | | | CL's /Zp flag is analogous to GCC's -fpack-struct, it controls the default maximum alignment of records. Differential Revision: http://reviews.llvm.org/D4671 llvm-svn: 213958
* clang-cl: ignore /showIncludes when combined with /E (PR20336)Hans Wennborg2014-07-211-0/+4
| | | | | | | | Both /showIncludes and /E write to stdout. Allowing both results in interleaved output and an error when double-closing the file descriptor, intended to catch issues like this. llvm-svn: 213589
* Don't use -msse2 in test/Driver/cl-options.cHans Wennborg2014-07-161-1/+0
| | | | | | | It's already tested in cl-x86-flags.c, and can only be used when targeting X86. llvm-svn: 213179
* clang-cl: expand test coverage for "core" optionsHans Wennborg2014-07-161-2/+9
| | | | llvm-svn: 213170
* clang-cl: make sure we still parse -fms-version= after r213119Hans Wennborg2014-07-161-0/+6
| | | | | | The CoreOption flag got lost in the changes. llvm-svn: 213164
* clang-cl: Implement the -arch flagEhsan Akhgari2014-07-151-1/+0
| | | | | | | | | | | | | | | Summary: This implements the -arch flag for both x86 and x86-64 by letting them affect the default target features we pass to cc1. -m machine flags will override the features set by -arch. Reviewers: hansw Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4519 llvm-svn: 213083
* Require an x86 registered target for this test by splitting it outReid Kleckner2014-07-121-6/+0
| | | | | | | This is a shot in the dark to fix the hexagon bot, so I'm not 100% sure this is the issue. llvm-svn: 212871
* clang-cl: Make all x86 CPU feature flags available, such as -msse3Reid Kleckner2014-07-121-2/+4
| | | | | | | | | | | | | Ideally, we would use the /arch cl.exe flag for this stuff. Unfortunately, MSVC supports only 5 /arch flag values, which isn't nearly enough to cover all the CPU features that LLVM cares about. At the very least, we need to know about SSE3 and SSE4.1 in addition to SSE, SSE2, AVX, and AVX2. In the future we should add the relevant /arch mappings in addition to these gcc-style -m flags. llvm-svn: 212869
* Driver: Handle /GR- in a compatible way with MSVCDavid Majnemer2014-07-011-3/+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: Ignore /Zc:inline and /Zc:rvalueCastReid Kleckner2014-07-011-0/+2
| | | | | | | | | | These flags enable behavior in MSVC that Clang has by default. /Zc:inline essentially marks all COMDATs as discardable. In LLVM parlance, this means using linkonce_odr linkage, which is what we already do. llvm-svn: 212117
* Add support for the /EP argument to clang-clHans Wennborg2014-06-131-1/+5
| | | | | | | | | | This maps the /EP argument to both -E and -P. Patch by Ehsan Akhgari! Differential Reviion: http://reviews.llvm.org/D4133 llvm-svn: 210935
OpenPOWER on IntegriCloud