Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1 | .. |
| 2 | ------------------------------------------------------------------- |
| 3 | NOTE: This file is automatically generated by running clang-tblgen |
| 4 | -gen-opt-docs. Do not edit this file by hand!! |
| 5 | ------------------------------------------------------------------- |
| 6 | |
| 7 | ===================================== |
| 8 | Clang command line argument reference |
| 9 | ===================================== |
| 10 | .. contents:: |
| 11 | :local: |
| 12 | |
| 13 | Introduction |
| 14 | ============ |
| 15 | |
| 16 | This page lists the command line arguments currently supported by the |
| 17 | GCC-compatible ``clang`` and ``clang++`` drivers. |
| 18 | |
| 19 | |
| 20 | .. program:: clang |
Richard Smith | c5b2e00 | 2017-01-27 02:08:37 +0000 | [diff] [blame] | 21 | .. option:: -B<dir>, --prefix <arg>, --prefix=<arg> |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 22 | |
Richard Smith | c5b2e00 | 2017-01-27 02:08:37 +0000 | [diff] [blame] | 23 | Add <dir> to search path for binaries and object files used implicitly |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 24 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 25 | .. option:: -F<arg> |
| 26 | |
| 27 | Add directory to framework include search path |
| 28 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 29 | .. option:: -ObjC |
| 30 | |
| 31 | Treat source input files as Objective-C inputs |
| 32 | |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 33 | .. program:: clang1 |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 34 | .. option:: -ObjC++ |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 35 | .. program:: clang |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 36 | |
| 37 | Treat source input files as Objective-C++ inputs |
| 38 | |
Craig Topper | 42da9cb | 2018-04-23 21:41:06 +0000 | [diff] [blame^] | 39 | .. option:: -Qn |
| 40 | |
| 41 | Do not emit metadata containing compiler name and version |
| 42 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 43 | .. option:: -Qunused-arguments |
| 44 | |
| 45 | Don't emit warning for unused driver arguments |
| 46 | |
Craig Topper | 42da9cb | 2018-04-23 21:41:06 +0000 | [diff] [blame^] | 47 | .. option:: -Qy |
| 48 | |
| 49 | Emit metadata containing compiler name and version |
| 50 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 51 | .. option:: -Wa,<arg>,<arg2>... |
| 52 | |
| 53 | Pass the comma separated arguments in <arg> to the assembler |
| 54 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 55 | .. option:: -Wlarge-by-value-copy=<arg> |
| 56 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 57 | .. option:: -Xarch\_<arg1> <arg2> |
| 58 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 59 | .. option:: -Xcuda-fatbinary <arg> |
| 60 | |
| 61 | Pass <arg> to fatbinary invocation |
| 62 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 63 | .. option:: -Xcuda-ptxas <arg> |
| 64 | |
| 65 | Pass <arg> to the ptxas assembler |
| 66 | |
Boris Kolpackov | b150d24 | 2017-08-30 09:15:53 +0000 | [diff] [blame] | 67 | .. option:: -Xopenmp-target <arg> |
| 68 | |
| 69 | Pass <arg> to the target offloading toolchain. |
| 70 | |
| 71 | .. program:: clang1 |
Jonas Hahnfeld | a180fc4 | 2018-02-22 17:10:28 +0000 | [diff] [blame] | 72 | .. option:: -Xopenmp-target=<triple> <arg> |
Boris Kolpackov | b150d24 | 2017-08-30 09:15:53 +0000 | [diff] [blame] | 73 | .. program:: clang |
| 74 | |
Jonas Hahnfeld | a180fc4 | 2018-02-22 17:10:28 +0000 | [diff] [blame] | 75 | Pass <arg> to the target offloading toolchain identified by <triple>. |
Boris Kolpackov | b150d24 | 2017-08-30 09:15:53 +0000 | [diff] [blame] | 76 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 77 | .. option:: -Z<arg> |
| 78 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 79 | .. option:: -a<arg>, --profile-blocks |
| 80 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 81 | .. option:: -all\_load |
| 82 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 83 | .. option:: -allowable\_client <arg> |
| 84 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 85 | .. option:: --analyze |
| 86 | |
| 87 | Run the static analyzer |
| 88 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 89 | .. option:: --analyze-auto |
| 90 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 91 | .. option:: --analyzer-no-default-checks |
| 92 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 93 | .. option:: --analyzer-output<arg> |
| 94 | |
| 95 | Static analyzer report output format (html\|plist\|plist-multi-file\|plist-html\|text). |
| 96 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 97 | .. option:: -ansi, --ansi |
| 98 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 99 | .. option:: -arch <arg> |
| 100 | |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 101 | .. program:: clang1 |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 102 | .. option:: -arch\_errors\_fatal |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 103 | .. program:: clang |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 104 | |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 105 | .. program:: clang2 |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 106 | .. option:: -arch\_only <arg> |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 107 | .. program:: clang |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 108 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 109 | .. option:: -arcmt-migrate-emit-errors |
| 110 | |
| 111 | Emit ARC errors even if the migrator can fix them |
| 112 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 113 | .. option:: -arcmt-migrate-report-output <arg> |
| 114 | |
| 115 | Output path for the plist report |
| 116 | |
Craig Topper | d23254a | 2017-07-20 17:52:48 +0000 | [diff] [blame] | 117 | .. option:: --autocomplete=<arg> |
| 118 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 119 | .. option:: -bind\_at\_load |
| 120 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 121 | .. option:: -bundle |
| 122 | |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 123 | .. program:: clang1 |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 124 | .. option:: -bundle\_loader <arg> |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 125 | .. program:: clang |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 126 | |
Craig Topper | 596527b | 2018-01-23 18:40:15 +0000 | [diff] [blame] | 127 | .. option:: -cfguard |
| 128 | |
| 129 | Emit tables required for Windows Control Flow Guard. |
| 130 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 131 | .. option:: -client\_name<arg> |
| 132 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 133 | .. option:: -compatibility\_version<arg> |
| 134 | |
Craig Topper | 287c801 | 2018-01-03 18:29:12 +0000 | [diff] [blame] | 135 | .. option:: --config <arg> |
| 136 | |
| 137 | Specifies configuration file |
| 138 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 139 | .. option:: --constant-cfstrings |
| 140 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 141 | .. option:: -coverage, --coverage |
| 142 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 143 | .. option:: --cuda-compile-host-device |
| 144 | |
| 145 | Compile CUDA code for both host and device (default). Has no effect on non-CUDA compilations. |
| 146 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 147 | .. option:: --cuda-device-only |
| 148 | |
| 149 | Compile CUDA code for device only |
| 150 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 151 | .. option:: --cuda-gpu-arch=<arg>, --no-cuda-gpu-arch=<arg> |
| 152 | |
| 153 | CUDA GPU architecture (e.g. sm\_35). May be specified more than once. |
| 154 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 155 | .. option:: --cuda-host-only |
| 156 | |
| 157 | Compile CUDA code for host only. Has no effect on non-CUDA compilations. |
| 158 | |
Jonas Hahnfeld | 06039e8 | 2018-04-20 13:26:03 +0000 | [diff] [blame] | 159 | .. option:: --cuda-include-ptx=<arg>, --no-cuda-include-ptx=<arg> |
| 160 | |
| 161 | Include PTX for the follwing GPU architecture (e.g. sm\_35) or 'all'. May be specified more than once. |
| 162 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 163 | .. option:: --cuda-noopt-device-debug, --no-cuda-noopt-device-debug |
| 164 | |
| 165 | Enable device-side debug info generation. Disables ptxas optimizations. |
| 166 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 167 | .. option:: -current\_version<arg> |
| 168 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 169 | .. option:: -dead\_strip |
| 170 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 171 | .. option:: -dependency-dot <arg> |
| 172 | |
| 173 | Filename to write DOT-formatted header dependencies to |
| 174 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 175 | .. option:: -dependency-file <arg> |
| 176 | |
| 177 | Filename (or -) to write dependency output to |
| 178 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 179 | .. option:: -dumpmachine |
| 180 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 181 | .. option:: -dumpversion |
| 182 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 183 | .. option:: --dyld-prefix=<arg>, --dyld-prefix <arg> |
| 184 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 185 | .. option:: -dylib\_file <arg> |
| 186 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 187 | .. option:: -dylinker |
| 188 | |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 189 | .. program:: clang1 |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 190 | .. option:: -dylinker\_install\_name<arg> |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 191 | .. program:: clang |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 192 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 193 | .. option:: -dynamic |
| 194 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 195 | .. option:: -dynamiclib |
| 196 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 197 | .. option:: -emit-ast |
| 198 | |
| 199 | Emit Clang AST files for source inputs |
| 200 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 201 | .. option:: -exported\_symbols\_list <arg> |
| 202 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 203 | .. option:: -faligned-new=<arg> |
| 204 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 205 | .. option:: -fcuda-approx-transcendentals, -fno-cuda-approx-transcendentals |
| 206 | |
| 207 | Use approximate transcendental functions |
| 208 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 209 | .. option:: -fcuda-flush-denormals-to-zero, -fno-cuda-flush-denormals-to-zero |
| 210 | |
| 211 | Flush denormal floating point values to zero in CUDA device mode. |
| 212 | |
Craig Topper | 42da9cb | 2018-04-23 21:41:06 +0000 | [diff] [blame^] | 213 | .. option:: -fcuda-rdc, -fno-cuda-rdc |
| 214 | |
| 215 | Generate relocatable device code, also known as separate compilation mode. |
| 216 | |
Jonas Hahnfeld | 06039e8 | 2018-04-20 13:26:03 +0000 | [diff] [blame] | 217 | .. option:: -ffixed-r19 |
| 218 | |
| 219 | Reserve the r19 register (Hexagon only) |
| 220 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 221 | .. option:: -fheinous-gnu-extensions |
| 222 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 223 | .. option:: -flat\_namespace |
| 224 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 225 | .. option:: -fopenmp-targets=<arg1>,<arg2>... |
| 226 | |
| 227 | Specify comma-separated list of triples OpenMP offloading targets to be supported |
| 228 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 229 | .. option:: -force\_cpusubtype\_ALL |
| 230 | |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 231 | .. program:: clang1 |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 232 | .. option:: -force\_flat\_namespace |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 233 | .. program:: clang |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 234 | |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 235 | .. program:: clang2 |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 236 | .. option:: -force\_load <arg> |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 237 | .. program:: clang |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 238 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 239 | .. option:: -framework <arg> |
| 240 | |
Richard Smith | 78e23fd | 2017-04-13 22:39:49 +0000 | [diff] [blame] | 241 | .. option:: -frtlib-add-rpath, -fno-rtlib-add-rpath |
| 242 | |
| 243 | Add -rpath with architecture-specific resource directory to the linker flags |
| 244 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 245 | .. option:: --gcc-toolchain=<arg>, -gcc-toolchain <arg> |
| 246 | |
| 247 | Use the gcc toolchain at the given directory |
| 248 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 249 | .. option:: -gcodeview |
| 250 | |
| 251 | Generate CodeView debug information |
| 252 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 253 | .. option:: -headerpad\_max\_install\_names<arg> |
| 254 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 255 | .. option:: -help, --help |
| 256 | |
| 257 | Display available options |
| 258 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 259 | .. option:: --help-hidden |
| 260 | |
Jonas Hahnfeld | 06039e8 | 2018-04-20 13:26:03 +0000 | [diff] [blame] | 261 | Display help for hidden options |
| 262 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 263 | .. option:: -image\_base <arg> |
| 264 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 265 | .. option:: -index-header-map |
| 266 | |
| 267 | Make the next included directory (-I or -F) an indexer header map |
| 268 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 269 | .. option:: -init <arg> |
| 270 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 271 | .. option:: -install\_name <arg> |
| 272 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 273 | .. option:: -keep\_private\_externs |
| 274 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 275 | .. option:: -lazy\_framework <arg> |
| 276 | |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 277 | .. program:: clang1 |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 278 | .. option:: -lazy\_library <arg> |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 279 | .. program:: clang |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 280 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 281 | .. option:: -mbig-endian, -EB |
| 282 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 283 | .. option:: --migrate |
| 284 | |
| 285 | Run the migrator |
| 286 | |
Richard Smith | 78e23fd | 2017-04-13 22:39:49 +0000 | [diff] [blame] | 287 | .. option:: -mios-simulator-version-min=<arg>, -miphonesimulator-version-min=<arg> |
| 288 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 289 | .. option:: -mlinker-version=<arg> |
| 290 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 291 | .. option:: -mlittle-endian, -EL |
| 292 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 293 | .. option:: -mllvm <arg> |
| 294 | |
| 295 | Additional arguments to forward to LLVM's option processing |
| 296 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 297 | .. option:: -module-dependency-dir <arg> |
| 298 | |
| 299 | Directory to dump module dependencies to |
| 300 | |
Richard Smith | 78e23fd | 2017-04-13 22:39:49 +0000 | [diff] [blame] | 301 | .. option:: -mtvos-simulator-version-min=<arg>, -mappletvsimulator-version-min=<arg> |
| 302 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 303 | .. option:: -multi\_module |
| 304 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 305 | .. option:: -multiply\_defined <arg> |
| 306 | |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 307 | .. program:: clang1 |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 308 | .. option:: -multiply\_defined\_unused <arg> |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 309 | .. program:: clang |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 310 | |
Richard Smith | 78e23fd | 2017-04-13 22:39:49 +0000 | [diff] [blame] | 311 | .. option:: -mwatchos-simulator-version-min=<arg>, -mwatchsimulator-version-min=<arg> |
| 312 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 313 | .. option:: --no-cuda-version-check |
| 314 | |
| 315 | Don't error out if the detected version of the CUDA install is too low for the requested CUDA gpu architecture. |
| 316 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 317 | .. option:: -no-integrated-cpp, --no-integrated-cpp |
| 318 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 319 | .. option:: -no\_dead\_strip\_inits\_and\_terms |
| 320 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 321 | .. option:: -nobuiltininc |
| 322 | |
| 323 | Disable builtin #include directories |
| 324 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 325 | .. option:: -nocudainc |
| 326 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 327 | .. option:: -nocudalib |
| 328 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 329 | .. option:: -nodefaultlibs |
| 330 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 331 | .. option:: -nofixprebinding |
| 332 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 333 | .. option:: -nolibc |
| 334 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 335 | .. option:: -nomultidefs |
| 336 | |
Craig Topper | d23254a | 2017-07-20 17:52:48 +0000 | [diff] [blame] | 337 | .. option:: -nopie, -no-pie |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 338 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 339 | .. option:: -noprebind |
| 340 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 341 | .. option:: -noseglinkedit |
| 342 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 343 | .. option:: -nostartfiles |
| 344 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 345 | .. option:: -nostdinc, --no-standard-includes |
| 346 | |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 347 | .. program:: clang1 |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 348 | .. option:: -nostdinc++ |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 349 | .. program:: clang |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 350 | |
| 351 | Disable standard #include directories for the C++ standard library |
| 352 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 353 | .. option:: -nostdlib, --no-standard-libraries |
| 354 | |
Boris Kolpackov | b150d24 | 2017-08-30 09:15:53 +0000 | [diff] [blame] | 355 | .. program:: clang1 |
| 356 | .. option:: -nostdlib++ |
| 357 | .. program:: clang |
| 358 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 359 | .. option:: -nostdlibinc |
| 360 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 361 | .. option:: -o<file>, --output <arg>, --output=<arg> |
| 362 | |
| 363 | Write output to <file> |
| 364 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 365 | .. option:: -objcmt-atomic-property |
| 366 | |
| 367 | Make migration to 'atomic' properties |
| 368 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 369 | .. option:: -objcmt-migrate-all |
| 370 | |
| 371 | Enable migration to modern ObjC |
| 372 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 373 | .. option:: -objcmt-migrate-annotation |
| 374 | |
| 375 | Enable migration to property and method annotations |
| 376 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 377 | .. option:: -objcmt-migrate-designated-init |
| 378 | |
| 379 | Enable migration to infer NS\_DESIGNATED\_INITIALIZER for initializer methods |
| 380 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 381 | .. option:: -objcmt-migrate-instancetype |
| 382 | |
| 383 | Enable migration to infer instancetype for method result type |
| 384 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 385 | .. option:: -objcmt-migrate-literals |
| 386 | |
| 387 | Enable migration to modern ObjC literals |
| 388 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 389 | .. option:: -objcmt-migrate-ns-macros |
| 390 | |
| 391 | Enable migration to NS\_ENUM/NS\_OPTIONS macros |
| 392 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 393 | .. option:: -objcmt-migrate-property |
| 394 | |
| 395 | Enable migration to modern ObjC property |
| 396 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 397 | .. option:: -objcmt-migrate-property-dot-syntax |
| 398 | |
| 399 | Enable migration of setter/getter messages to property-dot syntax |
| 400 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 401 | .. option:: -objcmt-migrate-protocol-conformance |
| 402 | |
| 403 | Enable migration to add protocol conformance on classes |
| 404 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 405 | .. option:: -objcmt-migrate-readonly-property |
| 406 | |
| 407 | Enable migration to modern ObjC readonly property |
| 408 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 409 | .. option:: -objcmt-migrate-readwrite-property |
| 410 | |
| 411 | Enable migration to modern ObjC readwrite property |
| 412 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 413 | .. option:: -objcmt-migrate-subscripting |
| 414 | |
| 415 | Enable migration to modern ObjC subscripting |
| 416 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 417 | .. option:: -objcmt-ns-nonatomic-iosonly |
| 418 | |
| 419 | Enable migration to use NS\_NONATOMIC\_IOSONLY macro for setting property's 'atomic' attribute |
| 420 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 421 | .. option:: -objcmt-returns-innerpointer-property |
| 422 | |
| 423 | Enable migration to annotate property with NS\_RETURNS\_INNER\_POINTER |
| 424 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 425 | .. option:: -objcmt-whitelist-dir-path=<arg>, -objcmt-white-list-dir-path=<arg> |
| 426 | |
| 427 | Only modify files with a filename contained in the provided directory path |
| 428 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 429 | .. option:: -object |
| 430 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 431 | .. option:: -p, --profile |
| 432 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 433 | .. option:: -pagezero\_size<arg> |
| 434 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 435 | .. option:: -pg |
| 436 | |
| 437 | Enable mcount instrumentation |
| 438 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 439 | .. option:: -pie |
| 440 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 441 | .. option:: -pipe, --pipe |
| 442 | |
| 443 | Use pipes between commands, when possible |
| 444 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 445 | .. option:: -prebind |
| 446 | |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 447 | .. program:: clang1 |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 448 | .. option:: -prebind\_all\_twolevel\_modules |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 449 | .. program:: clang |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 450 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 451 | .. option:: -preload |
| 452 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 453 | .. option:: --print-diagnostic-categories |
| 454 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 455 | .. option:: -print-file-name=<file>, --print-file-name=<file>, --print-file-name <arg> |
| 456 | |
| 457 | Print the full library path of <file> |
| 458 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 459 | .. option:: -print-ivar-layout |
| 460 | |
| 461 | Enable Objective-C Ivar layout bitmap print trace |
| 462 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 463 | .. option:: -print-libgcc-file-name, --print-libgcc-file-name |
| 464 | |
| 465 | Print the library path for the currently used compiler runtime library ("libgcc.a" or "libclang\_rt.builtins.\*.a") |
| 466 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 467 | .. option:: -print-multi-directory, --print-multi-directory |
| 468 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 469 | .. option:: -print-multi-lib, --print-multi-lib |
| 470 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 471 | .. option:: -print-prog-name=<name>, --print-prog-name=<name>, --print-prog-name <arg> |
| 472 | |
| 473 | Print the full program path of <name> |
| 474 | |
Richard Smith | 78e23fd | 2017-04-13 22:39:49 +0000 | [diff] [blame] | 475 | .. option:: -print-resource-dir, --print-resource-dir |
| 476 | |
| 477 | Print the resource directory pathname |
| 478 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 479 | .. option:: -print-search-dirs, --print-search-dirs |
| 480 | |
| 481 | Print the paths used for finding libraries and programs |
| 482 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 483 | .. option:: -private\_bundle |
| 484 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 485 | .. option:: -pthread, -no-pthread |
| 486 | |
| 487 | Support POSIX threads in generated code |
| 488 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 489 | .. option:: -pthreads |
| 490 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 491 | .. option:: -rdynamic |
| 492 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 493 | .. option:: -read\_only\_relocs <arg> |
| 494 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 495 | .. option:: -relocatable-pch, --relocatable-pch |
| 496 | |
| 497 | Whether to build a relocatable precompiled header |
| 498 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 499 | .. option:: -remap |
| 500 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 501 | .. option:: -rewrite-legacy-objc |
| 502 | |
| 503 | Rewrite Legacy Objective-C source to C++ |
| 504 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 505 | .. option:: -rtlib=<arg>, --rtlib=<arg>, --rtlib <arg> |
| 506 | |
| 507 | Compiler runtime library to use |
| 508 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 509 | .. option:: -save-stats=<arg>, --save-stats=<arg>, -save-stats (equivalent to -save-stats=cwd), --save-stats (equivalent to -save-stats=cwd) |
| 510 | |
| 511 | Save llvm statistics. |
| 512 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 513 | .. option:: -save-temps=<arg>, --save-temps=<arg>, -save-temps (equivalent to -save-temps=cwd), --save-temps (equivalent to -save-temps=cwd) |
| 514 | |
| 515 | Save intermediate compilation results. |
| 516 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 517 | .. option:: -sectalign <arg1> <arg2> <arg3> |
| 518 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 519 | .. option:: -sectcreate <arg1> <arg2> <arg3> |
| 520 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 521 | .. option:: -sectobjectsymbols <arg1> <arg2> |
| 522 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 523 | .. option:: -sectorder <arg1> <arg2> <arg3> |
| 524 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 525 | .. option:: -seg1addr<arg> |
| 526 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 527 | .. option:: -seg\_addr\_table <arg> |
| 528 | |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 529 | .. program:: clang1 |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 530 | .. option:: -seg\_addr\_table\_filename <arg> |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 531 | .. program:: clang |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 532 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 533 | .. option:: -segaddr <arg1> <arg2> |
| 534 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 535 | .. option:: -segcreate <arg1> <arg2> <arg3> |
| 536 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 537 | .. option:: -seglinkedit |
| 538 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 539 | .. option:: -segprot <arg1> <arg2> <arg3> |
| 540 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 541 | .. option:: -segs\_read\_<arg> |
| 542 | |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 543 | .. program:: clang1 |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 544 | .. option:: -segs\_read\_only\_addr <arg> |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 545 | .. program:: clang |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 546 | |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 547 | .. program:: clang2 |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 548 | .. option:: -segs\_read\_write\_addr <arg> |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 549 | .. program:: clang |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 550 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 551 | .. option:: -serialize-diagnostics <arg>, --serialize-diagnostics <arg> |
| 552 | |
| 553 | Serialize compiler diagnostics to a file |
| 554 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 555 | .. option:: -shared, --shared |
| 556 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 557 | .. option:: -shared-libgcc |
| 558 | |
Craig Topper | 1641866 | 2017-11-20 18:07:43 +0000 | [diff] [blame] | 559 | .. option:: -shared-libsan, -shared-libasan |
| 560 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 561 | .. option:: -single\_module |
| 562 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 563 | .. option:: -specs=<arg>, --specs=<arg> |
| 564 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 565 | .. option:: -static, --static |
| 566 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 567 | .. option:: -static-libgcc |
| 568 | |
Craig Topper | 1641866 | 2017-11-20 18:07:43 +0000 | [diff] [blame] | 569 | .. option:: -static-libsan |
| 570 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 571 | .. option:: -static-libstdc++ |
| 572 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 573 | .. option:: -std-default=<arg> |
| 574 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 575 | .. option:: -stdlib=<arg>, --stdlib=<arg>, --stdlib <arg> |
| 576 | |
| 577 | C++ standard library to use |
| 578 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 579 | .. option:: -sub\_library<arg> |
| 580 | |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 581 | .. program:: clang1 |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 582 | .. option:: -sub\_umbrella<arg> |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 583 | .. program:: clang |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 584 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 585 | .. option:: --sysroot=<arg>, --sysroot <arg> |
| 586 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 587 | .. option:: --target-help |
| 588 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 589 | .. option:: --target=<arg>, -target <arg> |
| 590 | |
| 591 | Generate code for the given target |
| 592 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 593 | .. option:: -time |
| 594 | |
| 595 | Time individual commands |
| 596 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 597 | .. option:: -traditional, --traditional |
| 598 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 599 | .. option:: -traditional-cpp, --traditional-cpp |
| 600 | |
| 601 | Enable some traditional CPP emulation |
| 602 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 603 | .. option:: -twolevel\_namespace |
| 604 | |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 605 | .. program:: clang1 |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 606 | .. option:: -twolevel\_namespace\_hints |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 607 | .. program:: clang |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 608 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 609 | .. option:: -umbrella <arg> |
| 610 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 611 | .. option:: -unexported\_symbols\_list <arg> |
| 612 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 613 | .. option:: -v, --verbose |
| 614 | |
| 615 | Show commands to run and use verbose output |
| 616 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 617 | .. option:: --verify-debug-info |
| 618 | |
| 619 | Verify the binary representation of debug output |
| 620 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 621 | .. option:: --version |
| 622 | |
Craig Topper | 1641866 | 2017-11-20 18:07:43 +0000 | [diff] [blame] | 623 | Print version information |
| 624 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 625 | .. option:: -w, --no-warnings |
| 626 | |
| 627 | Suppress all warnings |
| 628 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 629 | .. option:: -weak-l<arg> |
| 630 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 631 | .. option:: -weak\_framework <arg> |
| 632 | |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 633 | .. program:: clang1 |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 634 | .. option:: -weak\_library <arg> |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 635 | .. program:: clang |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 636 | |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 637 | .. program:: clang2 |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 638 | .. option:: -weak\_reference\_mismatches <arg> |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 639 | .. program:: clang |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 640 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 641 | .. option:: -whatsloaded |
| 642 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 643 | .. option:: -whyload |
| 644 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 645 | .. option:: -working-directory<arg>, -working-directory=<arg> |
| 646 | |
| 647 | Resolve file paths relative to the specified directory |
| 648 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 649 | .. option:: -x<language>, --language <arg>, --language=<arg> |
| 650 | |
| 651 | Treat subsequent input files as having type <language> |
| 652 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 653 | .. option:: -y<arg> |
| 654 | |
| 655 | Actions |
| 656 | ======= |
| 657 | The action to perform on the input. |
| 658 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 659 | .. option:: -E, --preprocess |
| 660 | |
| 661 | Only run the preprocessor |
| 662 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 663 | .. option:: -S, --assemble |
| 664 | |
| 665 | Only run preprocess and compilation steps |
| 666 | |
Richard Smith | c5b2e00 | 2017-01-27 02:08:37 +0000 | [diff] [blame] | 667 | .. option:: -c, --compile |
| 668 | |
| 669 | Only run preprocess, compile, and assemble steps |
| 670 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 671 | .. option:: -emit-llvm |
| 672 | |
| 673 | Use the LLVM representation for assembler and object files |
| 674 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 675 | .. option:: -fsyntax-only |
| 676 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 677 | .. option:: -module-file-info |
| 678 | |
| 679 | Provide information about a particular module file |
| 680 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 681 | .. option:: --precompile |
| 682 | |
| 683 | Only precompile the input |
| 684 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 685 | .. option:: -rewrite-objc |
| 686 | |
| 687 | Rewrite Objective-C source to C++ |
| 688 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 689 | .. option:: -verify-pch |
| 690 | |
| 691 | Load and verify that a pre-compiled header file is not stale |
| 692 | |
| 693 | Compilation flags |
| 694 | ================= |
| 695 | |
| 696 | Flags controlling the behavior of Clang during compilation. These flags have |
| 697 | no effect during actions that do not perform compilation. |
| 698 | |
Richard Smith | c5b2e00 | 2017-01-27 02:08:37 +0000 | [diff] [blame] | 699 | .. option:: -Xassembler <arg> |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 700 | |
Richard Smith | c5b2e00 | 2017-01-27 02:08:37 +0000 | [diff] [blame] | 701 | Pass <arg> to the assembler |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 702 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 703 | .. option:: -Xclang <arg> |
| 704 | |
| 705 | Pass <arg> to the clang compiler |
| 706 | |
Boris Kolpackov | b150d24 | 2017-08-30 09:15:53 +0000 | [diff] [blame] | 707 | .. option:: -fclang-abi-compat=<version> |
| 708 | |
| 709 | Attempt to match the ABI of Clang <version> |
| 710 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 711 | .. option:: -fcomment-block-commands=<arg>,<arg2>... |
| 712 | |
| 713 | Treat each comma separated argument in <arg> as a documentation comment block command |
| 714 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 715 | .. option:: -fdeclspec, -fno-declspec |
| 716 | |
| 717 | Allow \_\_declspec as a keyword |
| 718 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 719 | .. option:: -fdepfile-entry=<arg> |
| 720 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 721 | .. option:: -fdiagnostics-fixit-info, -fno-diagnostics-fixit-info |
| 722 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 723 | .. option:: -fdiagnostics-format=<arg> |
| 724 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 725 | .. option:: -fdiagnostics-parseable-fixits |
| 726 | |
| 727 | Print fix-its in machine parseable form |
| 728 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 729 | .. option:: -fdiagnostics-print-source-range-info |
| 730 | |
| 731 | Print source range spans in numeric form |
| 732 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 733 | .. option:: -fdiagnostics-show-category=<arg> |
| 734 | |
Jonas Hahnfeld | a180fc4 | 2018-02-22 17:10:28 +0000 | [diff] [blame] | 735 | .. option:: -fdiscard-value-names, -fno-discard-value-names |
| 736 | |
| 737 | Discard value names in LLVM IR |
| 738 | |
| 739 | .. option:: -fexperimental-isel, -fno-experimental-isel |
| 740 | |
| 741 | Enables the experimental global instruction selector |
| 742 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 743 | .. option:: -fexperimental-new-pass-manager, -fno-experimental-new-pass-manager |
| 744 | |
| 745 | Enables an experimental new pass manager in LLVM. |
| 746 | |
Craig Topper | 1641866 | 2017-11-20 18:07:43 +0000 | [diff] [blame] | 747 | .. option:: -ffine-grained-bitfield-accesses, -fno-fine-grained-bitfield-accesses |
| 748 | |
| 749 | Use separate accesses for bitfields with legal widths and alignments. |
| 750 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 751 | .. option:: -finline-functions, -fno-inline-functions |
| 752 | |
| 753 | Inline suitable functions |
| 754 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 755 | .. option:: -finline-hint-functions |
| 756 | |
| 757 | Inline functions which are (explicitly or implicitly) marked inline |
| 758 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 759 | .. option:: -fno-crash-diagnostics |
| 760 | |
Richard Smith | 78e23fd | 2017-04-13 22:39:49 +0000 | [diff] [blame] | 761 | Disable auto-generation of preprocessed source files and a script for reproduction during a clang crash |
| 762 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 763 | .. option:: -fno-sanitize-blacklist |
| 764 | |
| 765 | Don't use blacklist file for sanitizers |
| 766 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 767 | .. option:: -fparse-all-comments |
| 768 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 769 | .. option:: -fsanitize-address-field-padding=<arg> |
| 770 | |
| 771 | Level of field padding for AddressSanitizer |
| 772 | |
Craig Topper | d23254a | 2017-07-20 17:52:48 +0000 | [diff] [blame] | 773 | .. option:: -fsanitize-address-globals-dead-stripping |
| 774 | |
| 775 | Enable linker dead stripping of globals in AddressSanitizer |
| 776 | |
Jonas Hahnfeld | a180fc4 | 2018-02-22 17:10:28 +0000 | [diff] [blame] | 777 | .. option:: -fsanitize-address-poison-class-member-array-new-cookie, -fno-sanitize-address-poison-class-member-array-new-cookie |
| 778 | |
| 779 | Enable poisoning array cookies when using class member operator new\[\] in AddressSanitizer |
| 780 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 781 | .. option:: -fsanitize-address-use-after-scope, -fno-sanitize-address-use-after-scope |
| 782 | |
| 783 | Enable use-after-scope detection in AddressSanitizer |
| 784 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 785 | .. option:: -fsanitize-blacklist=<arg> |
| 786 | |
| 787 | Path to blacklist file for sanitizers |
| 788 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 789 | .. option:: -fsanitize-cfi-cross-dso, -fno-sanitize-cfi-cross-dso |
| 790 | |
| 791 | Enable control flow integrity (CFI) checks for cross-DSO calls. |
| 792 | |
Vlad Tsyrklevich | 634c601 | 2017-10-31 22:39:44 +0000 | [diff] [blame] | 793 | .. option:: -fsanitize-cfi-icall-generalize-pointers |
| 794 | |
Craig Topper | 1641866 | 2017-11-20 18:07:43 +0000 | [diff] [blame] | 795 | Generalize pointers in CFI indirect call type signature checks |
Vlad Tsyrklevich | 634c601 | 2017-10-31 22:39:44 +0000 | [diff] [blame] | 796 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 797 | .. option:: -fsanitize-coverage=<arg1>,<arg2>..., -fno-sanitize-coverage=<arg1>,<arg2>... |
| 798 | |
| 799 | Specify the type of coverage instrumentation for Sanitizers |
| 800 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 801 | .. option:: -fsanitize-link-c++-runtime |
| 802 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 803 | .. option:: -fsanitize-memory-track-origins, -fno-sanitize-memory-track-origins |
| 804 | |
| 805 | Enable origins tracking in MemorySanitizer |
| 806 | |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 807 | .. program:: clang1 |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 808 | .. option:: -fsanitize-memory-track-origins=<arg> |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 809 | .. program:: clang |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 810 | |
| 811 | Enable origins tracking in MemorySanitizer |
| 812 | |
Craig Topper | 1641866 | 2017-11-20 18:07:43 +0000 | [diff] [blame] | 813 | .. option:: -fsanitize-memory-use-after-dtor, -fno-sanitize-memory-use-after-dtor |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 814 | |
| 815 | Enable use-after-destroy detection in MemorySanitizer |
| 816 | |
Boris Kolpackov | b150d24 | 2017-08-30 09:15:53 +0000 | [diff] [blame] | 817 | .. option:: -fsanitize-minimal-runtime, -fno-sanitize-minimal-runtime |
| 818 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 819 | .. option:: -fsanitize-recover, -fno-sanitize-recover |
| 820 | |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 821 | .. program:: clang1 |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 822 | .. option:: -fsanitize-recover=<arg1>,<arg2>..., -fno-sanitize-recover=<arg1>,<arg2>... |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 823 | .. program:: clang |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 824 | |
| 825 | Enable recovery for specified sanitizers |
| 826 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 827 | .. option:: -fsanitize-stats, -fno-sanitize-stats |
| 828 | |
| 829 | Enable sanitizer statistics gathering. |
| 830 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 831 | .. option:: -fsanitize-thread-atomics, -fno-sanitize-thread-atomics |
| 832 | |
| 833 | Enable atomic operations instrumentation in ThreadSanitizer (default) |
| 834 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 835 | .. option:: -fsanitize-thread-func-entry-exit, -fno-sanitize-thread-func-entry-exit |
| 836 | |
| 837 | Enable function entry/exit instrumentation in ThreadSanitizer (default) |
| 838 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 839 | .. option:: -fsanitize-thread-memory-access, -fno-sanitize-thread-memory-access |
| 840 | |
| 841 | Enable memory access instrumentation in ThreadSanitizer (default) |
| 842 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 843 | .. option:: -fsanitize-trap=<arg1>,<arg2>..., -fno-sanitize-trap=<arg1>,<arg2>... |
| 844 | |
| 845 | Enable trapping for specified sanitizers |
| 846 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 847 | .. option:: -fsanitize-undefined-strip-path-components=<number> |
| 848 | |
| 849 | Strip (or keep only, if negative) a given number of path components when emitting check metadata. |
| 850 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 851 | .. option:: -fsanitize-undefined-trap-on-error, -fno-sanitize-undefined-trap-on-error |
| 852 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 853 | .. option:: -fsanitize=<check>,<arg2>..., -fno-sanitize=<arg1>,<arg2>... |
| 854 | |
| 855 | Turn on runtime checks for various forms of undefined or suspicious behavior. See user manual for available checks |
| 856 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 857 | .. option:: --param <arg>, --param=<arg> |
| 858 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 859 | .. option:: -std=<arg>, --std=<arg>, --std <arg> |
| 860 | |
| 861 | Language standard to compile for |
| 862 | |
Richard Smith | c5b2e00 | 2017-01-27 02:08:37 +0000 | [diff] [blame] | 863 | Preprocessor flags |
| 864 | ~~~~~~~~~~~~~~~~~~ |
| 865 | |
| 866 | Flags controlling the behavior of the Clang preprocessor. |
| 867 | |
| 868 | .. option:: -C, --comments |
| 869 | |
| 870 | Include comments in preprocessed output |
| 871 | |
| 872 | .. option:: -CC, --comments-in-macros |
| 873 | |
| 874 | Include comments from within macros in preprocessed output |
| 875 | |
| 876 | .. option:: -D<macro>=<value>, --define-macro <arg>, --define-macro=<arg> |
| 877 | |
| 878 | Define <macro> to <value> (or 1 if <value> omitted) |
| 879 | |
| 880 | .. option:: -H, --trace-includes |
| 881 | |
| 882 | Show header includes and nesting depth |
| 883 | |
| 884 | .. option:: -P, --no-line-commands |
| 885 | |
| 886 | Disable linemarker output in -E mode |
| 887 | |
| 888 | .. option:: -U<macro>, --undefine-macro <arg>, --undefine-macro=<arg> |
| 889 | |
| 890 | Undefine macro <macro> |
| 891 | |
| 892 | .. option:: -Wp,<arg>,<arg2>... |
| 893 | |
| 894 | Pass the comma separated arguments in <arg> to the preprocessor |
| 895 | |
| 896 | .. option:: -Xpreprocessor <arg> |
| 897 | |
| 898 | Pass <arg> to the preprocessor |
| 899 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 900 | Include path management |
Richard Smith | c5b2e00 | 2017-01-27 02:08:37 +0000 | [diff] [blame] | 901 | ----------------------- |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 902 | |
| 903 | Flags controlling how ``#include``\s are resolved to files. |
| 904 | |
Richard Smith | c5b2e00 | 2017-01-27 02:08:37 +0000 | [diff] [blame] | 905 | .. option:: -I<dir>, --include-directory <arg>, --include-directory=<arg> |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 906 | |
| 907 | Add directory to include search path |
| 908 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 909 | .. option:: -I-, --include-barrier |
| 910 | |
Richard Smith | c5b2e00 | 2017-01-27 02:08:37 +0000 | [diff] [blame] | 911 | Restrict all prior -I flags to double-quoted inclusion and remove current directory from include path |
| 912 | |
Jonas Hahnfeld | a180fc4 | 2018-02-22 17:10:28 +0000 | [diff] [blame] | 913 | .. option:: --cuda-path-ignore-env |
| 914 | |
| 915 | Ignore environment variables to detect CUDA installation |
| 916 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 917 | .. option:: --cuda-path=<arg> |
| 918 | |
| 919 | CUDA installation path |
| 920 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 921 | .. option:: -cxx-isystem<directory> |
| 922 | |
| 923 | Add directory to the C++ SYSTEM include search path |
| 924 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 925 | .. option:: -fbuild-session-file=<file> |
| 926 | |
| 927 | Use the last modification time of <file> as the build session timestamp |
| 928 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 929 | .. option:: -fbuild-session-timestamp=<time since Epoch in seconds> |
| 930 | |
| 931 | Time when the current build session started |
| 932 | |
Boris Kolpackov | b150d24 | 2017-08-30 09:15:53 +0000 | [diff] [blame] | 933 | .. option:: -fmodule-file=\[<name>=\]<file> |
| 934 | |
| 935 | Specify the mapping of module name to precompiled module file, or load a module file if name is omitted. |
| 936 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 937 | .. option:: -fmodules-cache-path=<directory> |
| 938 | |
| 939 | Specify the module cache path |
| 940 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 941 | .. option:: -fmodules-disable-diagnostic-validation |
| 942 | |
| 943 | Disable validation of the diagnostic options when loading the module |
| 944 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 945 | .. option:: -fmodules-prune-after=<seconds> |
| 946 | |
| 947 | Specify the interval (in seconds) after which a module file will be considered unused |
| 948 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 949 | .. option:: -fmodules-prune-interval=<seconds> |
| 950 | |
| 951 | Specify the interval (in seconds) between attempts to prune the module cache |
| 952 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 953 | .. option:: -fmodules-user-build-path <directory> |
| 954 | |
| 955 | Specify the module user build path |
| 956 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 957 | .. option:: -fmodules-validate-once-per-build-session |
| 958 | |
| 959 | Don't verify input files for the modules if the module has been successfully validated or loaded during this build session |
| 960 | |
Jonas Hahnfeld | 06039e8 | 2018-04-20 13:26:03 +0000 | [diff] [blame] | 961 | .. option:: -fmodules-validate-system-headers, -fno-modules-validate-system-headers |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 962 | |
| 963 | Validate the system headers that a module depends on when loading the module |
| 964 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 965 | .. option:: -fprebuilt-module-path=<directory> |
| 966 | |
| 967 | Specify the prebuilt module path |
| 968 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 969 | .. option:: -idirafter<arg>, --include-directory-after <arg>, --include-directory-after=<arg> |
| 970 | |
| 971 | Add directory to AFTER include search path |
| 972 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 973 | .. option:: -iframework<arg> |
| 974 | |
| 975 | Add directory to SYSTEM framework search path |
| 976 | |
Richard Smith | 78e23fd | 2017-04-13 22:39:49 +0000 | [diff] [blame] | 977 | .. option:: -iframeworkwithsysroot<directory> |
| 978 | |
| 979 | Add directory to SYSTEM framework search path, absolute paths are relative to -isysroot |
| 980 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 981 | .. option:: -imacros<file>, --imacros<file>, --imacros=<arg> |
| 982 | |
| 983 | Include macros from file before parsing |
| 984 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 985 | .. option:: -include<file>, --include<file>, --include=<arg> |
| 986 | |
| 987 | Include file before parsing |
| 988 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 989 | .. option:: -include-pch <file> |
| 990 | |
| 991 | Include precompiled header file |
| 992 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 993 | .. option:: -iprefix<dir>, --include-prefix <arg>, --include-prefix=<arg> |
| 994 | |
| 995 | Set the -iwithprefix/-iwithprefixbefore prefix |
| 996 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 997 | .. option:: -iquote<directory> |
| 998 | |
| 999 | Add directory to QUOTE include search path |
| 1000 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1001 | .. option:: -isysroot<dir> |
| 1002 | |
| 1003 | Set the system root directory (usually /) |
| 1004 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1005 | .. option:: -isystem<directory> |
| 1006 | |
| 1007 | Add directory to SYSTEM include search path |
| 1008 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1009 | .. option:: -isystem-after<directory> |
| 1010 | |
| 1011 | Add directory to end of the SYSTEM include search path |
| 1012 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1013 | .. option:: -ivfsoverlay<arg> |
| 1014 | |
| 1015 | Overlay the virtual filesystem described by file over the real file system |
| 1016 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1017 | .. option:: -iwithprefix<dir>, --include-with-prefix <arg>, --include-with-prefix-after <arg>, --include-with-prefix-after=<arg>, --include-with-prefix=<arg> |
| 1018 | |
| 1019 | Set directory to SYSTEM include search path with prefix |
| 1020 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1021 | .. option:: -iwithprefixbefore<dir>, --include-with-prefix-before <arg>, --include-with-prefix-before=<arg> |
| 1022 | |
| 1023 | Set directory to include search path with prefix |
| 1024 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1025 | .. option:: -iwithsysroot<directory> |
| 1026 | |
| 1027 | Add directory to SYSTEM include search path, absolute paths are relative to -isysroot |
| 1028 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1029 | .. option:: --ptxas-path=<arg> |
| 1030 | |
| 1031 | Path to ptxas (used for compiling CUDA code) |
| 1032 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1033 | .. option:: --system-header-prefix=<prefix>, --no-system-header-prefix=<prefix>, --system-header-prefix <arg> |
| 1034 | |
| 1035 | Treat all #include paths starting with <prefix> as including a system header. |
| 1036 | |
| 1037 | Dependency file generation |
Richard Smith | c5b2e00 | 2017-01-27 02:08:37 +0000 | [diff] [blame] | 1038 | -------------------------- |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1039 | |
| 1040 | Flags controlling generation of a dependency file for ``make``-like build |
| 1041 | systems. |
| 1042 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1043 | .. option:: -M, --dependencies |
| 1044 | |
| 1045 | Like -MD, but also implies -E and writes to stdout by default |
| 1046 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1047 | .. option:: -MD, --write-dependencies |
| 1048 | |
| 1049 | Write a depfile containing user and system headers |
| 1050 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1051 | .. option:: -MF<file> |
| 1052 | |
| 1053 | Write depfile output from -MMD, -MD, -MM, or -M to <file> |
| 1054 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1055 | .. option:: -MG, --print-missing-file-dependencies |
| 1056 | |
| 1057 | Add missing headers to depfile |
| 1058 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1059 | .. option:: -MJ<arg> |
| 1060 | |
| 1061 | Write a compilation database entry per input |
| 1062 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1063 | .. option:: -MM, --user-dependencies |
| 1064 | |
| 1065 | Like -MMD, but also implies -E and writes to stdout by default |
| 1066 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1067 | .. option:: -MMD, --write-user-dependencies |
| 1068 | |
| 1069 | Write a depfile containing user headers |
| 1070 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1071 | .. option:: -MP |
| 1072 | |
| 1073 | Create phony target for each dependency (other than main file) |
| 1074 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1075 | .. option:: -MQ<arg> |
| 1076 | |
| 1077 | Specify name of main file output to quote in depfile |
| 1078 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1079 | .. option:: -MT<arg> |
| 1080 | |
| 1081 | Specify name of main file output in depfile |
| 1082 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1083 | .. option:: -MV |
| 1084 | |
| 1085 | Use NMake/Jom format for the depfile |
| 1086 | |
| 1087 | Dumping preprocessor state |
Richard Smith | c5b2e00 | 2017-01-27 02:08:37 +0000 | [diff] [blame] | 1088 | -------------------------- |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1089 | |
| 1090 | Flags allowing the state of the preprocessor to be dumped in various ways. |
| 1091 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1092 | .. option:: -d |
| 1093 | |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 1094 | .. program:: clang1 |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1095 | .. option:: -d<arg> |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 1096 | .. program:: clang |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1097 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1098 | .. option:: -dA |
| 1099 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1100 | .. option:: -dD |
| 1101 | |
| 1102 | Print macro definitions in -E mode in addition to normal output |
| 1103 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1104 | .. option:: -dI |
| 1105 | |
| 1106 | Print include directives in -E mode in addition to normal output |
| 1107 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1108 | .. option:: -dM |
| 1109 | |
| 1110 | Print macro definitions in -E mode instead of normal output |
| 1111 | |
| 1112 | Diagnostic flags |
| 1113 | ~~~~~~~~~~~~~~~~ |
| 1114 | |
| 1115 | Flags controlling which warnings, errors, and remarks Clang will generate. |
| 1116 | See the :doc:`full list of warning and remark flags <DiagnosticsReference>`. |
| 1117 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1118 | .. option:: -R<remark> |
| 1119 | |
| 1120 | Enable the specified remark |
| 1121 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1122 | .. option:: -Rpass-analysis=<arg> |
| 1123 | |
| 1124 | Report transformation analysis from optimization passes whose name matches the given POSIX regular expression |
| 1125 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1126 | .. option:: -Rpass-missed=<arg> |
| 1127 | |
| 1128 | Report missed transformations by optimization passes whose name matches the given POSIX regular expression |
| 1129 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1130 | .. option:: -Rpass=<arg> |
| 1131 | |
| 1132 | Report transformations performed by optimization passes whose name matches the given POSIX regular expression |
| 1133 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1134 | .. option:: -W<warning>, --extra-warnings, --warn-<arg>, --warn-=<arg> |
| 1135 | |
| 1136 | Enable the specified warning |
| 1137 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1138 | .. option:: -Wdeprecated, -Wno-deprecated |
| 1139 | |
Richard Smith | c5b2e00 | 2017-01-27 02:08:37 +0000 | [diff] [blame] | 1140 | Enable warnings for deprecated constructs and define \_\_DEPRECATED |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1141 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1142 | .. option:: -Wnonportable-cfstrings<arg>, -Wno-nonportable-cfstrings<arg> |
| 1143 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1144 | Target-independent compilation options |
| 1145 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1146 | .. option:: -Wframe-larger-than=<arg> |
| 1147 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1148 | .. option:: -fPIC, -fno-PIC |
| 1149 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1150 | .. option:: -fPIE, -fno-PIE |
| 1151 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1152 | .. option:: -faccess-control, -fno-access-control |
| 1153 | |
Jonas Hahnfeld | 06039e8 | 2018-04-20 13:26:03 +0000 | [diff] [blame] | 1154 | .. option:: -falign-functions, -fno-align-functions |
| 1155 | |
| 1156 | .. program:: clang1 |
| 1157 | .. option:: -falign-functions=<arg> |
| 1158 | .. program:: clang |
| 1159 | |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 1160 | .. program:: clang1 |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1161 | .. option:: -faligned-allocation, -faligned-new, -fno-aligned-allocation |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 1162 | .. program:: clang |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1163 | |
| 1164 | Enable C++17 aligned allocation functions |
| 1165 | |
Craig Topper | d23254a | 2017-07-20 17:52:48 +0000 | [diff] [blame] | 1166 | .. option:: -fallow-editor-placeholders, -fno-allow-editor-placeholders |
| 1167 | |
| 1168 | Treat editor placeholders as valid source code |
| 1169 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1170 | .. option:: -fallow-unsupported |
| 1171 | |
Richard Smith | 78e23fd | 2017-04-13 22:39:49 +0000 | [diff] [blame] | 1172 | .. option:: -faltivec, -fno-altivec |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1173 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1174 | .. option:: -fansi-escape-codes |
| 1175 | |
| 1176 | Use ANSI escape codes for diagnostics |
| 1177 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1178 | .. option:: -fapple-kext, -findirect-virtual-calls, -fterminated-vtables |
| 1179 | |
| 1180 | Use Apple's kernel extensions ABI |
| 1181 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1182 | .. option:: -fapple-pragma-pack, -fno-apple-pragma-pack |
| 1183 | |
| 1184 | Enable Apple gcc-compatible #pragma pack handling |
| 1185 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1186 | .. option:: -fapplication-extension, -fno-application-extension |
| 1187 | |
| 1188 | Restrict code to those available for App Extensions |
| 1189 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1190 | .. option:: -fasm, -fno-asm |
| 1191 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1192 | .. option:: -fasm-blocks, -fno-asm-blocks |
| 1193 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1194 | .. option:: -fassociative-math, -fno-associative-math |
| 1195 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1196 | .. option:: -fassume-sane-operator-new, -fno-assume-sane-operator-new |
| 1197 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1198 | .. option:: -fast |
| 1199 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1200 | .. option:: -fastcp |
| 1201 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1202 | .. option:: -fastf |
| 1203 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1204 | .. option:: -fasynchronous-unwind-tables, -fno-asynchronous-unwind-tables |
| 1205 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1206 | .. option:: -fautolink, -fno-autolink |
| 1207 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1208 | .. option:: -fblocks, -fno-blocks |
| 1209 | |
| 1210 | Enable the 'blocks' language feature |
| 1211 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1212 | .. option:: -fbootclasspath=<arg>, --bootclasspath <arg>, --bootclasspath=<arg> |
| 1213 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1214 | .. option:: -fborland-extensions, -fno-borland-extensions |
| 1215 | |
| 1216 | Accept non-standard constructs supported by the Borland compiler |
| 1217 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1218 | .. option:: -fbracket-depth=<arg> |
| 1219 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1220 | .. option:: -fbuiltin, -fno-builtin |
| 1221 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1222 | .. option:: -fbuiltin-module-map |
| 1223 | |
| 1224 | Load the clang builtins module map file. |
| 1225 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1226 | .. option:: -fcaret-diagnostics, -fno-caret-diagnostics |
| 1227 | |
Craig Topper | 596527b | 2018-01-23 18:40:15 +0000 | [diff] [blame] | 1228 | .. option:: -fcf-protection=<arg>, -fcf-protection (equivalent to -fcf-protection=full) |
| 1229 | |
| 1230 | Instrument control-flow architecture protection. Options: return, branch, full, none. |
| 1231 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1232 | .. option:: -fclasspath=<arg>, --CLASSPATH <arg>, --CLASSPATH=<arg>, --classpath <arg>, --classpath=<arg> |
| 1233 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1234 | .. option:: -fcolor-diagnostics, -fno-color-diagnostics |
| 1235 | |
| 1236 | Use colors in diagnostics |
| 1237 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1238 | .. option:: -fcommon, -fno-common |
| 1239 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1240 | .. option:: -fcompile-resource=<arg>, --resource <arg>, --resource=<arg> |
| 1241 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1242 | .. option:: -fconstant-cfstrings, -fno-constant-cfstrings |
| 1243 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1244 | .. option:: -fconstant-string-class=<arg> |
| 1245 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1246 | .. option:: -fconstexpr-backtrace-limit=<arg> |
| 1247 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1248 | .. option:: -fconstexpr-depth=<arg> |
| 1249 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1250 | .. option:: -fconstexpr-steps=<arg> |
| 1251 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1252 | .. option:: -fcoroutines-ts, -fno-coroutines-ts |
| 1253 | |
| 1254 | Enable support for the C++ Coroutines TS |
| 1255 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1256 | .. option:: -fcoverage-mapping, -fno-coverage-mapping |
| 1257 | |
| 1258 | Generate coverage mapping to enable code coverage analysis |
| 1259 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1260 | .. option:: -fcreate-profile |
| 1261 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1262 | .. option:: -fcxx-exceptions, -fno-cxx-exceptions |
| 1263 | |
| 1264 | Enable C++ exceptions |
| 1265 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1266 | .. option:: -fcxx-modules, -fno-cxx-modules |
| 1267 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1268 | .. option:: -fdata-sections, -fno-data-sections |
| 1269 | |
| 1270 | Place each data in its own section (ELF Only) |
| 1271 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1272 | .. option:: -fdebug-info-for-profiling, -fno-debug-info-for-profiling |
| 1273 | |
| 1274 | Emit extra debug info to make sample profile more accurate. |
| 1275 | |
Richard Smith | 78e23fd | 2017-04-13 22:39:49 +0000 | [diff] [blame] | 1276 | .. option:: -fdebug-macro, -fno-debug-macro |
| 1277 | |
| 1278 | Emit macro debug information |
| 1279 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1280 | .. option:: -fdebug-pass-arguments |
| 1281 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1282 | .. option:: -fdebug-pass-structure |
| 1283 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1284 | .. option:: -fdebug-prefix-map=<arg> |
| 1285 | |
| 1286 | remap file source paths in debug info |
| 1287 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1288 | .. option:: -fdebug-types-section, -fno-debug-types-section |
| 1289 | |
| 1290 | Place debug types in their own section (ELF Only) |
| 1291 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1292 | .. option:: -fdelayed-template-parsing, -fno-delayed-template-parsing |
| 1293 | |
| 1294 | Parse templated function definitions at the end of the translation unit |
| 1295 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1296 | .. option:: -fdenormal-fp-math=<arg> |
| 1297 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1298 | .. option:: -fdiagnostics-absolute-paths |
| 1299 | |
| 1300 | Print absolute paths in diagnostics |
| 1301 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1302 | .. option:: -fdiagnostics-color, -fno-diagnostics-color |
| 1303 | |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 1304 | .. program:: clang1 |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1305 | .. option:: -fdiagnostics-color=<arg> |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 1306 | .. program:: clang |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1307 | |
Craig Topper | d23254a | 2017-07-20 17:52:48 +0000 | [diff] [blame] | 1308 | .. option:: -fdiagnostics-hotness-threshold=<number> |
| 1309 | |
| 1310 | Prevent optimization remarks from being output if they do not have at least this profile count |
| 1311 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1312 | .. option:: -fdiagnostics-show-hotness, -fno-diagnostics-show-hotness |
| 1313 | |
| 1314 | Enable profile hotness information in diagnostic line |
| 1315 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1316 | .. option:: -fdiagnostics-show-note-include-stack, -fno-diagnostics-show-note-include-stack |
| 1317 | |
| 1318 | Display include stacks for diagnostic notes |
| 1319 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1320 | .. option:: -fdiagnostics-show-option, -fno-diagnostics-show-option |
| 1321 | |
| 1322 | Print option name with mappable diagnostics |
| 1323 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1324 | .. option:: -fdiagnostics-show-template-tree |
| 1325 | |
| 1326 | Print a template comparison tree for differing templates |
| 1327 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1328 | .. option:: -fdollars-in-identifiers, -fno-dollars-in-identifiers |
| 1329 | |
| 1330 | Allow '$' in identifiers |
| 1331 | |
Craig Topper | 1641866 | 2017-11-20 18:07:43 +0000 | [diff] [blame] | 1332 | .. option:: -fdouble-square-bracket-attributes, -fno-double-square-bracket-attributes |
| 1333 | |
| 1334 | Enable '\[\[\]\]' attributes in all C and C++ language modes |
| 1335 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1336 | .. option:: -fdwarf-directory-asm, -fno-dwarf-directory-asm |
| 1337 | |
Craig Topper | 188252d | 2017-12-11 21:09:16 +0000 | [diff] [blame] | 1338 | .. option:: -fdwarf-exceptions |
| 1339 | |
| 1340 | Use DWARF style exceptions |
| 1341 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1342 | .. option:: -felide-constructors, -fno-elide-constructors |
| 1343 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1344 | .. option:: -feliminate-unused-debug-symbols, -fno-eliminate-unused-debug-symbols |
| 1345 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1346 | .. option:: -fembed-bitcode=<option>, -fembed-bitcode (equivalent to -fembed-bitcode=all), -fembed-bitcode-marker (equivalent to -fembed-bitcode=marker) |
| 1347 | |
| 1348 | Embed LLVM bitcode (option: off, all, bitcode, marker) |
| 1349 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1350 | .. option:: -femit-all-decls |
| 1351 | |
| 1352 | Emit all declarations, even if unused |
| 1353 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1354 | .. option:: -femulated-tls, -fno-emulated-tls |
| 1355 | |
| 1356 | Use emutls functions to access thread\_local variables |
| 1357 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1358 | .. option:: -fencoding=<arg>, --encoding <arg>, --encoding=<arg> |
| 1359 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1360 | .. option:: -ferror-limit=<arg> |
| 1361 | |
Jonas Hahnfeld | 06039e8 | 2018-04-20 13:26:03 +0000 | [diff] [blame] | 1362 | .. option:: -fescaping-block-tail-calls, -fno-escaping-block-tail-calls |
| 1363 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1364 | .. option:: -fexceptions, -fno-exceptions |
| 1365 | |
| 1366 | Enable support for exception handling |
| 1367 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1368 | .. option:: -fexec-charset=<arg> |
| 1369 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1370 | .. option:: -fextdirs=<arg>, --extdirs <arg>, --extdirs=<arg> |
| 1371 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1372 | .. option:: -ffast-math, -fno-fast-math |
| 1373 | |
| 1374 | Allow aggressive, lossy floating-point optimizations |
| 1375 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1376 | .. option:: -ffinite-math-only, -fno-finite-math-only |
| 1377 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1378 | .. option:: -ffor-scope, -fno-for-scope |
| 1379 | |
Jonas Hahnfeld | 06039e8 | 2018-04-20 13:26:03 +0000 | [diff] [blame] | 1380 | .. option:: -fforce-enable-int128, -fno-force-enable-int128 |
| 1381 | |
| 1382 | Enable support for int128\_t type |
| 1383 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1384 | .. option:: -ffp-contract=<arg> |
| 1385 | |
| 1386 | Form fused FP ops (e.g. FMAs): fast (everywhere) \| on (according to FP\_CONTRACT pragma, default) \| off (never fuse) |
| 1387 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1388 | .. option:: -ffreestanding |
| 1389 | |
| 1390 | Assert that the compilation takes place in a freestanding environment |
| 1391 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1392 | .. option:: -ffunction-sections, -fno-function-sections |
| 1393 | |
| 1394 | Place each function in its own section (ELF Only) |
| 1395 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1396 | .. option:: -fgnu-inline-asm, -fno-gnu-inline-asm |
| 1397 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1398 | .. option:: -fgnu-keywords, -fno-gnu-keywords |
| 1399 | |
| 1400 | Allow GNU-extension keywords regardless of language standard |
| 1401 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1402 | .. option:: -fgnu-runtime |
| 1403 | |
| 1404 | Generate output compatible with the standard GNU Objective-C runtime |
| 1405 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1406 | .. option:: -fgnu89-inline, -fno-gnu89-inline |
| 1407 | |
| 1408 | Use the gnu89 inline semantics |
| 1409 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1410 | .. option:: -fhonor-infinities, -fhonor-infinites, -fno-honor-infinities |
| 1411 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1412 | .. option:: -fhonor-nans, -fno-honor-nans |
| 1413 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1414 | .. option:: -fhosted |
| 1415 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1416 | .. option:: -fimplicit-module-maps, -fmodule-maps, -fno-implicit-module-maps |
| 1417 | |
| 1418 | Implicitly search the file system for module map files. |
| 1419 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1420 | .. option:: -fimplicit-modules, -fno-implicit-modules |
| 1421 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1422 | .. option:: -finput-charset=<arg> |
| 1423 | |
Craig Topper | 188252d | 2017-12-11 21:09:16 +0000 | [diff] [blame] | 1424 | .. option:: -finstrument-function-entry-bare |
| 1425 | |
| 1426 | Instrument function entry only, after inlining, without arguments to the instrumentation call |
| 1427 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1428 | .. option:: -finstrument-functions |
| 1429 | |
| 1430 | Generate calls to instrument function entry and exit |
| 1431 | |
Craig Topper | 1641866 | 2017-11-20 18:07:43 +0000 | [diff] [blame] | 1432 | .. option:: -finstrument-functions-after-inlining |
| 1433 | |
| 1434 | Like -finstrument-functions, but insert the calls after inlining |
| 1435 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1436 | .. option:: -fintegrated-as, -fno-integrated-as, -integrated-as |
| 1437 | |
| 1438 | Enable the integrated assembler |
| 1439 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1440 | .. option:: -fjump-tables, -fno-jump-tables |
| 1441 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1442 | .. option:: -flax-vector-conversions, -fno-lax-vector-conversions |
| 1443 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1444 | .. option:: -flimited-precision=<arg> |
| 1445 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1446 | .. option:: -flto, -fno-lto |
| 1447 | |
| 1448 | Enable LTO in 'full' mode |
| 1449 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1450 | .. option:: -flto-jobs=<arg> |
| 1451 | |
| 1452 | Controls the backend parallelism of -flto=thin (default of 0 means the number of threads will be derived from the number of CPUs detected) |
| 1453 | |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 1454 | .. program:: clang1 |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1455 | .. option:: -flto=<arg> |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 1456 | .. program:: clang |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1457 | |
| 1458 | Set LTO mode to either 'full' or 'thin' |
| 1459 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1460 | .. option:: -fmacro-backtrace-limit=<arg> |
| 1461 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1462 | .. option:: -fmath-errno, -fno-math-errno |
| 1463 | |
| 1464 | Require math functions to indicate errors by setting errno |
| 1465 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1466 | .. option:: -fmax-type-align=<arg> |
| 1467 | |
| 1468 | Specify the maximum alignment to enforce on pointers lacking an explicit alignment |
| 1469 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1470 | .. option:: -fmerge-all-constants, -fno-merge-all-constants |
| 1471 | |
Jonas Hahnfeld | 06039e8 | 2018-04-20 13:26:03 +0000 | [diff] [blame] | 1472 | Allow merging of constants |
| 1473 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1474 | .. option:: -fmessage-length=<arg> |
| 1475 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1476 | .. option:: -fmodule-file-deps, -fno-module-file-deps |
| 1477 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1478 | .. option:: -fmodule-map-file=<file> |
| 1479 | |
| 1480 | Load this module map file |
| 1481 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1482 | .. option:: -fmodule-name=<name>, -fmodule-implementation-of <arg>, -fmodule-name <arg> |
| 1483 | |
| 1484 | Specify the name of the module to build |
| 1485 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1486 | .. option:: -fmodules, -fno-modules |
| 1487 | |
| 1488 | Enable the 'modules' language feature |
| 1489 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1490 | .. option:: -fmodules-decluse, -fno-modules-decluse |
| 1491 | |
| 1492 | Require declaration of modules used within a module |
| 1493 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1494 | .. option:: -fmodules-ignore-macro=<arg> |
| 1495 | |
| 1496 | Ignore the definition of the given macro when building and loading modules |
| 1497 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1498 | .. option:: -fmodules-search-all, -fno-modules-search-all |
| 1499 | |
| 1500 | Search even non-imported modules to resolve references |
| 1501 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1502 | .. option:: -fmodules-strict-decluse |
| 1503 | |
| 1504 | Like -fmodules-decluse but requires all headers to be in modules |
| 1505 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1506 | .. option:: -fmodules-ts |
| 1507 | |
| 1508 | Enable support for the C++ Modules TS |
| 1509 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1510 | .. option:: -fms-compatibility, -fno-ms-compatibility |
| 1511 | |
| 1512 | Enable full Microsoft Visual C++ compatibility |
| 1513 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1514 | .. option:: -fms-compatibility-version=<arg> |
| 1515 | |
| 1516 | Dot-separated value representing the Microsoft compiler version number to report in \_MSC\_VER (0 = don't define it (default)) |
| 1517 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1518 | .. option:: -fms-extensions, -fno-ms-extensions |
| 1519 | |
| 1520 | Accept some non-standard constructs supported by the Microsoft compiler |
| 1521 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1522 | .. option:: -fms-memptr-rep=<arg> |
| 1523 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1524 | .. option:: -fms-volatile<arg> |
| 1525 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1526 | .. option:: -fmsc-version=<arg> |
| 1527 | |
| 1528 | Microsoft compiler version number to report in \_MSC\_VER (0 = don't define it (default)) |
| 1529 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1530 | .. option:: -fmudflap |
| 1531 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1532 | .. option:: -fmudflapth |
| 1533 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1534 | .. option:: -fnested-functions |
| 1535 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1536 | .. option:: -fnew-alignment=<align>, -fnew-alignment <arg> |
| 1537 | |
| 1538 | Specifies the largest alignment guaranteed by '::operator new(size\_t)' |
| 1539 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1540 | .. option:: -fnext-runtime |
| 1541 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1542 | .. option:: -fno-builtin-<arg> |
| 1543 | |
| 1544 | Disable implicit builtin knowledge of a specific function |
| 1545 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1546 | .. option:: -fno-elide-type |
| 1547 | |
| 1548 | Do not elide types when printing diagnostics |
| 1549 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1550 | .. option:: -fno-max-type-align |
| 1551 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1552 | .. option:: -fno-operator-names |
| 1553 | |
| 1554 | Do not treat C++ operator name keywords as synonyms for operators |
| 1555 | |
Jonas Hahnfeld | 06039e8 | 2018-04-20 13:26:03 +0000 | [diff] [blame] | 1556 | .. option:: -fno-rtti-data |
| 1557 | |
| 1558 | Control emission of RTTI data |
| 1559 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1560 | .. option:: -fno-strict-modules-decluse |
| 1561 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1562 | .. option:: -fno-working-directory |
| 1563 | |
Jonas Hahnfeld | 06039e8 | 2018-04-20 13:26:03 +0000 | [diff] [blame] | 1564 | .. option:: -fnoxray-link-deps |
| 1565 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1566 | .. option:: -fobjc-abi-version=<arg> |
| 1567 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1568 | .. option:: -fobjc-arc, -fno-objc-arc |
| 1569 | |
| 1570 | Synthesize retain and release calls for Objective-C pointers |
| 1571 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1572 | .. option:: -fobjc-arc-exceptions, -fno-objc-arc-exceptions |
| 1573 | |
| 1574 | Use EH-safe code when synthesizing retains and releases in -fobjc-arc |
| 1575 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1576 | .. option:: -fobjc-exceptions, -fno-objc-exceptions |
| 1577 | |
| 1578 | Enable Objective-C exceptions |
| 1579 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1580 | .. option:: -fobjc-infer-related-result-type, -fno-objc-infer-related-result-type |
| 1581 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1582 | .. option:: -fobjc-legacy-dispatch, -fno-objc-legacy-dispatch |
| 1583 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1584 | .. option:: -fobjc-link-runtime |
| 1585 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1586 | .. option:: -fobjc-nonfragile-abi, -fno-objc-nonfragile-abi |
| 1587 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1588 | .. option:: -fobjc-nonfragile-abi-version=<arg> |
| 1589 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1590 | .. option:: -fobjc-runtime=<arg> |
| 1591 | |
| 1592 | Specify the target Objective-C runtime kind and version |
| 1593 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1594 | .. option:: -fobjc-sender-dependent-dispatch |
| 1595 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1596 | .. option:: -fobjc-weak, -fno-objc-weak |
| 1597 | |
| 1598 | Enable ARC-style weak references in Objective-C |
| 1599 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1600 | .. option:: -fomit-frame-pointer, -fno-omit-frame-pointer |
| 1601 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1602 | .. option:: -fopenmp, -fno-openmp |
| 1603 | |
Jonas Hahnfeld | a180fc4 | 2018-02-22 17:10:28 +0000 | [diff] [blame] | 1604 | Parse OpenMP pragmas and generate parallel code. |
Boris Kolpackov | b150d24 | 2017-08-30 09:15:53 +0000 | [diff] [blame] | 1605 | |
Craig Topper | 287c801 | 2018-01-03 18:29:12 +0000 | [diff] [blame] | 1606 | .. option:: -fopenmp-simd, -fno-openmp-simd |
| 1607 | |
| 1608 | Emit OpenMP code only for SIMD-based constructs. |
| 1609 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1610 | .. option:: -fopenmp-version=<arg> |
| 1611 | |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 1612 | .. program:: clang1 |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1613 | .. option:: -fopenmp=<arg> |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 1614 | .. program:: clang |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1615 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1616 | .. option:: -foperator-arrow-depth=<arg> |
| 1617 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1618 | .. option:: -foptimization-record-file=<arg> |
| 1619 | |
| 1620 | Specify the file name of any generated YAML optimization record |
| 1621 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1622 | .. option:: -foptimize-sibling-calls, -fno-optimize-sibling-calls |
| 1623 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1624 | .. option:: -foutput-class-dir=<arg>, --output-class-directory <arg>, --output-class-directory=<arg> |
| 1625 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1626 | .. option:: -fpack-struct, -fno-pack-struct |
| 1627 | |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 1628 | .. program:: clang1 |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1629 | .. option:: -fpack-struct=<arg> |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 1630 | .. program:: clang |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1631 | |
| 1632 | Specify the default maximum struct packing alignment |
| 1633 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1634 | .. option:: -fpascal-strings, -fno-pascal-strings, -mpascal-strings |
| 1635 | |
| 1636 | Recognize and construct Pascal-style string literals |
| 1637 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1638 | .. option:: -fpcc-struct-return |
| 1639 | |
| 1640 | Override the default ABI to return all structs on the stack |
| 1641 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1642 | .. option:: -fpch-preprocess |
| 1643 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1644 | .. option:: -fpic, -fno-pic |
| 1645 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1646 | .. option:: -fpie, -fno-pie |
| 1647 | |
Craig Topper | 1641866 | 2017-11-20 18:07:43 +0000 | [diff] [blame] | 1648 | .. option:: -fplt, -fno-plt |
| 1649 | |
| 1650 | Use the PLT to make function calls |
| 1651 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1652 | .. option:: -fplugin=<dsopath> |
| 1653 | |
| 1654 | Load the named plugin (dynamic shared object) |
| 1655 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1656 | .. option:: -fpreserve-as-comments, -fno-preserve-as-comments |
| 1657 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1658 | .. option:: -fprofile-arcs, -fno-profile-arcs |
| 1659 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1660 | .. option:: -fprofile-dir=<arg> |
| 1661 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1662 | .. option:: -fprofile-generate, -fno-profile-generate |
| 1663 | |
| 1664 | Generate instrumented code to collect execution counts into default.profraw (overridden by LLVM\_PROFILE\_FILE env var) |
| 1665 | |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 1666 | .. program:: clang1 |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1667 | .. option:: -fprofile-generate=<directory> |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 1668 | .. program:: clang |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1669 | |
| 1670 | Generate instrumented code to collect execution counts into <directory>/default.profraw (overridden by LLVM\_PROFILE\_FILE env var) |
| 1671 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1672 | .. option:: -fprofile-instr-generate, -fno-profile-instr-generate |
| 1673 | |
| 1674 | Generate instrumented code to collect execution counts into default.profraw file (overridden by '=' form of option or LLVM\_PROFILE\_FILE env var) |
| 1675 | |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 1676 | .. program:: clang1 |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1677 | .. option:: -fprofile-instr-generate=<file> |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 1678 | .. program:: clang |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1679 | |
| 1680 | Generate instrumented code to collect execution counts into <file> (overridden by LLVM\_PROFILE\_FILE env var) |
| 1681 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1682 | .. option:: -fprofile-instr-use, -fno-profile-instr-use, -fprofile-use |
| 1683 | |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 1684 | .. program:: clang1 |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1685 | .. option:: -fprofile-instr-use=<arg> |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 1686 | .. program:: clang |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1687 | |
| 1688 | Use instrumentation data for profile-guided optimization |
| 1689 | |
Boris Kolpackov | b150d24 | 2017-08-30 09:15:53 +0000 | [diff] [blame] | 1690 | .. option:: -fprofile-sample-accurate, -fauto-profile-accurate, -fno-profile-sample-accurate |
| 1691 | |
| 1692 | Specifies that the sample profile is accurate. If the sample |
| 1693 | profile is accurate, callsites without profile samples are marked |
| 1694 | as cold. Otherwise, treat callsites without profile samples as if |
| 1695 | we have no profile |
| 1696 | |
Richard Smith | 78e23fd | 2017-04-13 22:39:49 +0000 | [diff] [blame] | 1697 | .. option:: -fprofile-sample-use, -fauto-profile, -fno-profile-sample-use |
| 1698 | |
| 1699 | .. program:: clang1 |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1700 | .. option:: -fprofile-sample-use=<arg>, -fauto-profile=<arg> |
Richard Smith | 78e23fd | 2017-04-13 22:39:49 +0000 | [diff] [blame] | 1701 | .. program:: clang |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1702 | |
| 1703 | Enable sample-based profile guided optimizations |
| 1704 | |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 1705 | .. program:: clang1 |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1706 | .. option:: -fprofile-use=<pathname> |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 1707 | .. program:: clang |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1708 | |
| 1709 | Use instrumentation data for profile-guided optimization. If pathname is a directory, it reads from <pathname>/default.profdata. Otherwise, it reads from file <pathname>. |
| 1710 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1711 | .. option:: -freciprocal-math, -fno-reciprocal-math |
| 1712 | |
| 1713 | Allow division operations to be reassociated |
| 1714 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1715 | .. option:: -freg-struct-return |
| 1716 | |
| 1717 | Override the default ABI to return small structs in registers |
| 1718 | |
Jonas Hahnfeld | 06039e8 | 2018-04-20 13:26:03 +0000 | [diff] [blame] | 1719 | .. option:: -fregister-global-dtors-with-atexit, -fno-register-global-dtors-with-atexit |
| 1720 | |
| 1721 | Use atexit or \_\_cxa\_atexit to register global destructors |
| 1722 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1723 | .. option:: -frelaxed-template-template-args, -fno-relaxed-template-template-args |
| 1724 | |
| 1725 | Enable C++17 relaxed template template argument matching |
| 1726 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1727 | .. option:: -freroll-loops, -fno-reroll-loops |
| 1728 | |
| 1729 | Turn on loop reroller |
| 1730 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1731 | .. option:: -fretain-comments-from-system-headers |
| 1732 | |
Craig Topper | d23254a | 2017-07-20 17:52:48 +0000 | [diff] [blame] | 1733 | .. option:: -frewrite-imports, -fno-rewrite-imports |
| 1734 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1735 | .. option:: -frewrite-includes, -fno-rewrite-includes |
| 1736 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1737 | .. option:: -frewrite-map-file <arg> |
| 1738 | |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 1739 | .. program:: clang1 |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1740 | .. option:: -frewrite-map-file=<arg> |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 1741 | .. program:: clang |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1742 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1743 | .. option:: -fropi, -fno-ropi |
| 1744 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1745 | .. option:: -frtti, -fno-rtti |
| 1746 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1747 | .. option:: -frwpi, -fno-rwpi |
| 1748 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1749 | .. option:: -fsave-optimization-record, -fno-save-optimization-record |
| 1750 | |
| 1751 | Generate a YAML optimization record file |
| 1752 | |
Craig Topper | 188252d | 2017-12-11 21:09:16 +0000 | [diff] [blame] | 1753 | .. option:: -fseh-exceptions |
| 1754 | |
| 1755 | Use SEH style exceptions |
| 1756 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1757 | .. option:: -fshort-enums, -fno-short-enums |
| 1758 | |
| 1759 | Allocate to an enum type only as many bytes as it needs for the declared range of possible values |
| 1760 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1761 | .. option:: -fshort-wchar, -fno-short-wchar |
| 1762 | |
| 1763 | Force wchar\_t to be a short unsigned int |
| 1764 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1765 | .. option:: -fshow-column, -fno-show-column |
| 1766 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1767 | .. option:: -fshow-overloads=<arg> |
| 1768 | |
| 1769 | Which overload candidates to show when overload resolution fails: best\|all; defaults to all |
| 1770 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1771 | .. option:: -fshow-source-location, -fno-show-source-location |
| 1772 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1773 | .. option:: -fsignaling-math, -fno-signaling-math |
| 1774 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1775 | .. option:: -fsigned-bitfields |
| 1776 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1777 | .. option:: -fsigned-char, -fno-signed-char, --signed-char |
| 1778 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1779 | .. option:: -fsigned-zeros, -fno-signed-zeros |
| 1780 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1781 | .. option:: -fsized-deallocation, -fno-sized-deallocation |
| 1782 | |
| 1783 | Enable C++14 sized global deallocation functions |
| 1784 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1785 | .. option:: -fsjlj-exceptions |
| 1786 | |
| 1787 | Use SjLj style exceptions |
| 1788 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1789 | .. option:: -fslp-vectorize, -fno-slp-vectorize, -ftree-slp-vectorize |
| 1790 | |
| 1791 | Enable the superword-level parallelism vectorization passes |
| 1792 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1793 | .. option:: -fspell-checking, -fno-spell-checking |
| 1794 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1795 | .. option:: -fspell-checking-limit=<arg> |
| 1796 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1797 | .. option:: -fsplit-dwarf-inlining, -fno-split-dwarf-inlining |
| 1798 | |
Jonas Hahnfeld | a180fc4 | 2018-02-22 17:10:28 +0000 | [diff] [blame] | 1799 | Provide minimal debug info in the object/executable to facilitate online symbolication/stack traces in the absence of .dwo/.dwp files when using Split DWARF |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1800 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1801 | .. option:: -fsplit-stack |
| 1802 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1803 | .. option:: -fstack-protector, -fno-stack-protector |
| 1804 | |
| 1805 | Enable stack protectors for functions potentially vulnerable to stack smashing |
| 1806 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1807 | .. option:: -fstack-protector-all |
| 1808 | |
| 1809 | Force the usage of stack protectors for all functions |
| 1810 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1811 | .. option:: -fstack-protector-strong |
| 1812 | |
| 1813 | Use a strong heuristic to apply stack protectors to functions |
| 1814 | |
Craig Topper | 596527b | 2018-01-23 18:40:15 +0000 | [diff] [blame] | 1815 | .. option:: -fstack-size-section, -fno-stack-size-section |
| 1816 | |
| 1817 | Emit section containing metadata on function stack sizes |
| 1818 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1819 | .. option:: -fstandalone-debug, -fno-limit-debug-info, -fno-standalone-debug |
| 1820 | |
| 1821 | Emit full debug info for all types used by the program |
| 1822 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1823 | .. option:: -fstrict-aliasing, -fno-strict-aliasing |
| 1824 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1825 | .. option:: -fstrict-enums, -fno-strict-enums |
| 1826 | |
| 1827 | Enable optimizations based on the strict definition of an enum's value range |
| 1828 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1829 | .. option:: -fstrict-overflow, -fno-strict-overflow |
| 1830 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1831 | .. option:: -fstrict-return, -fno-strict-return |
| 1832 | |
Richard Smith | 78e23fd | 2017-04-13 22:39:49 +0000 | [diff] [blame] | 1833 | Always treat control flow paths that fall off the end of a non-void function as unreachable |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1834 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1835 | .. option:: -fstrict-vtable-pointers, -fno-strict-vtable-pointers |
| 1836 | |
| 1837 | Enable optimizations based on the strict rules for overwriting polymorphic C++ objects |
| 1838 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1839 | .. option:: -fstruct-path-tbaa, -fno-struct-path-tbaa |
| 1840 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1841 | .. option:: -ftabstop=<arg> |
| 1842 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1843 | .. option:: -ftemplate-backtrace-limit=<arg> |
| 1844 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1845 | .. option:: -ftemplate-depth-<arg> |
| 1846 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1847 | .. option:: -ftemplate-depth=<arg> |
| 1848 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1849 | .. option:: -ftest-coverage |
| 1850 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1851 | .. option:: -fthinlto-index=<arg> |
| 1852 | |
| 1853 | Perform ThinLTO importing using provided function summary index |
| 1854 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1855 | .. option:: -fthreadsafe-statics, -fno-threadsafe-statics |
| 1856 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1857 | .. option:: -ftime-report |
| 1858 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1859 | .. option:: -ftls-model=<arg> |
| 1860 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1861 | .. option:: -ftrap-function=<arg> |
| 1862 | |
| 1863 | Issue call to specified function rather than a trap instruction |
| 1864 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1865 | .. option:: -ftrapping-math, -fno-trapping-math |
| 1866 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1867 | .. option:: -ftrapv |
| 1868 | |
| 1869 | Trap on integer overflow |
| 1870 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1871 | .. option:: -ftrapv-handler <arg> |
| 1872 | |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 1873 | .. program:: clang1 |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1874 | .. option:: -ftrapv-handler=<function name> |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 1875 | .. program:: clang |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1876 | |
| 1877 | Specify the function to be called on overflow |
| 1878 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1879 | .. option:: -ftrigraphs, -fno-trigraphs, -trigraphs, --trigraphs |
| 1880 | |
| 1881 | Process trigraph sequences |
| 1882 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1883 | .. option:: -funique-section-names, -fno-unique-section-names |
| 1884 | |
| 1885 | Use unique names for text and data sections (ELF Only) |
| 1886 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1887 | .. option:: -funit-at-a-time, -fno-unit-at-a-time |
| 1888 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1889 | .. option:: -funroll-loops, -fno-unroll-loops |
| 1890 | |
| 1891 | Turn on loop unroller |
| 1892 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1893 | .. option:: -funsafe-math-optimizations, -fno-unsafe-math-optimizations |
| 1894 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1895 | .. option:: -funsigned-bitfields |
| 1896 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1897 | .. option:: -funsigned-char, -fno-unsigned-char, --unsigned-char |
| 1898 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1899 | .. option:: -funwind-tables, -fno-unwind-tables |
| 1900 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1901 | .. option:: -fuse-cxa-atexit, -fno-use-cxa-atexit |
| 1902 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1903 | .. option:: -fuse-init-array, -fno-use-init-array |
| 1904 | |
| 1905 | Use .init\_array instead of .ctors |
| 1906 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1907 | .. option:: -fuse-ld=<arg> |
| 1908 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1909 | .. option:: -fuse-line-directives, -fno-use-line-directives |
| 1910 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1911 | .. option:: -fveclib=<arg> |
| 1912 | |
| 1913 | Use the given vector functions library |
| 1914 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1915 | .. option:: -fvectorize, -fno-vectorize, -ftree-vectorize |
| 1916 | |
| 1917 | Enable the loop vectorization passes |
| 1918 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1919 | .. option:: -fverbose-asm, -fno-verbose-asm |
| 1920 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1921 | .. option:: -fvisibility-inlines-hidden |
| 1922 | |
| 1923 | Give inline C++ member functions default visibility by default |
| 1924 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1925 | .. option:: -fvisibility-ms-compat |
| 1926 | |
| 1927 | Give global types 'default' visibility and global functions and variables 'hidden' visibility by default |
| 1928 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1929 | .. option:: -fvisibility=<arg> |
| 1930 | |
| 1931 | Set the default symbol visibility for all global declarations |
| 1932 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1933 | .. option:: -fwhole-program-vtables, -fno-whole-program-vtables |
| 1934 | |
| 1935 | Enables whole-program vtable optimization. Requires -flto |
| 1936 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1937 | .. option:: -fwrapv, -fno-wrapv |
| 1938 | |
| 1939 | Treat signed integer overflow as two's complement |
| 1940 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1941 | .. option:: -fwritable-strings |
| 1942 | |
| 1943 | Store string literals as writable data |
| 1944 | |
Craig Topper | 188252d | 2017-12-11 21:09:16 +0000 | [diff] [blame] | 1945 | .. option:: -fxray-always-emit-customevents, -fno-xray-always-emit-customevents |
| 1946 | |
| 1947 | Determine whether to always emit \_\_xray\_customevent(...) calls even if the function it appears in is not always instrumented. |
| 1948 | |
Jonas Hahnfeld | 06039e8 | 2018-04-20 13:26:03 +0000 | [diff] [blame] | 1949 | .. option:: -fxray-always-emit-typedevents, -fno-xray-always-emit-typedevents |
| 1950 | |
| 1951 | Determine whether to always emit \_\_xray\_typedevent(...) calls even if the function it appears in is not always instrumented. |
| 1952 | |
Richard Smith | 78e23fd | 2017-04-13 22:39:49 +0000 | [diff] [blame] | 1953 | .. option:: -fxray-always-instrument=<arg> |
| 1954 | |
Jonas Hahnfeld | 06039e8 | 2018-04-20 13:26:03 +0000 | [diff] [blame] | 1955 | DEPRECATED: Filename defining the whitelist for imbuing the 'always instrument' XRay attribute. |
| 1956 | |
| 1957 | .. option:: -fxray-attr-list=<arg> |
| 1958 | |
| 1959 | Filename defining the list of functions/types for imbuing XRay attributes. |
Richard Smith | 78e23fd | 2017-04-13 22:39:49 +0000 | [diff] [blame] | 1960 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1961 | .. option:: -fxray-instruction-threshold<arg> |
| 1962 | |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 1963 | .. program:: clang1 |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1964 | .. option:: -fxray-instruction-threshold=<arg> |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 1965 | .. program:: clang |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1966 | |
| 1967 | Sets the minimum function size to instrument with XRay |
| 1968 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1969 | .. option:: -fxray-instrument, -fno-xray-instrument |
| 1970 | |
| 1971 | Generate XRay instrumentation sleds on function entry and exit |
| 1972 | |
Jonas Hahnfeld | 06039e8 | 2018-04-20 13:26:03 +0000 | [diff] [blame] | 1973 | .. option:: -fxray-instrumentation-bundle=<arg> |
| 1974 | |
| 1975 | Select which XRay instrumentation points to emit. Options: all, none, function, custom. Default is 'all'. |
| 1976 | |
| 1977 | .. option:: -fxray-link-deps |
| 1978 | |
| 1979 | Tells clang to add the link dependencies for XRay. |
| 1980 | |
| 1981 | .. option:: -fxray-modes=<arg> |
| 1982 | |
| 1983 | List of modes to link in by default into XRay instrumented binaries. |
| 1984 | |
Richard Smith | 78e23fd | 2017-04-13 22:39:49 +0000 | [diff] [blame] | 1985 | .. option:: -fxray-never-instrument=<arg> |
| 1986 | |
Jonas Hahnfeld | 06039e8 | 2018-04-20 13:26:03 +0000 | [diff] [blame] | 1987 | DEPRECATED: Filename defining the whitelist for imbuing the 'never instrument' XRay attribute. |
Richard Smith | 78e23fd | 2017-04-13 22:39:49 +0000 | [diff] [blame] | 1988 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1989 | .. option:: -fzero-initialized-in-bss, -fno-zero-initialized-in-bss |
| 1990 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1991 | .. option:: -fzvector, -fno-zvector, -mzvector |
| 1992 | |
| 1993 | Enable System z vector language extension |
| 1994 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1995 | .. option:: -pedantic, --pedantic, -no-pedantic, --no-pedantic |
| 1996 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 1997 | .. option:: -pedantic-errors, --pedantic-errors |
| 1998 | |
| 1999 | OpenCL flags |
| 2000 | ------------ |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2001 | .. option:: -cl-denorms-are-zero |
| 2002 | |
| 2003 | OpenCL only. Allow denormals to be flushed to zero. |
| 2004 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2005 | .. option:: -cl-fast-relaxed-math |
| 2006 | |
| 2007 | OpenCL only. Sets -cl-finite-math-only and -cl-unsafe-math-optimizations, and defines \_\_FAST\_RELAXED\_MATH\_\_. |
| 2008 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2009 | .. option:: -cl-finite-math-only |
| 2010 | |
| 2011 | OpenCL only. Allow floating-point optimizations that assume arguments and results are not NaNs or +-Inf. |
| 2012 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2013 | .. option:: -cl-fp32-correctly-rounded-divide-sqrt |
| 2014 | |
| 2015 | OpenCL only. Specify that single precision floating-point divide and sqrt used in the program source are correctly rounded. |
| 2016 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2017 | .. option:: -cl-kernel-arg-info |
| 2018 | |
| 2019 | OpenCL only. Generate kernel argument metadata. |
| 2020 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2021 | .. option:: -cl-mad-enable |
| 2022 | |
| 2023 | OpenCL only. Allow use of less precise MAD computations in the generated binary. |
| 2024 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2025 | .. option:: -cl-no-signed-zeros |
| 2026 | |
| 2027 | OpenCL only. Allow use of less precise no signed zeros computations in the generated binary. |
| 2028 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2029 | .. option:: -cl-opt-disable |
| 2030 | |
| 2031 | OpenCL only. This option disables all optimizations. By default optimizations are enabled. |
| 2032 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2033 | .. option:: -cl-single-precision-constant |
| 2034 | |
| 2035 | OpenCL only. Treat double precision floating-point constant as single precision constant. |
| 2036 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2037 | .. option:: -cl-std=<arg> |
| 2038 | |
| 2039 | OpenCL language standard to compile for. |
| 2040 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2041 | .. option:: -cl-strict-aliasing |
| 2042 | |
| 2043 | OpenCL only. This option is added for compatibility with OpenCL 1.0. |
| 2044 | |
Jonas Hahnfeld | a180fc4 | 2018-02-22 17:10:28 +0000 | [diff] [blame] | 2045 | .. option:: -cl-uniform-work-group-size |
| 2046 | |
| 2047 | OpenCL only. Defines that the global work-size be a multiple of the work-group size specified to clEnqueueNDRangeKernel |
| 2048 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2049 | .. option:: -cl-unsafe-math-optimizations |
| 2050 | |
| 2051 | OpenCL only. Allow unsafe floating-point optimizations. Also implies -cl-no-signed-zeros and -cl-mad-enable. |
| 2052 | |
| 2053 | Target-dependent compilation options |
| 2054 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Richard Smith | c5b2e00 | 2017-01-27 02:08:37 +0000 | [diff] [blame] | 2055 | .. option:: -G<size>, -G=<arg>, -msmall-data-threshold=<arg> |
| 2056 | |
| 2057 | Put objects of at most <size> bytes into small data section (MIPS / Hexagon) |
| 2058 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2059 | .. option:: -m16 |
| 2060 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2061 | .. option:: -m32 |
| 2062 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2063 | .. option:: -m64 |
| 2064 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2065 | .. option:: -mabi=<arg> |
| 2066 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2067 | .. option:: -mabicalls, -mno-abicalls |
| 2068 | |
| 2069 | Enable SVR4-style position-independent code (Mips only) |
| 2070 | |
Boris Kolpackov | b150d24 | 2017-08-30 09:15:53 +0000 | [diff] [blame] | 2071 | .. option:: -mabs=<arg> |
| 2072 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2073 | .. option:: -malign-double |
| 2074 | |
| 2075 | Align doubles to two words in structs (x86 only) |
| 2076 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2077 | .. option:: -march=<arg> |
| 2078 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2079 | .. option:: -masm=<arg> |
| 2080 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2081 | .. option:: -mbackchain, -mno-backchain |
| 2082 | |
| 2083 | Link stack frames through backchain on System Z |
| 2084 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2085 | .. option:: -mcheck-zero-division, -mno-check-zero-division |
| 2086 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2087 | .. option:: -mcmodel=<arg> |
| 2088 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2089 | .. option:: -mcompact-branches=<arg> |
| 2090 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2091 | .. option:: -mconsole<arg> |
| 2092 | |
Craig Topper | 287c801 | 2018-01-03 18:29:12 +0000 | [diff] [blame] | 2093 | .. option:: -mcpu=<arg>, -mv4 (equivalent to -mcpu=hexagonv4), -mv5 (equivalent to -mcpu=hexagonv5), -mv55 (equivalent to -mcpu=hexagonv55), -mv60 (equivalent to -mcpu=hexagonv60), -mv62 (equivalent to -mcpu=hexagonv62), -mv65 (equivalent to -mcpu=hexagonv65) |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2094 | |
Craig Topper | d23254a | 2017-07-20 17:52:48 +0000 | [diff] [blame] | 2095 | .. option:: -mdefault-build-attributes<arg>, -mno-default-build-attributes<arg> |
| 2096 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2097 | .. option:: -mdll<arg> |
| 2098 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2099 | .. option:: -mdouble-float |
| 2100 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2101 | .. option:: -mdsp, -mno-dsp |
| 2102 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2103 | .. option:: -mdspr2, -mno-dspr2 |
| 2104 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2105 | .. option:: -mdynamic-no-pic<arg> |
| 2106 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2107 | .. option:: -meabi <arg> |
| 2108 | |
| 2109 | Set EABI type, e.g. 4, 5 or gnu (default depends on triple) |
| 2110 | |
Boris Kolpackov | b150d24 | 2017-08-30 09:15:53 +0000 | [diff] [blame] | 2111 | .. option:: -membedded-data, -mno-embedded-data |
| 2112 | |
| 2113 | Place constants in the .rodata section instead of the .sdata section even if they meet the -G <size> threshold (MIPS) |
| 2114 | |
| 2115 | .. option:: -mextern-sdata, -mno-extern-sdata |
| 2116 | |
| 2117 | Assume that externally defined data is in the small data if it meets the -G <size> threshold (MIPS) |
| 2118 | |
Richard Smith | 78e23fd | 2017-04-13 22:39:49 +0000 | [diff] [blame] | 2119 | .. option:: -mfentry |
| 2120 | |
| 2121 | Insert calls to fentry at function entry (x86 only) |
| 2122 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2123 | .. option:: -mfloat-abi=<arg> |
| 2124 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2125 | .. option:: -mfp32 |
| 2126 | |
| 2127 | Use 32-bit floating point registers (MIPS only) |
| 2128 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2129 | .. option:: -mfp64 |
| 2130 | |
| 2131 | Use 64-bit floating point registers (MIPS only) |
| 2132 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2133 | .. option:: -mfpmath=<arg> |
| 2134 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2135 | .. option:: -mfpu=<arg> |
| 2136 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2137 | .. option:: -mglobal-merge, -mno-global-merge |
| 2138 | |
| 2139 | Enable merging of globals |
| 2140 | |
Craig Topper | d23254a | 2017-07-20 17:52:48 +0000 | [diff] [blame] | 2141 | .. option:: -mgpopt, -mno-gpopt |
| 2142 | |
| 2143 | Use GP relative accesses for symbols known to be in a small data section (MIPS) |
| 2144 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2145 | .. option:: -mhard-float |
| 2146 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2147 | .. option:: -mhwdiv=<arg>, --mhwdiv <arg>, --mhwdiv=<arg> |
| 2148 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2149 | .. option:: -miamcu, -mno-iamcu |
| 2150 | |
| 2151 | Use Intel MCU ABI |
| 2152 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2153 | .. option:: -mimplicit-float, -mno-implicit-float |
| 2154 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2155 | .. option:: -mimplicit-it=<arg> |
| 2156 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2157 | .. option:: -mincremental-linker-compatible, -mno-incremental-linker-compatible |
| 2158 | |
| 2159 | (integrated-as) Emit an object file which can be used with an incremental linker |
| 2160 | |
Jonas Hahnfeld | a180fc4 | 2018-02-22 17:10:28 +0000 | [diff] [blame] | 2161 | .. option:: -mindirect-jump=<arg> |
| 2162 | |
| 2163 | Change indirect jump instructions to inhibit speculation |
| 2164 | |
Richard Smith | 78e23fd | 2017-04-13 22:39:49 +0000 | [diff] [blame] | 2165 | .. option:: -miphoneos-version-min=<arg>, -mios-version-min=<arg> |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2166 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2167 | .. option:: -mips16 |
| 2168 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2169 | .. option:: -mkernel |
| 2170 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2171 | .. option:: -mldc1-sdc1, -mno-ldc1-sdc1 |
| 2172 | |
Boris Kolpackov | b150d24 | 2017-08-30 09:15:53 +0000 | [diff] [blame] | 2173 | .. option:: -mlocal-sdata, -mno-local-sdata |
| 2174 | |
| 2175 | Extend the -G behaviour to object local data (MIPS) |
| 2176 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2177 | .. option:: -mlong-calls, -mno-long-calls |
| 2178 | |
| 2179 | Generate branches with extended addressability, usually via indirect jumps. |
| 2180 | |
Craig Topper | d23254a | 2017-07-20 17:52:48 +0000 | [diff] [blame] | 2181 | .. option:: -mmacosx-version-min=<arg>, -mmacos-version-min=<arg> |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2182 | |
| 2183 | Set Mac OS X deployment target |
| 2184 | |
Craig Topper | d23254a | 2017-07-20 17:52:48 +0000 | [diff] [blame] | 2185 | .. option:: -mmadd4, -mno-madd4 |
| 2186 | |
| 2187 | Enable the generation of 4-operand madd.s, madd.d and related instructions. |
| 2188 | |
| 2189 | .. option:: -mmcu=<arg> |
| 2190 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2191 | .. option:: -mmicromips, -mno-micromips |
| 2192 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2193 | .. option:: -mms-bitfields, -mno-ms-bitfields |
| 2194 | |
| 2195 | Set the default structure layout to be compatible with the Microsoft compiler standard |
| 2196 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2197 | .. option:: -mmsa, -mno-msa |
| 2198 | |
| 2199 | Enable MSA ASE (MIPS only) |
| 2200 | |
Craig Topper | d23254a | 2017-07-20 17:52:48 +0000 | [diff] [blame] | 2201 | .. option:: -mmt, -mno-mt |
| 2202 | |
| 2203 | Enable MT ASE (MIPS only) |
| 2204 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2205 | .. option:: -mnan=<arg> |
| 2206 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2207 | .. option:: -mno-mips16 |
| 2208 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2209 | .. option:: -momit-leaf-frame-pointer, -mno-omit-leaf-frame-pointer |
| 2210 | |
| 2211 | Omit frame pointer setup for leaf functions |
| 2212 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2213 | .. option:: -moslib=<arg> |
| 2214 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2215 | .. option:: -mpie-copy-relocations, -mno-pie-copy-relocations |
| 2216 | |
| 2217 | Use copy relocations support for PIE builds |
| 2218 | |
Craig Topper | 9a724aa | 2017-12-11 21:09:19 +0000 | [diff] [blame] | 2219 | .. option:: -mprefer-vector-width=<arg> |
| 2220 | |
| 2221 | Specifies preferred vector width for auto-vectorization. Defaults to 'none' which allows target specific decisions. |
| 2222 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2223 | .. option:: -mqdsp6-compat |
| 2224 | |
| 2225 | Enable hexagon-qdsp6 backward compatibility |
| 2226 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2227 | .. option:: -mrecip |
| 2228 | |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 2229 | .. program:: clang1 |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2230 | .. option:: -mrecip=<arg1>,<arg2>... |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 2231 | .. program:: clang |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2232 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2233 | .. option:: -mred-zone, -mno-red-zone |
| 2234 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2235 | .. option:: -mregparm=<arg> |
| 2236 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2237 | .. option:: -mrelax-all, -mno-relax-all |
| 2238 | |
| 2239 | (integrated-as) Relax all machine instructions |
| 2240 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2241 | .. option:: -mrtd, -mno-rtd |
| 2242 | |
| 2243 | Make StdCall calling convention the default |
| 2244 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2245 | .. option:: -msingle-float |
| 2246 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2247 | .. option:: -msoft-float, -mno-soft-float |
| 2248 | |
| 2249 | Use software floating point |
| 2250 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2251 | .. option:: -mstack-alignment=<arg> |
| 2252 | |
| 2253 | Set the stack alignment |
| 2254 | |
Jonas Hahnfeld | 06039e8 | 2018-04-20 13:26:03 +0000 | [diff] [blame] | 2255 | .. option:: -mstack-arg-probe, -mno-stack-arg-probe |
| 2256 | |
| 2257 | Enable stack probes |
| 2258 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2259 | .. option:: -mstack-probe-size=<arg> |
| 2260 | |
| 2261 | Set the stack probe size |
| 2262 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2263 | .. option:: -mstackrealign, -mno-stackrealign |
| 2264 | |
| 2265 | Force realign the stack at entry to every function |
| 2266 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2267 | .. option:: -mthread-model <arg> |
| 2268 | |
| 2269 | The thread model to use, e.g. posix, single (posix by default) |
| 2270 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2271 | .. option:: -mthreads<arg> |
| 2272 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2273 | .. option:: -mthumb, -mno-thumb |
| 2274 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2275 | .. option:: -mtune=<arg> |
| 2276 | |
Richard Smith | 78e23fd | 2017-04-13 22:39:49 +0000 | [diff] [blame] | 2277 | .. option:: -mtvos-version-min=<arg>, -mappletvos-version-min=<arg> |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2278 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2279 | .. option:: -municode<arg> |
| 2280 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2281 | .. option:: -mvx, -mno-vx |
| 2282 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2283 | .. option:: -mwarn-nonportable-cfstrings, -mno-warn-nonportable-cfstrings |
| 2284 | |
Richard Smith | 78e23fd | 2017-04-13 22:39:49 +0000 | [diff] [blame] | 2285 | .. option:: -mwatchos-version-min=<arg> |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2286 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2287 | .. option:: -mwindows<arg> |
| 2288 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2289 | .. option:: -mx32 |
| 2290 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2291 | .. option:: -mxgot, -mno-xgot |
| 2292 | |
| 2293 | AARCH64 |
| 2294 | ------- |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2295 | .. option:: -ffixed-x18 |
| 2296 | |
| 2297 | Reserve the x18 register (AArch64 only) |
| 2298 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2299 | .. option:: -mfix-cortex-a53-835769, -mno-fix-cortex-a53-835769 |
| 2300 | |
| 2301 | Workaround Cortex-A53 erratum 835769 (AArch64 only) |
| 2302 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2303 | .. option:: -mgeneral-regs-only |
| 2304 | |
| 2305 | Generate code which only uses the general purpose registers (AArch64 only) |
| 2306 | |
| 2307 | AMDGPU |
| 2308 | ------ |
Craig Topper | 1641866 | 2017-11-20 18:07:43 +0000 | [diff] [blame] | 2309 | .. option:: -mxnack, -mno-xnack |
| 2310 | |
| 2311 | Enable XNACK (AMDGPU only) |
| 2312 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2313 | ARM |
| 2314 | --- |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2315 | .. option:: -ffixed-r9 |
| 2316 | |
| 2317 | Reserve the r9 register (ARM only) |
| 2318 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2319 | .. option:: -mcrc |
| 2320 | |
| 2321 | Allow use of CRC instructions (ARM only) |
| 2322 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2323 | .. option:: -mexecute-only, -mno-execute-only, -mpure-code |
| 2324 | |
| 2325 | Disallow generation of data access to code sections (ARM only) |
| 2326 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2327 | .. option:: -mno-movt |
| 2328 | |
| 2329 | Disallow use of movt/movw pairs (ARM only) |
| 2330 | |
Richard Smith | 78e23fd | 2017-04-13 22:39:49 +0000 | [diff] [blame] | 2331 | .. option:: -mno-neg-immediates |
| 2332 | |
| 2333 | Disallow converting instructions with negative immediates to their negation or inversion. |
| 2334 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2335 | .. option:: -mnocrc |
| 2336 | |
| 2337 | Disallow use of CRC instructions (ARM only) |
| 2338 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2339 | .. option:: -mrestrict-it, -mno-restrict-it |
| 2340 | |
| 2341 | Disallow generation of deprecated IT blocks for ARMv8. It is on by default for ARMv8 Thumb mode. |
| 2342 | |
Craig Topper | 1641866 | 2017-11-20 18:07:43 +0000 | [diff] [blame] | 2343 | .. option:: -mtp=<arg> |
| 2344 | |
| 2345 | Read thread pointer from coprocessor register (ARM only) |
| 2346 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2347 | .. option:: -munaligned-access, -mno-unaligned-access |
| 2348 | |
| 2349 | Allow memory accesses to be unaligned (AArch32/AArch64 only) |
| 2350 | |
| 2351 | Hexagon |
| 2352 | ------- |
Craig Topper | 1641866 | 2017-11-20 18:07:43 +0000 | [diff] [blame] | 2353 | .. option:: -mieee-rnd-near |
| 2354 | |
Jonas Hahnfeld | 06039e8 | 2018-04-20 13:26:03 +0000 | [diff] [blame] | 2355 | .. option:: -mpackets, -mno-packets |
| 2356 | |
| 2357 | Enable generation of instruction packets |
| 2358 | |
Craig Topper | 1641866 | 2017-11-20 18:07:43 +0000 | [diff] [blame] | 2359 | Hexagon |
| 2360 | ------- |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2361 | .. option:: -mhvx, -mno-hvx |
| 2362 | |
| 2363 | Enable Hexagon Vector eXtensions |
| 2364 | |
Craig Topper | 1641866 | 2017-11-20 18:07:43 +0000 | [diff] [blame] | 2365 | .. option:: -mhvx-length=<arg> |
| 2366 | |
| 2367 | Set Hexagon Vector Length |
| 2368 | |
| 2369 | .. program:: clang1 |
| 2370 | .. option:: -mhvx=<arg> |
| 2371 | .. program:: clang |
| 2372 | |
| 2373 | Enable Hexagon Vector eXtensions |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2374 | |
| 2375 | PowerPC |
| 2376 | ------- |
Richard Smith | 78e23fd | 2017-04-13 22:39:49 +0000 | [diff] [blame] | 2377 | .. option:: -maltivec, -mno-altivec |
| 2378 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2379 | .. option:: -mcmpb, -mno-cmpb |
| 2380 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2381 | .. option:: -mcrbits, -mno-crbits |
| 2382 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2383 | .. option:: -mcrypto, -mno-crypto |
| 2384 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2385 | .. option:: -mdirect-move, -mno-direct-move |
| 2386 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2387 | .. option:: -mfloat128, -mno-float128 |
| 2388 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2389 | .. option:: -mfprnd, -mno-fprnd |
| 2390 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2391 | .. option:: -mhtm, -mno-htm |
| 2392 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2393 | .. option:: -minvariant-function-descriptors, -mno-invariant-function-descriptors |
| 2394 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2395 | .. option:: -misel, -mno-isel |
| 2396 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2397 | .. option:: -mlongcall, -mno-longcall |
| 2398 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2399 | .. option:: -mmfocrf, -mmfcrf, -mno-mfocrf |
| 2400 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2401 | .. option:: -mpopcntd, -mno-popcntd |
| 2402 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2403 | .. option:: -mpower8-vector, -mno-power8-vector |
| 2404 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2405 | .. option:: -mpower9-vector, -mno-power9-vector |
| 2406 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2407 | .. option:: -mqpx, -mno-qpx |
| 2408 | |
Jonas Hahnfeld | 06039e8 | 2018-04-20 13:26:03 +0000 | [diff] [blame] | 2409 | .. option:: -msecure-plt |
| 2410 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2411 | .. option:: -mvsx, -mno-vsx |
| 2412 | |
| 2413 | WebAssembly |
| 2414 | ----------- |
Jonas Hahnfeld | 06039e8 | 2018-04-20 13:26:03 +0000 | [diff] [blame] | 2415 | .. option:: -mexception-handling, -mno-exception-handling |
| 2416 | |
Craig Topper | 188252d | 2017-12-11 21:09:16 +0000 | [diff] [blame] | 2417 | .. option:: -mnontrapping-fptoint, -mno-nontrapping-fptoint |
| 2418 | |
Dan Gohman | d0c4e1e | 2018-01-19 17:16:32 +0000 | [diff] [blame] | 2419 | .. option:: -msign-ext, -mno-sign-ext |
| 2420 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2421 | .. option:: -msimd128, -mno-simd128 |
| 2422 | |
| 2423 | X86 |
| 2424 | --- |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2425 | .. option:: -m3dnow, -mno-3dnow |
| 2426 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2427 | .. option:: -m3dnowa, -mno-3dnowa |
| 2428 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2429 | .. option:: -madx, -mno-adx |
| 2430 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2431 | .. option:: -maes, -mno-aes |
| 2432 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2433 | .. option:: -mavx, -mno-avx |
| 2434 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2435 | .. option:: -mavx2, -mno-avx2 |
| 2436 | |
Craig Topper | 287c801 | 2018-01-03 18:29:12 +0000 | [diff] [blame] | 2437 | .. option:: -mavx512bitalg, -mno-avx512bitalg |
| 2438 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2439 | .. option:: -mavx512bw, -mno-avx512bw |
| 2440 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2441 | .. option:: -mavx512cd, -mno-avx512cd |
| 2442 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2443 | .. option:: -mavx512dq, -mno-avx512dq |
| 2444 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2445 | .. option:: -mavx512er, -mno-avx512er |
| 2446 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2447 | .. option:: -mavx512f, -mno-avx512f |
| 2448 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2449 | .. option:: -mavx512ifma, -mno-avx512ifma |
| 2450 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2451 | .. option:: -mavx512pf, -mno-avx512pf |
| 2452 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2453 | .. option:: -mavx512vbmi, -mno-avx512vbmi |
| 2454 | |
Craig Topper | 287c801 | 2018-01-03 18:29:12 +0000 | [diff] [blame] | 2455 | .. option:: -mavx512vbmi2, -mno-avx512vbmi2 |
| 2456 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2457 | .. option:: -mavx512vl, -mno-avx512vl |
| 2458 | |
Craig Topper | 287c801 | 2018-01-03 18:29:12 +0000 | [diff] [blame] | 2459 | .. option:: -mavx512vnni, -mno-avx512vnni |
| 2460 | |
Craig Topper | d23254a | 2017-07-20 17:52:48 +0000 | [diff] [blame] | 2461 | .. option:: -mavx512vpopcntdq, -mno-avx512vpopcntdq |
| 2462 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2463 | .. option:: -mbmi, -mno-bmi |
| 2464 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2465 | .. option:: -mbmi2, -mno-bmi2 |
| 2466 | |
Jonas Hahnfeld | 06039e8 | 2018-04-20 13:26:03 +0000 | [diff] [blame] | 2467 | .. option:: -mcldemote, -mno-cldemote |
| 2468 | |
Craig Topper | 78b4787 | 2017-02-08 06:48:58 +0000 | [diff] [blame] | 2469 | .. option:: -mclflushopt, -mno-clflushopt |
| 2470 | |
Craig Topper | 177a57c | 2017-02-08 07:57:01 +0000 | [diff] [blame] | 2471 | .. option:: -mclwb, -mno-clwb |
| 2472 | |
Richard Smith | 78e23fd | 2017-04-13 22:39:49 +0000 | [diff] [blame] | 2473 | .. option:: -mclzero, -mno-clzero |
| 2474 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2475 | .. option:: -mcx16, -mno-cx16 |
| 2476 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2477 | .. option:: -mf16c, -mno-f16c |
| 2478 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2479 | .. option:: -mfma, -mno-fma |
| 2480 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2481 | .. option:: -mfma4, -mno-fma4 |
| 2482 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2483 | .. option:: -mfsgsbase, -mno-fsgsbase |
| 2484 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2485 | .. option:: -mfxsr, -mno-fxsr |
| 2486 | |
Craig Topper | 287c801 | 2018-01-03 18:29:12 +0000 | [diff] [blame] | 2487 | .. option:: -mgfni, -mno-gfni |
| 2488 | |
Craig Topper | 188252d | 2017-12-11 21:09:16 +0000 | [diff] [blame] | 2489 | .. option:: -mibt, -mno-ibt |
| 2490 | |
Craig Topper | d23254a | 2017-07-20 17:52:48 +0000 | [diff] [blame] | 2491 | .. option:: -mlwp, -mno-lwp |
| 2492 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2493 | .. option:: -mlzcnt, -mno-lzcnt |
| 2494 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2495 | .. option:: -mmmx, -mno-mmx |
| 2496 | |
Craig Topper | 177a57c | 2017-02-08 07:57:01 +0000 | [diff] [blame] | 2497 | .. option:: -mmovbe, -mno-movbe |
| 2498 | |
Craig Topper | b16cb82 | 2017-02-08 07:56:42 +0000 | [diff] [blame] | 2499 | .. option:: -mmpx, -mno-mpx |
| 2500 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2501 | .. option:: -mmwaitx, -mno-mwaitx |
| 2502 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2503 | .. option:: -mpclmul, -mno-pclmul |
| 2504 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2505 | .. option:: -mpku, -mno-pku |
| 2506 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2507 | .. option:: -mpopcnt, -mno-popcnt |
| 2508 | |
Craig Topper | d2bf7b0 | 2017-02-08 08:23:40 +0000 | [diff] [blame] | 2509 | .. option:: -mprefetchwt1, -mno-prefetchwt1 |
| 2510 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2511 | .. option:: -mprfchw, -mno-prfchw |
| 2512 | |
Craig Topper | 596527b | 2018-01-23 18:40:15 +0000 | [diff] [blame] | 2513 | .. option:: -mrdpid, -mno-rdpid |
| 2514 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2515 | .. option:: -mrdrnd, -mno-rdrnd |
| 2516 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2517 | .. option:: -mrdseed, -mno-rdseed |
| 2518 | |
Craig Topper | 596527b | 2018-01-23 18:40:15 +0000 | [diff] [blame] | 2519 | .. option:: -mretpoline, -mno-retpoline |
| 2520 | |
| 2521 | .. option:: -mretpoline-external-thunk, -mno-retpoline-external-thunk |
| 2522 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2523 | .. option:: -mrtm, -mno-rtm |
| 2524 | |
Jonas Hahnfeld | a180fc4 | 2018-02-22 17:10:28 +0000 | [diff] [blame] | 2525 | .. option:: -msahf, -mno-sahf |
| 2526 | |
Craig Topper | 204ecff | 2017-02-08 08:23:17 +0000 | [diff] [blame] | 2527 | .. option:: -msgx, -mno-sgx |
| 2528 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2529 | .. option:: -msha, -mno-sha |
| 2530 | |
Craig Topper | 188252d | 2017-12-11 21:09:16 +0000 | [diff] [blame] | 2531 | .. option:: -mshstk, -mno-shstk |
| 2532 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2533 | .. option:: -msse, -mno-sse |
| 2534 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2535 | .. option:: -msse2, -mno-sse2 |
| 2536 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2537 | .. option:: -msse3, -mno-sse3 |
| 2538 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2539 | .. option:: -msse4.1, -mno-sse4.1 |
| 2540 | |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 2541 | .. program:: clang1 |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2542 | .. option:: -msse4.2, -mno-sse4.2, -msse4 |
Richard Smith | b2c82a6 | 2017-01-27 01:54:42 +0000 | [diff] [blame] | 2543 | .. program:: clang |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2544 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2545 | .. option:: -msse4a, -mno-sse4a |
| 2546 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2547 | .. option:: -mssse3, -mno-ssse3 |
| 2548 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2549 | .. option:: -mtbm, -mno-tbm |
| 2550 | |
Craig Topper | 287c801 | 2018-01-03 18:29:12 +0000 | [diff] [blame] | 2551 | .. option:: -mvaes, -mno-vaes |
| 2552 | |
| 2553 | .. option:: -mvpclmulqdq, -mno-vpclmulqdq |
| 2554 | |
Craig Topper | 42da9cb | 2018-04-23 21:41:06 +0000 | [diff] [blame^] | 2555 | .. option:: -mwaitpkg, -mno-waitpkg |
| 2556 | |
Gabor Buella | a052016 | 2018-04-11 20:09:09 +0000 | [diff] [blame] | 2557 | .. option:: -mwbnoinvd, -mno-wbnoinvd |
| 2558 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2559 | .. option:: -mx87, -m80387, -mno-x87 |
| 2560 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2561 | .. option:: -mxop, -mno-xop |
| 2562 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2563 | .. option:: -mxsave, -mno-xsave |
| 2564 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2565 | .. option:: -mxsavec, -mno-xsavec |
| 2566 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2567 | .. option:: -mxsaveopt, -mno-xsaveopt |
| 2568 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2569 | .. option:: -mxsaves, -mno-xsaves |
| 2570 | |
| 2571 | Optimization level |
| 2572 | ~~~~~~~~~~~~~~~~~~ |
| 2573 | |
| 2574 | Flags controlling how much optimization should be performed. |
| 2575 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2576 | .. option:: -O<arg>, -O (equivalent to -O2), --optimize, --optimize=<arg> |
| 2577 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2578 | .. option:: -Ofast<arg> |
| 2579 | |
| 2580 | Debug information generation |
| 2581 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 2582 | |
| 2583 | Flags controlling how much and what kind of debug information should be |
| 2584 | generated. |
| 2585 | |
| 2586 | Kind and level of debug information |
| 2587 | ----------------------------------- |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2588 | .. option:: -g, --debug, --debug=<arg> |
| 2589 | |
| 2590 | Generate source-level debug information |
| 2591 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2592 | .. option:: -gdwarf-2 |
| 2593 | |
| 2594 | Generate source-level debug information with dwarf version 2 |
| 2595 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2596 | .. option:: -gdwarf-3 |
| 2597 | |
| 2598 | Generate source-level debug information with dwarf version 3 |
| 2599 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2600 | .. option:: -gdwarf-4, -gdwarf |
| 2601 | |
| 2602 | Generate source-level debug information with dwarf version 4 |
| 2603 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2604 | .. option:: -gdwarf-5 |
| 2605 | |
| 2606 | Generate source-level debug information with dwarf version 5 |
| 2607 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2608 | .. option:: -gfull |
| 2609 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2610 | .. option:: -gused |
| 2611 | |
| 2612 | Debug level |
| 2613 | ___________ |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2614 | .. option:: -g0 |
| 2615 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2616 | .. option:: -g2 |
| 2617 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2618 | .. option:: -g3 |
| 2619 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2620 | .. option:: -ggdb0 |
| 2621 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2622 | .. option:: -ggdb1 |
| 2623 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2624 | .. option:: -ggdb2 |
| 2625 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2626 | .. option:: -ggdb3 |
| 2627 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2628 | .. option:: -gline-tables-only, -g1, -gmlt |
| 2629 | |
| 2630 | Emit debug line number tables only |
| 2631 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2632 | .. option:: -gmodules |
| 2633 | |
| 2634 | Generate debug info with external references to clang modules or precompiled headers |
| 2635 | |
| 2636 | Debugger to tune debug information for |
| 2637 | ______________________________________ |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2638 | .. option:: -ggdb |
| 2639 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2640 | .. option:: -glldb |
| 2641 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2642 | .. option:: -gsce |
| 2643 | |
| 2644 | Debug information flags |
| 2645 | ----------------------- |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2646 | .. option:: -gcolumn-info, -gno-column-info |
| 2647 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2648 | .. option:: -gdwarf-aranges |
| 2649 | |
Jonas Hahnfeld | 06039e8 | 2018-04-20 13:26:03 +0000 | [diff] [blame] | 2650 | .. option:: -gembed-source, -gno-embed-source |
Scott Linder | a2fbcef | 2018-02-26 17:32:31 +0000 | [diff] [blame] | 2651 | |
Jonas Hahnfeld | 06039e8 | 2018-04-20 13:26:03 +0000 | [diff] [blame] | 2652 | Embed source text in DWARF debug sections |
Scott Linder | a2fbcef | 2018-02-26 17:32:31 +0000 | [diff] [blame] | 2653 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2654 | .. option:: -ggnu-pubnames |
| 2655 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2656 | .. option:: -grecord-gcc-switches, -gno-record-gcc-switches |
| 2657 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2658 | .. option:: -gsplit-dwarf |
| 2659 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2660 | .. option:: -gstrict-dwarf, -gno-strict-dwarf |
| 2661 | |
Craig Topper | d23254a | 2017-07-20 17:52:48 +0000 | [diff] [blame] | 2662 | .. option:: -gz |
| 2663 | |
| 2664 | DWARF debug sections compression type |
| 2665 | |
| 2666 | .. program:: clang1 |
| 2667 | .. option:: -gz=<arg> |
| 2668 | .. program:: clang |
| 2669 | |
| 2670 | DWARF debug sections compression type |
| 2671 | |
Richard Smith | c5b2e00 | 2017-01-27 02:08:37 +0000 | [diff] [blame] | 2672 | Static analyzer flags |
| 2673 | ===================== |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2674 | |
Richard Smith | c5b2e00 | 2017-01-27 02:08:37 +0000 | [diff] [blame] | 2675 | Flags controlling the behavior of the Clang Static Analyzer. |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2676 | |
Richard Smith | c5b2e00 | 2017-01-27 02:08:37 +0000 | [diff] [blame] | 2677 | .. option:: -Xanalyzer <arg> |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2678 | |
Richard Smith | c5b2e00 | 2017-01-27 02:08:37 +0000 | [diff] [blame] | 2679 | Pass <arg> to the static analyzer |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2680 | |
| 2681 | Fortran compilation flags |
| 2682 | ========================= |
| 2683 | |
| 2684 | Flags that will be passed onto the ``gfortran`` compiler when Clang is given |
| 2685 | a Fortran input. |
| 2686 | |
Richard Smith | c5b2e00 | 2017-01-27 02:08:37 +0000 | [diff] [blame] | 2687 | .. option:: -A<arg>, --assert <arg>, --assert=<arg> |
| 2688 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2689 | .. option:: -A-<arg> |
| 2690 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2691 | .. option:: -J<arg> |
| 2692 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2693 | .. option:: -cpp |
| 2694 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2695 | .. option:: -faggressive-function-elimination, -fno-aggressive-function-elimination |
| 2696 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2697 | .. option:: -falign-commons, -fno-align-commons |
| 2698 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2699 | .. option:: -fall-intrinsics, -fno-all-intrinsics |
| 2700 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2701 | .. option:: -fautomatic, -fno-automatic |
| 2702 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2703 | .. option:: -fbackslash, -fno-backslash |
| 2704 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2705 | .. option:: -fbacktrace, -fno-backtrace |
| 2706 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2707 | .. option:: -fblas-matmul-limit=<arg> |
| 2708 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2709 | .. option:: -fbounds-check, -fno-bounds-check |
| 2710 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2711 | .. option:: -fcheck-array-temporaries, -fno-check-array-temporaries |
| 2712 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2713 | .. option:: -fcheck=<arg> |
| 2714 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2715 | .. option:: -fcoarray=<arg> |
| 2716 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2717 | .. option:: -fconvert=<arg> |
| 2718 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2719 | .. option:: -fcray-pointer, -fno-cray-pointer |
| 2720 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2721 | .. option:: -fd-lines-as-code, -fno-d-lines-as-code |
| 2722 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2723 | .. option:: -fd-lines-as-comments, -fno-d-lines-as-comments |
| 2724 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2725 | .. option:: -fdefault-double-8, -fno-default-double-8 |
| 2726 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2727 | .. option:: -fdefault-integer-8, -fno-default-integer-8 |
| 2728 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2729 | .. option:: -fdefault-real-8, -fno-default-real-8 |
| 2730 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2731 | .. option:: -fdollar-ok, -fno-dollar-ok |
| 2732 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2733 | .. option:: -fdump-fortran-optimized, -fno-dump-fortran-optimized |
| 2734 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2735 | .. option:: -fdump-fortran-original, -fno-dump-fortran-original |
| 2736 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2737 | .. option:: -fdump-parse-tree, -fno-dump-parse-tree |
| 2738 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2739 | .. option:: -fexternal-blas, -fno-external-blas |
| 2740 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2741 | .. option:: -ff2c, -fno-f2c |
| 2742 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2743 | .. option:: -ffixed-form, -fno-fixed-form |
| 2744 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2745 | .. option:: -ffixed-line-length-<arg> |
| 2746 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2747 | .. option:: -ffpe-trap=<arg> |
| 2748 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2749 | .. option:: -ffree-form, -fno-free-form |
| 2750 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2751 | .. option:: -ffree-line-length-<arg> |
| 2752 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2753 | .. option:: -ffrontend-optimize, -fno-frontend-optimize |
| 2754 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2755 | .. option:: -fimplicit-none, -fno-implicit-none |
| 2756 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2757 | .. option:: -finit-character=<arg> |
| 2758 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2759 | .. option:: -finit-integer=<arg> |
| 2760 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2761 | .. option:: -finit-local-zero, -fno-init-local-zero |
| 2762 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2763 | .. option:: -finit-logical=<arg> |
| 2764 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2765 | .. option:: -finit-real=<arg> |
| 2766 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2767 | .. option:: -finteger-4-integer-8, -fno-integer-4-integer-8 |
| 2768 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2769 | .. option:: -fintrinsic-modules-path, -fno-intrinsic-modules-path |
| 2770 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2771 | .. option:: -fmax-array-constructor=<arg> |
| 2772 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2773 | .. option:: -fmax-errors=<arg> |
| 2774 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2775 | .. option:: -fmax-identifier-length, -fno-max-identifier-length |
| 2776 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2777 | .. option:: -fmax-stack-var-size=<arg> |
| 2778 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2779 | .. option:: -fmax-subrecord-length=<arg> |
| 2780 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2781 | .. option:: -fmodule-private, -fno-module-private |
| 2782 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2783 | .. option:: -fpack-derived, -fno-pack-derived |
| 2784 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2785 | .. option:: -fprotect-parens, -fno-protect-parens |
| 2786 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2787 | .. option:: -frange-check, -fno-range-check |
| 2788 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2789 | .. option:: -freal-4-real-10, -fno-real-4-real-10 |
| 2790 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2791 | .. option:: -freal-4-real-16, -fno-real-4-real-16 |
| 2792 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2793 | .. option:: -freal-4-real-8, -fno-real-4-real-8 |
| 2794 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2795 | .. option:: -freal-8-real-10, -fno-real-8-real-10 |
| 2796 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2797 | .. option:: -freal-8-real-16, -fno-real-8-real-16 |
| 2798 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2799 | .. option:: -freal-8-real-4, -fno-real-8-real-4 |
| 2800 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2801 | .. option:: -frealloc-lhs, -fno-realloc-lhs |
| 2802 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2803 | .. option:: -frecord-marker=<arg> |
| 2804 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2805 | .. option:: -frecursive, -fno-recursive |
| 2806 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2807 | .. option:: -frepack-arrays, -fno-repack-arrays |
| 2808 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2809 | .. option:: -fsecond-underscore, -fno-second-underscore |
| 2810 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2811 | .. option:: -fsign-zero, -fno-sign-zero |
| 2812 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2813 | .. option:: -fstack-arrays, -fno-stack-arrays |
| 2814 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2815 | .. option:: -funderscoring, -fno-underscoring |
| 2816 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2817 | .. option:: -fwhole-file, -fno-whole-file |
| 2818 | |
Jonas Hahnfeld | 06039e8 | 2018-04-20 13:26:03 +0000 | [diff] [blame] | 2819 | .. option:: -imultilib <arg> |
| 2820 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2821 | .. option:: -nocpp |
| 2822 | |
Richard Smith | 081ad4d | 2017-01-24 19:39:46 +0000 | [diff] [blame] | 2823 | .. option:: -static-libgfortran |
| 2824 | |
Richard Smith | c5b2e00 | 2017-01-27 02:08:37 +0000 | [diff] [blame] | 2825 | Linker flags |
| 2826 | ============ |
| 2827 | Flags that are passed on to the linker |
| 2828 | |
| 2829 | .. option:: -L<dir>, --library-directory <arg>, --library-directory=<arg> |
| 2830 | |
| 2831 | Add directory to library search path |
| 2832 | |
| 2833 | .. option:: -Mach |
| 2834 | |
| 2835 | .. option:: -T<script> |
| 2836 | |
| 2837 | Specify <script> as linker script |
| 2838 | |
Richard Smith | 78e23fd | 2017-04-13 22:39:49 +0000 | [diff] [blame] | 2839 | .. option:: -Tbss<addr> |
Richard Smith | c5b2e00 | 2017-01-27 02:08:37 +0000 | [diff] [blame] | 2840 | |
| 2841 | Set starting address of BSS to <addr> |
| 2842 | |
Richard Smith | 78e23fd | 2017-04-13 22:39:49 +0000 | [diff] [blame] | 2843 | .. option:: -Tdata<addr> |
Richard Smith | c5b2e00 | 2017-01-27 02:08:37 +0000 | [diff] [blame] | 2844 | |
Jonas Hahnfeld | 06039e8 | 2018-04-20 13:26:03 +0000 | [diff] [blame] | 2845 | Set starting address of DATA to <addr> |
Richard Smith | c5b2e00 | 2017-01-27 02:08:37 +0000 | [diff] [blame] | 2846 | |
Richard Smith | 78e23fd | 2017-04-13 22:39:49 +0000 | [diff] [blame] | 2847 | .. option:: -Ttext<addr> |
Richard Smith | c5b2e00 | 2017-01-27 02:08:37 +0000 | [diff] [blame] | 2848 | |
Jonas Hahnfeld | 06039e8 | 2018-04-20 13:26:03 +0000 | [diff] [blame] | 2849 | Set starting address of TEXT to <addr> |
Richard Smith | c5b2e00 | 2017-01-27 02:08:37 +0000 | [diff] [blame] | 2850 | |
| 2851 | .. option:: -Wl,<arg>,<arg2>... |
| 2852 | |
| 2853 | Pass the comma separated arguments in <arg> to the linker |
| 2854 | |
| 2855 | .. option:: -X |
| 2856 | |
| 2857 | .. option:: -Xlinker <arg>, --for-linker <arg>, --for-linker=<arg> |
| 2858 | |
| 2859 | Pass <arg> to the linker |
| 2860 | |
| 2861 | .. program:: clang1 |
| 2862 | .. option:: -Z |
| 2863 | .. program:: clang |
| 2864 | |
| 2865 | .. option:: -e<arg>, --entry |
| 2866 | |
| 2867 | .. option:: -filelist <arg> |
| 2868 | |
| 2869 | .. option:: -l<arg> |
| 2870 | |
| 2871 | .. option:: -r |
| 2872 | |
| 2873 | .. option:: -rpath <arg> |
| 2874 | |
| 2875 | .. option:: -s |
| 2876 | |
| 2877 | .. option:: -t |
| 2878 | |
| 2879 | .. option:: -u<arg>, --force-link <arg>, --force-link=<arg> |
| 2880 | |
| 2881 | .. option:: -undef |
| 2882 | |
| 2883 | undef all system defines |
| 2884 | |
| 2885 | .. option:: -undefined<arg>, --no-undefined |
| 2886 | |
| 2887 | .. option:: -z <arg> |
| 2888 | |
| 2889 | Pass -z <arg> to the linker |
| 2890 | |