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