CC1Options.td revision 360784
1//===--- CC1Options.td - Options for clang -cc1 ---------------------------===// 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 -cc1 and clang -cc1as. 10// 11//===----------------------------------------------------------------------===// 12 13let Flags = [CC1Option, NoDriverOption] in { 14 15//===----------------------------------------------------------------------===// 16// Target Options 17//===----------------------------------------------------------------------===// 18 19let Flags = [CC1Option, CC1AsOption, NoDriverOption] in { 20 21def target_cpu : Separate<["-"], "target-cpu">, 22 HelpText<"Target a specific cpu type">; 23def target_feature : Separate<["-"], "target-feature">, 24 HelpText<"Target specific attributes">; 25def triple : Separate<["-"], "triple">, 26 HelpText<"Specify target triple (e.g. i686-apple-darwin9)">; 27def target_abi : Separate<["-"], "target-abi">, 28 HelpText<"Target a particular ABI type">; 29def target_sdk_version_EQ : Joined<["-"], "target-sdk-version=">, 30 HelpText<"The version of target SDK used for compilation">; 31 32} 33 34def target_linker_version : Separate<["-"], "target-linker-version">, 35 HelpText<"Target linker version">; 36def triple_EQ : Joined<["-"], "triple=">, Alias<triple>; 37def mfpmath : Separate<["-"], "mfpmath">, 38 HelpText<"Which unit to use for fp math">; 39 40def fpadding_on_unsigned_fixed_point : Flag<["-"], "fpadding-on-unsigned-fixed-point">, 41 HelpText<"Force each unsigned fixed point type to have an extra bit of padding to align their scales with those of signed fixed point types">; 42def fno_padding_on_unsigned_fixed_point : Flag<["-"], "fno-padding-on-unsigned-fixed-point">; 43 44//===----------------------------------------------------------------------===// 45// Analyzer Options 46//===----------------------------------------------------------------------===// 47 48def analysis_UnoptimizedCFG : Flag<["-"], "unoptimized-cfg">, 49 HelpText<"Generate unoptimized CFGs for all analyses">; 50def analysis_CFGAddImplicitDtors : Flag<["-"], "cfg-add-implicit-dtors">, 51 HelpText<"Add C++ implicit destructors to CFGs for all analyses">; 52 53def analyzer_store : Separate<["-"], "analyzer-store">, 54 HelpText<"Source Code Analysis - Abstract Memory Store Models">; 55def analyzer_store_EQ : Joined<["-"], "analyzer-store=">, Alias<analyzer_store>; 56 57def analyzer_constraints : Separate<["-"], "analyzer-constraints">, 58 HelpText<"Source Code Analysis - Symbolic Constraint Engines">; 59def analyzer_constraints_EQ : Joined<["-"], "analyzer-constraints=">, 60 Alias<analyzer_constraints>; 61 62def analyzer_output : Separate<["-"], "analyzer-output">, 63 HelpText<"Source Code Analysis - Output Options">; 64def analyzer_output_EQ : Joined<["-"], "analyzer-output=">, 65 Alias<analyzer_output>; 66 67def analyzer_purge : Separate<["-"], "analyzer-purge">, 68 HelpText<"Source Code Analysis - Dead Symbol Removal Frequency">; 69def analyzer_purge_EQ : Joined<["-"], "analyzer-purge=">, Alias<analyzer_purge>; 70 71def analyzer_opt_analyze_headers : Flag<["-"], "analyzer-opt-analyze-headers">, 72 HelpText<"Force the static analyzer to analyze functions defined in header files">; 73def analyzer_opt_analyze_nested_blocks : Flag<["-"], "analyzer-opt-analyze-nested-blocks">, 74 HelpText<"Analyze the definitions of blocks in addition to functions">; 75def analyzer_display_progress : Flag<["-"], "analyzer-display-progress">, 76 HelpText<"Emit verbose output about the analyzer's progress">; 77def analyze_function : Separate<["-"], "analyze-function">, 78 HelpText<"Run analysis on specific function (for C++ include parameters in name)">; 79def analyze_function_EQ : Joined<["-"], "analyze-function=">, Alias<analyze_function>; 80def trim_egraph : Flag<["-"], "trim-egraph">, 81 HelpText<"Only show error-related paths in the analysis graph">; 82def analyzer_viz_egraph_graphviz : Flag<["-"], "analyzer-viz-egraph-graphviz">, 83 HelpText<"Display exploded graph using GraphViz">; 84def analyzer_dump_egraph : Separate<["-"], "analyzer-dump-egraph">, 85 HelpText<"Dump exploded graph to the specified file">; 86def analyzer_dump_egraph_EQ : Joined<["-"], "analyzer-dump-egraph=">, Alias<analyzer_dump_egraph>; 87 88def analyzer_inline_max_stack_depth : Separate<["-"], "analyzer-inline-max-stack-depth">, 89 HelpText<"Bound on stack depth while inlining (4 by default)">; 90def analyzer_inline_max_stack_depth_EQ : Joined<["-"], "analyzer-inline-max-stack-depth=">, 91 Alias<analyzer_inline_max_stack_depth>; 92 93def analyzer_inlining_mode : Separate<["-"], "analyzer-inlining-mode">, 94 HelpText<"Specify the function selection heuristic used during inlining">; 95def analyzer_inlining_mode_EQ : Joined<["-"], "analyzer-inlining-mode=">, Alias<analyzer_inlining_mode>; 96 97def analyzer_disable_retry_exhausted : Flag<["-"], "analyzer-disable-retry-exhausted">, 98 HelpText<"Do not re-analyze paths leading to exhausted nodes with a different strategy (may decrease code coverage)">; 99 100def analyzer_max_loop : Separate<["-"], "analyzer-max-loop">, 101 HelpText<"The maximum number of times the analyzer will go through a loop">; 102def analyzer_stats : Flag<["-"], "analyzer-stats">, 103 HelpText<"Print internal analyzer statistics.">; 104 105def analyzer_checker : Separate<["-"], "analyzer-checker">, 106 HelpText<"Choose analyzer checkers to enable">, 107 ValuesCode<[{ 108 const char *Values = 109 #define GET_CHECKERS 110 #define CHECKER(FULLNAME, CLASS, HT, DOC_URI, IS_HIDDEN) FULLNAME "," 111 #include "clang/StaticAnalyzer/Checkers/Checkers.inc" 112 #undef GET_CHECKERS 113 #define GET_PACKAGES 114 #define PACKAGE(FULLNAME) FULLNAME "," 115 #include "clang/StaticAnalyzer/Checkers/Checkers.inc" 116 #undef GET_PACKAGES 117 ; 118 }]>; 119def analyzer_checker_EQ : Joined<["-"], "analyzer-checker=">, 120 Alias<analyzer_checker>; 121 122def analyzer_disable_checker : Separate<["-"], "analyzer-disable-checker">, 123 HelpText<"Choose analyzer checkers to disable">; 124def analyzer_disable_checker_EQ : Joined<["-"], "analyzer-disable-checker=">, 125 Alias<analyzer_disable_checker>; 126 127def analyzer_disable_all_checks : Flag<["-"], "analyzer-disable-all-checks">, 128 HelpText<"Disable all static analyzer checks">; 129 130def analyzer_checker_help : Flag<["-"], "analyzer-checker-help">, 131 HelpText<"Display the list of analyzer checkers that are available">; 132 133def analyzer_checker_help_alpha : Flag<["-"], "analyzer-checker-help-alpha">, 134 HelpText<"Display the list of in development analyzer checkers. These " 135 "are NOT considered safe, they are unstable and will emit incorrect " 136 "reports. Enable ONLY FOR DEVELOPMENT purposes">; 137 138def analyzer_checker_help_developer : Flag<["-"], "analyzer-checker-help-developer">, 139 HelpText<"Display the list of developer-only checkers such as modeling " 140 "and debug checkers">; 141 142def analyzer_config_help : Flag<["-"], "analyzer-config-help">, 143 HelpText<"Display the list of -analyzer-config options. These are meant for " 144 "development purposes only!">; 145 146def analyzer_list_enabled_checkers : Flag<["-"], "analyzer-list-enabled-checkers">, 147 HelpText<"Display the list of enabled analyzer checkers">; 148 149def analyzer_config : Separate<["-"], "analyzer-config">, 150 HelpText<"Choose analyzer options to enable">; 151 152def analyzer_checker_option_help : Flag<["-"], "analyzer-checker-option-help">, 153 HelpText<"Display the list of checker and package options">; 154 155def analyzer_checker_option_help_alpha : Flag<["-"], "analyzer-checker-option-help-alpha">, 156 HelpText<"Display the list of in development checker and package options. " 157 "These are NOT considered safe, they are unstable and will emit " 158 "incorrect reports. Enable ONLY FOR DEVELOPMENT purposes">; 159 160def analyzer_checker_option_help_developer : Flag<["-"], "analyzer-checker-option-help-developer">, 161 HelpText<"Display the list of checker and package options meant for " 162 "development purposes only">; 163 164def analyzer_config_compatibility_mode : Separate<["-"], "analyzer-config-compatibility-mode">, 165 HelpText<"Don't emit errors on invalid analyzer-config inputs">; 166 167def analyzer_config_compatibility_mode_EQ : Joined<["-"], "analyzer-config-compatibility-mode=">, 168 Alias<analyzer_config_compatibility_mode>; 169 170def analyzer_werror : Flag<["-"], "analyzer-werror">, 171 HelpText<"Emit analyzer results as errors rather than warnings">; 172 173//===----------------------------------------------------------------------===// 174// Migrator Options 175//===----------------------------------------------------------------------===// 176def migrator_no_nsalloc_error : Flag<["-"], "no-ns-alloc-error">, 177 HelpText<"Do not error on use of NSAllocateCollectable/NSReallocateCollectable">; 178 179def migrator_no_finalize_removal : Flag<["-"], "no-finalize-removal">, 180 HelpText<"Do not remove finalize method in gc mode">; 181 182//===----------------------------------------------------------------------===// 183// CodeGen Options 184//===----------------------------------------------------------------------===// 185 186let Flags = [CC1Option, CC1AsOption, NoDriverOption] in { 187def debug_info_kind_EQ : Joined<["-"], "debug-info-kind=">; 188def debug_info_macro : Flag<["-"], "debug-info-macro">, 189 HelpText<"Emit macro debug information">; 190def default_function_attr : Separate<["-"], "default-function-attr">, 191 HelpText<"Apply given attribute to all functions">; 192def dwarf_version_EQ : Joined<["-"], "dwarf-version=">; 193def debugger_tuning_EQ : Joined<["-"], "debugger-tuning=">; 194def dwarf_debug_flags : Separate<["-"], "dwarf-debug-flags">, 195 HelpText<"The string to embed in the Dwarf debug flags record.">; 196def record_command_line : Separate<["-"], "record-command-line">, 197 HelpText<"The string to embed in the .LLVM.command.line section.">; 198def compress_debug_sections : Flag<["-", "--"], "compress-debug-sections">, 199 HelpText<"DWARF debug sections compression">; 200def compress_debug_sections_EQ : Joined<["-", "--"], "compress-debug-sections=">, 201 HelpText<"DWARF debug sections compression type">; 202def mno_exec_stack : Flag<["-"], "mnoexecstack">, 203 HelpText<"Mark the file as not needing an executable stack">; 204def massembler_no_warn : Flag<["-"], "massembler-no-warn">, 205 HelpText<"Make assembler not emit warnings">; 206def massembler_fatal_warnings : Flag<["-"], "massembler-fatal-warnings">, 207 HelpText<"Make assembler warnings fatal">; 208def mrelax_relocations : Flag<["--"], "mrelax-relocations">, 209 HelpText<"Use relaxable elf relocations">; 210def msave_temp_labels : Flag<["-"], "msave-temp-labels">, 211 HelpText<"Save temporary labels in the symbol table. " 212 "Note this may change .s semantics and shouldn't generally be used " 213 "on compiler-generated code.">; 214def mrelocation_model : Separate<["-"], "mrelocation-model">, 215 HelpText<"The relocation model to use">, Values<"static,pic,ropi,rwpi,ropi-rwpi,dynamic-no-pic">; 216def fno_math_builtin : Flag<["-"], "fno-math-builtin">, 217 HelpText<"Disable implicit builtin knowledge of math functions">; 218} 219 220def disable_llvm_verifier : Flag<["-"], "disable-llvm-verifier">, 221 HelpText<"Don't run the LLVM IR verifier pass">; 222def disable_llvm_passes : Flag<["-"], "disable-llvm-passes">, 223 HelpText<"Use together with -emit-llvm to get pristine LLVM IR from the " 224 "frontend by not running any LLVM passes at all">; 225def disable_llvm_optzns : Flag<["-"], "disable-llvm-optzns">, 226 Alias<disable_llvm_passes>; 227def disable_lifetimemarkers : Flag<["-"], "disable-lifetime-markers">, 228 HelpText<"Disable lifetime-markers emission even when optimizations are " 229 "enabled">; 230def disable_O0_optnone : Flag<["-"], "disable-O0-optnone">, 231 HelpText<"Disable adding the optnone attribute to functions at O0">; 232def disable_red_zone : Flag<["-"], "disable-red-zone">, 233 HelpText<"Do not emit code that uses the red zone.">; 234def dwarf_column_info : Flag<["-"], "dwarf-column-info">, 235 HelpText<"Turn on column location information.">; 236def dwarf_ext_refs : Flag<["-"], "dwarf-ext-refs">, 237 HelpText<"Generate debug info with external references to clang modules" 238 " or precompiled headers">; 239def dwarf_explicit_import : Flag<["-"], "dwarf-explicit-import">, 240 HelpText<"Generate explicit import from anonymous namespace to containing" 241 " scope">; 242def debug_forward_template_params : Flag<["-"], "debug-forward-template-params">, 243 HelpText<"Emit complete descriptions of template parameters in forward" 244 " declarations">; 245def fforbid_guard_variables : Flag<["-"], "fforbid-guard-variables">, 246 HelpText<"Emit an error if a C++ static local initializer would need a guard variable">; 247def no_implicit_float : Flag<["-"], "no-implicit-float">, 248 HelpText<"Don't generate implicit floating point instructions">; 249def fdump_vtable_layouts : Flag<["-"], "fdump-vtable-layouts">, 250 HelpText<"Dump the layouts of all vtables that will be emitted in a translation unit">; 251def fmerge_functions : Flag<["-"], "fmerge-functions">, 252 HelpText<"Permit merging of identical functions when optimizing.">; 253def femit_coverage_notes : Flag<["-"], "femit-coverage-notes">, 254 HelpText<"Emit a gcov coverage notes file when compiling.">; 255def femit_coverage_data: Flag<["-"], "femit-coverage-data">, 256 HelpText<"Instrument the program to emit gcov coverage data when run.">; 257def coverage_data_file : Separate<["-"], "coverage-data-file">, 258 HelpText<"Emit coverage data to this filename.">; 259def coverage_data_file_EQ : Joined<["-"], "coverage-data-file=">, 260 Alias<coverage_data_file>; 261def coverage_notes_file : Separate<["-"], "coverage-notes-file">, 262 HelpText<"Emit coverage notes to this filename.">; 263def coverage_notes_file_EQ : Joined<["-"], "coverage-notes-file=">, 264 Alias<coverage_notes_file>; 265def coverage_cfg_checksum : Flag<["-"], "coverage-cfg-checksum">, 266 HelpText<"Emit CFG checksum for functions in .gcno files.">; 267def coverage_no_function_names_in_data : Flag<["-"], "coverage-no-function-names-in-data">, 268 HelpText<"Emit function names in .gcda files.">; 269def coverage_exit_block_before_body : Flag<["-"], "coverage-exit-block-before-body">, 270 HelpText<"Emit the exit block before the body blocks in .gcno files.">; 271def coverage_version_EQ : Joined<["-"], "coverage-version=">, 272 HelpText<"Four-byte version string for gcov files.">; 273def test_coverage : Flag<["-"], "test-coverage">, 274 HelpText<"Do not generate coverage files or remove coverage changes from IR">; 275def dump_coverage_mapping : Flag<["-"], "dump-coverage-mapping">, 276 HelpText<"Dump the coverage mapping records, for testing">; 277def fuse_register_sized_bitfield_access: Flag<["-"], "fuse-register-sized-bitfield-access">, 278 HelpText<"Use register sized accesses to bit-fields, when possible.">; 279def relaxed_aliasing : Flag<["-"], "relaxed-aliasing">, 280 HelpText<"Turn off Type Based Alias Analysis">; 281def no_struct_path_tbaa : Flag<["-"], "no-struct-path-tbaa">, 282 HelpText<"Turn off struct-path aware Type Based Alias Analysis">; 283def new_struct_path_tbaa : Flag<["-"], "new-struct-path-tbaa">, 284 HelpText<"Enable enhanced struct-path aware Type Based Alias Analysis">; 285def masm_verbose : Flag<["-"], "masm-verbose">, 286 HelpText<"Generate verbose assembly output">; 287def mcode_model : Separate<["-"], "mcode-model">, 288 HelpText<"The code model to use">, Values<"tiny,small,kernel,medium,large">; 289def mdebug_pass : Separate<["-"], "mdebug-pass">, 290 HelpText<"Enable additional debug output">; 291def mframe_pointer_EQ : Joined<["-"], "mframe-pointer=">, 292 HelpText<"Specify which frame pointers to retain (all, non-leaf, none).">, Values<"all,non-leaf,none">; 293def mdisable_tail_calls : Flag<["-"], "mdisable-tail-calls">, 294 HelpText<"Disable tail call optimization, keeping the call stack accurate">; 295def menable_no_infinities : Flag<["-"], "menable-no-infs">, 296 HelpText<"Allow optimization to assume there are no infinities.">; 297def menable_no_nans : Flag<["-"], "menable-no-nans">, 298 HelpText<"Allow optimization to assume there are no NaNs.">; 299def menable_unsafe_fp_math : Flag<["-"], "menable-unsafe-fp-math">, 300 HelpText<"Allow unsafe floating-point math optimizations which may decrease " 301 "precision">; 302def mreassociate : Flag<["-"], "mreassociate">, 303 HelpText<"Allow reassociation transformations for floating-point instructions">; 304def mabi_EQ_ieeelongdouble : Flag<["-"], "mabi=ieeelongdouble">, 305 HelpText<"Use IEEE 754 quadruple-precision for long double">; 306def mfloat_abi : Separate<["-"], "mfloat-abi">, 307 HelpText<"The float ABI to use">; 308def mtp : Separate<["-"], "mtp">, 309 HelpText<"Mode for reading thread pointer">; 310def mlimit_float_precision : Separate<["-"], "mlimit-float-precision">, 311 HelpText<"Limit float precision to the given value">; 312def split_stacks : Flag<["-"], "split-stacks">, 313 HelpText<"Try to use a split stack if possible.">; 314def mno_zero_initialized_in_bss : Flag<["-"], "mno-zero-initialized-in-bss">, 315 HelpText<"Do not put zero initialized data in the BSS">; 316def mregparm : Separate<["-"], "mregparm">, 317 HelpText<"Limit the number of registers available for integer arguments">; 318def munwind_tables : Flag<["-"], "munwind-tables">, 319 HelpText<"Generate unwinding tables for all functions">; 320def mconstructor_aliases : Flag<["-"], "mconstructor-aliases">, 321 HelpText<"Emit complete constructors and destructors as aliases when possible">; 322def mlink_bitcode_file : Separate<["-"], "mlink-bitcode-file">, 323 HelpText<"Link the given bitcode file before performing optimizations.">; 324def mlink_builtin_bitcode : Separate<["-"], "mlink-builtin-bitcode">, 325 HelpText<"Link and internalize needed symbols from the given bitcode file " 326 "before performing optimizations.">; 327def mlink_cuda_bitcode : Separate<["-"], "mlink-cuda-bitcode">, 328 Alias<mlink_builtin_bitcode>; 329def vectorize_loops : Flag<["-"], "vectorize-loops">, 330 HelpText<"Run the Loop vectorization passes">; 331def vectorize_slp : Flag<["-"], "vectorize-slp">, 332 HelpText<"Run the SLP vectorization passes">; 333def dependent_lib : Joined<["--"], "dependent-lib=">, 334 HelpText<"Add dependent library">; 335def linker_option : Joined<["--"], "linker-option=">, 336 HelpText<"Add linker option">; 337def fsanitize_coverage_type : Joined<["-"], "fsanitize-coverage-type=">, 338 HelpText<"Sanitizer coverage type">; 339def fsanitize_coverage_indirect_calls 340 : Flag<["-"], "fsanitize-coverage-indirect-calls">, 341 HelpText<"Enable sanitizer coverage for indirect calls">; 342def fsanitize_coverage_trace_bb 343 : Flag<["-"], "fsanitize-coverage-trace-bb">, 344 HelpText<"Enable basic block tracing in sanitizer coverage">; 345def fsanitize_coverage_trace_cmp 346 : Flag<["-"], "fsanitize-coverage-trace-cmp">, 347 HelpText<"Enable cmp instruction tracing in sanitizer coverage">; 348def fsanitize_coverage_trace_div 349 : Flag<["-"], "fsanitize-coverage-trace-div">, 350 HelpText<"Enable div instruction tracing in sanitizer coverage">; 351def fsanitize_coverage_trace_gep 352 : Flag<["-"], "fsanitize-coverage-trace-gep">, 353 HelpText<"Enable gep instruction tracing in sanitizer coverage">; 354def fsanitize_coverage_8bit_counters 355 : Flag<["-"], "fsanitize-coverage-8bit-counters">, 356 HelpText<"Enable frequency counters in sanitizer coverage">; 357def fsanitize_coverage_inline_8bit_counters 358 : Flag<["-"], "fsanitize-coverage-inline-8bit-counters">, 359 HelpText<"Enable inline 8-bit counters in sanitizer coverage">; 360def fsanitize_coverage_pc_table 361 : Flag<["-"], "fsanitize-coverage-pc-table">, 362 HelpText<"Create a table of coverage-instrumented PCs">; 363def fsanitize_coverage_trace_pc 364 : Flag<["-"], "fsanitize-coverage-trace-pc">, 365 HelpText<"Enable PC tracing in sanitizer coverage">; 366def fsanitize_coverage_trace_pc_guard 367 : Flag<["-"], "fsanitize-coverage-trace-pc-guard">, 368 HelpText<"Enable PC tracing with guard in sanitizer coverage">; 369def fsanitize_coverage_no_prune 370 : Flag<["-"], "fsanitize-coverage-no-prune">, 371 HelpText<"Disable coverage pruning (i.e. instrument all blocks/edges)">; 372def fsanitize_coverage_stack_depth 373 : Flag<["-"], "fsanitize-coverage-stack-depth">, 374 HelpText<"Enable max stack depth tracing">; 375def fpatchable_function_entry_offset_EQ 376 : Joined<["-"], "fpatchable-function-entry-offset=">, MetaVarName<"<M>">, 377 HelpText<"Generate M NOPs before function entry">; 378def fprofile_instrument_EQ : Joined<["-"], "fprofile-instrument=">, 379 HelpText<"Enable PGO instrumentation. The accepted value is clang, llvm, " 380 "or none">, Values<"none,clang,llvm">; 381def fprofile_instrument_path_EQ : Joined<["-"], "fprofile-instrument-path=">, 382 HelpText<"Generate instrumented code to collect execution counts into " 383 "<file> (overridden by LLVM_PROFILE_FILE env var)">; 384def fprofile_instrument_use_path_EQ : 385 Joined<["-"], "fprofile-instrument-use-path=">, 386 HelpText<"Specify the profile path in PGO use compilation">; 387def flto_visibility_public_std: 388 Flag<["-"], "flto-visibility-public-std">, 389 HelpText<"Use public LTO visibility for classes in std and stdext namespaces">; 390def flto_unit: Flag<["-"], "flto-unit">, 391 HelpText<"Emit IR to support LTO unit features (CFI, whole program vtable opt)">; 392def fno_lto_unit: Flag<["-"], "fno-lto-unit">; 393def femit_debug_entry_values : Flag<["-"], "femit-debug-entry-values">, 394 HelpText<"Enables debug info about call site parameter's entry values">; 395def fdebug_pass_manager : Flag<["-"], "fdebug-pass-manager">, 396 HelpText<"Prints debug information for the new pass manager">; 397def fno_debug_pass_manager : Flag<["-"], "fno-debug-pass-manager">, 398 HelpText<"Disables debug printing for the new pass manager">; 399// The driver option takes the key as a parameter to the -msign-return-address= 400// and -mbranch-protection= options, but CC1 has a separate option so we 401// don't have to parse the parameter twice. 402def msign_return_address_key_EQ : Joined<["-"], "msign-return-address-key=">, 403 Values<"a_key,b_key">; 404def mbranch_target_enforce : Flag<["-"], "mbranch-target-enforce">; 405def fno_dllexport_inlines : Flag<["-"], "fno-dllexport-inlines">; 406def cfguard_no_checks : Flag<["-"], "cfguard-no-checks">, 407 HelpText<"Emit Windows Control Flow Guard tables only (no checks)">; 408def cfguard : Flag<["-"], "cfguard">, 409 HelpText<"Emit Windows Control Flow Guard tables and checks">; 410 411//===----------------------------------------------------------------------===// 412// Dependency Output Options 413//===----------------------------------------------------------------------===// 414 415def sys_header_deps : Flag<["-"], "sys-header-deps">, 416 HelpText<"Include system headers in dependency output">; 417def module_file_deps : Flag<["-"], "module-file-deps">, 418 HelpText<"Include module files in dependency output">; 419def header_include_file : Separate<["-"], "header-include-file">, 420 HelpText<"Filename (or -) to write header include output to">; 421def show_includes : Flag<["--"], "show-includes">, 422 HelpText<"Print cl.exe style /showIncludes to stdout">; 423 424//===----------------------------------------------------------------------===// 425// Diagnostic Options 426//===----------------------------------------------------------------------===// 427 428def diagnostic_log_file : Separate<["-"], "diagnostic-log-file">, 429 HelpText<"Filename (or -) to log diagnostics to">; 430def diagnostic_serialized_file : Separate<["-"], "serialize-diagnostic-file">, 431 MetaVarName<"<filename>">, 432 HelpText<"File for serializing diagnostics in a binary format">; 433 434def fdiagnostics_format : Separate<["-"], "fdiagnostics-format">, 435 HelpText<"Change diagnostic formatting to match IDE and command line tools">, Values<"clang,msvc,msvc-fallback,vi">; 436def fdiagnostics_show_category : Separate<["-"], "fdiagnostics-show-category">, 437 HelpText<"Print diagnostic category">, Values<"none,id,name">; 438def fno_diagnostics_use_presumed_location : Flag<["-"], "fno-diagnostics-use-presumed-location">, 439 HelpText<"Ignore #line directives when displaying diagnostic locations">; 440def ftabstop : Separate<["-"], "ftabstop">, MetaVarName<"<N>">, 441 HelpText<"Set the tab stop distance.">; 442def ferror_limit : Separate<["-"], "ferror-limit">, MetaVarName<"<N>">, 443 HelpText<"Set the maximum number of errors to emit before stopping (0 = no limit).">; 444def fmacro_backtrace_limit : Separate<["-"], "fmacro-backtrace-limit">, MetaVarName<"<N>">, 445 HelpText<"Set the maximum number of entries to print in a macro expansion backtrace (0 = no limit).">; 446def ftemplate_backtrace_limit : Separate<["-"], "ftemplate-backtrace-limit">, MetaVarName<"<N>">, 447 HelpText<"Set the maximum number of entries to print in a template instantiation backtrace (0 = no limit).">; 448def fconstexpr_backtrace_limit : Separate<["-"], "fconstexpr-backtrace-limit">, MetaVarName<"<N>">, 449 HelpText<"Set the maximum number of entries to print in a constexpr evaluation backtrace (0 = no limit).">; 450def fspell_checking_limit : Separate<["-"], "fspell-checking-limit">, MetaVarName<"<N>">, 451 HelpText<"Set the maximum number of times to perform spell checking on unrecognized identifiers (0 = no limit).">; 452def fcaret_diagnostics_max_lines : 453 Separate<["-"], "fcaret-diagnostics-max-lines">, MetaVarName<"<N>">, 454 HelpText<"Set the maximum number of source lines to show in a caret diagnostic">; 455def fmessage_length : Separate<["-"], "fmessage-length">, MetaVarName<"<N>">, 456 HelpText<"Format message diagnostics so that they fit within N columns or fewer, when possible.">; 457def verify_EQ : CommaJoined<["-"], "verify=">, 458 MetaVarName<"<prefixes>">, 459 HelpText<"Verify diagnostic output using comment directives that start with" 460 " prefixes in the comma-separated sequence <prefixes>">; 461def verify : Flag<["-"], "verify">, 462 HelpText<"Equivalent to -verify=expected">; 463def verify_ignore_unexpected : Flag<["-"], "verify-ignore-unexpected">, 464 HelpText<"Ignore unexpected diagnostic messages">; 465def verify_ignore_unexpected_EQ : CommaJoined<["-"], "verify-ignore-unexpected=">, 466 HelpText<"Ignore unexpected diagnostic messages">; 467def Wno_rewrite_macros : Flag<["-"], "Wno-rewrite-macros">, 468 HelpText<"Silence ObjC rewriting warnings">; 469 470//===----------------------------------------------------------------------===// 471// Frontend Options 472//===----------------------------------------------------------------------===// 473 474// This isn't normally used, it is just here so we can parse a 475// CompilerInvocation out of a driver-derived argument vector. 476def cc1 : Flag<["-"], "cc1">; 477def cc1as : Flag<["-"], "cc1as">; 478 479def ast_merge : Separate<["-"], "ast-merge">, 480 MetaVarName<"<ast file>">, 481 HelpText<"Merge the given AST file into the translation unit being compiled.">; 482def aux_triple : Separate<["-"], "aux-triple">, 483 HelpText<"Auxiliary target triple.">; 484def code_completion_at : Separate<["-"], "code-completion-at">, 485 MetaVarName<"<file>:<line>:<column>">, 486 HelpText<"Dump code-completion information at a location">; 487def remap_file : Separate<["-"], "remap-file">, 488 MetaVarName<"<from>;<to>">, 489 HelpText<"Replace the contents of the <from> file with the contents of the <to> file">; 490def code_completion_at_EQ : Joined<["-"], "code-completion-at=">, 491 Alias<code_completion_at>; 492def code_completion_macros : Flag<["-"], "code-completion-macros">, 493 HelpText<"Include macros in code-completion results">; 494def code_completion_patterns : Flag<["-"], "code-completion-patterns">, 495 HelpText<"Include code patterns in code-completion results">; 496def no_code_completion_globals : Flag<["-"], "no-code-completion-globals">, 497 HelpText<"Do not include global declarations in code-completion results.">; 498def no_code_completion_ns_level_decls : Flag<["-"], "no-code-completion-ns-level-decls">, 499 HelpText<"Do not include declarations inside namespaces (incl. global namespace) in the code-completion results.">; 500def code_completion_brief_comments : Flag<["-"], "code-completion-brief-comments">, 501 HelpText<"Include brief documentation comments in code-completion results.">; 502def code_completion_with_fixits : Flag<["-"], "code-completion-with-fixits">, 503 HelpText<"Include code completion results which require small fix-its.">; 504def disable_free : Flag<["-"], "disable-free">, 505 HelpText<"Disable freeing of memory on exit">; 506def discard_value_names : Flag<["-"], "discard-value-names">, 507 HelpText<"Discard value names in LLVM IR">; 508def load : Separate<["-"], "load">, MetaVarName<"<dsopath>">, 509 HelpText<"Load the named plugin (dynamic shared object)">; 510def plugin : Separate<["-"], "plugin">, MetaVarName<"<name>">, 511 HelpText<"Use the named plugin action instead of the default action (use \"help\" to list available options)">; 512def plugin_arg : JoinedAndSeparate<["-"], "plugin-arg-">, 513 MetaVarName<"<name> <arg>">, 514 HelpText<"Pass <arg> to plugin <name>">; 515def add_plugin : Separate<["-"], "add-plugin">, MetaVarName<"<name>">, 516 HelpText<"Use the named plugin action in addition to the default action">; 517def ast_dump_filter : Separate<["-"], "ast-dump-filter">, 518 MetaVarName<"<dump_filter>">, 519 HelpText<"Use with -ast-dump or -ast-print to dump/print only AST declaration" 520 " nodes having a certain substring in a qualified name. Use" 521 " -ast-list to list all filterable declaration node names.">; 522def fno_modules_global_index : Flag<["-"], "fno-modules-global-index">, 523 HelpText<"Do not automatically generate or update the global module index">; 524def fno_modules_error_recovery : Flag<["-"], "fno-modules-error-recovery">, 525 HelpText<"Do not automatically import modules for error recovery">; 526def fmodule_map_file_home_is_cwd : Flag<["-"], "fmodule-map-file-home-is-cwd">, 527 HelpText<"Use the current working directory as the home directory of " 528 "module maps specified by -fmodule-map-file=<FILE>">; 529def fmodule_feature : Separate<["-"], "fmodule-feature">, 530 MetaVarName<"<feature>">, 531 HelpText<"Enable <feature> in module map requires declarations">; 532def fmodules_embed_file_EQ : Joined<["-"], "fmodules-embed-file=">, 533 MetaVarName<"<file>">, 534 HelpText<"Embed the contents of the specified file into the module file " 535 "being compiled.">; 536def fmodules_embed_all_files : Joined<["-"], "fmodules-embed-all-files">, 537 HelpText<"Embed the contents of all files read by this compilation into " 538 "the produced module file.">; 539def fmodules_local_submodule_visibility : 540 Flag<["-"], "fmodules-local-submodule-visibility">, 541 HelpText<"Enforce name visibility rules across submodules of the same " 542 "top-level module.">; 543def fmodules_codegen : 544 Flag<["-"], "fmodules-codegen">, 545 HelpText<"Generate code for uses of this module that assumes an explicit " 546 "object file will be built for the module">; 547def fmodules_debuginfo : 548 Flag<["-"], "fmodules-debuginfo">, 549 HelpText<"Generate debug info for types in an object file built from this " 550 "module and do not generate them elsewhere">; 551def fmodule_format_EQ : Joined<["-"], "fmodule-format=">, 552 HelpText<"Select the container format for clang modules and PCH. " 553 "Supported options are 'raw' and 'obj'.">; 554def ftest_module_file_extension_EQ : 555 Joined<["-"], "ftest-module-file-extension=">, 556 HelpText<"introduce a module file extension for testing purposes. " 557 "The argument is parsed as blockname:major:minor:hashed:user info">; 558def fconcepts_ts : Flag<["-"], "fconcepts-ts">, 559 HelpText<"Enable C++ Extensions for Concepts. (deprecated - use -std=c++2a)">; 560def fno_concept_satisfaction_caching : Flag<["-"], 561 "fno-concept-satisfaction-caching">, 562 HelpText<"Disable satisfaction caching for C++2a Concepts.">; 563 564let Group = Action_Group in { 565 566def Eonly : Flag<["-"], "Eonly">, 567 HelpText<"Just run preprocessor, no output (for timings)">; 568def dump_raw_tokens : Flag<["-"], "dump-raw-tokens">, 569 HelpText<"Lex file in raw mode and dump raw tokens">; 570def analyze : Flag<["-"], "analyze">, 571 HelpText<"Run static analysis engine">; 572def dump_tokens : Flag<["-"], "dump-tokens">, 573 HelpText<"Run preprocessor, dump internal rep of tokens">; 574def init_only : Flag<["-"], "init-only">, 575 HelpText<"Only execute frontend initialization">; 576def fixit : Flag<["-"], "fixit">, 577 HelpText<"Apply fix-it advice to the input source">; 578def fixit_EQ : Joined<["-"], "fixit=">, 579 HelpText<"Apply fix-it advice creating a file with the given suffix">; 580def print_preamble : Flag<["-"], "print-preamble">, 581 HelpText<"Print the \"preamble\" of a file, which is a candidate for implicit" 582 " precompiled headers.">; 583def emit_html : Flag<["-"], "emit-html">, 584 HelpText<"Output input source as HTML">; 585def ast_print : Flag<["-"], "ast-print">, 586 HelpText<"Build ASTs and then pretty-print them">; 587def ast_list : Flag<["-"], "ast-list">, 588 HelpText<"Build ASTs and print the list of declaration node qualified names">; 589def ast_dump : Flag<["-"], "ast-dump">, 590 HelpText<"Build ASTs and then debug dump them">; 591def ast_dump_EQ : Joined<["-"], "ast-dump=">, 592 HelpText<"Build ASTs and then debug dump them in the specified format. " 593 "Supported formats include: default, json">; 594def ast_dump_all : Flag<["-"], "ast-dump-all">, 595 HelpText<"Build ASTs and then debug dump them, forcing deserialization">; 596def ast_dump_all_EQ : Joined<["-"], "ast-dump-all=">, 597 HelpText<"Build ASTs and then debug dump them in the specified format, " 598 "forcing deserialization. Supported formats include: default, json">; 599def templight_dump : Flag<["-"], "templight-dump">, 600 HelpText<"Dump templight information to stdout">; 601def ast_dump_lookups : Flag<["-"], "ast-dump-lookups">, 602 HelpText<"Build ASTs and then debug dump their name lookup tables">; 603def ast_view : Flag<["-"], "ast-view">, 604 HelpText<"Build ASTs and view them with GraphViz">; 605def emit_module : Flag<["-"], "emit-module">, 606 HelpText<"Generate pre-compiled module file from a module map">; 607def emit_module_interface : Flag<["-"], "emit-module-interface">, 608 HelpText<"Generate pre-compiled module file from a C++ module interface">; 609def emit_header_module : Flag<["-"], "emit-header-module">, 610 HelpText<"Generate pre-compiled module file from a set of header files">; 611def emit_pch : Flag<["-"], "emit-pch">, 612 HelpText<"Generate pre-compiled header file">; 613def emit_llvm_bc : Flag<["-"], "emit-llvm-bc">, 614 HelpText<"Build ASTs then convert to LLVM, emit .bc file">; 615def emit_llvm_only : Flag<["-"], "emit-llvm-only">, 616 HelpText<"Build ASTs and convert to LLVM, discarding output">; 617def emit_codegen_only : Flag<["-"], "emit-codegen-only">, 618 HelpText<"Generate machine code, but discard output">; 619def emit_obj : Flag<["-"], "emit-obj">, 620 HelpText<"Emit native object files">; 621def rewrite_test : Flag<["-"], "rewrite-test">, 622 HelpText<"Rewriter playground">; 623def rewrite_macros : Flag<["-"], "rewrite-macros">, 624 HelpText<"Expand macros without full preprocessing">; 625def migrate : Flag<["-"], "migrate">, 626 HelpText<"Migrate source code">; 627def compiler_options_dump : Flag<["-"], "compiler-options-dump">, 628 HelpText<"Dump the compiler configuration options">; 629def print_dependency_directives_minimized_source : Flag<["-"], 630 "print-dependency-directives-minimized-source">, 631 HelpText<"Print the output of the dependency directives source minimizer">; 632} 633 634def emit_llvm_uselists : Flag<["-"], "emit-llvm-uselists">, 635 HelpText<"Preserve order of LLVM use-lists when serializing">; 636def no_emit_llvm_uselists : Flag<["-"], "no-emit-llvm-uselists">, 637 HelpText<"Don't preserve order of LLVM use-lists when serializing">; 638 639def mt_migrate_directory : Separate<["-"], "mt-migrate-directory">, 640 HelpText<"Directory for temporary files produced during ARC or ObjC migration">; 641def arcmt_check : Flag<["-"], "arcmt-check">, 642 HelpText<"Check for ARC migration issues that need manual handling">; 643def arcmt_modify : Flag<["-"], "arcmt-modify">, 644 HelpText<"Apply modifications to files to conform to ARC">; 645def arcmt_migrate : Flag<["-"], "arcmt-migrate">, 646 HelpText<"Apply modifications and produces temporary files that conform to ARC">; 647 648def opt_record_file : Separate<["-"], "opt-record-file">, 649 HelpText<"File name to use for YAML optimization record output">; 650def opt_record_passes : Separate<["-"], "opt-record-passes">, 651 HelpText<"Only record remark information for passes whose names match the given regular expression">; 652def opt_record_format : Separate<["-"], "opt-record-format">, 653 HelpText<"The format used for serializing remarks (default: YAML)">; 654 655def print_stats : Flag<["-"], "print-stats">, 656 HelpText<"Print performance metrics and statistics">; 657def stats_file : Joined<["-"], "stats-file=">, 658 HelpText<"Filename to write statistics to">; 659def fdump_record_layouts : Flag<["-"], "fdump-record-layouts">, 660 HelpText<"Dump record layout information">; 661def fdump_record_layouts_simple : Flag<["-"], "fdump-record-layouts-simple">, 662 HelpText<"Dump record layout information in a simple form used for testing">; 663def fix_what_you_can : Flag<["-"], "fix-what-you-can">, 664 HelpText<"Apply fix-it advice even in the presence of unfixable errors">; 665def fix_only_warnings : Flag<["-"], "fix-only-warnings">, 666 HelpText<"Apply fix-it advice only for warnings, not errors">; 667def fixit_recompile : Flag<["-"], "fixit-recompile">, 668 HelpText<"Apply fix-it changes and recompile">; 669def fixit_to_temp : Flag<["-"], "fixit-to-temporary">, 670 HelpText<"Apply fix-it changes to temporary files">; 671 672def foverride_record_layout_EQ : Joined<["-"], "foverride-record-layout=">, 673 HelpText<"Override record layouts with those in the given file">; 674def pch_through_header_EQ : Joined<["-"], "pch-through-header=">, 675 HelpText<"Stop PCH generation after including this file. When using a PCH, " 676 "skip tokens until after this file is included.">; 677def pch_through_hdrstop_create : Flag<["-"], "pch-through-hdrstop-create">, 678 HelpText<"When creating a PCH, stop PCH generation after #pragma hdrstop.">; 679def pch_through_hdrstop_use : Flag<["-"], "pch-through-hdrstop-use">, 680 HelpText<"When using a PCH, skip tokens until after a #pragma hdrstop.">; 681def fno_pch_timestamp : Flag<["-"], "fno-pch-timestamp">, 682 HelpText<"Disable inclusion of timestamp in precompiled headers">; 683def building_pch_with_obj : Flag<["-"], "building-pch-with-obj">, 684 HelpText<"This compilation is part of building a PCH with corresponding object file.">; 685 686def aligned_alloc_unavailable : Flag<["-"], "faligned-alloc-unavailable">, 687 HelpText<"Aligned allocation/deallocation functions are unavailable">; 688 689//===----------------------------------------------------------------------===// 690// Language Options 691//===----------------------------------------------------------------------===// 692 693let Flags = [CC1Option, CC1AsOption, NoDriverOption] in { 694 695def version : Flag<["-"], "version">, 696 HelpText<"Print the compiler version">; 697def main_file_name : Separate<["-"], "main-file-name">, 698 HelpText<"Main file name to use for debug info and source if missing">; 699def split_dwarf_output : Separate<["-"], "split-dwarf-output">, 700 HelpText<"File name to use for split dwarf debug info output">; 701 702} 703 704def fblocks_runtime_optional : Flag<["-"], "fblocks-runtime-optional">, 705 HelpText<"Weakly link in the blocks runtime">; 706def fexternc_nounwind : Flag<["-"], "fexternc-nounwind">, 707 HelpText<"Assume all functions with C linkage do not unwind">; 708def split_dwarf_file : Separate<["-"], "split-dwarf-file">, 709 HelpText<"Name of the split dwarf debug info file to encode in the object file">; 710def fno_wchar : Flag<["-"], "fno-wchar">, 711 HelpText<"Disable C++ builtin type wchar_t">; 712def fconstant_string_class : Separate<["-"], "fconstant-string-class">, 713 MetaVarName<"<class name>">, 714 HelpText<"Specify the class to use for constant Objective-C string objects.">; 715def fobjc_arc_cxxlib_EQ : Joined<["-"], "fobjc-arc-cxxlib=">, 716 HelpText<"Objective-C++ Automatic Reference Counting standard library kind">, Values<"libc++,libstdc++,none">; 717def fobjc_runtime_has_weak : Flag<["-"], "fobjc-runtime-has-weak">, 718 HelpText<"The target Objective-C runtime supports ARC weak operations">; 719def fobjc_dispatch_method_EQ : Joined<["-"], "fobjc-dispatch-method=">, 720 HelpText<"Objective-C dispatch method to use">, Values<"legacy,non-legacy,mixed">; 721def disable_objc_default_synthesize_properties : Flag<["-"], "disable-objc-default-synthesize-properties">, 722 HelpText<"disable the default synthesis of Objective-C properties">; 723def fencode_extended_block_signature : Flag<["-"], "fencode-extended-block-signature">, 724 HelpText<"enable extended encoding of block type signature">; 725def function_alignment : Separate<["-"], "function-alignment">, 726 HelpText<"default alignment for functions">; 727def pic_level : Separate<["-"], "pic-level">, 728 HelpText<"Value for __PIC__">; 729def pic_is_pie : Flag<["-"], "pic-is-pie">, 730 HelpText<"File is for a position independent executable">; 731def fno_validate_pch : Flag<["-"], "fno-validate-pch">, 732 HelpText<"Disable validation of precompiled headers">; 733def fallow_pch_with_errors : Flag<["-"], "fallow-pch-with-compiler-errors">, 734 HelpText<"Accept a PCH file that was created with compiler errors">; 735def dump_deserialized_pch_decls : Flag<["-"], "dump-deserialized-decls">, 736 HelpText<"Dump declarations that are deserialized from PCH, for testing">; 737def error_on_deserialized_pch_decl : Separate<["-"], "error-on-deserialized-decl">, 738 HelpText<"Emit error if a specific declaration is deserialized from PCH, for testing">; 739def error_on_deserialized_pch_decl_EQ : Joined<["-"], "error-on-deserialized-decl=">, 740 Alias<error_on_deserialized_pch_decl>; 741def static_define : Flag<["-"], "static-define">, 742 HelpText<"Should __STATIC__ be defined">; 743def stack_protector : Separate<["-"], "stack-protector">, 744 HelpText<"Enable stack protectors">; 745def stack_protector_buffer_size : Separate<["-"], "stack-protector-buffer-size">, 746 HelpText<"Lower bound for a buffer to be considered for stack protection">; 747def fvisibility : Separate<["-"], "fvisibility">, 748 HelpText<"Default type and symbol visibility">; 749def ftype_visibility : Separate<["-"], "ftype-visibility">, 750 HelpText<"Default type visibility">; 751def fapply_global_visibility_to_externs : Flag<["-"], "fapply-global-visibility-to-externs">, 752 HelpText<"Apply global symbol visibility to external declarations without an explicit visibility">; 753def ftemplate_depth : Separate<["-"], "ftemplate-depth">, 754 HelpText<"Maximum depth of recursive template instantiation">; 755def foperator_arrow_depth : Separate<["-"], "foperator-arrow-depth">, 756 HelpText<"Maximum number of 'operator->'s to call for a member access">; 757def fconstexpr_depth : Separate<["-"], "fconstexpr-depth">, 758 HelpText<"Maximum depth of recursive constexpr function calls">; 759def fconstexpr_steps : Separate<["-"], "fconstexpr-steps">, 760 HelpText<"Maximum number of steps in constexpr function evaluation">; 761def fbracket_depth : Separate<["-"], "fbracket-depth">, 762 HelpText<"Maximum nesting level for parentheses, brackets, and braces">; 763def fconst_strings : Flag<["-"], "fconst-strings">, 764 HelpText<"Use a const qualified type for string literals in C and ObjC">; 765def fno_const_strings : Flag<["-"], "fno-const-strings">, 766 HelpText<"Don't use a const qualified type for string literals in C and ObjC">; 767def fno_bitfield_type_align : Flag<["-"], "fno-bitfield-type-align">, 768 HelpText<"Ignore bit-field types when aligning structures">; 769def ffake_address_space_map : Flag<["-"], "ffake-address-space-map">, 770 HelpText<"Use a fake address space map; OpenCL testing purposes only">; 771def faddress_space_map_mangling_EQ : Joined<["-"], "faddress-space-map-mangling=">, MetaVarName<"<yes|no|target>">, 772 HelpText<"Set the mode for address space map based mangling; OpenCL testing purposes only">; 773def funknown_anytype : Flag<["-"], "funknown-anytype">, 774 HelpText<"Enable parser support for the __unknown_anytype type; for testing purposes only">; 775def fdebugger_support : Flag<["-"], "fdebugger-support">, 776 HelpText<"Enable special debugger support behavior">; 777def fdebugger_cast_result_to_id : Flag<["-"], "fdebugger-cast-result-to-id">, 778 HelpText<"Enable casting unknown expression results to id">; 779def fdebugger_objc_literal : Flag<["-"], "fdebugger-objc-literal">, 780 HelpText<"Enable special debugger support for Objective-C subscripting and literals">; 781def fdeprecated_macro : Flag<["-"], "fdeprecated-macro">, 782 HelpText<"Defines the __DEPRECATED macro">; 783def fno_deprecated_macro : Flag<["-"], "fno-deprecated-macro">, 784 HelpText<"Undefines the __DEPRECATED macro">; 785def fobjc_subscripting_legacy_runtime : Flag<["-"], "fobjc-subscripting-legacy-runtime">, 786 HelpText<"Allow Objective-C array and dictionary subscripting in legacy runtime">; 787def vtordisp_mode_EQ : Joined<["-"], "vtordisp-mode=">, 788 HelpText<"Control vtordisp placement on win32 targets">; 789def fnative_half_type: Flag<["-"], "fnative-half-type">, 790 HelpText<"Use the native half type for __fp16 instead of promoting to float">; 791def fnative_half_arguments_and_returns : Flag<["-"], "fnative-half-arguments-and-returns">, 792 HelpText<"Use the native __fp16 type for arguments and returns (and skip ABI-specific lowering)">; 793def fallow_half_arguments_and_returns : Flag<["-"], "fallow-half-arguments-and-returns">, 794 HelpText<"Allow function arguments and returns of type half">; 795def fdefault_calling_conv_EQ : Joined<["-"], "fdefault-calling-conv=">, 796 HelpText<"Set default calling convention">, Values<"cdecl,fastcall,stdcall,vectorcall,regcall">; 797def finclude_default_header : Flag<["-"], "finclude-default-header">, 798 HelpText<"Include default header file for OpenCL">; 799def fdeclare_opencl_builtins : Flag<["-"], "fdeclare-opencl-builtins">, 800 HelpText<"Add OpenCL builtin function declarations (experimental)">; 801def fpreserve_vec3_type : Flag<["-"], "fpreserve-vec3-type">, 802 HelpText<"Preserve 3-component vector type">; 803def fwchar_type_EQ : Joined<["-"], "fwchar-type=">, 804 HelpText<"Select underlying type for wchar_t">, Values<"char,short,int">; 805def fsigned_wchar : Flag<["-"], "fsigned-wchar">, 806 HelpText<"Use a signed type for wchar_t">; 807def fno_signed_wchar : Flag<["-"], "fno-signed-wchar">, 808 HelpText<"Use an unsigned type for wchar_t">; 809 810// FIXME: Remove these entirely once functionality/tests have been excised. 811def fobjc_gc_only : Flag<["-"], "fobjc-gc-only">, Group<f_Group>, 812 HelpText<"Use GC exclusively for Objective-C related memory management">; 813def fobjc_gc : Flag<["-"], "fobjc-gc">, Group<f_Group>, 814 HelpText<"Enable Objective-C garbage collection">; 815 816//===----------------------------------------------------------------------===// 817// Header Search Options 818//===----------------------------------------------------------------------===// 819 820def nostdsysteminc : Flag<["-"], "nostdsysteminc">, 821 HelpText<"Disable standard system #include directories">; 822def fdisable_module_hash : Flag<["-"], "fdisable-module-hash">, 823 HelpText<"Disable the module hash">; 824def fmodules_hash_content : Flag<["-"], "fmodules-hash-content">, 825 HelpText<"Enable hashing the content of a module file">; 826def fmodules_strict_context_hash : Flag<["-"], "fmodules-strict-context-hash">, 827 HelpText<"Enable hashing of all compiler options that could impact the " 828 "semantics of a module in an implicit build">; 829def c_isystem : JoinedOrSeparate<["-"], "c-isystem">, MetaVarName<"<directory>">, 830 HelpText<"Add directory to the C SYSTEM include search path">; 831def objc_isystem : JoinedOrSeparate<["-"], "objc-isystem">, 832 MetaVarName<"<directory>">, 833 HelpText<"Add directory to the ObjC SYSTEM include search path">; 834def objcxx_isystem : JoinedOrSeparate<["-"], "objcxx-isystem">, 835 MetaVarName<"<directory>">, 836 HelpText<"Add directory to the ObjC++ SYSTEM include search path">; 837def internal_isystem : JoinedOrSeparate<["-"], "internal-isystem">, 838 MetaVarName<"<directory>">, 839 HelpText<"Add directory to the internal system include search path; these " 840 "are assumed to not be user-provided and are used to model system " 841 "and standard headers' paths.">; 842def internal_externc_isystem : JoinedOrSeparate<["-"], "internal-externc-isystem">, 843 MetaVarName<"<directory>">, 844 HelpText<"Add directory to the internal system include search path with " 845 "implicit extern \"C\" semantics; these are assumed to not be " 846 "user-provided and are used to model system and standard headers' " 847 "paths.">; 848 849//===----------------------------------------------------------------------===// 850// Preprocessor Options 851//===----------------------------------------------------------------------===// 852 853def chain_include : Separate<["-"], "chain-include">, MetaVarName<"<file>">, 854 HelpText<"Include and chain a header file after turning it into PCH">; 855def preamble_bytes_EQ : Joined<["-"], "preamble-bytes=">, 856 HelpText<"Assume that the precompiled header is a precompiled preamble " 857 "covering the first N bytes of the main file">; 858def detailed_preprocessing_record : Flag<["-"], "detailed-preprocessing-record">, 859 HelpText<"include a detailed record of preprocessing actions">; 860def setup_static_analyzer : Flag<["-"], "setup-static-analyzer">, 861 HelpText<"Set up preprocessor for static analyzer (done automatically when static analyzer is run).">; 862def disable_pragma_debug_crash : Flag<["-"], "disable-pragma-debug-crash">, 863 HelpText<"Disable any #pragma clang __debug that can lead to crashing behavior. This is meant for testing.">; 864 865//===----------------------------------------------------------------------===// 866// OpenCL Options 867//===----------------------------------------------------------------------===// 868 869def cl_ext_EQ : CommaJoined<["-"], "cl-ext=">, 870 HelpText<"OpenCL only. Enable or disable OpenCL extensions. The argument is a comma-separated sequence of one or more extension names, each prefixed by '+' or '-'.">; 871 872//===----------------------------------------------------------------------===// 873// CUDA Options 874//===----------------------------------------------------------------------===// 875 876def fcuda_is_device : Flag<["-"], "fcuda-is-device">, 877 HelpText<"Generate code for CUDA device">; 878def fcuda_include_gpubinary : Separate<["-"], "fcuda-include-gpubinary">, 879 HelpText<"Incorporate CUDA device-side binary into host object file.">; 880def fcuda_allow_variadic_functions : Flag<["-"], "fcuda-allow-variadic-functions">, 881 HelpText<"Allow variadic functions in CUDA device code.">; 882def fno_cuda_host_device_constexpr : Flag<["-"], "fno-cuda-host-device-constexpr">, 883 HelpText<"Don't treat unattributed constexpr functions as __host__ __device__.">; 884 885//===----------------------------------------------------------------------===// 886// OpenMP Options 887//===----------------------------------------------------------------------===// 888 889def fopenmp_is_device : Flag<["-"], "fopenmp-is-device">, 890 HelpText<"Generate code only for an OpenMP target device.">; 891def fopenmp_host_ir_file_path : Separate<["-"], "fopenmp-host-ir-file-path">, 892 HelpText<"Path to the IR file produced by the frontend for the host.">; 893 894//===----------------------------------------------------------------------===// 895// SYCL Options 896//===----------------------------------------------------------------------===// 897 898def fsycl_is_device : Flag<["-"], "fsycl-is-device">, 899 HelpText<"Generate code for SYCL device.">; 900 901} // let Flags = [CC1Option] 902 903//===----------------------------------------------------------------------===// 904// cc1as-only Options 905//===----------------------------------------------------------------------===// 906 907let Flags = [CC1AsOption, NoDriverOption] in { 908 909// Language Options 910def n : Flag<["-"], "n">, 911 HelpText<"Don't automatically start assembly file with a text section">; 912 913// Frontend Options 914def filetype : Separate<["-"], "filetype">, 915 HelpText<"Specify the output file type ('asm', 'null', or 'obj')">; 916 917// Transliterate Options 918def output_asm_variant : Separate<["-"], "output-asm-variant">, 919 HelpText<"Select the asm variant index to use for output">; 920def show_encoding : Flag<["-"], "show-encoding">, 921 HelpText<"Show instruction encoding information in transliterate mode">; 922def show_inst : Flag<["-"], "show-inst">, 923 HelpText<"Show internal instruction representation in transliterate mode">; 924 925// Assemble Options 926def dwarf_debug_producer : Separate<["-"], "dwarf-debug-producer">, 927 HelpText<"The string to embed in the Dwarf debug AT_producer record.">; 928 929def defsym : Separate<["-"], "defsym">, 930 HelpText<"Define a value for a symbol">; 931} // let Flags = [CC1AsOption] 932