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