Daniel Dunbar | 8adfcff | 2009-11-19 07:19:04 +0000 | [diff] [blame] | 1 | //===--- CC1Options.td - Options for clang -cc1 ---------------------------===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This file defines the options accepted by clang -cc1. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | // Include the common option parsing interfaces. |
| 15 | include "OptParser.td" |
| 16 | |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 17 | //===----------------------------------------------------------------------===// |
Daniel Dunbar | 8adfcff | 2009-11-19 07:19:04 +0000 | [diff] [blame] | 18 | // Target Options |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 19 | //===----------------------------------------------------------------------===// |
Daniel Dunbar | 8adfcff | 2009-11-19 07:19:04 +0000 | [diff] [blame] | 20 | |
Charles Davis | 98b7c5c | 2010-06-11 01:06:47 +0000 | [diff] [blame] | 21 | def cxx_abi : Separate<"-cxx-abi">, |
| 22 | HelpText<"Target a particular C++ ABI type">; |
Daniel Dunbar | 8adfcff | 2009-11-19 07:19:04 +0000 | [diff] [blame] | 23 | def target_abi : Separate<"-target-abi">, |
| 24 | HelpText<"Target a particular ABI type">; |
Daniel Dunbar | 38b48af | 2009-12-18 06:30:12 +0000 | [diff] [blame] | 25 | def target_cpu : Separate<"-target-cpu">, |
| 26 | HelpText<"Target a specific cpu type">; |
Daniel Dunbar | 31db76c | 2009-11-20 01:46:44 +0000 | [diff] [blame] | 27 | def target_feature : Separate<"-target-feature">, |
Daniel Dunbar | 8adfcff | 2009-11-19 07:19:04 +0000 | [diff] [blame] | 28 | HelpText<"Target specific attributes">; |
Daniel Dunbar | 39065a5 | 2010-08-11 23:07:42 +0000 | [diff] [blame] | 29 | def target_linker_version : Separate<"-target-linker-version">, |
| 30 | HelpText<"Target linker version">; |
Daniel Dunbar | 31db76c | 2009-11-20 01:46:44 +0000 | [diff] [blame] | 31 | def triple : Separate<"-triple">, |
Daniel Dunbar | 8adfcff | 2009-11-19 07:19:04 +0000 | [diff] [blame] | 32 | HelpText<"Specify target triple (e.g. i686-apple-darwin9)">; |
Daniel Dunbar | ce6bf1e | 2009-11-29 09:32:20 +0000 | [diff] [blame] | 33 | def triple_EQ : Joined<"-triple=">, Alias<triple>; |
Daniel Dunbar | 50a4487 | 2009-11-20 17:23:30 +0000 | [diff] [blame] | 34 | |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 35 | //===----------------------------------------------------------------------===// |
Daniel Dunbar | e2814d8 | 2009-11-22 22:08:20 +0000 | [diff] [blame] | 36 | // Analyzer Options |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 37 | //===----------------------------------------------------------------------===// |
Daniel Dunbar | e2814d8 | 2009-11-22 22:08:20 +0000 | [diff] [blame] | 38 | |
Ted Kremenek | 9b823e8 | 2010-08-03 00:09:51 +0000 | [diff] [blame] | 39 | def analysis_UnoptimizedCFG : Flag<"-unoptimized-cfg">, |
Ted Kremenek | c9c6b90 | 2010-08-20 05:53:47 +0000 | [diff] [blame] | 40 | HelpText<"Generate unoptimized CFGs for all analyses">; |
Marcin Swiderski | 9121ba2 | 2010-09-30 07:41:24 +0000 | [diff] [blame] | 41 | def analysis_CFGAddImplicitDtors : Flag<"-cfg-add-implicit-dtors">, |
| 42 | HelpText<"Add C++ implicit destructors to CFGs for all analyses">; |
| 43 | def analysis_CFGAddInitializers : Flag<"-cfg-add-initializers">, |
| 44 | HelpText<"Add C++ initializers to CFGs for all analyses">; |
Daniel Dunbar | e2814d8 | 2009-11-22 22:08:20 +0000 | [diff] [blame] | 45 | |
| 46 | def analyzer_store : Separate<"-analyzer-store">, |
| 47 | HelpText<"Source Code Analysis - Abstract Memory Store Models">; |
| 48 | def analyzer_store_EQ : Joined<"-analyzer-store=">, Alias<analyzer_store>; |
| 49 | |
| 50 | def analyzer_constraints : Separate<"-analyzer-constraints">, |
| 51 | HelpText<"Source Code Analysis - Symbolic Constraint Engines">; |
| 52 | def analyzer_constraints_EQ : Joined<"-analyzer-constraints=">, |
| 53 | Alias<analyzer_constraints>; |
| 54 | |
| 55 | def analyzer_output : Separate<"-analyzer-output">, |
| 56 | HelpText<"Source Code Analysis - Output Options">; |
| 57 | def analyzer_output_EQ : Joined<"-analyzer-output=">, |
| 58 | Alias<analyzer_output>; |
| 59 | |
Anna Zaks | d309528 | 2011-09-30 02:03:00 +0000 | [diff] [blame] | 60 | def analyzer_purge : Separate<"-analyzer-purge">, |
| 61 | HelpText<"Source Code Analysis - Dead Symbol Removal Frequency">; |
| 62 | def analyzer_purge_EQ : Joined<"-analyzer-purge=">, Alias<analyzer_purge>; |
| 63 | |
Daniel Dunbar | e2814d8 | 2009-11-22 22:08:20 +0000 | [diff] [blame] | 64 | def analyzer_opt_analyze_headers : Flag<"-analyzer-opt-analyze-headers">, |
| 65 | HelpText<"Force the static analyzer to analyze functions defined in header files">; |
Ted Kremenek | fc57651 | 2009-12-07 22:06:12 +0000 | [diff] [blame] | 66 | def analyzer_opt_analyze_nested_blocks : Flag<"-analyzer-opt-analyze-nested-blocks">, |
Michael J. Spencer | 20249a1 | 2010-10-21 03:16:25 +0000 | [diff] [blame] | 67 | HelpText<"Analyze the definitions of blocks in addition to functions">; |
Daniel Dunbar | e2814d8 | 2009-11-22 22:08:20 +0000 | [diff] [blame] | 68 | def analyzer_display_progress : Flag<"-analyzer-display-progress">, |
| 69 | HelpText<"Emit verbose output about the analyzer's progress">; |
Daniel Dunbar | e2814d8 | 2009-11-22 22:08:20 +0000 | [diff] [blame] | 70 | def analyze_function : Separate<"-analyze-function">, |
| 71 | HelpText<"Run analysis on specific function">; |
| 72 | def analyze_function_EQ : Joined<"-analyze-function=">, Alias<analyze_function>; |
| 73 | def analyzer_eagerly_assume : Flag<"-analyzer-eagerly-assume">, |
| 74 | HelpText<"Eagerly assume the truth/falseness of some symbolic constraints">; |
Ted Kremenek | d767d81 | 2011-02-09 01:27:33 +0000 | [diff] [blame] | 75 | def analyzer_no_eagerly_trim_egraph : Flag<"-analyzer-no-eagerly-trim-egraph">, |
| 76 | HelpText<"Don't eagerly remove uninteresting ExplodedNodes from the ExplodedGraph">; |
Daniel Dunbar | e2814d8 | 2009-11-22 22:08:20 +0000 | [diff] [blame] | 77 | def trim_egraph : Flag<"-trim-egraph">, |
| 78 | HelpText<"Only show error-related paths in the analysis graph">; |
| 79 | def analyzer_viz_egraph_graphviz : Flag<"-analyzer-viz-egraph-graphviz">, |
| 80 | HelpText<"Display exploded graph using GraphViz">; |
| 81 | def analyzer_viz_egraph_ubigraph : Flag<"-analyzer-viz-egraph-ubigraph">, |
| 82 | HelpText<"Display exploded graph using Ubigraph">; |
Zhongxing Xu | 7b99d12 | 2010-05-06 02:59:29 +0000 | [diff] [blame] | 83 | def analyzer_inline_call : Flag<"-analyzer-inline-call">, |
| 84 | HelpText<"Experimental transfer function inlining callees when its definition is available.">; |
Zhongxing Xu | c09289d | 2010-04-13 06:44:31 +0000 | [diff] [blame] | 85 | def analyzer_max_nodes : Separate<"-analyzer-max-nodes">, |
Tom Care | cf9ce13 | 2010-09-29 23:48:13 +0000 | [diff] [blame] | 86 | HelpText<"The maximum number of nodes the analyzer can generate (150000 default, 0 = no limit)">; |
Zhongxing Xu | 6362b89 | 2010-05-18 00:28:37 +0000 | [diff] [blame] | 87 | def analyzer_max_loop : Separate<"-analyzer-max-loop">, |
| 88 | HelpText<"The maximum number of times the analyzer will go through a loop">; |
Daniel Dunbar | e2814d8 | 2009-11-22 22:08:20 +0000 | [diff] [blame] | 89 | |
Argyrios Kyrtzidis | 43dee22 | 2011-02-14 18:13:31 +0000 | [diff] [blame] | 90 | def analyzer_checker : Separate<"-analyzer-checker">, |
| 91 | HelpText<"Choose analyzer checkers to enable">; |
| 92 | def analyzer_checker_EQ : Joined<"-analyzer-checker=">, |
| 93 | Alias<analyzer_checker>; |
| 94 | |
| 95 | def analyzer_disable_checker : Separate<"-analyzer-disable-checker">, |
| 96 | HelpText<"Choose analyzer checkers to disable">; |
| 97 | def analyzer_disable_checker_EQ : Joined<"-analyzer-disable-checker=">, |
| 98 | Alias<analyzer_disable_checker>; |
| 99 | |
Argyrios Kyrtzidis | 116f364 | 2011-02-25 00:09:51 +0000 | [diff] [blame] | 100 | def analyzer_checker_help : Flag<"-analyzer-checker-help">, |
| 101 | HelpText<"Display the list of analyzer checkers that are available">; |
| 102 | |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 103 | //===----------------------------------------------------------------------===// |
Daniel Dunbar | 50a4487 | 2009-11-20 17:23:30 +0000 | [diff] [blame] | 104 | // CodeGen Options |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 105 | //===----------------------------------------------------------------------===// |
Daniel Dunbar | 50a4487 | 2009-11-20 17:23:30 +0000 | [diff] [blame] | 106 | |
| 107 | def disable_llvm_optzns : Flag<"-disable-llvm-optzns">, |
| 108 | HelpText<"Don't run LLVM optimization passes">; |
John McCall | 824e19e | 2010-02-12 23:47:27 +0000 | [diff] [blame] | 109 | def disable_llvm_verifier : Flag<"-disable-llvm-verifier">, |
| 110 | HelpText<"Don't run the LLVM IR verifier pass">; |
Daniel Dunbar | 50a4487 | 2009-11-20 17:23:30 +0000 | [diff] [blame] | 111 | def disable_red_zone : Flag<"-disable-red-zone">, |
| 112 | HelpText<"Do not emit code that uses the red zone.">; |
Nick Lewycky | 7c4fd91 | 2011-10-21 02:32:14 +0000 | [diff] [blame] | 113 | def fdebug_compilation_dir : Separate<"-fdebug-compilation-dir">, |
| 114 | HelpText<"The compilation directory to embed in the debug info.">; |
Daniel Dunbar | f2d8b9f | 2009-12-18 02:43:17 +0000 | [diff] [blame] | 115 | def dwarf_debug_flags : Separate<"-dwarf-debug-flags">, |
| 116 | HelpText<"The string to embed in the Dwarf debug flags record.">; |
John McCall | 3209669 | 2011-03-18 02:56:14 +0000 | [diff] [blame] | 117 | def fforbid_guard_variables : Flag<"-fforbid-guard-variables">, |
| 118 | HelpText<"Emit an error if a C++ static local initializer would need a guard variable">; |
Daniel Dunbar | 50a4487 | 2009-11-20 17:23:30 +0000 | [diff] [blame] | 119 | def g : Flag<"-g">, HelpText<"Generate source level debug information">; |
Chad Rosier | af6fbe4 | 2011-08-25 20:17:19 +0000 | [diff] [blame] | 120 | def fno_dwarf2_cfi_asm : Flag<"-fno-dwarf2-cfi-asm">, |
| 121 | HelpText<"Don't use the cfi directives">; |
Nick Lewycky | ea523d7 | 2011-10-17 23:05:52 +0000 | [diff] [blame] | 122 | def fno_dwarf_directory_asm : Flag<"-fno-dwarf-directory-asm">, |
| 123 | HelpText<"Don't separate directory and filename in .file directives">; |
Mike Stump | 9c276ae | 2009-12-12 01:27:46 +0000 | [diff] [blame] | 124 | def fcatch_undefined_behavior : Flag<"-fcatch-undefined-behavior">, |
Chad Rosier | af6fbe4 | 2011-08-25 20:17:19 +0000 | [diff] [blame] | 125 | HelpText<"Generate runtime checks for undefined behavior.">; |
Devang Patel | c69e1cf | 2010-09-30 19:05:55 +0000 | [diff] [blame] | 126 | def flimit_debug_info : Flag<"-flimit-debug-info">, |
| 127 | HelpText<"Limit debug information produced to reduce size of debug binary">; |
Daniel Dunbar | 50a4487 | 2009-11-20 17:23:30 +0000 | [diff] [blame] | 128 | def fno_common : Flag<"-fno-common">, |
| 129 | HelpText<"Compile common globals like normal definitions">; |
| 130 | def no_implicit_float : Flag<"-no-implicit-float">, |
| 131 | HelpText<"Don't generate implicit floating point instructions (x86-only)">; |
Chris Lattner | 7255a2d | 2010-06-22 00:03:40 +0000 | [diff] [blame] | 132 | def finstrument_functions : Flag<"-finstrument-functions">, |
| 133 | HelpText<"Generate calls to instrument function entry and exit">; |
Daniel Dunbar | 50a4487 | 2009-11-20 17:23:30 +0000 | [diff] [blame] | 134 | def fno_merge_all_constants : Flag<"-fno-merge-all-constants">, |
| 135 | HelpText<"Disallow merging of constants.">; |
Anders Carlsson | a508b7d | 2010-02-06 23:23:06 +0000 | [diff] [blame] | 136 | def fno_threadsafe_statics : Flag<"-fno-threadsafe-statics">, |
| 137 | HelpText<"Do not emit code to make initialization of local statics thread safe">; |
Anders Carlsson | 824d7ea | 2010-02-11 08:02:13 +0000 | [diff] [blame] | 138 | def fdump_vtable_layouts : Flag<"-fdump-vtable-layouts">, |
| 139 | HelpText<"Dump the layouts of all vtables that will be emitted in a translation unit">; |
Chris Lattner | bbea716 | 2010-04-13 00:38:24 +0000 | [diff] [blame] | 140 | def ffunction_sections : Flag<"-ffunction-sections">, |
| 141 | HelpText<"Place each function in its own section (ELF Only)">; |
| 142 | def fdata_sections : Flag<"-fdata-sections">, |
| 143 | HelpText<"Place each data in its own section (ELF Only)">; |
Eric Christopher | f84d409 | 2010-08-07 23:08:14 +0000 | [diff] [blame] | 144 | def funroll_loops : Flag<"-funroll-loops">, |
| 145 | HelpText<"Turn on loop unroller">; |
Nick Lewycky | e8ba8d7 | 2011-04-21 23:44:07 +0000 | [diff] [blame] | 146 | def femit_coverage_notes : Flag<"-femit-coverage-notes">, |
| 147 | HelpText<"Emit a gcov coverage notes file when compiling.">; |
| 148 | def femit_coverage_data: Flag<"-femit-coverage-data">, |
| 149 | HelpText<"Instrument the program to emit gcov coverage data when run.">; |
Nick Lewycky | 3dc0541 | 2011-05-05 00:08:20 +0000 | [diff] [blame] | 150 | def coverage_file : Separate<"-coverage-file">, |
| 151 | HelpText<"Emit coverage data to this filename. The extension will be replaced.">; |
| 152 | def coverage_file_EQ : Joined<"-coverage-file=">, Alias<coverage_file>; |
Daniel Dunbar | e26bdb9 | 2011-06-21 18:54:46 +0000 | [diff] [blame] | 153 | def fuse_register_sized_bitfield_access: Flag<"-fuse-register-sized-bitfield-access">, |
| 154 | HelpText<"Use register sized accesses to bit-fields, when possible.">; |
Dan Gohman | 4d5625e | 2010-10-14 22:36:56 +0000 | [diff] [blame] | 155 | def relaxed_aliasing : Flag<"-relaxed-aliasing">, |
Devang Patel | be57012 | 2010-10-15 18:23:36 +0000 | [diff] [blame] | 156 | HelpText<"Turn off Type Based Alias Analysis">; |
Daniel Dunbar | f219e7c | 2009-11-29 07:18:39 +0000 | [diff] [blame] | 157 | def masm_verbose : Flag<"-masm-verbose">, |
| 158 | HelpText<"Generate verbose assembly output">; |
| 159 | def mcode_model : Separate<"-mcode-model">, |
| 160 | HelpText<"The code model to use">; |
| 161 | def mdebug_pass : Separate<"-mdebug-pass">, |
| 162 | HelpText<"Enable additional debug output">; |
| 163 | def mdisable_fp_elim : Flag<"-mdisable-fp-elim">, |
| 164 | HelpText<"Disable frame pointer elimination optimization">; |
Daniel Dunbar | 87667aa | 2009-12-08 19:49:51 +0000 | [diff] [blame] | 165 | def mfloat_abi : Separate<"-mfloat-abi">, |
Daniel Dunbar | 3b31526 | 2009-11-30 08:42:00 +0000 | [diff] [blame] | 166 | HelpText<"The float ABI to use">; |
Chad Rosier | 1b90605 | 2011-08-26 00:26:29 +0000 | [diff] [blame] | 167 | def mno_global_merge : Flag<"-mno-global-merge">, |
| 168 | HelpText<"Disable merging of globals">; |
Daniel Dunbar | f219e7c | 2009-11-29 07:18:39 +0000 | [diff] [blame] | 169 | def mlimit_float_precision : Separate<"-mlimit-float-precision">, |
| 170 | HelpText<"Limit float precision to the given value">; |
Nick Lewycky | c3b9014 | 2011-06-21 00:14:18 +0000 | [diff] [blame] | 171 | def mno_exec_stack : Flag<"-mnoexecstack">, |
| 172 | HelpText<"Mark the file as not needing an executable stack">; |
Daniel Dunbar | f219e7c | 2009-11-29 07:18:39 +0000 | [diff] [blame] | 173 | def mno_zero_initialized_in_bss : Flag<"-mno-zero-initialized-in-bss">, |
| 174 | HelpText<"Do not put zero initialized data in the BSS">; |
Daniel Dunbar | 1ad6648 | 2010-07-01 01:31:45 +0000 | [diff] [blame] | 175 | def momit_leaf_frame_pointer : Flag<"-momit-leaf-frame-pointer">, |
| 176 | HelpText<"Omit frame pointer setup for leaf functions.">; |
Daniel Dunbar | 87667aa | 2009-12-08 19:49:51 +0000 | [diff] [blame] | 177 | def msoft_float : Flag<"-msoft-float">, |
Daniel Dunbar | 3b31526 | 2009-11-30 08:42:00 +0000 | [diff] [blame] | 178 | HelpText<"Use software floating point">; |
Daniel Dunbar | 3c66d30 | 2011-03-22 16:48:17 +0000 | [diff] [blame] | 179 | def backend_option : Separate<"-backend-option">, |
| 180 | HelpText<"Additional arguments to forward to LLVM backend (during code gen)">; |
Daniel Dunbar | 17d3fea | 2011-02-09 17:54:19 +0000 | [diff] [blame] | 181 | def mregparm : Separate<"-mregparm">, |
| 182 | HelpText<"Limit the number of registers available for integer arguments">; |
Daniel Dunbar | 4ecc9b7 | 2010-05-27 05:39:39 +0000 | [diff] [blame] | 183 | def mrelax_all : Flag<"-mrelax-all">, |
Daniel Dunbar | 9693232 | 2011-03-28 22:49:28 +0000 | [diff] [blame] | 184 | HelpText<"(integrated-as) Relax all machine instructions">; |
| 185 | def msave_temp_labels : Flag<"-msave-temp-labels">, |
| 186 | HelpText<"(integrated-as) Save temporary labels">; |
Roman Divacky | cfe9af2 | 2011-03-01 17:40:53 +0000 | [diff] [blame] | 187 | def mrtd: Flag<"-mrtd">, |
| 188 | HelpText<"Make StdCall calling convention the default">; |
Daniel Dunbar | f219e7c | 2009-11-29 07:18:39 +0000 | [diff] [blame] | 189 | def mrelocation_model : Separate<"-mrelocation-model">, |
| 190 | HelpText<"The relocation model to use">; |
| 191 | def munwind_tables : Flag<"-munwind-tables">, |
| 192 | HelpText<"Generate unwinding tables for all functions">; |
John McCall | d46f985 | 2010-02-19 01:32:20 +0000 | [diff] [blame] | 193 | def mconstructor_aliases : Flag<"-mconstructor-aliases">, |
| 194 | HelpText<"Emit complete constructors and destructors as aliases when possible">; |
Douglas Gregor | 6f75550 | 2011-02-01 15:15:22 +0000 | [diff] [blame] | 195 | def mms_bitfields : Flag<"-mms-bitfields">, |
| 196 | HelpText<"Set the default structure layout to be compatible with the Microsoft compiler standard.">; |
Eric Christopher | 1a58402 | 2011-05-02 21:18:22 +0000 | [diff] [blame] | 197 | def mstackrealign : Flag<"-mstackrealign">, |
| 198 | HelpText<"Force realign the stack at entry to every function.">; |
Daniel Dunbar | 50a4487 | 2009-11-20 17:23:30 +0000 | [diff] [blame] | 199 | def O : Joined<"-O">, HelpText<"Optimization level">; |
| 200 | def Os : Flag<"-Os">, HelpText<"Optimize for size">; |
Bob Wilson | a0fa203 | 2011-04-29 22:49:50 +0000 | [diff] [blame] | 201 | def Oz : Flag<"-Oz">, HelpText<"Optimize for size, regardless of performance">; |
Roman Divacky | be4c870 | 2011-02-10 16:52:03 +0000 | [diff] [blame] | 202 | def pg : Flag<"-pg">, HelpText<"Enable mcount instrumentation">; |
Daniel Dunbar | 1bed0c3 | 2009-11-20 23:28:07 +0000 | [diff] [blame] | 203 | |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 204 | //===----------------------------------------------------------------------===// |
Daniel Dunbar | 1bed0c3 | 2009-11-20 23:28:07 +0000 | [diff] [blame] | 205 | // Dependency Output Options |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 206 | //===----------------------------------------------------------------------===// |
| 207 | |
Daniel Dunbar | 1bed0c3 | 2009-11-20 23:28:07 +0000 | [diff] [blame] | 208 | def dependency_file : Separate<"-dependency-file">, |
| 209 | HelpText<"Filename (or -) to write dependency output to">; |
| 210 | def sys_header_deps : Flag<"-sys-header-deps">, |
| 211 | HelpText<"Include system headers in dependency output">; |
Daniel Dunbar | b34d69b | 2011-02-02 21:11:31 +0000 | [diff] [blame] | 212 | def header_include_file : Separate<"-header-include-file">, |
| 213 | HelpText<"Filename (or -) to write header include output to">; |
| 214 | def H : Flag<"-H">, |
| 215 | HelpText<"Show header includes and nesting depth">; |
Chris Lattner | 3edbeb7 | 2010-03-29 17:55:58 +0000 | [diff] [blame] | 216 | def MQ : Separate<"-MQ">, HelpText<"Specify target to quote for dependency">; |
Daniel Dunbar | 1bed0c3 | 2009-11-20 23:28:07 +0000 | [diff] [blame] | 217 | def MT : Separate<"-MT">, HelpText<"Specify target for dependency">; |
| 218 | def MP : Flag<"-MP">, |
| 219 | HelpText<"Create phony target for each dependency (other than main file)">; |
Peter Collingbourne | bb52786 | 2011-07-12 19:35:15 +0000 | [diff] [blame] | 220 | def MG : Flag<"-MG">, HelpText<"Add missing headers to dependency list">; |
Daniel Dunbar | 21affc0 | 2009-11-23 23:41:17 +0000 | [diff] [blame] | 221 | |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 222 | //===----------------------------------------------------------------------===// |
Daniel Dunbar | 21affc0 | 2009-11-23 23:41:17 +0000 | [diff] [blame] | 223 | // Diagnostic Options |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 224 | //===----------------------------------------------------------------------===// |
Daniel Dunbar | 21affc0 | 2009-11-23 23:41:17 +0000 | [diff] [blame] | 225 | |
| 226 | def dump_build_information : Separate<"-dump-build-information">, |
Daniel Dunbar | b737fb1 | 2009-12-03 07:01:46 +0000 | [diff] [blame] | 227 | MetaVarName<"<filename>">, |
Daniel Dunbar | 21affc0 | 2009-11-23 23:41:17 +0000 | [diff] [blame] | 228 | HelpText<"output a dump of some build information to a file">; |
Daniel Dunbar | 08c6695 | 2011-04-07 18:11:14 +0000 | [diff] [blame] | 229 | def diagnostic_log_file : Separate<"-diagnostic-log-file">, |
| 230 | HelpText<"Filename (or -) to log diagnostics to">; |
Daniel Dunbar | 21affc0 | 2009-11-23 23:41:17 +0000 | [diff] [blame] | 231 | def fno_show_column : Flag<"-fno-show-column">, |
| 232 | HelpText<"Do not include column number on diagnostics">; |
Douglas Gregor | c9471b0 | 2011-05-21 17:07:29 +0000 | [diff] [blame] | 233 | def fshow_column : Flag<"-fshow-column">, |
| 234 | HelpText<"Include column number on diagnostics">; |
Daniel Dunbar | 21affc0 | 2009-11-23 23:41:17 +0000 | [diff] [blame] | 235 | def fno_show_source_location : Flag<"-fno-show-source-location">, |
| 236 | HelpText<"Do not include source location information with diagnostics">; |
Jeffrey Yasskin | 5edbdcc | 2010-06-11 05:57:47 +0000 | [diff] [blame] | 237 | def fshow_overloads_EQ : Joined<"-fshow-overloads=">, |
| 238 | HelpText<"Which overload candidates to show when overload resolution fails: " |
| 239 | "best|all; defaults to all">; |
Daniel Dunbar | 21affc0 | 2009-11-23 23:41:17 +0000 | [diff] [blame] | 240 | def fno_caret_diagnostics : Flag<"-fno-caret-diagnostics">, |
| 241 | HelpText<"Do not include source line and caret with diagnostics">; |
Daniel Dunbar | 21affc0 | 2009-11-23 23:41:17 +0000 | [diff] [blame] | 242 | def fno_diagnostics_fixit_info : Flag<"-fno-diagnostics-fixit-info">, |
| 243 | HelpText<"Do not include fixit information in diagnostics">; |
Chandler Carruth | abaca7a | 2011-03-27 01:50:55 +0000 | [diff] [blame] | 244 | def fno_diagnostics_show_note_include_stack : |
| 245 | Flag<"-fno-diagnostics-show-note-include-stack">, |
| 246 | HelpText<"Display include stacks for diagnostic notes">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 247 | def w : Flag<"-w">, HelpText<"Suppress all warnings">; |
Daniel Dunbar | 21affc0 | 2009-11-23 23:41:17 +0000 | [diff] [blame] | 248 | def pedantic : Flag<"-pedantic">; |
Daniel Dunbar | 21affc0 | 2009-11-23 23:41:17 +0000 | [diff] [blame] | 249 | def pedantic_errors : Flag<"-pedantic-errors">; |
| 250 | |
| 251 | // This gets all -W options, including -Werror, -W[no-]system-headers, etc. The |
| 252 | // driver has stripped off -Wa,foo etc. The driver has also translated -W to |
| 253 | // -Wextra, so we don't need to worry about it. |
| 254 | def W : Joined<"-W">; |
| 255 | |
| 256 | def fdiagnostics_print_source_range_info : Flag<"-fdiagnostics-print-source-range-info">, |
| 257 | HelpText<"Print source range spans in numeric form">; |
Douglas Gregor | 4786c15 | 2010-08-19 20:24:43 +0000 | [diff] [blame] | 258 | def fdiagnostics_parseable_fixits : Flag<"-fdiagnostics-parseable-fixits">, |
| 259 | HelpText<"Print fix-its in machine parseable form">; |
Douglas Gregor | 7d2b8c1 | 2011-04-15 22:04:17 +0000 | [diff] [blame] | 260 | def fdiagnostics_show_name : Flag<"-fdiagnostics-show-name">, |
| 261 | HelpText<"Print diagnostic name">; |
Daniel Dunbar | 21affc0 | 2009-11-23 23:41:17 +0000 | [diff] [blame] | 262 | def fdiagnostics_show_option : Flag<"-fdiagnostics-show-option">, |
Douglas Gregor | 7d2b8c1 | 2011-04-15 22:04:17 +0000 | [diff] [blame] | 263 | HelpText<"Print option name with mappable diagnostics">; |
Douglas Gregor | c9471b0 | 2011-05-21 17:07:29 +0000 | [diff] [blame] | 264 | def fdiagnostics_format : Separate<"-fdiagnostics-format">, |
| 265 | HelpText<"Change diagnostic formatting to match IDE and command line tools">; |
Chris Lattner | 6fbe839 | 2010-05-04 21:55:25 +0000 | [diff] [blame] | 266 | def fdiagnostics_show_category : Separate<"-fdiagnostics-show-category">, |
| 267 | HelpText<"Print diagnostic category">; |
Chandler Carruth | abaca7a | 2011-03-27 01:50:55 +0000 | [diff] [blame] | 268 | def fdiagnostics_show_note_include_stack : |
| 269 | Flag<"-fdiagnostics-show-note-include-stack">, |
| 270 | HelpText<"Display include stacks for diagnostic notes">; |
Chris Lattner | 124fca5 | 2010-01-09 21:54:33 +0000 | [diff] [blame] | 271 | def ftabstop : Separate<"-ftabstop">, MetaVarName<"<N>">, |
| 272 | HelpText<"Set the tab stop distance.">; |
Chris Lattner | c100214 | 2010-04-07 20:37:06 +0000 | [diff] [blame] | 273 | def ferror_limit : Separate<"-ferror-limit">, MetaVarName<"<N>">, |
| 274 | HelpText<"Set the maximum number of errors to emit before stopping (0 = no limit).">; |
Douglas Gregor | 6c1cb99 | 2010-05-04 17:13:42 +0000 | [diff] [blame] | 275 | def fmacro_backtrace_limit : Separate<"-fmacro-backtrace-limit">, MetaVarName<"<N>">, |
Chandler Carruth | b29a610 | 2011-07-15 00:04:38 +0000 | [diff] [blame] | 276 | HelpText<"Set the maximum number of entries to print in a macro expansion backtrace (0 = no limit).">; |
Douglas Gregor | 575cf37 | 2010-04-20 07:18:24 +0000 | [diff] [blame] | 277 | def ftemplate_backtrace_limit : Separate<"-ftemplate-backtrace-limit">, MetaVarName<"<N>">, |
| 278 | HelpText<"Set the maximum number of entries to print in a template instantiation backtrace (0 = no limit).">; |
Daniel Dunbar | b737fb1 | 2009-12-03 07:01:46 +0000 | [diff] [blame] | 279 | def fmessage_length : Separate<"-fmessage-length">, MetaVarName<"<N>">, |
Daniel Dunbar | 21affc0 | 2009-11-23 23:41:17 +0000 | [diff] [blame] | 280 | HelpText<"Format message diagnostics so that they fit within N columns or fewer, when possible.">; |
Daniel Dunbar | 21affc0 | 2009-11-23 23:41:17 +0000 | [diff] [blame] | 281 | def fcolor_diagnostics : Flag<"-fcolor-diagnostics">, |
| 282 | HelpText<"Use colors in diagnostics">; |
Daniel Dunbar | 21affc0 | 2009-11-23 23:41:17 +0000 | [diff] [blame] | 283 | def Wno_rewrite_macros : Flag<"-Wno-rewrite-macros">, |
| 284 | HelpText<"Silence ObjC rewriting warnings">; |
Daniel Dunbar | 21affc0 | 2009-11-23 23:41:17 +0000 | [diff] [blame] | 285 | def verify : Flag<"-verify">, |
| 286 | HelpText<"Verify emitted diagnostics and warnings">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 287 | |
| 288 | //===----------------------------------------------------------------------===// |
| 289 | // Frontend Options |
| 290 | //===----------------------------------------------------------------------===// |
| 291 | |
Daniel Dunbar | 8ff5b28 | 2009-12-11 23:00:49 +0000 | [diff] [blame] | 292 | // This isn't normally used, it is just here so we can parse a |
| 293 | // CompilerInvocation out of a driver-derived argument vector. |
| 294 | def cc1 : Flag<"-cc1">; |
| 295 | |
Douglas Gregor | 9bed879 | 2010-02-09 19:21:46 +0000 | [diff] [blame] | 296 | def ast_merge : Separate<"-ast-merge">, |
| 297 | MetaVarName<"<ast file>">, |
| 298 | HelpText<"Merge the given AST file into the translation unit being compiled.">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 299 | def code_completion_at : Separate<"-code-completion-at">, |
Daniel Dunbar | b737fb1 | 2009-12-03 07:01:46 +0000 | [diff] [blame] | 300 | MetaVarName<"<file>:<line>:<column>">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 301 | HelpText<"Dump code-completion information at a location">; |
Daniel Dunbar | e14b5f5 | 2009-12-03 05:11:16 +0000 | [diff] [blame] | 302 | def remap_file : Separate<"-remap-file">, |
| 303 | MetaVarName<"<from>;<to>">, |
| 304 | HelpText<"Replace the contents of the <from> file with the contents of the <to> file">; |
Daniel Dunbar | ce6bf1e | 2009-11-29 09:32:20 +0000 | [diff] [blame] | 305 | def code_completion_at_EQ : Joined<"-code-completion-at=">, |
| 306 | Alias<code_completion_at>; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 307 | def code_completion_macros : Flag<"-code-completion-macros">, |
| 308 | HelpText<"Include macros in code-completion results">; |
Douglas Gregor | d8e8a58 | 2010-05-25 21:41:55 +0000 | [diff] [blame] | 309 | def code_completion_patterns : Flag<"-code-completion-patterns">, |
| 310 | HelpText<"Include code patterns in code-completion results">; |
Douglas Gregor | 8071e42 | 2010-08-15 06:18:01 +0000 | [diff] [blame] | 311 | def no_code_completion_globals : Flag<"-no-code-completion-globals">, |
| 312 | HelpText<"Do not include global declarations in code-completion results.">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 313 | def disable_free : Flag<"-disable-free">, |
| 314 | HelpText<"Disable freeing of memory on exit">; |
Daniel Dunbar | 9b5e9ae | 2009-12-03 07:01:58 +0000 | [diff] [blame] | 315 | def help : Flag<"-help">, |
| 316 | HelpText<"Print this help text">; |
| 317 | def _help : Flag<"--help">, Alias<help>; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 318 | def x : Separate<"-x">, HelpText<"Input language type">; |
Daniel Dunbar | b737fb1 | 2009-12-03 07:01:46 +0000 | [diff] [blame] | 319 | def o : Separate<"-o">, MetaVarName<"<path>">, HelpText<"Specify output file">; |
| 320 | def load : Separate<"-load">, MetaVarName<"<dsopath>">, |
Daniel Dunbar | efba227 | 2009-12-03 05:11:05 +0000 | [diff] [blame] | 321 | HelpText<"Load the named plugin (dynamic shared object)">; |
Daniel Dunbar | 3177aae | 2010-06-16 16:59:23 +0000 | [diff] [blame] | 322 | def plugin : Separate<"-plugin">, MetaVarName<"<name>">, |
Nico Weber | 5aa74af | 2011-01-25 20:34:14 +0000 | [diff] [blame] | 323 | HelpText<"Use the named plugin action instead of the default action (use \"help\" to list available options)">; |
Michael J. Spencer | 20249a1 | 2010-10-21 03:16:25 +0000 | [diff] [blame] | 324 | def plugin_arg : JoinedAndSeparate<"-plugin-arg-">, |
Daniel Dunbar | 3177aae | 2010-06-16 16:59:23 +0000 | [diff] [blame] | 325 | MetaVarName<"<name> <arg>">, |
| 326 | HelpText<"Pass <arg> to plugin <name>">; |
Nico Weber | 5aa74af | 2011-01-25 20:34:14 +0000 | [diff] [blame] | 327 | def add_plugin : Separate<"-add-plugin">, MetaVarName<"<name>">, |
| 328 | HelpText<"Use the named plugin action in addition to the default action">; |
Daniel Dunbar | 8b9adfe | 2009-12-15 00:06:45 +0000 | [diff] [blame] | 329 | def resource_dir : Separate<"-resource-dir">, |
| 330 | HelpText<"The directory which holds the compiler resource files">; |
Daniel Dunbar | 9b5e9ae | 2009-12-03 07:01:58 +0000 | [diff] [blame] | 331 | def version : Flag<"-version">, |
| 332 | HelpText<"Print the compiler version">; |
| 333 | def _version : Flag<"--version">, Alias<version>; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 334 | |
| 335 | def Action_Group : OptionGroup<"<action group>">; |
| 336 | let Group = Action_Group in { |
| 337 | |
| 338 | def Eonly : Flag<"-Eonly">, |
| 339 | HelpText<"Just run preprocessor, no output (for timings)">; |
| 340 | def E : Flag<"-E">, |
| 341 | HelpText<"Run preprocessor, emit preprocessed file">; |
| 342 | def dump_raw_tokens : Flag<"-dump-raw-tokens">, |
| 343 | HelpText<"Lex file in raw mode and dump raw tokens">; |
| 344 | def analyze : Flag<"-analyze">, |
| 345 | HelpText<"Run static analysis engine">; |
| 346 | def dump_tokens : Flag<"-dump-tokens">, |
| 347 | HelpText<"Run preprocessor, dump internal rep of tokens">; |
Daniel Dunbar | 2758595 | 2010-03-19 19:44:04 +0000 | [diff] [blame] | 348 | def init_only : Flag<"-init-only">, |
| 349 | HelpText<"Only execute frontend initialization">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 350 | def fsyntax_only : Flag<"-fsyntax-only">, |
| 351 | HelpText<"Run parser and perform semantic analysis">; |
| 352 | def fixit : Flag<"-fixit">, |
| 353 | HelpText<"Apply fix-it advice to the input source">; |
Nick Lewycky | ba5f6ec | 2010-04-24 01:30:46 +0000 | [diff] [blame] | 354 | def fixit_EQ : Joined<"-fixit=">, |
| 355 | HelpText<"Apply fix-it advice creating a file with the given suffix">; |
Douglas Gregor | f033f1d | 2010-07-20 20:18:03 +0000 | [diff] [blame] | 356 | def print_preamble : Flag<"-print-preamble">, |
| 357 | HelpText<"Print the \"preamble\" of a file, which is a candidate for implicit" |
| 358 | " precompiled headers.">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 359 | def emit_html : Flag<"-emit-html">, |
| 360 | HelpText<"Output input source as HTML">; |
| 361 | def ast_print : Flag<"-ast-print">, |
| 362 | HelpText<"Build ASTs and then pretty-print them">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 363 | def ast_dump : Flag<"-ast-dump">, |
| 364 | HelpText<"Build ASTs and then debug dump them">; |
John McCall | f351424 | 2010-11-24 11:21:45 +0000 | [diff] [blame] | 365 | def ast_dump_xml : Flag<"-ast-dump-xml">, |
| 366 | HelpText<"Build ASTs and then debug dump them in a verbose XML format">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 367 | def ast_view : Flag<"-ast-view">, |
| 368 | HelpText<"Build ASTs and view them with GraphViz">; |
| 369 | def print_decl_contexts : Flag<"-print-decl-contexts">, |
| 370 | HelpText<"Print DeclContexts and their Decls">; |
Douglas Gregor | 467dc88 | 2011-08-25 22:30:56 +0000 | [diff] [blame] | 371 | def emit_module : Flag<"-emit-module">, |
| 372 | HelpText<"Generate pre-compiled module file">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 373 | def emit_pth : Flag<"-emit-pth">, |
| 374 | HelpText<"Generate pre-tokenized header file">; |
| 375 | def emit_pch : Flag<"-emit-pch">, |
| 376 | HelpText<"Generate pre-compiled header file">; |
| 377 | def S : Flag<"-S">, |
| 378 | HelpText<"Emit native assembly code">; |
| 379 | def emit_llvm : Flag<"-emit-llvm">, |
| 380 | HelpText<"Build ASTs then convert to LLVM, emit .ll file">; |
| 381 | def emit_llvm_bc : Flag<"-emit-llvm-bc">, |
| 382 | HelpText<"Build ASTs then convert to LLVM, emit .bc file">; |
| 383 | def emit_llvm_only : Flag<"-emit-llvm-only">, |
| 384 | HelpText<"Build ASTs and convert to LLVM, discarding output">; |
Daniel Dunbar | 32148ce | 2010-05-25 18:41:01 +0000 | [diff] [blame] | 385 | def emit_codegen_only : Flag<"-emit-codegen-only">, |
| 386 | HelpText<"Generate machine code, but discard output">; |
Daniel Dunbar | da1573f | 2010-02-03 01:18:43 +0000 | [diff] [blame] | 387 | def emit_obj : Flag<"-emit-obj">, |
| 388 | HelpText<"Emit native object files">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 389 | def rewrite_test : Flag<"-rewrite-test">, |
| 390 | HelpText<"Rewriter playground">; |
| 391 | def rewrite_objc : Flag<"-rewrite-objc">, |
| 392 | HelpText<"Rewrite ObjC into C (code rewriter example)">; |
| 393 | def rewrite_macros : Flag<"-rewrite-macros">, |
| 394 | HelpText<"Expand macros without full preprocessing">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 395 | } |
| 396 | |
John McCall | f85e193 | 2011-06-15 23:02:42 +0000 | [diff] [blame] | 397 | def arcmt_check : Flag<"-arcmt-check">, |
| 398 | HelpText<"Check for ARC migration issues that need manual handling">; |
| 399 | def arcmt_modify : Flag<"-arcmt-modify">, |
| 400 | HelpText<"Apply modifications to files to conform to ARC">; |
Argyrios Kyrtzidis | 69325d5 | 2011-07-09 20:00:58 +0000 | [diff] [blame] | 401 | def arcmt_migrate : Flag<"-arcmt-migrate">, |
| 402 | HelpText<"Apply modifications and produces temporary files that conform to ARC">; |
| 403 | def arcmt_migrate_directory : Separate<"-arcmt-migrate-directory">, |
| 404 | HelpText<"Directory for temporary files produced during ARC migration">; |
Argyrios Kyrtzidis | 7ee2049 | 2011-07-19 17:20:03 +0000 | [diff] [blame] | 405 | def arcmt_migrate_report_output : Separate<"-arcmt-migrate-report-output">, |
| 406 | HelpText<"Output path for the plist report">; |
| 407 | def arcmt_migrate_emit_arc_errors : Flag<"-arcmt-migrate-emit-errors">, |
| 408 | HelpText<"Emit ARC errors even if the migrator can fix them">; |
John McCall | f85e193 | 2011-06-15 23:02:42 +0000 | [diff] [blame] | 409 | |
Argyrios Kyrtzidis | 389db16 | 2010-11-03 22:45:23 +0000 | [diff] [blame] | 410 | def working_directory : JoinedOrSeparate<"-working-directory">, |
| 411 | HelpText<"Resolve file paths relative to the specified directory">; |
| 412 | def working_directory_EQ : Joined<"-working-directory=">, |
| 413 | Alias<working_directory>; |
| 414 | |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 415 | def relocatable_pch : Flag<"-relocatable-pch">, |
| 416 | HelpText<"Whether to build a relocatable precompiled header">; |
| 417 | def print_stats : Flag<"-print-stats">, |
| 418 | HelpText<"Print performance metrics and statistics">; |
| 419 | def ftime_report : Flag<"-ftime-report">, |
| 420 | HelpText<"Print the amount of time each phase of compilation takes">; |
Anders Carlsson | 46116ce | 2010-04-10 19:09:13 +0000 | [diff] [blame] | 421 | def fdump_record_layouts : Flag<"-fdump-record-layouts">, |
Daniel Dunbar | b69eca5 | 2010-04-08 02:59:56 +0000 | [diff] [blame] | 422 | HelpText<"Dump record layout information">; |
Nick Lewycky | 1450f26 | 2010-08-13 17:31:00 +0000 | [diff] [blame] | 423 | def fix_what_you_can : Flag<"-fix-what-you-can">, |
| 424 | HelpText<"Apply fix-it advice even in the presence of unfixable errors">; |
Daniel Dunbar | b69eca5 | 2010-04-08 02:59:56 +0000 | [diff] [blame] | 425 | |
Daniel Dunbar | 3f87fb0 | 2010-04-15 06:09:03 +0000 | [diff] [blame] | 426 | // Generic forwarding to LLVM options. This should only be used for debugging |
| 427 | // and experimental features. |
| 428 | def mllvm : Separate<"-mllvm">, |
| 429 | HelpText<"Additional arguments to forward to LLVM's option processing">; |
| 430 | |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 431 | //===----------------------------------------------------------------------===// |
| 432 | // Language Options |
| 433 | //===----------------------------------------------------------------------===// |
| 434 | |
| 435 | def fno_builtin : Flag<"-fno-builtin">, |
| 436 | HelpText<"Disable implicit builtin knowledge of functions">; |
| 437 | def faltivec : Flag<"-faltivec">, |
| 438 | HelpText<"Enable AltiVec vector initializer syntax">; |
Benjamin Kramer | c53e365 | 2010-04-09 19:40:47 +0000 | [diff] [blame] | 439 | def fno_access_control : Flag<"-fno-access-control">, |
John McCall | 380509a | 2010-04-09 19:09:08 +0000 | [diff] [blame] | 440 | HelpText<"Disable C++ access control">; |
Nuno Lopes | fc28448 | 2009-12-16 16:59:22 +0000 | [diff] [blame] | 441 | def fno_assume_sane_operator_new : Flag<"-fno-assume-sane-operator-new">, |
Nuno Lopes | 9986017 | 2009-12-17 22:37:33 +0000 | [diff] [blame] | 442 | HelpText<"Don't assume that C++'s global operator new can't alias any pointer">; |
Chandler Carruth | eb5d7b7 | 2010-04-17 20:17:31 +0000 | [diff] [blame] | 443 | def fgnu_keywords : Flag<"-fgnu-keywords">, |
| 444 | HelpText<"Allow GNU-extension keywords regardless of language standard">; |
Rafael Espindola | fb3f4aa | 2011-06-02 16:13:27 +0000 | [diff] [blame] | 445 | def fgnu89_inline : Flag<"-fgnu89-inline">, |
| 446 | HelpText<"Use the gnu89 inline semantics">; |
Chandler Carruth | eb5d7b7 | 2010-04-17 20:17:31 +0000 | [diff] [blame] | 447 | def fno_gnu_keywords : Flag<"-fno-gnu-keywords">, |
| 448 | HelpText<"Disallow GNU-extension keywords regardless of language standard">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 449 | def fdollars_in_identifiers : Flag<"-fdollars-in-identifiers">, |
| 450 | HelpText<"Allow '$' in identifiers">; |
Daniel Dunbar | 8663b18 | 2009-12-16 20:10:18 +0000 | [diff] [blame] | 451 | def fno_dollars_in_identifiers : Flag<"-fno-dollars-in-identifiers">, |
| 452 | HelpText<"Disallow '$' in identifiers">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 453 | def femit_all_decls : Flag<"-femit-all-decls">, |
| 454 | HelpText<"Emit all declarations, even if unused">; |
| 455 | def fblocks : Flag<"-fblocks">, |
John McCall | 13db5cf | 2011-09-09 20:41:01 +0000 | [diff] [blame] | 456 | HelpText<"Enable the 'blocks' language feature">; |
| 457 | def fblocks_runtime_optional : Flag<"-fblocks-runtime-optional">, |
| 458 | HelpText<"Weakly link in the blocks runtime">; |
Michael J. Spencer | 20249a1 | 2010-10-21 03:16:25 +0000 | [diff] [blame] | 459 | def fheinous_gnu_extensions : Flag<"-fheinous-gnu-extensions">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 460 | def fexceptions : Flag<"-fexceptions">, |
| 461 | HelpText<"Enable support for exception handling">; |
Anders Carlsson | 0761e44 | 2011-02-23 03:16:42 +0000 | [diff] [blame] | 462 | def fobjc_exceptions : Flag<"-fobjc-exceptions">, |
| 463 | HelpText<"Enable Objective-C exceptions">; |
| 464 | def fcxx_exceptions : Flag<"-fcxx-exceptions">, |
| 465 | HelpText<"Enable C++ exceptions">; |
Daniel Dunbar | 7348288 | 2010-02-10 18:48:44 +0000 | [diff] [blame] | 466 | def fsjlj_exceptions : Flag<"-fsjlj-exceptions">, |
| 467 | HelpText<"Use SjLj style exceptions">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 468 | def ffreestanding : Flag<"-ffreestanding">, |
| 469 | HelpText<"Assert that the compilation takes place in a freestanding environment">; |
| 470 | def fgnu_runtime : Flag<"-fgnu-runtime">, |
| 471 | HelpText<"Generate output compatible with the standard GNU Objective-C runtime">; |
John McCall | 279b5eb | 2010-08-12 23:36:15 +0000 | [diff] [blame] | 472 | def fhidden_weak_vtables : Flag<"-fhidden-weak-vtables">, |
| 473 | HelpText<"Generate weak vtables and RTTI with hidden visibility">; |
Daniel Dunbar | ce6bf1e | 2009-11-29 09:32:20 +0000 | [diff] [blame] | 474 | def std_EQ : Joined<"-std=">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 475 | HelpText<"Language standard to compile for">; |
Bob Wilson | 13c4f21 | 2011-06-21 21:12:29 +0000 | [diff] [blame] | 476 | def stdlib_EQ : Joined<"-stdlib=">, |
| 477 | HelpText<"C++ standard library to use">; |
Dan Gohman | c31176d | 2010-01-08 02:20:44 +0000 | [diff] [blame] | 478 | def fmath_errno : Flag<"-fmath-errno">, |
| 479 | HelpText<"Require math functions to indicate errors by setting errno">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 480 | def fms_extensions : Flag<"-fms-extensions">, |
Francois Pichet | ae55608 | 2011-09-17 04:32:15 +0000 | [diff] [blame] | 481 | HelpText<"Accept some non-standard constructs supported by the Microsoft compiler">; |
| 482 | def fms_compatibility : Flag<"-fms-compatibility">, |
| 483 | HelpText<"Enable Microsoft compatibility mode">; |
Michael J. Spencer | dae4ac4 | 2010-10-21 05:21:48 +0000 | [diff] [blame] | 484 | def fmsc_version : Joined<"-fmsc-version=">, |
| 485 | HelpText<"Version of the Microsoft C/C++ compiler to report in _MSC_VER (0 = don't define it (default))">; |
Dawn Perchik | 400b607 | 2010-09-02 23:59:25 +0000 | [diff] [blame] | 486 | def fborland_extensions : Flag<"-fborland-extensions">, |
| 487 | HelpText<"Accept non-standard constructs supported by the Borland compiler">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 488 | def main_file_name : Separate<"-main-file-name">, |
| 489 | HelpText<"Main file name to use for debug info">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 490 | def fno_elide_constructors : Flag<"-fno-elide-constructors">, |
| 491 | HelpText<"Disable C++ copy constructor elision">; |
| 492 | def fno_lax_vector_conversions : Flag<"-fno-lax-vector-conversions">, |
| 493 | HelpText<"Disallow implicit conversions between vectors with a different number of elements or different element types">; |
| 494 | def fno_operator_names : Flag<"-fno-operator-names">, |
| 495 | HelpText<"Do not treat C++ operator name keywords as synonyms for operators">; |
Daniel Dunbar | efb0fa9 | 2010-03-20 04:15:41 +0000 | [diff] [blame] | 496 | def fno_signed_char : Flag<"-fno-signed-char">, |
| 497 | HelpText<"Char is unsigned">; |
Douglas Gregor | a0068fc | 2010-07-09 17:35:33 +0000 | [diff] [blame] | 498 | def fno_spell_checking : Flag<"-fno-spell-checking">, |
Michael J. Spencer | 20249a1 | 2010-10-21 03:16:25 +0000 | [diff] [blame] | 499 | HelpText<"Disable spell-checking">; |
Daniel Dunbar | efb0fa9 | 2010-03-20 04:15:41 +0000 | [diff] [blame] | 500 | def fno_use_cxa_atexit : Flag<"-fno-use-cxa-atexit">, |
| 501 | HelpText<"Don't use __cxa_atexit for calling destructors">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 502 | def fconstant_string_class : Separate<"-fconstant-string-class">, |
Daniel Dunbar | b737fb1 | 2009-12-03 07:01:46 +0000 | [diff] [blame] | 503 | MetaVarName<"<class name>">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 504 | HelpText<"Specify the class to use for constant Objective-C string objects.">; |
Fariborz Jahanian | 33e982b | 2010-04-22 20:26:39 +0000 | [diff] [blame] | 505 | def fno_constant_cfstrings : Flag<"-fno-constant-cfstrings">, |
| 506 | HelpText<"Enable creation of CodeFoundation-type constant strings">; |
John McCall | f85e193 | 2011-06-15 23:02:42 +0000 | [diff] [blame] | 507 | def fobjc_arc : Flag<"-fobjc-arc">, |
| 508 | HelpText<"Synthesize retain and release calls for Objective-C pointers">; |
| 509 | def fobjc_arc_cxxlib_EQ : Joined<"-fobjc-arc-cxxlib=">, |
| 510 | HelpText<"Objective-C++ Automatic Reference Counting standard library kind">; |
John McCall | f85e193 | 2011-06-15 23:02:42 +0000 | [diff] [blame] | 511 | def fobjc_arc_exceptions : Flag<"-fobjc-arc-exceptions">, |
| 512 | HelpText<"Use EH-safe code when synthesizing retains and releases in -fobjc-arc">; |
John McCall | 9f084a3 | 2011-07-06 00:26:06 +0000 | [diff] [blame] | 513 | def fobjc_runtime_has_arc : Flag<"-fobjc-runtime-has-arc">, |
| 514 | HelpText<"The target Objective-C runtime provides ARC entrypoints">; |
| 515 | def fobjc_runtime_has_weak : Flag<"-fobjc-runtime-has-weak">, |
| 516 | HelpText<"The target Objective-C runtime supports ARC weak operations">; |
John McCall | 256a76e | 2011-07-06 01:22:26 +0000 | [diff] [blame] | 517 | def fobjc_runtime_has_terminate : Flag<"-fobjc-runtime-has-terminate">, |
| 518 | HelpText<"The target Objective-C runtime provides an objc_terminate entrypoint">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 519 | def fobjc_gc : Flag<"-fobjc-gc">, |
| 520 | HelpText<"Enable Objective-C garbage collection">; |
| 521 | def fobjc_gc_only : Flag<"-fobjc-gc-only">, |
| 522 | HelpText<"Use GC exclusively for Objective-C related memory management">; |
Fariborz Jahanian | b466d01 | 2011-01-07 01:05:02 +0000 | [diff] [blame] | 523 | def fapple_kext : Flag<"-fapple-kext">, |
Fariborz Jahanian | f84109e | 2011-01-07 18:59:25 +0000 | [diff] [blame] | 524 | HelpText<"Use Apple's kernel extensions ABI">; |
Daniel Dunbar | f643b9b | 2010-04-24 17:56:46 +0000 | [diff] [blame] | 525 | def fobjc_dispatch_method_EQ : Joined<"-fobjc-dispatch-method=">, |
| 526 | HelpText<"Objective-C dispatch method to use">; |
Ted Kremenek | c32647d | 2010-12-23 21:35:43 +0000 | [diff] [blame] | 527 | def fobjc_default_synthesize_properties : Flag<"-fobjc-default-synthesize-properties">, |
| 528 | HelpText<"enable the default synthesis of Objective-C properties">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 529 | def print_ivar_layout : Flag<"-print-ivar-layout">, |
| 530 | HelpText<"Enable Objective-C Ivar layout bitmap print trace">; |
John McCall | d1e40d5 | 2011-10-02 01:16:38 +0000 | [diff] [blame] | 531 | def fobjc_fragile_abi : Flag<"-fobjc-fragile-abi">, |
| 532 | HelpText<"Use Objective-C's fragile ABI">; |
Douglas Gregor | 74da19f | 2011-06-14 23:20:43 +0000 | [diff] [blame] | 533 | def fno_objc_infer_related_result_type : Flag< |
| 534 | "-fno-objc-infer-related-result-type">, |
| 535 | HelpText< |
| 536 | "do not infer Objective-C related result type based on method family">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 537 | def ftrapv : Flag<"-ftrapv">, |
| 538 | HelpText<"Trap on integer overflow">; |
David Chisnall | 7f18e67 | 2010-09-17 18:29:54 +0000 | [diff] [blame] | 539 | def ftrapv_handler : Separate<"-ftrapv-handler">, |
| 540 | MetaVarName<"<function name>">, |
| 541 | HelpText<"Specify the function to be called on overflow.">; |
Chris Lattner | a4d7145 | 2010-06-26 21:25:03 +0000 | [diff] [blame] | 542 | def fwrapv : Flag<"-fwrapv">, |
| 543 | HelpText<"Treat signed integer overflow as two's complement">; |
Daniel Dunbar | 7674352 | 2009-11-29 02:39:08 +0000 | [diff] [blame] | 544 | def pic_level : Separate<"-pic-level">, |
Daniel Dunbar | b737fb1 | 2009-12-03 07:01:46 +0000 | [diff] [blame] | 545 | HelpText<"Value for __PIC__">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 546 | def pthread : Flag<"-pthread">, |
| 547 | HelpText<"Support POSIX threads in generated code">; |
Daniel Dunbar | 88934e8 | 2011-10-05 21:04:55 +0000 | [diff] [blame] | 548 | def fpack_struct : Separate<"-fpack-struct">, |
| 549 | HelpText<"Specify the default maximum struct packing alignment">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 550 | def fpascal_strings : Flag<"-fpascal-strings">, |
| 551 | HelpText<"Recognize and construct Pascal-style string literals">; |
| 552 | def fno_rtti : Flag<"-fno-rtti">, |
| 553 | HelpText<"Disable generation of rtti information">; |
Douglas Gregor | fae3b2f | 2010-07-27 00:27:13 +0000 | [diff] [blame] | 554 | def fno_validate_pch : Flag<"-fno-validate-pch">, |
| 555 | HelpText<"Disable validation of precompiled headers">; |
Argyrios Kyrtzidis | b972858 | 2010-10-14 20:14:18 +0000 | [diff] [blame] | 556 | def dump_deserialized_pch_decls : Flag<"-dump-deserialized-decls">, |
| 557 | HelpText<"Dump declarations that are deserialized from PCH, for testing">; |
Argyrios Kyrtzidis | 3e78593 | 2010-10-14 20:14:25 +0000 | [diff] [blame] | 558 | def error_on_deserialized_pch_decl : Separate<"-error-on-deserialized-decl">, |
| 559 | HelpText<"Emit error if a specific declaration is deserialized from PCH, for testing">; |
Argyrios Kyrtzidis | 9a8cbc7 | 2011-10-28 22:54:24 +0000 | [diff] [blame] | 560 | def error_on_deserialized_pch_decl_EQ : Joined<"-error-on-deserialized-decl=">, |
| 561 | Alias<error_on_deserialized_pch_decl>; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 562 | def fshort_wchar : Flag<"-fshort-wchar">, |
| 563 | HelpText<"Force wchar_t to be a short unsigned int">; |
Argyrios Kyrtzidis | 9a2b9d7 | 2010-10-08 00:25:19 +0000 | [diff] [blame] | 564 | def fshort_enums : Flag<"-fshort-enums">, |
| 565 | HelpText<"Allocate to an enum type only as many bytes as it needs for the declared range of possible values">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 566 | def static_define : Flag<"-static-define">, |
| 567 | HelpText<"Should __STATIC__ be defined">; |
| 568 | def stack_protector : Separate<"-stack-protector">, |
| 569 | HelpText<"Enable stack protectors">; |
| 570 | def fvisibility : Separate<"-fvisibility">, |
| 571 | HelpText<"Default symbol visibility">; |
Douglas Gregor | 7cf84d6 | 2010-06-15 17:05:35 +0000 | [diff] [blame] | 572 | def fvisibility_inlines_hidden : Flag<"-fvisibility-inlines-hidden">, |
| 573 | HelpText<"Give inline C++ member functions default visibility by default">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 574 | def ftemplate_depth : Separate<"-ftemplate-depth">, |
| 575 | HelpText<"Maximum depth of recursive template instantiation">; |
Argyrios Kyrtzidis | 1380a14 | 2010-11-18 00:20:36 +0000 | [diff] [blame] | 576 | def Wlarge_by_value_copy : Separate<"-Wlarge-by-value-copy">, |
Argyrios Kyrtzidis | 3532fdd | 2010-11-17 23:11:54 +0000 | [diff] [blame] | 577 | HelpText<"Warn if a function definition returns or accepts an object larger " |
| 578 | "in bytes that a given value">; |
Argyrios Kyrtzidis | 1380a14 | 2010-11-18 00:20:36 +0000 | [diff] [blame] | 579 | def Wlarge_by_value_copy_EQ : Joined<"-Wlarge-by-value-copy=">, |
| 580 | Alias<Wlarge_by_value_copy>; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 581 | def trigraphs : Flag<"-trigraphs">, |
| 582 | HelpText<"Process trigraph sequences">; |
| 583 | def fwritable_strings : Flag<"-fwritable-strings">, |
| 584 | HelpText<"Store string literals as writable data">; |
Chandler Carruth | 50465d1 | 2011-04-23 06:30:43 +0000 | [diff] [blame] | 585 | def fconst_strings : Flag<"-fconst-strings">, |
| 586 | HelpText<"Use a const qualified type for string literals in C and ObjC">; |
| 587 | def fno_const_strings : Flag<"-fno-const-strings">, |
| 588 | HelpText<"Don't use a const qualified type for string literals in C and ObjC">; |
Daniel Dunbar | fb937b8 | 2010-04-15 15:06:22 +0000 | [diff] [blame] | 589 | def fno_bitfield_type_align : Flag<"-fno-bitfield-type-align">, |
| 590 | HelpText<"Ignore bit-field types when aligning structures">; |
Daniel Dunbar | 2ed4228 | 2011-03-18 21:23:38 +0000 | [diff] [blame] | 591 | def traditional_cpp : Flag<"-traditional-cpp">, |
| 592 | HelpText<"Enable some traditional CPP emulation">; |
Peter Collingbourne | 207f4d8 | 2011-03-18 22:38:29 +0000 | [diff] [blame] | 593 | def ffake_address_space_map : Flag<"-ffake-address-space-map">, |
| 594 | HelpText<"Use a fake address space map; OpenCL testing purposes only">; |
Francois Pichet | 8387e2a | 2011-04-22 22:18:13 +0000 | [diff] [blame] | 595 | def fdelayed_template_parsing : Flag<"-fdelayed-template-parsing">, |
| 596 | HelpText<"Parse templated function definitions at the end of the " |
| 597 | "translation unit ">; |
John McCall | a5fc472 | 2011-04-09 22:50:59 +0000 | [diff] [blame] | 598 | def funknown_anytype : Flag<"-funknown-anytype">, |
| 599 | HelpText<"Enable parser support for the __unknown_anytype type; for testing purposes only">; |
John McCall | 48218c6 | 2011-07-13 17:56:40 +0000 | [diff] [blame] | 600 | def fdebugger_support : Flag<"-fdebugger-support">, |
| 601 | HelpText<"Enable special debugger support behavior">; |
Chandler Carruth | 1cfe3c3 | 2011-04-23 09:27:53 +0000 | [diff] [blame] | 602 | def fdeprecated_macro : Flag<"-fdeprecated-macro">, |
Chandler Carruth | f8c247d | 2011-04-23 19:48:40 +0000 | [diff] [blame] | 603 | HelpText<"Defines the __DEPRECATED macro">; |
Chandler Carruth | 1cfe3c3 | 2011-04-23 09:27:53 +0000 | [diff] [blame] | 604 | def fno_deprecated_macro : Flag<"-fno-deprecated-macro">, |
Chandler Carruth | f8c247d | 2011-04-23 19:48:40 +0000 | [diff] [blame] | 605 | HelpText<"Undefines the __DEPRECATED macro">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 606 | |
| 607 | //===----------------------------------------------------------------------===// |
| 608 | // Header Search Options |
| 609 | //===----------------------------------------------------------------------===// |
| 610 | |
Daniel Dunbar | a268fc0 | 2011-10-11 18:20:10 +0000 | [diff] [blame] | 611 | def nostdsysteminc : Flag<"-nostdsysteminc">, |
| 612 | HelpText<"Disable standard system #include directories">; |
Douglas Gregor | 4c2bcad | 2010-03-24 20:13:48 +0000 | [diff] [blame] | 613 | def nostdincxx : Flag<"-nostdinc++">, |
| 614 | HelpText<"Disable standard #include directories for the C++ standard library">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 615 | def nobuiltininc : Flag<"-nobuiltininc">, |
| 616 | HelpText<"Disable builtin #include directories">; |
Douglas Gregor | 8ee51ef | 2011-09-14 20:28:46 +0000 | [diff] [blame] | 617 | def fmodule_cache_path : Separate<"-fmodule-cache-path">, |
Douglas Gregor | 9a6da69 | 2011-09-12 20:41:59 +0000 | [diff] [blame] | 618 | MetaVarName<"<directory>">, |
| 619 | HelpText<"Specify the module cache path">; |
Douglas Gregor | 6e975c4 | 2011-09-13 23:15:45 +0000 | [diff] [blame] | 620 | def fdisable_module_hash : Flag<"-fdisable-module-hash">, |
| 621 | HelpText<"Disable the module hash">; |
Douglas Gregor | fba18aa | 2011-09-15 22:00:41 +0000 | [diff] [blame] | 622 | def fauto_module_import : Flag<"-fauto-module-import">, |
| 623 | HelpText<"Automatically translate #include/#import into module imports " |
| 624 | "when possible">; |
| 625 | |
Daniel Dunbar | b737fb1 | 2009-12-03 07:01:46 +0000 | [diff] [blame] | 626 | def F : JoinedOrSeparate<"-F">, MetaVarName<"<directory>">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 627 | HelpText<"Add directory to framework include search path">; |
Daniel Dunbar | b737fb1 | 2009-12-03 07:01:46 +0000 | [diff] [blame] | 628 | def I : JoinedOrSeparate<"-I">, MetaVarName<"<directory>">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 629 | HelpText<"Add directory to include search path">; |
Daniel Dunbar | b94ffa4 | 2009-12-09 10:01:26 +0000 | [diff] [blame] | 630 | def idirafter : JoinedOrSeparate<"-idirafter">, MetaVarName<"<directory>">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 631 | HelpText<"Add directory to AFTER include search path">; |
Douglas Gregor | 65e02fa | 2011-07-28 04:45:53 +0000 | [diff] [blame] | 632 | def index_header_map : Flag<"-index-header-map">, |
| 633 | HelpText<"Make the next included directory (-I or -F) an indexer header map">; |
Daniel Dunbar | b94ffa4 | 2009-12-09 10:01:26 +0000 | [diff] [blame] | 634 | def iquote : JoinedOrSeparate<"-iquote">, MetaVarName<"<directory>">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 635 | HelpText<"Add directory to QUOTE include search path">; |
Benjamin Kramer | 47adebe | 2011-09-22 21:41:16 +0000 | [diff] [blame] | 636 | def c_isystem : JoinedOrSeparate<"-c-isystem">, MetaVarName<"<directory>">, |
| 637 | HelpText<"Add directory to the C SYSTEM include search path">; |
Joerg Sonnenberger | 2df6647 | 2011-02-22 00:40:56 +0000 | [diff] [blame] | 638 | def cxx_isystem : JoinedOrSeparate<"-cxx-isystem">, MetaVarName<"<directory>">, |
| 639 | HelpText<"Add directory to the C++ SYSTEM include search path">; |
Benjamin Kramer | 47adebe | 2011-09-22 21:41:16 +0000 | [diff] [blame] | 640 | def objc_isystem : JoinedOrSeparate<"-objc-isystem">, |
| 641 | MetaVarName<"<directory>">, |
| 642 | HelpText<"Add directory to the ObjC SYSTEM include search path">; |
| 643 | def objcxx_isystem : JoinedOrSeparate<"-objcxx-isystem">, |
| 644 | MetaVarName<"<directory>">, |
| 645 | HelpText<"Add directory to the ObjC++ SYSTEM include search path">; |
Daniel Dunbar | 024f4be | 2011-10-18 20:40:38 +0000 | [diff] [blame] | 646 | def iframework : JoinedOrSeparate<"-iframework">, MetaVarName<"<directory>">, |
| 647 | HelpText<"Add directory to SYSTEM framework search path">; |
Daniel Dunbar | b94ffa4 | 2009-12-09 10:01:26 +0000 | [diff] [blame] | 648 | def isystem : JoinedOrSeparate<"-isystem">, MetaVarName<"<directory>">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 649 | HelpText<"Add directory to SYSTEM include search path">; |
Chris Lattner | 9db9ad3 | 2010-08-24 21:09:16 +0000 | [diff] [blame] | 650 | def iwithsysroot : JoinedOrSeparate<"-iwithsysroot">,MetaVarName<"<directory>">, |
| 651 | HelpText<"Add directory to SYSTEM include search path, " |
| 652 | "absolute paths are relative to -isysroot">; |
Daniel Dunbar | b94ffa4 | 2009-12-09 10:01:26 +0000 | [diff] [blame] | 653 | def iprefix : JoinedOrSeparate<"-iprefix">, MetaVarName<"<prefix>">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 654 | HelpText<"Set the -iwithprefix/-iwithprefixbefore prefix">; |
Daniel Dunbar | b94ffa4 | 2009-12-09 10:01:26 +0000 | [diff] [blame] | 655 | def iwithprefix : JoinedOrSeparate<"-iwithprefix">, MetaVarName<"<dir>">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 656 | HelpText<"Set directory to SYSTEM include search path with prefix">; |
Mike Stump | e4cb2a4 | 2009-12-09 18:09:35 +0000 | [diff] [blame] | 657 | def iwithprefixbefore : JoinedOrSeparate<"-iwithprefixbefore">, |
| 658 | MetaVarName<"<dir>">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 659 | HelpText<"Set directory to include search path with prefix">; |
Daniel Dunbar | b94ffa4 | 2009-12-09 10:01:26 +0000 | [diff] [blame] | 660 | def isysroot : JoinedOrSeparate<"-isysroot">, MetaVarName<"<dir>">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 661 | HelpText<"Set the system root directory (usually /)">; |
| 662 | def v : Flag<"-v">, HelpText<"Enable verbose output">; |
| 663 | |
| 664 | //===----------------------------------------------------------------------===// |
| 665 | // Preprocessor Options |
| 666 | //===----------------------------------------------------------------------===// |
| 667 | |
Daniel Dunbar | b737fb1 | 2009-12-03 07:01:46 +0000 | [diff] [blame] | 668 | def D : JoinedOrSeparate<"-D">, MetaVarName<"<macro>">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 669 | HelpText<"Predefine the specified macro">; |
Daniel Dunbar | b94ffa4 | 2009-12-09 10:01:26 +0000 | [diff] [blame] | 670 | def include_ : JoinedOrSeparate<"-include">, MetaVarName<"<file>">, EnumName<"include">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 671 | HelpText<"Include file before parsing">; |
Daniel Dunbar | b94ffa4 | 2009-12-09 10:01:26 +0000 | [diff] [blame] | 672 | def imacros : JoinedOrSeparate<"-imacros">, MetaVarName<"<file>">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 673 | HelpText<"Include macros from file before parsing">; |
Daniel Dunbar | b737fb1 | 2009-12-03 07:01:46 +0000 | [diff] [blame] | 674 | def include_pch : Separate<"-include-pch">, MetaVarName<"<file>">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 675 | HelpText<"Include precompiled header file">; |
Daniel Dunbar | b737fb1 | 2009-12-03 07:01:46 +0000 | [diff] [blame] | 676 | def include_pth : Separate<"-include-pth">, MetaVarName<"<file>">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 677 | HelpText<"Include file before parsing">; |
Argyrios Kyrtzidis | b0f4b9a | 2011-03-09 17:21:42 +0000 | [diff] [blame] | 678 | def chain_include : Separate<"-chain-include">, MetaVarName<"<file>">, |
| 679 | HelpText<"Include and chain a header file after turning it into PCH">; |
Douglas Gregor | f4f6c9d | 2010-07-26 21:36:20 +0000 | [diff] [blame] | 680 | def preamble_bytes_EQ : Joined<"-preamble-bytes=">, |
Douglas Gregor | 3d398aa | 2010-07-26 16:29:14 +0000 | [diff] [blame] | 681 | HelpText<"Assume that the precompiled header is a precompiled preamble " |
| 682 | "covering the first N bytes of the main file">; |
Daniel Dunbar | b737fb1 | 2009-12-03 07:01:46 +0000 | [diff] [blame] | 683 | def token_cache : Separate<"-token-cache">, MetaVarName<"<path>">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 684 | HelpText<"Use specified token cache file">; |
Daniel Dunbar | b737fb1 | 2009-12-03 07:01:46 +0000 | [diff] [blame] | 685 | def U : JoinedOrSeparate<"-U">, MetaVarName<"<macro>">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 686 | HelpText<"Undefine the specified macro">; |
Daniel Dunbar | b737fb1 | 2009-12-03 07:01:46 +0000 | [diff] [blame] | 687 | def undef : Flag<"-undef">, MetaVarName<"<macro>">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 688 | HelpText<"undef all system defines">; |
Douglas Gregor | 94dc8f6 | 2010-03-19 16:15:56 +0000 | [diff] [blame] | 689 | def detailed_preprocessing_record : Flag<"-detailed-preprocessing-record">, |
| 690 | HelpText<"include a detailed record of preprocessing actions">; |
Michael J. Spencer | 20249a1 | 2010-10-21 03:16:25 +0000 | [diff] [blame] | 691 | |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 692 | //===----------------------------------------------------------------------===// |
| 693 | // Preprocessed Output Options |
| 694 | //===----------------------------------------------------------------------===// |
| 695 | |
| 696 | def P : Flag<"-P">, |
| 697 | HelpText<"Disable linemarker output in -E mode">; |
| 698 | def C : Flag<"-C">, |
| 699 | HelpText<"Enable comment output in -E mode">; |
| 700 | def CC : Flag<"-CC">, |
| 701 | HelpText<"Enable comment output in -E mode, even from macro expansions">; |
| 702 | def dM : Flag<"-dM">, |
| 703 | HelpText<"Print macro definitions in -E mode instead of normal output">; |
| 704 | def dD : Flag<"-dD">, |
| 705 | HelpText<"Print macro definitions in -E mode in addition to normal output">; |
Peter Collingbourne | 61e0786 | 2010-12-04 01:50:45 +0000 | [diff] [blame] | 706 | |
| 707 | //===----------------------------------------------------------------------===// |
| 708 | // OpenCL Options |
| 709 | //===----------------------------------------------------------------------===// |
| 710 | |
| 711 | def cl_opt_disable : Flag<"-cl-opt-disable">, |
| 712 | HelpText<"OpenCL only. This option disables all optimizations. The default is optimizations are enabled.">; |
Peter Collingbourne | 0982136 | 2010-12-04 01:50:56 +0000 | [diff] [blame] | 713 | def cl_single_precision_constant : Flag<"-cl-single-precision-constant">, |
| 714 | HelpText<"OpenCL only. Treat double precision floating-point constant as single precision constant.">; |
Peter Collingbourne | 5d729a3 | 2010-12-04 01:51:05 +0000 | [diff] [blame] | 715 | def cl_finite_math_only : Flag<"-cl-finite-math-only">, |
| 716 | HelpText<"OpenCL only. Allow floating-point optimizations that assume arguments and results are not NaNs or +-Inf.">; |
Peter Collingbourne | 5f67e13 | 2010-12-04 01:51:14 +0000 | [diff] [blame] | 717 | def cl_unsafe_math_optimizations : Flag<"-cl-unsafe-math-optimizations">, |
| 718 | HelpText<"OpenCL only. Allow unsafe floating-point optimizations. Also implies -cl-no-signed-zeros and -cl-mad-enable">; |
Peter Collingbourne | f084082 | 2010-12-04 01:51:23 +0000 | [diff] [blame] | 719 | def cl_fast_relaxed_math : Flag<"-cl-fast-relaxed-math">, |
| 720 | HelpText<"OpenCL only. Sets -cl-finite-math-only and -cl-unsafe-math-optimizations, and defines __FAST_RELAXED_MATH__">; |
Peter Collingbourne | 4400cb8 | 2010-12-04 01:51:33 +0000 | [diff] [blame] | 721 | def cl_mad_enable : Flag<"-cl-mad-enable">, |
| 722 | HelpText<"OpenCL only. Enable less precise MAD instructions to be generated.">; |
Peter Collingbourne | 91252d1 | 2010-12-04 01:51:40 +0000 | [diff] [blame] | 723 | def cl_std_EQ : Joined<"-cl-std=">, |
| 724 | HelpText<"OpenCL language standard to compile for">; |
Peter Collingbourne | d51e43a | 2011-10-06 18:29:46 +0000 | [diff] [blame] | 725 | |
| 726 | //===----------------------------------------------------------------------===// |
| 727 | // CUDA Options |
| 728 | //===----------------------------------------------------------------------===// |
| 729 | |
| 730 | def fcuda_is_device : Flag<"-fcuda-is-device">, |
| 731 | HelpText<"Generate code for CUDA device">; |