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