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