| 1 | //===--- CLCompatOptions.td - Options for clang-cl ------------------------===// |
| 2 | // |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | // |
| 9 | // This file defines the options accepted by clang-cl. |
| 10 | // |
| 11 | //===----------------------------------------------------------------------===// |
| 12 | |
| 13 | def cl_Group : OptionGroup<"<clang-cl options>">, Flags<[CLOption]>, |
| 14 | HelpText<"CL.EXE COMPATIBILITY OPTIONS">; |
| 15 | |
| 16 | def cl_compile_Group : OptionGroup<"<clang-cl compile-only options>">, |
| 17 | Group<cl_Group>; |
| 18 | |
| 19 | def cl_ignored_Group : OptionGroup<"<clang-cl ignored options>">, |
| 20 | Group<cl_Group>; |
| 21 | |
| 22 | class CLFlag<string name> : Option<["/", "-"], name, KIND_FLAG>, |
| 23 | Group<cl_Group>, Flags<[CLOption, DriverOption]>; |
| 24 | |
| 25 | class CLCompileFlag<string name> : Option<["/", "-"], name, KIND_FLAG>, |
| 26 | Group<cl_compile_Group>, Flags<[CLOption, DriverOption]>; |
| 27 | |
| 28 | class CLIgnoredFlag<string name> : Option<["/", "-"], name, KIND_FLAG>, |
| 29 | Group<cl_ignored_Group>, Flags<[CLOption, DriverOption]>; |
| 30 | |
| 31 | class CLJoined<string name> : Option<["/", "-"], name, KIND_JOINED>, |
| 32 | Group<cl_Group>, Flags<[CLOption, DriverOption]>; |
| 33 | |
| 34 | class CLCompileJoined<string name> : Option<["/", "-"], name, KIND_JOINED>, |
| 35 | Group<cl_compile_Group>, Flags<[CLOption, DriverOption]>; |
| 36 | |
| 37 | class CLIgnoredJoined<string name> : Option<["/", "-"], name, KIND_JOINED>, |
| 38 | Group<cl_ignored_Group>, Flags<[CLOption, DriverOption, HelpHidden]>; |
| 39 | |
| 40 | class CLJoinedOrSeparate<string name> : Option<["/", "-"], name, |
| 41 | KIND_JOINED_OR_SEPARATE>, Group<cl_Group>, Flags<[CLOption, DriverOption]>; |
| 42 | |
| 43 | class CLCompileJoinedOrSeparate<string name> : Option<["/", "-"], name, |
| 44 | KIND_JOINED_OR_SEPARATE>, Group<cl_compile_Group>, |
| 45 | Flags<[CLOption, DriverOption]>; |
| 46 | |
| 47 | class CLRemainingArgsJoined<string name> : Option<["/", "-"], name, |
| 48 | KIND_REMAINING_ARGS_JOINED>, Group<cl_Group>, Flags<[CLOption, DriverOption]>; |
| 49 | |
| 50 | // Aliases: |
| 51 | // (We don't put any of these in cl_compile_Group as the options they alias are |
| 52 | // already in the right group.) |
| 53 | |
| 54 | def _SLASH_Brepro : CLFlag<"Brepro">, |
| 55 | HelpText<"Emit an object file which can be reproduced over time">, |
| 56 | Alias<mno_incremental_linker_compatible>; |
| 57 | def _SLASH_Brepro_ : CLFlag<"Brepro-">, |
| 58 | HelpText<"Emit an object file which cannot be reproduced over time">, |
| 59 | Alias<mincremental_linker_compatible>; |
| 60 | def _SLASH_C : CLFlag<"C">, |
| 61 | HelpText<"Don't discard comments when preprocessing">, Alias<C>; |
| 62 | def _SLASH_c : CLFlag<"c">, HelpText<"Compile only">, Alias<c>; |
| 63 | def _SLASH_d1PP : CLFlag<"d1PP">, |
| 64 | HelpText<"Retain macro definitions in /E mode">, Alias<dD>; |
| 65 | def _SLASH_d1reportAllClassLayout : CLFlag<"d1reportAllClassLayout">, |
| 66 | HelpText<"Dump record layout information">, Alias<fdump_record_layouts>; |
| 67 | def _SLASH_diagnostics_caret : CLFlag<"diagnostics:caret">, |
| 68 | HelpText<"Enable caret and column diagnostics (on by default)">; |
| 69 | def _SLASH_diagnostics_column : CLFlag<"diagnostics:column">, |
| 70 | HelpText<"Disable caret diagnostics but keep column info">; |
| 71 | def _SLASH_diagnostics_classic : CLFlag<"diagnostics:classic">, |
| 72 | HelpText<"Disable column and caret diagnostics">; |
| 73 | def _SLASH_D : CLJoinedOrSeparate<"D">, HelpText<"Define macro">, |
| 74 | MetaVarName<"<macro[=value]>">, Alias<D>; |
| 75 | def _SLASH_E : CLFlag<"E">, HelpText<"Preprocess to stdout">, Alias<E>; |
| 76 | def _SLASH_fp_except : CLFlag<"fp:except">, HelpText<"">, Alias<ftrapping_math>; |
| 77 | def _SLASH_fp_except_ : CLFlag<"fp:except-">, |
| 78 | HelpText<"">, Alias<fno_trapping_math>; |
| 79 | def _SLASH_fp_fast : CLFlag<"fp:fast">, HelpText<"">, Alias<ffast_math>; |
| 80 | def _SLASH_fp_precise : CLFlag<"fp:precise">, |
| 81 | HelpText<"">, Alias<fno_fast_math>; |
| 82 | def _SLASH_fp_strict : CLFlag<"fp:strict">, HelpText<"">, Alias<fno_fast_math>; |
| 83 | def _SLASH_GA : CLFlag<"GA">, Alias<ftlsmodel_EQ>, AliasArgs<["local-exec"]>, |
| 84 | HelpText<"Assume thread-local variables are defined in the executable">; |
| 85 | def _SLASH_GR : CLFlag<"GR">, HelpText<"Enable emission of RTTI data">; |
| 86 | def _SLASH_GR_ : CLFlag<"GR-">, HelpText<"Disable emission of RTTI data">; |
| 87 | def _SLASH_GF : CLIgnoredFlag<"GF">, HelpText<"Enable string pooling (default)">; |
| 88 | def _SLASH_GF_ : CLFlag<"GF-">, HelpText<"Disable string pooling">, |
| 89 | Alias<fwritable_strings>; |
| 90 | def _SLASH_GS : CLFlag<"GS">, HelpText<"Enable buffer security check (default)">; |
| 91 | def _SLASH_GS_ : CLFlag<"GS-">, HelpText<"Disable buffer security check">; |
| 92 | def : CLFlag<"Gs">, HelpText<"Use stack probes (default)">, |
| 93 | Alias<mstack_probe_size>, AliasArgs<["4096"]>; |
| 94 | def _SLASH_Gs : CLJoined<"Gs">, |
| 95 | HelpText<"Set stack probe size (default 4096)">, Alias<mstack_probe_size>; |
| 96 | def _SLASH_Gy : CLFlag<"Gy">, HelpText<"Put each function in its own section">, |
| 97 | Alias<ffunction_sections>; |
| 98 | def _SLASH_Gy_ : CLFlag<"Gy-">, |
| 99 | HelpText<"Don't put each function in its own section (default)">, |
| 100 | Alias<fno_function_sections>; |
| 101 | def _SLASH_Gw : CLFlag<"Gw">, HelpText<"Put each data item in its own section">, |
| 102 | Alias<fdata_sections>; |
| 103 | def _SLASH_Gw_ : CLFlag<"Gw-">, |
| 104 | HelpText<"Don't put each data item in its own section">, |
| 105 | Alias<fno_data_sections>; |
| 106 | def _SLASH_help : CLFlag<"help">, Alias<help>, |
| 107 | HelpText<"Display available options">; |
| 108 | def _SLASH_HELP : CLFlag<"HELP">, Alias<help>; |
| 109 | def _SLASH_I : CLJoinedOrSeparate<"I">, |
| 110 | HelpText<"Add directory to include search path">, MetaVarName<"<dir>">, |
| 111 | Alias<I>; |
| 112 | def _SLASH_J : CLFlag<"J">, HelpText<"Make char type unsigned">, |
| 113 | Alias<funsigned_char>; |
| 114 | |
| 115 | // The _SLASH_O option handles all the /O flags, but we also provide separate |
| 116 | // aliased options to provide separate help messages. |
| 117 | def _SLASH_O : CLJoined<"O">, |
| 118 | HelpText<"Set multiple /O flags at once; e.g. '/O2y-' for '/O2 /Oy-'">, |
| 119 | MetaVarName<"<flags>">; |
| 120 | // FIXME: Not sure why we have -O0 here; MSVC doesn't support that. |
| 121 | def : CLFlag<"O0">, Alias<O0>, HelpText<"Disable optimization">; |
| 122 | def : CLFlag<"O1">, Alias<_SLASH_O>, AliasArgs<["1"]>, |
| 123 | HelpText<"Optimize for size (same as /Og /Os /Oy /Ob2 /GF /Gy)">; |
| 124 | def : CLFlag<"O2">, Alias<_SLASH_O>, AliasArgs<["2"]>, |
| 125 | HelpText<"Optimize for speed (same as /Og /Oi /Ot /Oy /Ob2 /GF /Gy)">; |
| 126 | def : CLFlag<"Ob0">, Alias<_SLASH_O>, AliasArgs<["b0"]>, |
| 127 | HelpText<"Disable function inlining">; |
| 128 | def : CLFlag<"Ob1">, Alias<_SLASH_O>, AliasArgs<["b1"]>, |
| 129 | HelpText<"Only inline functions which are (explicitly or implicitly) marked inline">; |
| 130 | def : CLFlag<"Ob2">, Alias<_SLASH_O>, AliasArgs<["b2"]>, |
| 131 | HelpText<"Inline functions as deemed beneficial by the compiler">; |
| 132 | def : CLFlag<"Od">, Alias<_SLASH_O>, AliasArgs<["d"]>, |
| 133 | HelpText<"Disable optimization">; |
| 134 | def : CLFlag<"Og">, Alias<_SLASH_O>, AliasArgs<["g"]>, |
| 135 | HelpText<"No effect">; |
| 136 | def : CLFlag<"Oi">, Alias<_SLASH_O>, AliasArgs<["i"]>, |
| 137 | HelpText<"Enable use of builtin functions">; |
| 138 | def : CLFlag<"Oi-">, Alias<_SLASH_O>, AliasArgs<["i-"]>, |
| 139 | HelpText<"Disable use of builtin functions">; |
| 140 | def : CLFlag<"Os">, Alias<_SLASH_O>, AliasArgs<["s"]>, |
| 141 | HelpText<"Optimize for size">; |
| 142 | def : CLFlag<"Ot">, Alias<_SLASH_O>, AliasArgs<["t"]>, |
| 143 | HelpText<"Optimize for speed">; |
| 144 | def : CLFlag<"Ox">, Alias<_SLASH_O>, AliasArgs<["x"]>, |
| 145 | HelpText<"Deprecated (same as /Og /Oi /Ot /Oy /Ob2); use /O2 instead">; |
| 146 | def : CLFlag<"Oy">, Alias<_SLASH_O>, AliasArgs<["y"]>, |
| 147 | HelpText<"Enable frame pointer omission (x86 only)">; |
| 148 | def : CLFlag<"Oy-">, Alias<_SLASH_O>, AliasArgs<["y-"]>, |
| 149 | HelpText<"Disable frame pointer omission (x86 only, default)">; |
| 150 | |
| 151 | def _SLASH_QUESTION : CLFlag<"?">, Alias<help>, |
| 152 | HelpText<"Display available options">; |
| 153 | def _SLASH_Qvec : CLFlag<"Qvec">, |
| 154 | HelpText<"Enable the loop vectorization passes">, Alias<fvectorize>; |
| 155 | def _SLASH_Qvec_ : CLFlag<"Qvec-">, |
| 156 | HelpText<"Disable the loop vectorization passes">, Alias<fno_vectorize>; |
| 157 | def _SLASH_showIncludes : CLFlag<"showIncludes">, |
| 158 | HelpText<"Print info about included files to stderr">, |
| 159 | Alias<show_includes>; |
| 160 | def _SLASH_showFilenames : CLFlag<"showFilenames">, |
| 161 | HelpText<"Print the name of each compiled file">; |
| 162 | def _SLASH_showFilenames_ : CLFlag<"showFilenames-">, |
| 163 | HelpText<"Don't print the name of each compiled file (default)">; |
| 164 | def _SLASH_source_charset : CLCompileJoined<"source-charset:">, |
| 165 | HelpText<"Source encoding, supports only UTF-8">, Alias<finput_charset_EQ>; |
| 166 | def _SLASH_execution_charset : CLCompileJoined<"execution-charset:">, |
| 167 | HelpText<"Runtime encoding, supports only UTF-8">, Alias<fexec_charset_EQ>; |
| 168 | def _SLASH_std : CLCompileJoined<"std:">, |
| 169 | HelpText<"Language standard to compile for">; |
| 170 | def _SLASH_U : CLJoinedOrSeparate<"U">, HelpText<"Undefine macro">, |
| 171 | MetaVarName<"<macro>">, Alias<U>; |
| 172 | def _SLASH_validate_charset : CLFlag<"validate-charset">, |
| 173 | Alias<W_Joined>, AliasArgs<["invalid-source-encoding"]>; |
| 174 | def _SLASH_validate_charset_ : CLFlag<"validate-charset-">, |
| 175 | Alias<W_Joined>, AliasArgs<["no-invalid-source-encoding"]>; |
| 176 | def _SLASH_W0 : CLFlag<"W0">, HelpText<"Disable all warnings">, Alias<w>; |
| 177 | def _SLASH_W1 : CLFlag<"W1">, HelpText<"Enable -Wall">, Alias<Wall>; |
| 178 | def _SLASH_W2 : CLFlag<"W2">, HelpText<"Enable -Wall">, Alias<Wall>; |
| 179 | def _SLASH_W3 : CLFlag<"W3">, HelpText<"Enable -Wall">, Alias<Wall>; |
| 180 | def _SLASH_W4 : CLFlag<"W4">, HelpText<"Enable -Wall and -Wextra">, Alias<WCL4>; |
| 181 | def _SLASH_Wall : CLFlag<"Wall">, HelpText<"Enable -Weverything">, |
| 182 | Alias<W_Joined>, AliasArgs<["everything"]>; |
| 183 | def _SLASH_WX : CLFlag<"WX">, HelpText<"Treat warnings as errors">, |
| 184 | Alias<W_Joined>, AliasArgs<["error"]>; |
| 185 | def _SLASH_WX_ : CLFlag<"WX-">, HelpText<"Do not treat warnings as errors">, |
| 186 | Alias<W_Joined>, AliasArgs<["no-error"]>; |
| 187 | def _SLASH_w_flag : CLFlag<"w">, HelpText<"Disable all warnings">, Alias<w>; |
| 188 | def _SLASH_wd4005 : CLFlag<"wd4005">, Alias<W_Joined>, |
| 189 | AliasArgs<["no-macro-redefined"]>; |
| 190 | def _SLASH_wd4018 : CLFlag<"wd4018">, Alias<W_Joined>, |
| 191 | AliasArgs<["no-sign-compare"]>; |
| 192 | def _SLASH_wd4100 : CLFlag<"wd4100">, Alias<W_Joined>, |
| 193 | AliasArgs<["no-unused-parameter"]>; |
| 194 | def _SLASH_wd4910 : CLFlag<"wd4910">, Alias<W_Joined>, |
| 195 | AliasArgs<["no-dllexport-explicit-instantiation-decl"]>; |
| 196 | def _SLASH_wd4996 : CLFlag<"wd4996">, Alias<W_Joined>, |
| 197 | AliasArgs<["no-deprecated-declarations"]>; |
| 198 | def _SLASH_vd : CLJoined<"vd">, HelpText<"Control vtordisp placement">, |
| 199 | Alias<vtordisp_mode_EQ>; |
| 200 | def _SLASH_X : CLFlag<"X">, |
| 201 | HelpText<"Don't add %INCLUDE% to the include search path">, |
| 202 | Alias<nostdlibinc>; |
| 203 | def _SLASH_Zc_sizedDealloc : CLFlag<"Zc:sizedDealloc">, |
| 204 | HelpText<"Enable C++14 sized global deallocation functions">, |
| 205 | Alias<fsized_deallocation>; |
| 206 | def _SLASH_Zc_sizedDealloc_ : CLFlag<"Zc:sizedDealloc-">, |
| 207 | HelpText<"Disable C++14 sized global deallocation functions">, |
| 208 | Alias<fno_sized_deallocation>; |
| 209 | def _SLASH_Zc_alignedNew : CLFlag<"Zc:alignedNew">, |
| 210 | HelpText<"Enable C++17 aligned allocation functions">, |
| 211 | Alias<faligned_allocation>; |
| 212 | def _SLASH_Zc_alignedNew_ : CLFlag<"Zc:alignedNew-">, |
| 213 | HelpText<"Disable C++17 aligned allocation functions">, |
| 214 | Alias<fno_aligned_allocation>; |
| 215 | def _SLASH_Zc_strictStrings : CLFlag<"Zc:strictStrings">, |
| 216 | HelpText<"Treat string literals as const">, Alias<W_Joined>, |
| 217 | AliasArgs<["error=c++11-compat-deprecated-writable-strings"]>; |
| 218 | def _SLASH_Zc_threadSafeInit : CLFlag<"Zc:threadSafeInit">, |
| 219 | HelpText<"Enable thread-safe initialization of static variables">, |
| 220 | Alias<fthreadsafe_statics>; |
| 221 | def _SLASH_Zc_threadSafeInit_ : CLFlag<"Zc:threadSafeInit-">, |
| 222 | HelpText<"Disable thread-safe initialization of static variables">, |
| 223 | Alias<fno_threadsafe_statics>; |
| 224 | def _SLASH_Zc_trigraphs : CLFlag<"Zc:trigraphs">, |
| 225 | HelpText<"Enable trigraphs">, Alias<ftrigraphs>; |
| 226 | def _SLASH_Zc_trigraphs_off : CLFlag<"Zc:trigraphs-">, |
| 227 | HelpText<"Disable trigraphs (default)">, Alias<fno_trigraphs>; |
| 228 | def _SLASH_Zc_twoPhase : CLFlag<"Zc:twoPhase">, |
| 229 | HelpText<"Enable two-phase name lookup in templates">, |
| 230 | Alias<fno_delayed_template_parsing>; |
| 231 | def _SLASH_Zc_twoPhase_ : CLFlag<"Zc:twoPhase-">, |
| 232 | HelpText<"Disable two-phase name lookup in templates">, |
| 233 | Alias<fdelayed_template_parsing>; |
| 234 | def _SLASH_Z7 : CLFlag<"Z7">, |
| 235 | HelpText<"Enable CodeView debug information in object files">; |
| 236 | def _SLASH_Zd : CLFlag<"Zd">, |
| 237 | HelpText<"Emit debug line number tables only">; |
| 238 | def _SLASH_Zi : CLFlag<"Zi">, Alias<_SLASH_Z7>, |
| 239 | HelpText<"Alias for /Z7. Does not produce PDBs.">; |
| 240 | def _SLASH_Zp : CLJoined<"Zp">, |
| 241 | HelpText<"Specify the default maximum struct packing alignment">, |
| 242 | Alias<fpack_struct_EQ>; |
| 243 | def _SLASH_Zp_flag : CLFlag<"Zp">, |
| 244 | HelpText<"Set the default maximum struct packing alignment to 1">, |
| 245 | Alias<fpack_struct_EQ>, AliasArgs<["1"]>; |
| 246 | def _SLASH_Zs : CLFlag<"Zs">, HelpText<"Syntax-check only">, |
| 247 | Alias<fsyntax_only>; |
| 248 | |
| 249 | |
| 250 | // Non-aliases: |
| 251 | |
| 252 | def _SLASH_arch : CLCompileJoined<"arch:">, |
| 253 | HelpText<"Set architecture for code generation">; |
| 254 | |
| 255 | def _SLASH_M_Group : OptionGroup<"</M group>">, Group<cl_compile_Group>; |
| 256 | def _SLASH_volatile_Group : OptionGroup<"</volatile group>">, |
| 257 | Group<cl_compile_Group>; |
| 258 | |
| 259 | def _SLASH_EH : CLJoined<"EH">, HelpText<"Exception handling model">; |
| 260 | def _SLASH_EP : CLFlag<"EP">, |
| 261 | HelpText<"Disable linemarker output and preprocess to stdout">; |
| 262 | def _SLASH_FA : CLFlag<"FA">, |
| 263 | HelpText<"Output assembly code file during compilation">; |
| 264 | def _SLASH_Fa : CLJoined<"Fa">, |
| 265 | HelpText<"Output assembly code to this file during compilation (with /FA)">, |
| 266 | MetaVarName<"<file or directory>">; |
| 267 | def _SLASH_fallback : CLCompileFlag<"fallback">, |
| 268 | HelpText<"Fall back to cl.exe if clang-cl fails to compile">; |
| 269 | def _SLASH_FI : CLJoinedOrSeparate<"FI">, |
| 270 | HelpText<"Include file before parsing">, Alias<include_>; |
| 271 | def _SLASH_Fe : CLJoined<"Fe">, |
| 272 | HelpText<"Set output executable file or directory (ends in / or \\)">, |
| 273 | MetaVarName<"<file or directory>">; |
| 274 | def _SLASH_Fi : CLCompileJoined<"Fi">, |
| 275 | HelpText<"Set preprocess output file name (with /P)">, |
| 276 | MetaVarName<"<file>">; |
| 277 | def _SLASH_Fo : CLCompileJoined<"Fo">, |
| 278 | HelpText<"Set output object file, or directory (ends in / or \\) (with /c)">, |
| 279 | MetaVarName<"<file or directory>">; |
| 280 | def _SLASH_guard : CLJoined<"guard:">, |
| 281 | HelpText<"Enable Control Flow Guard with /guard:cf, or only the table with /guard:cf,nochecks">; |
| 282 | def _SLASH_GX : CLFlag<"GX">, |
| 283 | HelpText<"Enable exception handling">; |
| 284 | def _SLASH_GX_ : CLFlag<"GX-">, |
| 285 | HelpText<"Disable exception handling">; |
| 286 | def _SLASH_imsvc : CLJoinedOrSeparate<"imsvc">, |
| 287 | HelpText<"Add directory to system include search path, as if part of %INCLUDE%">, |
| 288 | MetaVarName<"<dir>">; |
| 289 | def _SLASH_LD : CLFlag<"LD">, HelpText<"Create DLL">; |
| 290 | def _SLASH_LDd : CLFlag<"LDd">, HelpText<"Create debug DLL">; |
| 291 | def _SLASH_link : CLRemainingArgsJoined<"link">, |
| 292 | HelpText<"Forward options to the linker">, MetaVarName<"<options>">; |
| 293 | def _SLASH_MD : Option<["/", "-"], "MD", KIND_FLAG>, Group<_SLASH_M_Group>, |
| 294 | Flags<[CLOption, DriverOption]>, HelpText<"Use DLL run-time">; |
| 295 | def _SLASH_MDd : Option<["/", "-"], "MDd", KIND_FLAG>, Group<_SLASH_M_Group>, |
| 296 | Flags<[CLOption, DriverOption]>, HelpText<"Use DLL debug run-time">; |
| 297 | def _SLASH_MT : Option<["/", "-"], "MT", KIND_FLAG>, Group<_SLASH_M_Group>, |
| 298 | Flags<[CLOption, DriverOption]>, HelpText<"Use static run-time">; |
| 299 | def _SLASH_MTd : Option<["/", "-"], "MTd", KIND_FLAG>, Group<_SLASH_M_Group>, |
| 300 | Flags<[CLOption, DriverOption]>, HelpText<"Use static debug run-time">; |
| 301 | def _SLASH_o : CLJoinedOrSeparate<"o">, |
| 302 | HelpText<"Set output file or directory (ends in / or \\)">, |
| 303 | MetaVarName<"<file or directory>">; |
| 304 | def _SLASH_P : CLFlag<"P">, HelpText<"Preprocess to file">; |
| 305 | def _SLASH_Tc : CLCompileJoinedOrSeparate<"Tc">, |
| 306 | HelpText<"Specify a C source file">, MetaVarName<"<filename>">; |
| 307 | def _SLASH_TC : CLCompileFlag<"TC">, HelpText<"Treat all source files as C">; |
| 308 | def _SLASH_Tp : CLCompileJoinedOrSeparate<"Tp">, |
| 309 | HelpText<"Specify a C++ source file">, MetaVarName<"<filename>">; |
| 310 | def _SLASH_TP : CLCompileFlag<"TP">, HelpText<"Treat all source files as C++">; |
| 311 | def _SLASH_volatile_iso : Option<["/", "-"], "volatile:iso", KIND_FLAG>, |
| 312 | Group<_SLASH_volatile_Group>, Flags<[CLOption, DriverOption]>, |
| 313 | HelpText<"Volatile loads and stores have standard semantics">; |
| 314 | def _SLASH_vmb : CLFlag<"vmb">, |
| 315 | HelpText<"Use a best-case representation method for member pointers">; |
| 316 | def _SLASH_vmg : CLFlag<"vmg">, |
| 317 | HelpText<"Use a most-general representation for member pointers">; |
| 318 | def _SLASH_vms : CLFlag<"vms">, |
| 319 | HelpText<"Set the default most-general representation to single inheritance">; |
| 320 | def _SLASH_vmm : CLFlag<"vmm">, |
| 321 | HelpText<"Set the default most-general representation to " |
| 322 | "multiple inheritance">; |
| 323 | def _SLASH_vmv : CLFlag<"vmv">, |
| 324 | HelpText<"Set the default most-general representation to " |
| 325 | "virtual inheritance">; |
| 326 | def _SLASH_volatile_ms : Option<["/", "-"], "volatile:ms", KIND_FLAG>, |
| 327 | Group<_SLASH_volatile_Group>, Flags<[CLOption, DriverOption]>, |
| 328 | HelpText<"Volatile loads and stores have acquire and release semantics">; |
| 329 | def _SLASH_clang : CLJoined<"clang:">, |
| 330 | HelpText<"Pass <arg> to the clang driver">, MetaVarName<"<arg>">; |
| 331 | def _SLASH_Zl : CLFlag<"Zl">, |
| 332 | HelpText<"Don't mention any default libraries in the object file">; |
| 333 | |
| 334 | def _SLASH_Yc : CLJoined<"Yc">, |
| 335 | HelpText<"Generate a pch file for all code up to and including <filename>">, |
| 336 | MetaVarName<"<filename>">; |
| 337 | def _SLASH_Yu : CLJoined<"Yu">, |
| 338 | HelpText<"Load a pch file and use it instead of all code up to " |
| 339 | "and including <filename>">, |
| 340 | MetaVarName<"<filename>">; |
| 341 | def _SLASH_Y_ : CLFlag<"Y-">, |
| 342 | HelpText<"Disable precompiled headers, overrides /Yc and /Yu">; |
| 343 | def _SLASH_Zc_dllexportInlines : CLFlag<"Zc:dllexportInlines">, |
| 344 | HelpText<"dllexport/dllimport inline member functions of dllexport/import classes (default)">; |
| 345 | def _SLASH_Zc_dllexportInlines_ : CLFlag<"Zc:dllexportInlines-">, |
| 346 | HelpText<"Don't dllexport/dllimport inline member functions of dllexport/import classes">; |
| 347 | def _SLASH_Fp : CLJoined<"Fp">, |
| 348 | HelpText<"Set pch filename (with /Yc and /Yu)">, MetaVarName<"<filename>">; |
| 349 | |
| 350 | def _SLASH_Gd : CLFlag<"Gd">, |
| 351 | HelpText<"Set __cdecl as a default calling convention">; |
| 352 | def _SLASH_Gr : CLFlag<"Gr">, |
| 353 | HelpText<"Set __fastcall as a default calling convention">; |
| 354 | def _SLASH_Gz : CLFlag<"Gz">, |
| 355 | HelpText<"Set __stdcall as a default calling convention">; |
| 356 | def _SLASH_Gv : CLFlag<"Gv">, |
| 357 | HelpText<"Set __vectorcall as a default calling convention">; |
| 358 | def _SLASH_Gregcall : CLFlag<"Gregcall">, |
| 359 | HelpText<"Set __regcall as a default calling convention">; |
| 360 | |
| 361 | // Ignored: |
| 362 | |
| 363 | def _SLASH_analyze_ : CLIgnoredFlag<"analyze-">; |
| 364 | def _SLASH_bigobj : CLIgnoredFlag<"bigobj">; |
| 365 | def _SLASH_cgthreads : CLIgnoredJoined<"cgthreads">; |
| 366 | def _SLASH_d2FastFail : CLIgnoredFlag<"d2FastFail">; |
| 367 | def _SLASH_d2Zi_PLUS : CLIgnoredFlag<"d2Zi+">; |
| 368 | def _SLASH_errorReport : CLIgnoredJoined<"errorReport">; |
| 369 | def _SLASH_FC : CLIgnoredFlag<"FC">; |
| 370 | def _SLASH_Fd : CLIgnoredJoined<"Fd">; |
| 371 | def _SLASH_FS : CLIgnoredFlag<"FS">; |
| 372 | def _SLASH_JMC : CLIgnoredFlag<"JMC">; |
| 373 | def _SLASH_kernel_ : CLIgnoredFlag<"kernel-">; |
| 374 | def _SLASH_nologo : CLIgnoredFlag<"nologo">; |
| 375 | def _SLASH_openmp_ : CLIgnoredFlag<"openmp-">; |
| 376 | def _SLASH_permissive_ : CLIgnoredFlag<"permissive-">; |
| 377 | def _SLASH_RTC : CLIgnoredJoined<"RTC">; |
| 378 | def _SLASH_sdl : CLIgnoredFlag<"sdl">; |
| 379 | def _SLASH_sdl_ : CLIgnoredFlag<"sdl-">; |
| 380 | def _SLASH_utf8 : CLIgnoredFlag<"utf-8">, |
| 381 | HelpText<"Set source and runtime encoding to UTF-8 (default)">; |
| 382 | def _SLASH_w : CLIgnoredJoined<"w">; |
| 383 | def _SLASH_Zc___cplusplus : CLIgnoredFlag<"Zc:__cplusplus">; |
| 384 | def _SLASH_Zc_auto : CLIgnoredFlag<"Zc:auto">; |
| 385 | def _SLASH_Zc_forScope : CLIgnoredFlag<"Zc:forScope">; |
| 386 | def _SLASH_Zc_inline : CLIgnoredFlag<"Zc:inline">; |
| 387 | def _SLASH_Zc_rvalueCast : CLIgnoredFlag<"Zc:rvalueCast">; |
| 388 | def _SLASH_Zc_ternary : CLIgnoredFlag<"Zc:ternary">; |
| 389 | def _SLASH_Zc_wchar_t : CLIgnoredFlag<"Zc:wchar_t">; |
| 390 | def _SLASH_Zm : CLIgnoredJoined<"Zm">; |
| 391 | def _SLASH_Zo : CLIgnoredFlag<"Zo">; |
| 392 | def _SLASH_Zo_ : CLIgnoredFlag<"Zo-">; |
| 393 | |
| 394 | |
| 395 | // Unsupported: |
| 396 | |
| 397 | def _SLASH_await : CLFlag<"await">; |
| 398 | def _SLASH_constexpr : CLJoined<"constexpr:">; |
| 399 | def _SLASH_AI : CLJoinedOrSeparate<"AI">; |
| 400 | def _SLASH_Bt : CLFlag<"Bt">; |
| 401 | def _SLASH_Bt_plus : CLFlag<"Bt+">; |
| 402 | def _SLASH_clr : CLJoined<"clr">; |
| 403 | def _SLASH_d2 : CLJoined<"d2">; |
| 404 | def _SLASH_doc : CLJoined<"doc">; |
| 405 | def _SLASH_FA_joined : CLJoined<"FA">; |
| 406 | def _SLASH_favor : CLJoined<"favor">; |
| 407 | def _SLASH_F : CLFlag<"F">; |
| 408 | def _SLASH_Fm : CLJoined<"Fm">; |
| 409 | def _SLASH_Fr : CLJoined<"Fr">; |
| 410 | def _SLASH_FR : CLJoined<"FR">; |
| 411 | def _SLASH_FU : CLJoinedOrSeparate<"FU">; |
| 412 | def _SLASH_Fx : CLFlag<"Fx">; |
| 413 | def _SLASH_G1 : CLFlag<"G1">; |
| 414 | def _SLASH_G2 : CLFlag<"G2">; |
| 415 | def _SLASH_Ge : CLFlag<"Ge">; |
| 416 | def _SLASH_Gh : CLFlag<"Gh">; |
| 417 | def _SLASH_GH : CLFlag<"GH">; |
| 418 | def _SLASH_GL : CLFlag<"GL">; |
| 419 | def _SLASH_GL_ : CLFlag<"GL-">; |
| 420 | def _SLASH_Gm : CLFlag<"Gm">; |
| 421 | def _SLASH_Gm_ : CLFlag<"Gm-">; |
| 422 | def _SLASH_GT : CLFlag<"GT">; |
| 423 | def _SLASH_GZ : CLFlag<"GZ">; |
| 424 | def _SLASH_H : CLFlag<"H">; |
| 425 | def _SLASH_homeparams : CLFlag<"homeparams">; |
| 426 | def _SLASH_hotpatch : CLFlag<"hotpatch">; |
| 427 | def _SLASH_kernel : CLFlag<"kernel">; |
| 428 | def _SLASH_LN : CLFlag<"LN">; |
| 429 | def _SLASH_MP : CLJoined<"MP">; |
| 430 | def _SLASH_openmp : CLFlag<"openmp">; |
| 431 | def _SLASH_Qfast_transcendentals : CLFlag<"Qfast_transcendentals">; |
| 432 | def _SLASH_QIfist : CLFlag<"QIfist">; |
| 433 | def _SLASH_Qimprecise_fwaits : CLFlag<"Qimprecise_fwaits">; |
| 434 | def _SLASH_Qpar : CLFlag<"Qpar">; |
| 435 | def _SLASH_Qpar_report : CLJoined<"Qpar-report">; |
| 436 | def _SLASH_Qsafe_fp_loads : CLFlag<"Qsafe_fp_loads">; |
| 437 | def _SLASH_Qspectre : CLFlag<"Qspectre">; |
| 438 | def _SLASH_Qvec_report : CLJoined<"Qvec-report">; |
| 439 | def _SLASH_u : CLFlag<"u">; |
| 440 | def _SLASH_V : CLFlag<"V">; |
| 441 | def _SLASH_WL : CLFlag<"WL">; |
| 442 | def _SLASH_Wp64 : CLFlag<"Wp64">; |
| 443 | def _SLASH_Yd : CLFlag<"Yd">; |
| 444 | def _SLASH_Yl : CLJoined<"Yl">; |
| 445 | def _SLASH_Za : CLFlag<"Za">; |
| 446 | def _SLASH_Zc : CLJoined<"Zc:">; |
| 447 | def _SLASH_Ze : CLFlag<"Ze">; |
| 448 | def _SLASH_Zg : CLFlag<"Zg">; |
| 449 | def _SLASH_ZI : CLFlag<"ZI">; |
| 450 | def _SLASH_ZW : CLJoined<"ZW">; |
| 451 | |