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