blob: 609e7fa66c00e7b696459db7d78d12dc5bbb6206 [file] [log] [blame]
Richard Smith081ad4d2017-01-24 19:39:46 +00001..
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=====================================
8Clang command line argument reference
9=====================================
10.. contents::
11 :local:
12
13Introduction
14============
15
16This page lists the command line arguments currently supported by the
17GCC-compatible ``clang`` and ``clang++`` drivers.
18
19
20.. program:: clang
Richard Smithc5b2e002017-01-27 02:08:37 +000021.. option:: -B<dir>, --prefix <arg>, --prefix=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +000022
Richard Smithc5b2e002017-01-27 02:08:37 +000023Add <dir> to search path for binaries and object files used implicitly
Richard Smith081ad4d2017-01-24 19:39:46 +000024
Richard Smith081ad4d2017-01-24 19:39:46 +000025.. option:: -F<arg>
26
27Add directory to framework include search path
28
Richard Smith081ad4d2017-01-24 19:39:46 +000029.. option:: -ObjC
30
31Treat source input files as Objective-C inputs
32
Richard Smithb2c82a62017-01-27 01:54:42 +000033.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +000034.. option:: -ObjC++
Richard Smithb2c82a62017-01-27 01:54:42 +000035.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +000036
37Treat source input files as Objective-C++ inputs
38
Vedant Kumar368540f2018-08-23 17:55:03 +000039.. option:: -Qn, -fno-ident
Craig Topper42da9cb2018-04-23 21:41:06 +000040
41Do not emit metadata containing compiler name and version
42
Richard Smith081ad4d2017-01-24 19:39:46 +000043.. option:: -Qunused-arguments
44
45Don't emit warning for unused driver arguments
46
Vedant Kumar368540f2018-08-23 17:55:03 +000047.. option:: -Qy, -fident
Craig Topper42da9cb2018-04-23 21:41:06 +000048
49Emit metadata containing compiler name and version
50
Richard Smith081ad4d2017-01-24 19:39:46 +000051.. option:: -Wa,<arg>,<arg2>...
52
53Pass the comma separated arguments in <arg> to the assembler
54
Richard Smith081ad4d2017-01-24 19:39:46 +000055.. option:: -Wlarge-by-value-copy=<arg>
56
Richard Smith081ad4d2017-01-24 19:39:46 +000057.. option:: -Xarch\_<arg1> <arg2>
58
Richard Smith081ad4d2017-01-24 19:39:46 +000059.. option:: -Xcuda-fatbinary <arg>
60
61Pass <arg> to fatbinary invocation
62
Richard Smith081ad4d2017-01-24 19:39:46 +000063.. option:: -Xcuda-ptxas <arg>
64
65Pass <arg> to the ptxas assembler
66
Boris Kolpackovb150d242017-08-30 09:15:53 +000067.. option:: -Xopenmp-target <arg>
68
69Pass <arg> to the target offloading toolchain.
70
71.. program:: clang1
Jonas Hahnfelda180fc42018-02-22 17:10:28 +000072.. option:: -Xopenmp-target=<triple> <arg>
Boris Kolpackovb150d242017-08-30 09:15:53 +000073.. program:: clang
74
Jonas Hahnfelda180fc42018-02-22 17:10:28 +000075Pass <arg> to the target offloading toolchain identified by <triple>.
Boris Kolpackovb150d242017-08-30 09:15:53 +000076
Richard Smith081ad4d2017-01-24 19:39:46 +000077.. option:: -Z<arg>
78
Richard Smith081ad4d2017-01-24 19:39:46 +000079.. option:: -a<arg>, --profile-blocks
80
Richard Smith081ad4d2017-01-24 19:39:46 +000081.. option:: -all\_load
82
Richard Smith081ad4d2017-01-24 19:39:46 +000083.. option:: -allowable\_client <arg>
84
Richard Smith081ad4d2017-01-24 19:39:46 +000085.. option:: --analyze
86
87Run the static analyzer
88
Richard Smith081ad4d2017-01-24 19:39:46 +000089.. option:: --analyzer-no-default-checks
90
Richard Smith081ad4d2017-01-24 19:39:46 +000091.. option:: --analyzer-output<arg>
92
93Static analyzer report output format (html\|plist\|plist-multi-file\|plist-html\|text).
94
Richard Smith081ad4d2017-01-24 19:39:46 +000095.. option:: -ansi, --ansi
96
Richard Smith081ad4d2017-01-24 19:39:46 +000097.. option:: -arch <arg>
98
Richard Smithb2c82a62017-01-27 01:54:42 +000099.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000100.. option:: -arch\_errors\_fatal
Richard Smithb2c82a62017-01-27 01:54:42 +0000101.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000102
Richard Smithb2c82a62017-01-27 01:54:42 +0000103.. program:: clang2
Richard Smith081ad4d2017-01-24 19:39:46 +0000104.. option:: -arch\_only <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000105.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000106
Richard Smith081ad4d2017-01-24 19:39:46 +0000107.. option:: -arcmt-migrate-emit-errors
108
109Emit ARC errors even if the migrator can fix them
110
Richard Smith081ad4d2017-01-24 19:39:46 +0000111.. option:: -arcmt-migrate-report-output <arg>
112
113Output path for the plist report
114
Craig Topperd23254a2017-07-20 17:52:48 +0000115.. option:: --autocomplete=<arg>
116
Richard Smith081ad4d2017-01-24 19:39:46 +0000117.. option:: -bind\_at\_load
118
Richard Smith081ad4d2017-01-24 19:39:46 +0000119.. option:: -bundle
120
Richard Smithb2c82a62017-01-27 01:54:42 +0000121.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000122.. option:: -bundle\_loader <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000123.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000124
Craig Topper596527b2018-01-23 18:40:15 +0000125.. option:: -cfguard
126
Andrew Paverdd157a9b2019-10-28 13:22:19 +0000127Emit tables and checks for Windows Control Flow Guard.
128
129.. option:: -cfguard-no-checks
130
131Emit tables required for Windows Control Flow Guard without checks.
Craig Topper596527b2018-01-23 18:40:15 +0000132
Richard Smith081ad4d2017-01-24 19:39:46 +0000133.. option:: -client\_name<arg>
134
Richard Smith081ad4d2017-01-24 19:39:46 +0000135.. option:: -compatibility\_version<arg>
136
Craig Topper287c8012018-01-03 18:29:12 +0000137.. option:: --config <arg>
138
139Specifies configuration file
140
Richard Smith081ad4d2017-01-24 19:39:46 +0000141.. option:: --constant-cfstrings
142
Richard Smith081ad4d2017-01-24 19:39:46 +0000143.. option:: -coverage, --coverage
144
Richard Smith081ad4d2017-01-24 19:39:46 +0000145.. option:: --cuda-compile-host-device
146
147Compile CUDA code for both host and device (default). Has no effect on non-CUDA compilations.
148
Richard Smith081ad4d2017-01-24 19:39:46 +0000149.. option:: --cuda-device-only
150
151Compile CUDA code for device only
152
Richard Smith081ad4d2017-01-24 19:39:46 +0000153.. option:: --cuda-gpu-arch=<arg>, --no-cuda-gpu-arch=<arg>
154
155CUDA GPU architecture (e.g. sm\_35). May be specified more than once.
156
Richard Smith081ad4d2017-01-24 19:39:46 +0000157.. option:: --cuda-host-only
158
159Compile CUDA code for host only. Has no effect on non-CUDA compilations.
160
Jonas Hahnfeld06039e82018-04-20 13:26:03 +0000161.. option:: --cuda-include-ptx=<arg>, --no-cuda-include-ptx=<arg>
162
Sylvestre Ledru90f1dfb2019-01-01 12:51:14 +0000163Include PTX for the following GPU architecture (e.g. sm\_35) or 'all'. May be specified more than once.
Jonas Hahnfeld06039e82018-04-20 13:26:03 +0000164
Richard Smith081ad4d2017-01-24 19:39:46 +0000165.. option:: --cuda-noopt-device-debug, --no-cuda-noopt-device-debug
166
167Enable device-side debug info generation. Disables ptxas optimizations.
168
Richard Smith081ad4d2017-01-24 19:39:46 +0000169.. option:: -current\_version<arg>
170
Richard Smith081ad4d2017-01-24 19:39:46 +0000171.. option:: -dead\_strip
172
Richard Smith081ad4d2017-01-24 19:39:46 +0000173.. option:: -dependency-dot <arg>
174
175Filename to write DOT-formatted header dependencies to
176
Richard Smith081ad4d2017-01-24 19:39:46 +0000177.. option:: -dependency-file <arg>
178
179Filename (or -) to write dependency output to
180
Richard Smith081ad4d2017-01-24 19:39:46 +0000181.. option:: -dumpmachine
182
Richard Smith081ad4d2017-01-24 19:39:46 +0000183.. option:: -dumpversion
184
Richard Smith081ad4d2017-01-24 19:39:46 +0000185.. option:: --dyld-prefix=<arg>, --dyld-prefix <arg>
186
Richard Smith081ad4d2017-01-24 19:39:46 +0000187.. option:: -dylib\_file <arg>
188
Richard Smith081ad4d2017-01-24 19:39:46 +0000189.. option:: -dylinker
190
Richard Smithb2c82a62017-01-27 01:54:42 +0000191.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000192.. option:: -dylinker\_install\_name<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000193.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000194
Richard Smith081ad4d2017-01-24 19:39:46 +0000195.. option:: -dynamic
196
Richard Smith081ad4d2017-01-24 19:39:46 +0000197.. option:: -dynamiclib
198
Richard Smith081ad4d2017-01-24 19:39:46 +0000199.. option:: -emit-ast
200
201Emit Clang AST files for source inputs
202
Richard Smith081ad4d2017-01-24 19:39:46 +0000203.. option:: -exported\_symbols\_list <arg>
204
Richard Smith081ad4d2017-01-24 19:39:46 +0000205.. option:: -faligned-new=<arg>
206
Richard Smith081ad4d2017-01-24 19:39:46 +0000207.. option:: -fcuda-approx-transcendentals, -fno-cuda-approx-transcendentals
208
209Use approximate transcendental functions
210
Richard Smith081ad4d2017-01-24 19:39:46 +0000211.. option:: -fcuda-flush-denormals-to-zero, -fno-cuda-flush-denormals-to-zero
212
213Flush denormal floating point values to zero in CUDA device mode.
214
Craig Topper42da9cb2018-04-23 21:41:06 +0000215.. option:: -fcuda-rdc, -fno-cuda-rdc
216
217Generate relocatable device code, also known as separate compilation mode.
218
Vedant Kumar368540f2018-08-23 17:55:03 +0000219.. option:: -fcuda-short-ptr, -fno-cuda-short-ptr
220
221Use 32-bit pointers for accessing const/local/shared address spaces.
222
Jonas Hahnfeld06039e82018-04-20 13:26:03 +0000223.. option:: -ffixed-r19
224
Vedant Kumar368540f2018-08-23 17:55:03 +0000225Reserve register r19 (Hexagon only)
Jonas Hahnfeld06039e82018-04-20 13:26:03 +0000226
Richard Smith081ad4d2017-01-24 19:39:46 +0000227.. option:: -fheinous-gnu-extensions
228
Richard Smith081ad4d2017-01-24 19:39:46 +0000229.. option:: -flat\_namespace
230
Richard Smith081ad4d2017-01-24 19:39:46 +0000231.. option:: -fopenmp-targets=<arg1>,<arg2>...
232
233Specify comma-separated list of triples OpenMP offloading targets to be supported
234
Richard Smith081ad4d2017-01-24 19:39:46 +0000235.. option:: -force\_cpusubtype\_ALL
236
Richard Smithb2c82a62017-01-27 01:54:42 +0000237.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000238.. option:: -force\_flat\_namespace
Richard Smithb2c82a62017-01-27 01:54:42 +0000239.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000240
Richard Smithb2c82a62017-01-27 01:54:42 +0000241.. program:: clang2
Richard Smith081ad4d2017-01-24 19:39:46 +0000242.. option:: -force\_load <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000243.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000244
Richard Smith081ad4d2017-01-24 19:39:46 +0000245.. option:: -framework <arg>
246
Richard Smith78e23fd2017-04-13 22:39:49 +0000247.. option:: -frtlib-add-rpath, -fno-rtlib-add-rpath
248
249Add -rpath with architecture-specific resource directory to the linker flags
250
Richard Smith081ad4d2017-01-24 19:39:46 +0000251.. option:: --gcc-toolchain=<arg>, -gcc-toolchain <arg>
252
253Use the gcc toolchain at the given directory
254
Richard Smith081ad4d2017-01-24 19:39:46 +0000255.. option:: -gcodeview
256
257Generate CodeView debug information
258
Richard Smith081ad4d2017-01-24 19:39:46 +0000259.. option:: -headerpad\_max\_install\_names<arg>
260
Richard Smith081ad4d2017-01-24 19:39:46 +0000261.. option:: -help, --help
262
263Display available options
264
Richard Smith081ad4d2017-01-24 19:39:46 +0000265.. option:: --help-hidden
266
Jonas Hahnfeld06039e82018-04-20 13:26:03 +0000267Display help for hidden options
268
Vedant Kumar368540f2018-08-23 17:55:03 +0000269.. option:: --hip-link
270
271Link clang-offload-bundler bundles for HIP
272
Richard Smith081ad4d2017-01-24 19:39:46 +0000273.. option:: -image\_base <arg>
274
Richard Smith081ad4d2017-01-24 19:39:46 +0000275.. option:: -index-header-map
276
277Make the next included directory (-I or -F) an indexer header map
278
Richard Smith081ad4d2017-01-24 19:39:46 +0000279.. option:: -init <arg>
280
Richard Smith081ad4d2017-01-24 19:39:46 +0000281.. option:: -install\_name <arg>
282
Richard Smith081ad4d2017-01-24 19:39:46 +0000283.. option:: -keep\_private\_externs
284
Richard Smith081ad4d2017-01-24 19:39:46 +0000285.. option:: -lazy\_framework <arg>
286
Richard Smithb2c82a62017-01-27 01:54:42 +0000287.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000288.. option:: -lazy\_library <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000289.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000290
Richard Smith081ad4d2017-01-24 19:39:46 +0000291.. option:: -mbig-endian, -EB
292
Richard Smith081ad4d2017-01-24 19:39:46 +0000293.. option:: --migrate
294
295Run the migrator
296
Richard Smith78e23fd2017-04-13 22:39:49 +0000297.. option:: -mios-simulator-version-min=<arg>, -miphonesimulator-version-min=<arg>
298
Richard Smith081ad4d2017-01-24 19:39:46 +0000299.. option:: -mlinker-version=<arg>
300
Richard Smith081ad4d2017-01-24 19:39:46 +0000301.. option:: -mlittle-endian, -EL
302
Richard Smith081ad4d2017-01-24 19:39:46 +0000303.. option:: -mllvm <arg>
304
305Additional arguments to forward to LLVM's option processing
306
Richard Smith081ad4d2017-01-24 19:39:46 +0000307.. option:: -module-dependency-dir <arg>
308
309Directory to dump module dependencies to
310
Richard Smith78e23fd2017-04-13 22:39:49 +0000311.. option:: -mtvos-simulator-version-min=<arg>, -mappletvsimulator-version-min=<arg>
312
Richard Smith081ad4d2017-01-24 19:39:46 +0000313.. option:: -multi\_module
314
Richard Smith081ad4d2017-01-24 19:39:46 +0000315.. option:: -multiply\_defined <arg>
316
Richard Smithb2c82a62017-01-27 01:54:42 +0000317.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000318.. option:: -multiply\_defined\_unused <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000319.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000320
Richard Smith78e23fd2017-04-13 22:39:49 +0000321.. option:: -mwatchos-simulator-version-min=<arg>, -mwatchsimulator-version-min=<arg>
322
Richard Smith081ad4d2017-01-24 19:39:46 +0000323.. option:: --no-cuda-version-check
324
325Don't error out if the detected version of the CUDA install is too low for the requested CUDA gpu architecture.
326
Richard Smith081ad4d2017-01-24 19:39:46 +0000327.. option:: -no-integrated-cpp, --no-integrated-cpp
328
Richard Smith081ad4d2017-01-24 19:39:46 +0000329.. option:: -no\_dead\_strip\_inits\_and\_terms
330
Richard Smith081ad4d2017-01-24 19:39:46 +0000331.. option:: -nobuiltininc
332
333Disable builtin #include directories
334
Richard Smith081ad4d2017-01-24 19:39:46 +0000335.. option:: -nocudainc
336
Richard Smith081ad4d2017-01-24 19:39:46 +0000337.. option:: -nocudalib
338
Richard Smith081ad4d2017-01-24 19:39:46 +0000339.. option:: -nodefaultlibs
340
Richard Smith081ad4d2017-01-24 19:39:46 +0000341.. option:: -nofixprebinding
342
Richard Smith081ad4d2017-01-24 19:39:46 +0000343.. option:: -nolibc
344
Richard Smith081ad4d2017-01-24 19:39:46 +0000345.. option:: -nomultidefs
346
Craig Topperd23254a2017-07-20 17:52:48 +0000347.. option:: -nopie, -no-pie
Richard Smith081ad4d2017-01-24 19:39:46 +0000348
Richard Smith081ad4d2017-01-24 19:39:46 +0000349.. option:: -noprebind
350
Petr Hosek08cb3422019-07-11 19:06:38 +0000351.. option:: -noprofilelib
352
Richard Smith081ad4d2017-01-24 19:39:46 +0000353.. option:: -noseglinkedit
354
Richard Smith081ad4d2017-01-24 19:39:46 +0000355.. option:: -nostartfiles
356
Richard Smith081ad4d2017-01-24 19:39:46 +0000357.. option:: -nostdinc, --no-standard-includes
358
Richard Smithb2c82a62017-01-27 01:54:42 +0000359.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000360.. option:: -nostdinc++
Richard Smithb2c82a62017-01-27 01:54:42 +0000361.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000362
363Disable standard #include directories for the C++ standard library
364
Richard Smith081ad4d2017-01-24 19:39:46 +0000365.. option:: -nostdlib, --no-standard-libraries
366
Boris Kolpackovb150d242017-08-30 09:15:53 +0000367.. program:: clang1
368.. option:: -nostdlib++
369.. program:: clang
370
Richard Smith081ad4d2017-01-24 19:39:46 +0000371.. option:: -nostdlibinc
372
Richard Smith081ad4d2017-01-24 19:39:46 +0000373.. option:: -o<file>, --output <arg>, --output=<arg>
374
375Write output to <file>
376
Richard Smith081ad4d2017-01-24 19:39:46 +0000377.. option:: -objcmt-atomic-property
378
379Make migration to 'atomic' properties
380
Richard Smith081ad4d2017-01-24 19:39:46 +0000381.. option:: -objcmt-migrate-all
382
383Enable migration to modern ObjC
384
Richard Smith081ad4d2017-01-24 19:39:46 +0000385.. option:: -objcmt-migrate-annotation
386
387Enable migration to property and method annotations
388
Richard Smith081ad4d2017-01-24 19:39:46 +0000389.. option:: -objcmt-migrate-designated-init
390
391Enable migration to infer NS\_DESIGNATED\_INITIALIZER for initializer methods
392
Richard Smith081ad4d2017-01-24 19:39:46 +0000393.. option:: -objcmt-migrate-instancetype
394
395Enable migration to infer instancetype for method result type
396
Richard Smith081ad4d2017-01-24 19:39:46 +0000397.. option:: -objcmt-migrate-literals
398
399Enable migration to modern ObjC literals
400
Richard Smith081ad4d2017-01-24 19:39:46 +0000401.. option:: -objcmt-migrate-ns-macros
402
403Enable migration to NS\_ENUM/NS\_OPTIONS macros
404
Richard Smith081ad4d2017-01-24 19:39:46 +0000405.. option:: -objcmt-migrate-property
406
407Enable migration to modern ObjC property
408
Richard Smith081ad4d2017-01-24 19:39:46 +0000409.. option:: -objcmt-migrate-property-dot-syntax
410
411Enable migration of setter/getter messages to property-dot syntax
412
Richard Smith081ad4d2017-01-24 19:39:46 +0000413.. option:: -objcmt-migrate-protocol-conformance
414
415Enable migration to add protocol conformance on classes
416
Richard Smith081ad4d2017-01-24 19:39:46 +0000417.. option:: -objcmt-migrate-readonly-property
418
419Enable migration to modern ObjC readonly property
420
Richard Smith081ad4d2017-01-24 19:39:46 +0000421.. option:: -objcmt-migrate-readwrite-property
422
423Enable migration to modern ObjC readwrite property
424
Richard Smith081ad4d2017-01-24 19:39:46 +0000425.. option:: -objcmt-migrate-subscripting
426
427Enable migration to modern ObjC subscripting
428
Richard Smith081ad4d2017-01-24 19:39:46 +0000429.. option:: -objcmt-ns-nonatomic-iosonly
430
431Enable migration to use NS\_NONATOMIC\_IOSONLY macro for setting property's 'atomic' attribute
432
Richard Smith081ad4d2017-01-24 19:39:46 +0000433.. option:: -objcmt-returns-innerpointer-property
434
435Enable migration to annotate property with NS\_RETURNS\_INNER\_POINTER
436
Richard Smith081ad4d2017-01-24 19:39:46 +0000437.. option:: -objcmt-whitelist-dir-path=<arg>, -objcmt-white-list-dir-path=<arg>
438
439Only modify files with a filename contained in the provided directory path
440
Richard Smith081ad4d2017-01-24 19:39:46 +0000441.. option:: -object
442
Richard Smith081ad4d2017-01-24 19:39:46 +0000443.. option:: -p, --profile
444
Richard Smith081ad4d2017-01-24 19:39:46 +0000445.. option:: -pagezero\_size<arg>
446
Richard Smith081ad4d2017-01-24 19:39:46 +0000447.. option:: -pg
448
449Enable mcount instrumentation
450
Richard Smith081ad4d2017-01-24 19:39:46 +0000451.. option:: -pie
452
Richard Smith081ad4d2017-01-24 19:39:46 +0000453.. option:: -pipe, --pipe
454
455Use pipes between commands, when possible
456
Richard Smith081ad4d2017-01-24 19:39:46 +0000457.. option:: -prebind
458
Richard Smithb2c82a62017-01-27 01:54:42 +0000459.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000460.. option:: -prebind\_all\_twolevel\_modules
Richard Smithb2c82a62017-01-27 01:54:42 +0000461.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000462
Richard Smith081ad4d2017-01-24 19:39:46 +0000463.. option:: -preload
464
Richard Smith081ad4d2017-01-24 19:39:46 +0000465.. option:: --print-diagnostic-categories
466
Vedant Kumar368540f2018-08-23 17:55:03 +0000467.. option:: -print-effective-triple, --print-effective-triple
468
469Print the effective target triple
470
Richard Smith081ad4d2017-01-24 19:39:46 +0000471.. option:: -print-file-name=<file>, --print-file-name=<file>, --print-file-name <arg>
472
473Print the full library path of <file>
474
Richard Smith081ad4d2017-01-24 19:39:46 +0000475.. option:: -print-ivar-layout
476
477Enable Objective-C Ivar layout bitmap print trace
478
Richard Smith081ad4d2017-01-24 19:39:46 +0000479.. option:: -print-libgcc-file-name, --print-libgcc-file-name
480
481Print the library path for the currently used compiler runtime library ("libgcc.a" or "libclang\_rt.builtins.\*.a")
482
Richard Smith081ad4d2017-01-24 19:39:46 +0000483.. option:: -print-multi-directory, --print-multi-directory
484
Richard Smith081ad4d2017-01-24 19:39:46 +0000485.. option:: -print-multi-lib, --print-multi-lib
486
Richard Smith081ad4d2017-01-24 19:39:46 +0000487.. option:: -print-prog-name=<name>, --print-prog-name=<name>, --print-prog-name <arg>
488
489Print the full program path of <name>
490
Richard Smith78e23fd2017-04-13 22:39:49 +0000491.. option:: -print-resource-dir, --print-resource-dir
492
493Print the resource directory pathname
494
Richard Smith081ad4d2017-01-24 19:39:46 +0000495.. option:: -print-search-dirs, --print-search-dirs
496
497Print the paths used for finding libraries and programs
498
Vedant Kumar368540f2018-08-23 17:55:03 +0000499.. option:: -print-target-triple, --print-target-triple
500
501Print the normalized target triple
502
Richard Smith081ad4d2017-01-24 19:39:46 +0000503.. option:: -private\_bundle
504
Richard Smith081ad4d2017-01-24 19:39:46 +0000505.. option:: -pthread, -no-pthread
506
507Support POSIX threads in generated code
508
Richard Smith081ad4d2017-01-24 19:39:46 +0000509.. option:: -pthreads
510
Richard Smith081ad4d2017-01-24 19:39:46 +0000511.. option:: -rdynamic
512
Richard Smith081ad4d2017-01-24 19:39:46 +0000513.. option:: -read\_only\_relocs <arg>
514
Richard Smith081ad4d2017-01-24 19:39:46 +0000515.. option:: -relocatable-pch, --relocatable-pch
516
517Whether to build a relocatable precompiled header
518
Richard Smith081ad4d2017-01-24 19:39:46 +0000519.. option:: -remap
520
Richard Smith081ad4d2017-01-24 19:39:46 +0000521.. option:: -rewrite-legacy-objc
522
523Rewrite Legacy Objective-C source to C++
524
Richard Smith081ad4d2017-01-24 19:39:46 +0000525.. option:: -rtlib=<arg>, --rtlib=<arg>, --rtlib <arg>
526
527Compiler runtime library to use
528
Richard Smith081ad4d2017-01-24 19:39:46 +0000529.. option:: -save-stats=<arg>, --save-stats=<arg>, -save-stats (equivalent to -save-stats=cwd), --save-stats (equivalent to -save-stats=cwd)
530
531Save llvm statistics.
532
Richard Smith081ad4d2017-01-24 19:39:46 +0000533.. option:: -save-temps=<arg>, --save-temps=<arg>, -save-temps (equivalent to -save-temps=cwd), --save-temps (equivalent to -save-temps=cwd)
534
535Save intermediate compilation results.
536
Richard Smith081ad4d2017-01-24 19:39:46 +0000537.. option:: -sectalign <arg1> <arg2> <arg3>
538
Richard Smith081ad4d2017-01-24 19:39:46 +0000539.. option:: -sectcreate <arg1> <arg2> <arg3>
540
Richard Smith081ad4d2017-01-24 19:39:46 +0000541.. option:: -sectobjectsymbols <arg1> <arg2>
542
Richard Smith081ad4d2017-01-24 19:39:46 +0000543.. option:: -sectorder <arg1> <arg2> <arg3>
544
Richard Smith081ad4d2017-01-24 19:39:46 +0000545.. option:: -seg1addr<arg>
546
Richard Smith081ad4d2017-01-24 19:39:46 +0000547.. option:: -seg\_addr\_table <arg>
548
Richard Smithb2c82a62017-01-27 01:54:42 +0000549.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000550.. option:: -seg\_addr\_table\_filename <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000551.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000552
Richard Smith081ad4d2017-01-24 19:39:46 +0000553.. option:: -segaddr <arg1> <arg2>
554
Richard Smith081ad4d2017-01-24 19:39:46 +0000555.. option:: -segcreate <arg1> <arg2> <arg3>
556
Richard Smith081ad4d2017-01-24 19:39:46 +0000557.. option:: -seglinkedit
558
Richard Smith081ad4d2017-01-24 19:39:46 +0000559.. option:: -segprot <arg1> <arg2> <arg3>
560
Richard Smith081ad4d2017-01-24 19:39:46 +0000561.. option:: -segs\_read\_<arg>
562
Richard Smithb2c82a62017-01-27 01:54:42 +0000563.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000564.. option:: -segs\_read\_only\_addr <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000565.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000566
Richard Smithb2c82a62017-01-27 01:54:42 +0000567.. program:: clang2
Richard Smith081ad4d2017-01-24 19:39:46 +0000568.. option:: -segs\_read\_write\_addr <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000569.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000570
Richard Smith081ad4d2017-01-24 19:39:46 +0000571.. option:: -serialize-diagnostics <arg>, --serialize-diagnostics <arg>
572
573Serialize compiler diagnostics to a file
574
Richard Smith081ad4d2017-01-24 19:39:46 +0000575.. option:: -shared, --shared
576
Richard Smith081ad4d2017-01-24 19:39:46 +0000577.. option:: -shared-libgcc
578
Craig Topper16418662017-11-20 18:07:43 +0000579.. option:: -shared-libsan, -shared-libasan
580
Vedant Kumar368540f2018-08-23 17:55:03 +0000581Dynamically link the sanitizer runtime
582
Richard Smith081ad4d2017-01-24 19:39:46 +0000583.. option:: -single\_module
584
Richard Smith081ad4d2017-01-24 19:39:46 +0000585.. option:: -specs=<arg>, --specs=<arg>
586
Richard Smith081ad4d2017-01-24 19:39:46 +0000587.. option:: -static, --static
588
Richard Smith081ad4d2017-01-24 19:39:46 +0000589.. option:: -static-libgcc
590
Craig Topper16418662017-11-20 18:07:43 +0000591.. option:: -static-libsan
592
Vedant Kumar368540f2018-08-23 17:55:03 +0000593Statically link the sanitizer runtime
594
Richard Smith081ad4d2017-01-24 19:39:46 +0000595.. option:: -static-libstdc++
596
Richard Smith081ad4d2017-01-24 19:39:46 +0000597.. option:: -std-default=<arg>
598
Richard Smith081ad4d2017-01-24 19:39:46 +0000599.. option:: -stdlib=<arg>, --stdlib=<arg>, --stdlib <arg>
600
601C++ standard library to use
602
Richard Smith081ad4d2017-01-24 19:39:46 +0000603.. option:: -sub\_library<arg>
604
Richard Smithb2c82a62017-01-27 01:54:42 +0000605.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000606.. option:: -sub\_umbrella<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000607.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000608
Richard Smith081ad4d2017-01-24 19:39:46 +0000609.. option:: --sysroot=<arg>, --sysroot <arg>
610
Richard Smith081ad4d2017-01-24 19:39:46 +0000611.. option:: --target-help
612
Richard Smith081ad4d2017-01-24 19:39:46 +0000613.. option:: --target=<arg>, -target <arg>
614
615Generate code for the given target
616
Ziang Wanaf857b92019-06-14 21:42:21 +0000617.. option:: --print-supported-cpus
618
619Print supported cpu models for the given target
620
Richard Smith081ad4d2017-01-24 19:39:46 +0000621.. option:: -time
622
623Time individual commands
624
Richard Smith081ad4d2017-01-24 19:39:46 +0000625.. option:: -traditional, --traditional
626
Richard Smith081ad4d2017-01-24 19:39:46 +0000627.. option:: -traditional-cpp, --traditional-cpp
628
629Enable some traditional CPP emulation
630
Richard Smith081ad4d2017-01-24 19:39:46 +0000631.. option:: -twolevel\_namespace
632
Richard Smithb2c82a62017-01-27 01:54:42 +0000633.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000634.. option:: -twolevel\_namespace\_hints
Richard Smithb2c82a62017-01-27 01:54:42 +0000635.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000636
Richard Smith081ad4d2017-01-24 19:39:46 +0000637.. option:: -umbrella <arg>
638
Richard Smith081ad4d2017-01-24 19:39:46 +0000639.. option:: -unexported\_symbols\_list <arg>
640
Richard Smith081ad4d2017-01-24 19:39:46 +0000641.. option:: -v, --verbose
642
643Show commands to run and use verbose output
644
Richard Smith081ad4d2017-01-24 19:39:46 +0000645.. option:: --verify-debug-info
646
647Verify the binary representation of debug output
648
Richard Smith081ad4d2017-01-24 19:39:46 +0000649.. option:: --version
650
Craig Topper16418662017-11-20 18:07:43 +0000651Print version information
652
Richard Smith081ad4d2017-01-24 19:39:46 +0000653.. option:: -w, --no-warnings
654
655Suppress all warnings
656
Richard Smith081ad4d2017-01-24 19:39:46 +0000657.. option:: -weak-l<arg>
658
Richard Smith081ad4d2017-01-24 19:39:46 +0000659.. option:: -weak\_framework <arg>
660
Richard Smithb2c82a62017-01-27 01:54:42 +0000661.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000662.. option:: -weak\_library <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000663.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000664
Richard Smithb2c82a62017-01-27 01:54:42 +0000665.. program:: clang2
Richard Smith081ad4d2017-01-24 19:39:46 +0000666.. option:: -weak\_reference\_mismatches <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000667.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000668
Richard Smith081ad4d2017-01-24 19:39:46 +0000669.. option:: -whatsloaded
670
Richard Smith081ad4d2017-01-24 19:39:46 +0000671.. option:: -whyload
672
Richard Smith081ad4d2017-01-24 19:39:46 +0000673.. option:: -working-directory<arg>, -working-directory=<arg>
674
675Resolve file paths relative to the specified directory
676
Richard Smith081ad4d2017-01-24 19:39:46 +0000677.. option:: -x<language>, --language <arg>, --language=<arg>
678
679Treat subsequent input files as having type <language>
680
Richard Smith081ad4d2017-01-24 19:39:46 +0000681.. option:: -y<arg>
682
683Actions
684=======
685The action to perform on the input.
686
Richard Smith081ad4d2017-01-24 19:39:46 +0000687.. option:: -E, --preprocess
688
689Only run the preprocessor
690
Richard Smith081ad4d2017-01-24 19:39:46 +0000691.. option:: -S, --assemble
692
693Only run preprocess and compilation steps
694
Richard Smithc5b2e002017-01-27 02:08:37 +0000695.. option:: -c, --compile
696
697Only run preprocess, compile, and assemble steps
698
Richard Smith081ad4d2017-01-24 19:39:46 +0000699.. option:: -emit-llvm
700
701Use the LLVM representation for assembler and object files
702
Richard Smith081ad4d2017-01-24 19:39:46 +0000703.. option:: -fsyntax-only
704
Richard Smith081ad4d2017-01-24 19:39:46 +0000705.. option:: -module-file-info
706
707Provide information about a particular module file
708
Richard Smith081ad4d2017-01-24 19:39:46 +0000709.. option:: --precompile
710
711Only precompile the input
712
Richard Smith081ad4d2017-01-24 19:39:46 +0000713.. option:: -rewrite-objc
714
715Rewrite Objective-C source to C++
716
Richard Smith081ad4d2017-01-24 19:39:46 +0000717.. option:: -verify-pch
718
719Load and verify that a pre-compiled header file is not stale
720
721Compilation flags
722=================
723
724Flags controlling the behavior of Clang during compilation. These flags have
725no effect during actions that do not perform compilation.
726
Richard Smithc5b2e002017-01-27 02:08:37 +0000727.. option:: -Xassembler <arg>
Richard Smith081ad4d2017-01-24 19:39:46 +0000728
Richard Smithc5b2e002017-01-27 02:08:37 +0000729Pass <arg> to the assembler
Richard Smith081ad4d2017-01-24 19:39:46 +0000730
Richard Smith081ad4d2017-01-24 19:39:46 +0000731.. option:: -Xclang <arg>
732
733Pass <arg> to the clang compiler
734
Boris Kolpackovb150d242017-08-30 09:15:53 +0000735.. option:: -fclang-abi-compat=<version>
736
737Attempt to match the ABI of Clang <version>
738
Richard Smith081ad4d2017-01-24 19:39:46 +0000739.. option:: -fcomment-block-commands=<arg>,<arg2>...
740
741Treat each comma separated argument in <arg> as a documentation comment block command
742
Vedant Kumar368540f2018-08-23 17:55:03 +0000743.. option:: -fcomplete-member-pointers, -fno-complete-member-pointers
744
745Require member pointer base types to be complete if they would be significant under the Microsoft ABI
746
747.. option:: -fcrash-diagnostics-dir=<arg>
748
Richard Smith081ad4d2017-01-24 19:39:46 +0000749.. option:: -fdeclspec, -fno-declspec
750
751Allow \_\_declspec as a keyword
752
Richard Smith081ad4d2017-01-24 19:39:46 +0000753.. option:: -fdepfile-entry=<arg>
754
Richard Smith081ad4d2017-01-24 19:39:46 +0000755.. option:: -fdiagnostics-fixit-info, -fno-diagnostics-fixit-info
756
Richard Smith081ad4d2017-01-24 19:39:46 +0000757.. option:: -fdiagnostics-format=<arg>
758
Richard Smith081ad4d2017-01-24 19:39:46 +0000759.. option:: -fdiagnostics-parseable-fixits
760
761Print fix-its in machine parseable form
762
Richard Smith081ad4d2017-01-24 19:39:46 +0000763.. option:: -fdiagnostics-print-source-range-info
764
765Print source range spans in numeric form
766
Richard Smith081ad4d2017-01-24 19:39:46 +0000767.. option:: -fdiagnostics-show-category=<arg>
768
Jonas Hahnfelda180fc42018-02-22 17:10:28 +0000769.. option:: -fdiscard-value-names, -fno-discard-value-names
770
771Discard value names in LLVM IR
772
773.. option:: -fexperimental-isel, -fno-experimental-isel
774
775Enables the experimental global instruction selector
776
Richard Smith081ad4d2017-01-24 19:39:46 +0000777.. option:: -fexperimental-new-pass-manager, -fno-experimental-new-pass-manager
778
779Enables an experimental new pass manager in LLVM.
780
Craig Topper16418662017-11-20 18:07:43 +0000781.. option:: -ffine-grained-bitfield-accesses, -fno-fine-grained-bitfield-accesses
782
Vedant Kumar368540f2018-08-23 17:55:03 +0000783Use separate accesses for consecutive bitfield runs with legal widths and alignments.
Craig Topper16418662017-11-20 18:07:43 +0000784
Richard Smith081ad4d2017-01-24 19:39:46 +0000785.. option:: -finline-functions, -fno-inline-functions
786
787Inline suitable functions
788
Richard Smith081ad4d2017-01-24 19:39:46 +0000789.. option:: -finline-hint-functions
790
791Inline functions which are (explicitly or implicitly) marked inline
792
Richard Smith081ad4d2017-01-24 19:39:46 +0000793.. option:: -fno-crash-diagnostics
794
Richard Smith78e23fd2017-04-13 22:39:49 +0000795Disable auto-generation of preprocessed source files and a script for reproduction during a clang crash
796
Richard Smith081ad4d2017-01-24 19:39:46 +0000797.. option:: -fno-sanitize-blacklist
798
799Don't use blacklist file for sanitizers
800
Richard Smith081ad4d2017-01-24 19:39:46 +0000801.. option:: -fparse-all-comments
802
Scott Linderde6beb02018-12-14 15:38:15 +0000803.. option:: -frecord-command-line, -frecord-gcc-switches, -fno-record-command-line, -fno-record-gcc-switches
804
805Generate a section named ".GCC.command.line" containing the clang driver
806command-line. After linking, the section may contain multiple command lines,
807which will be individually terminated by null bytes. Separate arguments within
808a command line are combined with spaces; spaces and backslashes within an
809argument are escaped with backslashes. This format differs from the format of
810the equivalent section produced by GCC with the -frecord-gcc-switches flag.
811This option is currently only supported on ELF targets.
812
Richard Smith081ad4d2017-01-24 19:39:46 +0000813.. option:: -fsanitize-address-field-padding=<arg>
814
815Level of field padding for AddressSanitizer
816
Craig Topperd23254a2017-07-20 17:52:48 +0000817.. option:: -fsanitize-address-globals-dead-stripping
818
819Enable linker dead stripping of globals in AddressSanitizer
820
Vitaly Buka8076c572018-12-05 01:44:31 +0000821.. option:: -fsanitize-address-use-odr-indicator, -fno-sanitize-address-use-odr-indicator
822
823Enable ODR indicator globals to avoid false ODR violation reports in partially sanitized programs at the cost of an increase in binary size
824
Filipe Cabecinhas0eb50082018-11-02 17:29:04 +0000825.. option:: -fsanitize-address-poison-custom-array-cookie, -fno-sanitize-address-poison-custom-array-cookie
Jonas Hahnfelda180fc42018-02-22 17:10:28 +0000826
Filipe Cabecinhas0eb50082018-11-02 17:29:04 +0000827Enable "poisoning" array cookies when allocating arrays with a custom operator new\[\] in Address Sanitizer, preventing accesses to the cookies from user code. An array cookie is a small implementation-defined header added to certain array allocations to record metadata such as the length of the array. Accesses to array cookies from user code are technically allowed by the standard but are more likely to be the result of an out-of-bounds array access.
828
829An operator new\[\] is "custom" if it is not one of the allocation functions provided by the C++ standard library. Array cookies from non-custom allocation functions are always poisoned.
Jonas Hahnfelda180fc42018-02-22 17:10:28 +0000830
Richard Smith081ad4d2017-01-24 19:39:46 +0000831.. option:: -fsanitize-address-use-after-scope, -fno-sanitize-address-use-after-scope
832
833Enable use-after-scope detection in AddressSanitizer
834
Richard Smith081ad4d2017-01-24 19:39:46 +0000835.. option:: -fsanitize-blacklist=<arg>
836
837Path to blacklist file for sanitizers
838
Richard Smith081ad4d2017-01-24 19:39:46 +0000839.. option:: -fsanitize-cfi-cross-dso, -fno-sanitize-cfi-cross-dso
840
841Enable control flow integrity (CFI) checks for cross-DSO calls.
842
Vlad Tsyrklevich634c6012017-10-31 22:39:44 +0000843.. option:: -fsanitize-cfi-icall-generalize-pointers
844
Craig Topper16418662017-11-20 18:07:43 +0000845Generalize pointers in CFI indirect call type signature checks
Vlad Tsyrklevich634c6012017-10-31 22:39:44 +0000846
Richard Smith081ad4d2017-01-24 19:39:46 +0000847.. option:: -fsanitize-coverage=<arg1>,<arg2>..., -fno-sanitize-coverage=<arg1>,<arg2>...
848
849Specify the type of coverage instrumentation for Sanitizers
850
Richard Smith081ad4d2017-01-24 19:39:46 +0000851.. option:: -fsanitize-link-c++-runtime
852
Richard Smith081ad4d2017-01-24 19:39:46 +0000853.. option:: -fsanitize-memory-track-origins, -fno-sanitize-memory-track-origins
854
855Enable origins tracking in MemorySanitizer
856
Richard Smithb2c82a62017-01-27 01:54:42 +0000857.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000858.. option:: -fsanitize-memory-track-origins=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000859.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000860
861Enable origins tracking in MemorySanitizer
862
Craig Topper16418662017-11-20 18:07:43 +0000863.. option:: -fsanitize-memory-use-after-dtor, -fno-sanitize-memory-use-after-dtor
Richard Smith081ad4d2017-01-24 19:39:46 +0000864
865Enable use-after-destroy detection in MemorySanitizer
866
Boris Kolpackovb150d242017-08-30 09:15:53 +0000867.. option:: -fsanitize-minimal-runtime, -fno-sanitize-minimal-runtime
868
Richard Smith081ad4d2017-01-24 19:39:46 +0000869.. option:: -fsanitize-recover, -fno-sanitize-recover
870
Richard Smithb2c82a62017-01-27 01:54:42 +0000871.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000872.. option:: -fsanitize-recover=<arg1>,<arg2>..., -fno-sanitize-recover=<arg1>,<arg2>...
Richard Smithb2c82a62017-01-27 01:54:42 +0000873.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000874
875Enable recovery for specified sanitizers
876
Richard Smith081ad4d2017-01-24 19:39:46 +0000877.. option:: -fsanitize-stats, -fno-sanitize-stats
878
879Enable sanitizer statistics gathering.
880
Richard Smith081ad4d2017-01-24 19:39:46 +0000881.. option:: -fsanitize-thread-atomics, -fno-sanitize-thread-atomics
882
883Enable atomic operations instrumentation in ThreadSanitizer (default)
884
Richard Smith081ad4d2017-01-24 19:39:46 +0000885.. option:: -fsanitize-thread-func-entry-exit, -fno-sanitize-thread-func-entry-exit
886
887Enable function entry/exit instrumentation in ThreadSanitizer (default)
888
Richard Smith081ad4d2017-01-24 19:39:46 +0000889.. option:: -fsanitize-thread-memory-access, -fno-sanitize-thread-memory-access
890
891Enable memory access instrumentation in ThreadSanitizer (default)
892
Richard Smith081ad4d2017-01-24 19:39:46 +0000893.. option:: -fsanitize-trap=<arg1>,<arg2>..., -fno-sanitize-trap=<arg1>,<arg2>...
894
895Enable trapping for specified sanitizers
896
Richard Smith081ad4d2017-01-24 19:39:46 +0000897.. option:: -fsanitize-undefined-strip-path-components=<number>
898
899Strip (or keep only, if negative) a given number of path components when emitting check metadata.
900
Richard Smith081ad4d2017-01-24 19:39:46 +0000901.. option:: -fsanitize-undefined-trap-on-error, -fno-sanitize-undefined-trap-on-error
902
Richard Smith081ad4d2017-01-24 19:39:46 +0000903.. option:: -fsanitize=<check>,<arg2>..., -fno-sanitize=<arg1>,<arg2>...
904
905Turn on runtime checks for various forms of undefined or suspicious behavior. See user manual for available checks
906
serge-sans-paillefd09f122020-01-16 11:56:41 +0100907.. option:: -fno-semantic-interposition, -fsemantic-interposition
908
909Enable semantic interposition. Semantic interposition allows for the
910interposition of a symbol by another at runtime, thus preventing a range of
911inter-procedural optimisation.
912
Vedant Kumar368540f2018-08-23 17:55:03 +0000913.. option:: -moutline, -mno-outline
914
915Enable function outlining (AArch64 only)
916
Richard Smith081ad4d2017-01-24 19:39:46 +0000917.. option:: --param <arg>, --param=<arg>
918
Richard Smith081ad4d2017-01-24 19:39:46 +0000919.. option:: -std=<arg>, --std=<arg>, --std <arg>
920
921Language standard to compile for
922
Richard Smithc5b2e002017-01-27 02:08:37 +0000923Preprocessor flags
924~~~~~~~~~~~~~~~~~~
925
926Flags controlling the behavior of the Clang preprocessor.
927
928.. option:: -C, --comments
929
930Include comments in preprocessed output
931
932.. option:: -CC, --comments-in-macros
933
934Include comments from within macros in preprocessed output
935
936.. option:: -D<macro>=<value>, --define-macro <arg>, --define-macro=<arg>
937
938Define <macro> to <value> (or 1 if <value> omitted)
939
940.. option:: -H, --trace-includes
941
942Show header includes and nesting depth
943
944.. option:: -P, --no-line-commands
945
946Disable linemarker output in -E mode
947
948.. option:: -U<macro>, --undefine-macro <arg>, --undefine-macro=<arg>
949
950Undefine macro <macro>
951
952.. option:: -Wp,<arg>,<arg2>...
953
954Pass the comma separated arguments in <arg> to the preprocessor
955
956.. option:: -Xpreprocessor <arg>
957
958Pass <arg> to the preprocessor
959
Richard Smith081ad4d2017-01-24 19:39:46 +0000960Include path management
Richard Smithc5b2e002017-01-27 02:08:37 +0000961-----------------------
Richard Smith081ad4d2017-01-24 19:39:46 +0000962
963Flags controlling how ``#include``\s are resolved to files.
964
Richard Smithc5b2e002017-01-27 02:08:37 +0000965.. option:: -I<dir>, --include-directory <arg>, --include-directory=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +0000966
967Add directory to include search path
968
Richard Smith081ad4d2017-01-24 19:39:46 +0000969.. option:: -I-, --include-barrier
970
Richard Smithc5b2e002017-01-27 02:08:37 +0000971Restrict all prior -I flags to double-quoted inclusion and remove current directory from include path
972
Jonas Hahnfelda180fc42018-02-22 17:10:28 +0000973.. option:: --cuda-path-ignore-env
974
975Ignore environment variables to detect CUDA installation
976
Richard Smith081ad4d2017-01-24 19:39:46 +0000977.. option:: --cuda-path=<arg>
978
979CUDA installation path
980
Richard Smith081ad4d2017-01-24 19:39:46 +0000981.. option:: -cxx-isystem<directory>
982
983Add directory to the C++ SYSTEM include search path
984
Richard Smith081ad4d2017-01-24 19:39:46 +0000985.. option:: -fbuild-session-file=<file>
986
987Use the last modification time of <file> as the build session timestamp
988
Richard Smith081ad4d2017-01-24 19:39:46 +0000989.. option:: -fbuild-session-timestamp=<time since Epoch in seconds>
990
991Time when the current build session started
992
Boris Kolpackovb150d242017-08-30 09:15:53 +0000993.. option:: -fmodule-file=\[<name>=\]<file>
994
995Specify the mapping of module name to precompiled module file, or load a module file if name is omitted.
996
Richard Smith081ad4d2017-01-24 19:39:46 +0000997.. option:: -fmodules-cache-path=<directory>
998
999Specify the module cache path
1000
Richard Smith081ad4d2017-01-24 19:39:46 +00001001.. option:: -fmodules-disable-diagnostic-validation
1002
1003Disable validation of the diagnostic options when loading the module
1004
Richard Smith081ad4d2017-01-24 19:39:46 +00001005.. option:: -fmodules-prune-after=<seconds>
1006
1007Specify the interval (in seconds) after which a module file will be considered unused
1008
Richard Smith081ad4d2017-01-24 19:39:46 +00001009.. option:: -fmodules-prune-interval=<seconds>
1010
1011Specify the interval (in seconds) between attempts to prune the module cache
1012
Richard Smith081ad4d2017-01-24 19:39:46 +00001013.. option:: -fmodules-user-build-path <directory>
1014
1015Specify the module user build path
1016
Richard Smith081ad4d2017-01-24 19:39:46 +00001017.. option:: -fmodules-validate-once-per-build-session
1018
1019Don't verify input files for the modules if the module has been successfully validated or loaded during this build session
1020
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00001021.. option:: -fmodules-validate-system-headers, -fno-modules-validate-system-headers
Richard Smith081ad4d2017-01-24 19:39:46 +00001022
1023Validate the system headers that a module depends on when loading the module
1024
Richard Smith081ad4d2017-01-24 19:39:46 +00001025.. option:: -fprebuilt-module-path=<directory>
1026
1027Specify the prebuilt module path
1028
Richard Smith081ad4d2017-01-24 19:39:46 +00001029.. option:: -idirafter<arg>, --include-directory-after <arg>, --include-directory-after=<arg>
1030
1031Add directory to AFTER include search path
1032
Richard Smith081ad4d2017-01-24 19:39:46 +00001033.. option:: -iframework<arg>
1034
1035Add directory to SYSTEM framework search path
1036
Richard Smith78e23fd2017-04-13 22:39:49 +00001037.. option:: -iframeworkwithsysroot<directory>
1038
1039Add directory to SYSTEM framework search path, absolute paths are relative to -isysroot
1040
Richard Smith081ad4d2017-01-24 19:39:46 +00001041.. option:: -imacros<file>, --imacros<file>, --imacros=<arg>
1042
1043Include macros from file before parsing
1044
Richard Smith081ad4d2017-01-24 19:39:46 +00001045.. option:: -include<file>, --include<file>, --include=<arg>
1046
1047Include file before parsing
1048
Richard Smith081ad4d2017-01-24 19:39:46 +00001049.. option:: -include-pch <file>
1050
1051Include precompiled header file
1052
Richard Smith081ad4d2017-01-24 19:39:46 +00001053.. option:: -iprefix<dir>, --include-prefix <arg>, --include-prefix=<arg>
1054
1055Set the -iwithprefix/-iwithprefixbefore prefix
1056
Richard Smith081ad4d2017-01-24 19:39:46 +00001057.. option:: -iquote<directory>
1058
1059Add directory to QUOTE include search path
1060
Richard Smith081ad4d2017-01-24 19:39:46 +00001061.. option:: -isysroot<dir>
1062
1063Set the system root directory (usually /)
1064
Richard Smith081ad4d2017-01-24 19:39:46 +00001065.. option:: -isystem<directory>
1066
1067Add directory to SYSTEM include search path
1068
Richard Smith081ad4d2017-01-24 19:39:46 +00001069.. option:: -isystem-after<directory>
1070
1071Add directory to end of the SYSTEM include search path
1072
Richard Smith081ad4d2017-01-24 19:39:46 +00001073.. option:: -ivfsoverlay<arg>
1074
1075Overlay the virtual filesystem described by file over the real file system
1076
Richard Smith081ad4d2017-01-24 19:39:46 +00001077.. option:: -iwithprefix<dir>, --include-with-prefix <arg>, --include-with-prefix-after <arg>, --include-with-prefix-after=<arg>, --include-with-prefix=<arg>
1078
1079Set directory to SYSTEM include search path with prefix
1080
Richard Smith081ad4d2017-01-24 19:39:46 +00001081.. option:: -iwithprefixbefore<dir>, --include-with-prefix-before <arg>, --include-with-prefix-before=<arg>
1082
1083Set directory to include search path with prefix
1084
Richard Smith081ad4d2017-01-24 19:39:46 +00001085.. option:: -iwithsysroot<directory>
1086
1087Add directory to SYSTEM include search path, absolute paths are relative to -isysroot
1088
Richard Smith081ad4d2017-01-24 19:39:46 +00001089.. option:: --ptxas-path=<arg>
1090
1091Path to ptxas (used for compiling CUDA code)
1092
Richard Smith081ad4d2017-01-24 19:39:46 +00001093.. option:: --system-header-prefix=<prefix>, --no-system-header-prefix=<prefix>, --system-header-prefix <arg>
1094
1095Treat all #include paths starting with <prefix> as including a system header.
1096
1097Dependency file generation
Richard Smithc5b2e002017-01-27 02:08:37 +00001098--------------------------
Richard Smith081ad4d2017-01-24 19:39:46 +00001099
1100Flags controlling generation of a dependency file for ``make``-like build
1101systems.
1102
Richard Smith081ad4d2017-01-24 19:39:46 +00001103.. option:: -M, --dependencies
1104
1105Like -MD, but also implies -E and writes to stdout by default
1106
Richard Smith081ad4d2017-01-24 19:39:46 +00001107.. option:: -MD, --write-dependencies
1108
1109Write a depfile containing user and system headers
1110
Richard Smith081ad4d2017-01-24 19:39:46 +00001111.. option:: -MF<file>
1112
1113Write depfile output from -MMD, -MD, -MM, or -M to <file>
1114
Richard Smith081ad4d2017-01-24 19:39:46 +00001115.. option:: -MG, --print-missing-file-dependencies
1116
1117Add missing headers to depfile
1118
Richard Smith081ad4d2017-01-24 19:39:46 +00001119.. option:: -MJ<arg>
1120
1121Write a compilation database entry per input
1122
Richard Smith081ad4d2017-01-24 19:39:46 +00001123.. option:: -MM, --user-dependencies
1124
1125Like -MMD, but also implies -E and writes to stdout by default
1126
Richard Smith081ad4d2017-01-24 19:39:46 +00001127.. option:: -MMD, --write-user-dependencies
1128
1129Write a depfile containing user headers
1130
Richard Smith081ad4d2017-01-24 19:39:46 +00001131.. option:: -MP
1132
1133Create phony target for each dependency (other than main file)
1134
Richard Smith081ad4d2017-01-24 19:39:46 +00001135.. option:: -MQ<arg>
1136
1137Specify name of main file output to quote in depfile
1138
Richard Smith081ad4d2017-01-24 19:39:46 +00001139.. option:: -MT<arg>
1140
1141Specify name of main file output in depfile
1142
Richard Smith081ad4d2017-01-24 19:39:46 +00001143.. option:: -MV
1144
1145Use NMake/Jom format for the depfile
1146
1147Dumping preprocessor state
Richard Smithc5b2e002017-01-27 02:08:37 +00001148--------------------------
Richard Smith081ad4d2017-01-24 19:39:46 +00001149
1150Flags allowing the state of the preprocessor to be dumped in various ways.
1151
Richard Smith081ad4d2017-01-24 19:39:46 +00001152.. option:: -d
1153
Richard Smithb2c82a62017-01-27 01:54:42 +00001154.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001155.. option:: -d<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001156.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001157
Richard Smith081ad4d2017-01-24 19:39:46 +00001158.. option:: -dD
1159
1160Print macro definitions in -E mode in addition to normal output
1161
Richard Smith081ad4d2017-01-24 19:39:46 +00001162.. option:: -dI
1163
1164Print include directives in -E mode in addition to normal output
1165
Richard Smith081ad4d2017-01-24 19:39:46 +00001166.. option:: -dM
1167
1168Print macro definitions in -E mode instead of normal output
1169
1170Diagnostic flags
1171~~~~~~~~~~~~~~~~
1172
1173Flags controlling which warnings, errors, and remarks Clang will generate.
1174See the :doc:`full list of warning and remark flags <DiagnosticsReference>`.
1175
Richard Smith081ad4d2017-01-24 19:39:46 +00001176.. option:: -R<remark>
1177
1178Enable the specified remark
1179
Richard Smith081ad4d2017-01-24 19:39:46 +00001180.. option:: -Rpass-analysis=<arg>
1181
1182Report transformation analysis from optimization passes whose name matches the given POSIX regular expression
1183
Richard Smith081ad4d2017-01-24 19:39:46 +00001184.. option:: -Rpass-missed=<arg>
1185
1186Report missed transformations by optimization passes whose name matches the given POSIX regular expression
1187
Richard Smith081ad4d2017-01-24 19:39:46 +00001188.. option:: -Rpass=<arg>
1189
1190Report transformations performed by optimization passes whose name matches the given POSIX regular expression
1191
Richard Smith081ad4d2017-01-24 19:39:46 +00001192.. option:: -W<warning>, --extra-warnings, --warn-<arg>, --warn-=<arg>
1193
1194Enable the specified warning
1195
Richard Smith081ad4d2017-01-24 19:39:46 +00001196.. option:: -Wdeprecated, -Wno-deprecated
1197
Richard Smithc5b2e002017-01-27 02:08:37 +00001198Enable warnings for deprecated constructs and define \_\_DEPRECATED
Richard Smith081ad4d2017-01-24 19:39:46 +00001199
Richard Smith081ad4d2017-01-24 19:39:46 +00001200.. option:: -Wnonportable-cfstrings<arg>, -Wno-nonportable-cfstrings<arg>
1201
Richard Smith081ad4d2017-01-24 19:39:46 +00001202Target-independent compilation options
1203~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Richard Smith081ad4d2017-01-24 19:39:46 +00001204.. option:: -Wframe-larger-than=<arg>
1205
Richard Smith081ad4d2017-01-24 19:39:46 +00001206.. option:: -fPIC, -fno-PIC
1207
Richard Smith081ad4d2017-01-24 19:39:46 +00001208.. option:: -fPIE, -fno-PIE
1209
Richard Smith081ad4d2017-01-24 19:39:46 +00001210.. option:: -faccess-control, -fno-access-control
1211
Vedant Kumar368540f2018-08-23 17:55:03 +00001212.. option:: -faddrsig, -fno-addrsig
1213
1214Emit an address-significance table
1215
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00001216.. option:: -falign-functions, -fno-align-functions
1217
1218.. program:: clang1
1219.. option:: -falign-functions=<arg>
1220.. program:: clang
1221
Richard Smithb2c82a62017-01-27 01:54:42 +00001222.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001223.. option:: -faligned-allocation, -faligned-new, -fno-aligned-allocation
Richard Smithb2c82a62017-01-27 01:54:42 +00001224.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001225
1226Enable C++17 aligned allocation functions
1227
Craig Topperd23254a2017-07-20 17:52:48 +00001228.. option:: -fallow-editor-placeholders, -fno-allow-editor-placeholders
1229
1230Treat editor placeholders as valid source code
1231
Richard Smith081ad4d2017-01-24 19:39:46 +00001232.. option:: -fallow-unsupported
1233
Richard Smith78e23fd2017-04-13 22:39:49 +00001234.. option:: -faltivec, -fno-altivec
Richard Smith081ad4d2017-01-24 19:39:46 +00001235
Richard Smith081ad4d2017-01-24 19:39:46 +00001236.. option:: -fansi-escape-codes
1237
1238Use ANSI escape codes for diagnostics
1239
Richard Smith081ad4d2017-01-24 19:39:46 +00001240.. option:: -fapple-kext, -findirect-virtual-calls, -fterminated-vtables
1241
1242Use Apple's kernel extensions ABI
1243
Richard Smith081ad4d2017-01-24 19:39:46 +00001244.. option:: -fapple-pragma-pack, -fno-apple-pragma-pack
1245
1246Enable Apple gcc-compatible #pragma pack handling
1247
Richard Smith081ad4d2017-01-24 19:39:46 +00001248.. option:: -fapplication-extension, -fno-application-extension
1249
1250Restrict code to those available for App Extensions
1251
Richard Smith081ad4d2017-01-24 19:39:46 +00001252.. option:: -fasm, -fno-asm
1253
Richard Smith081ad4d2017-01-24 19:39:46 +00001254.. option:: -fasm-blocks, -fno-asm-blocks
1255
Richard Smith081ad4d2017-01-24 19:39:46 +00001256.. option:: -fassociative-math, -fno-associative-math
1257
Richard Smith081ad4d2017-01-24 19:39:46 +00001258.. option:: -fassume-sane-operator-new, -fno-assume-sane-operator-new
1259
Richard Smith081ad4d2017-01-24 19:39:46 +00001260.. option:: -fast
1261
Richard Smith081ad4d2017-01-24 19:39:46 +00001262.. option:: -fastcp
1263
Richard Smith081ad4d2017-01-24 19:39:46 +00001264.. option:: -fastf
1265
Richard Smith081ad4d2017-01-24 19:39:46 +00001266.. option:: -fasynchronous-unwind-tables, -fno-asynchronous-unwind-tables
1267
Richard Smith081ad4d2017-01-24 19:39:46 +00001268.. option:: -fautolink, -fno-autolink
1269
Richard Smith081ad4d2017-01-24 19:39:46 +00001270.. option:: -fblocks, -fno-blocks
1271
1272Enable the 'blocks' language feature
1273
Richard Smith081ad4d2017-01-24 19:39:46 +00001274.. option:: -fbootclasspath=<arg>, --bootclasspath <arg>, --bootclasspath=<arg>
1275
Richard Smith081ad4d2017-01-24 19:39:46 +00001276.. option:: -fborland-extensions, -fno-borland-extensions
1277
1278Accept non-standard constructs supported by the Borland compiler
1279
Richard Smith081ad4d2017-01-24 19:39:46 +00001280.. option:: -fbracket-depth=<arg>
1281
Richard Smith081ad4d2017-01-24 19:39:46 +00001282.. option:: -fbuiltin, -fno-builtin
1283
Richard Smith081ad4d2017-01-24 19:39:46 +00001284.. option:: -fbuiltin-module-map
1285
1286Load the clang builtins module map file.
1287
Vedant Kumar368540f2018-08-23 17:55:03 +00001288.. option:: -fc++-static-destructors, -fno-c++-static-destructors
1289
1290Enable C++ static destructor registration (the default)
1291
Richard Smith081ad4d2017-01-24 19:39:46 +00001292.. option:: -fcaret-diagnostics, -fno-caret-diagnostics
1293
Craig Topper596527b2018-01-23 18:40:15 +00001294.. option:: -fcf-protection=<arg>, -fcf-protection (equivalent to -fcf-protection=full)
1295
1296Instrument control-flow architecture protection. Options: return, branch, full, none.
1297
Vedant Kumar368540f2018-08-23 17:55:03 +00001298.. option:: -fchar8\_t, -fno-char8\_t
1299
1300Enable C++ builtin type char8\_t
1301
Richard Smith081ad4d2017-01-24 19:39:46 +00001302.. option:: -fclasspath=<arg>, --CLASSPATH <arg>, --CLASSPATH=<arg>, --classpath <arg>, --classpath=<arg>
1303
Richard Smith081ad4d2017-01-24 19:39:46 +00001304.. option:: -fcolor-diagnostics, -fno-color-diagnostics
1305
1306Use colors in diagnostics
1307
Richard Smith081ad4d2017-01-24 19:39:46 +00001308.. option:: -fcommon, -fno-common
1309
Richard Smith081ad4d2017-01-24 19:39:46 +00001310.. option:: -fcompile-resource=<arg>, --resource <arg>, --resource=<arg>
1311
Richard Smith081ad4d2017-01-24 19:39:46 +00001312.. option:: -fconstant-cfstrings, -fno-constant-cfstrings
1313
Richard Smith081ad4d2017-01-24 19:39:46 +00001314.. option:: -fconstant-string-class=<arg>
1315
Richard Smith081ad4d2017-01-24 19:39:46 +00001316.. option:: -fconstexpr-backtrace-limit=<arg>
1317
Richard Smith081ad4d2017-01-24 19:39:46 +00001318.. option:: -fconstexpr-depth=<arg>
1319
Richard Smith081ad4d2017-01-24 19:39:46 +00001320.. option:: -fconstexpr-steps=<arg>
1321
Richard Smith081ad4d2017-01-24 19:39:46 +00001322.. option:: -fcoroutines-ts, -fno-coroutines-ts
1323
1324Enable support for the C++ Coroutines TS
1325
Richard Smith081ad4d2017-01-24 19:39:46 +00001326.. option:: -fcoverage-mapping, -fno-coverage-mapping
1327
1328Generate coverage mapping to enable code coverage analysis
1329
Richard Smith081ad4d2017-01-24 19:39:46 +00001330.. option:: -fcreate-profile
1331
Richard Smith081ad4d2017-01-24 19:39:46 +00001332.. option:: -fcxx-exceptions, -fno-cxx-exceptions
1333
1334Enable C++ exceptions
1335
Richard Smith081ad4d2017-01-24 19:39:46 +00001336.. option:: -fcxx-modules, -fno-cxx-modules
1337
Richard Smith081ad4d2017-01-24 19:39:46 +00001338.. option:: -fdata-sections, -fno-data-sections
1339
1340Place each data in its own section (ELF Only)
1341
Richard Smith081ad4d2017-01-24 19:39:46 +00001342.. option:: -fdebug-info-for-profiling, -fno-debug-info-for-profiling
1343
1344Emit extra debug info to make sample profile more accurate.
1345
Richard Smith78e23fd2017-04-13 22:39:49 +00001346.. option:: -fdebug-macro, -fno-debug-macro
1347
1348Emit macro debug information
1349
Richard Smith081ad4d2017-01-24 19:39:46 +00001350.. option:: -fdebug-pass-arguments
1351
Richard Smith081ad4d2017-01-24 19:39:46 +00001352.. option:: -fdebug-pass-structure
1353
Richard Smith081ad4d2017-01-24 19:39:46 +00001354.. option:: -fdebug-prefix-map=<arg>
1355
1356remap file source paths in debug info
1357
Richard Smith081ad4d2017-01-24 19:39:46 +00001358.. option:: -fdebug-types-section, -fno-debug-types-section
1359
1360Place debug types in their own section (ELF Only)
1361
Richard Smith081ad4d2017-01-24 19:39:46 +00001362.. option:: -fdelayed-template-parsing, -fno-delayed-template-parsing
1363
1364Parse templated function definitions at the end of the translation unit
1365
Vedant Kumar368540f2018-08-23 17:55:03 +00001366.. option:: -fdelete-null-pointer-checks, -fno-delete-null-pointer-checks
1367
1368Treat usage of null pointers as undefined behavior.
1369
Richard Smith081ad4d2017-01-24 19:39:46 +00001370.. option:: -fdenormal-fp-math=<arg>
1371
Richard Smith081ad4d2017-01-24 19:39:46 +00001372.. option:: -fdiagnostics-absolute-paths
1373
1374Print absolute paths in diagnostics
1375
Richard Smith081ad4d2017-01-24 19:39:46 +00001376.. option:: -fdiagnostics-color, -fno-diagnostics-color
1377
Richard Smithb2c82a62017-01-27 01:54:42 +00001378.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001379.. option:: -fdiagnostics-color=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001380.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001381
Craig Topperd23254a2017-07-20 17:52:48 +00001382.. option:: -fdiagnostics-hotness-threshold=<number>
1383
1384Prevent optimization remarks from being output if they do not have at least this profile count
1385
Richard Smith081ad4d2017-01-24 19:39:46 +00001386.. option:: -fdiagnostics-show-hotness, -fno-diagnostics-show-hotness
1387
1388Enable profile hotness information in diagnostic line
1389
Richard Smith081ad4d2017-01-24 19:39:46 +00001390.. option:: -fdiagnostics-show-note-include-stack, -fno-diagnostics-show-note-include-stack
1391
1392Display include stacks for diagnostic notes
1393
Richard Smith081ad4d2017-01-24 19:39:46 +00001394.. option:: -fdiagnostics-show-option, -fno-diagnostics-show-option
1395
1396Print option name with mappable diagnostics
1397
Richard Smith081ad4d2017-01-24 19:39:46 +00001398.. option:: -fdiagnostics-show-template-tree
1399
1400Print a template comparison tree for differing templates
1401
Vedant Kumar368540f2018-08-23 17:55:03 +00001402.. option:: -fdigraphs, -fno-digraphs
1403
1404Enable alternative token representations '<:', ':>', '<%', '%>', '%:', '%:%:' (default)
1405
Richard Smith081ad4d2017-01-24 19:39:46 +00001406.. option:: -fdollars-in-identifiers, -fno-dollars-in-identifiers
1407
1408Allow '$' in identifiers
1409
Craig Topper16418662017-11-20 18:07:43 +00001410.. option:: -fdouble-square-bracket-attributes, -fno-double-square-bracket-attributes
1411
1412Enable '\[\[\]\]' attributes in all C and C++ language modes
1413
Richard Smith081ad4d2017-01-24 19:39:46 +00001414.. option:: -fdwarf-directory-asm, -fno-dwarf-directory-asm
1415
Craig Topper188252d2017-12-11 21:09:16 +00001416.. option:: -fdwarf-exceptions
1417
1418Use DWARF style exceptions
1419
Richard Smith081ad4d2017-01-24 19:39:46 +00001420.. option:: -felide-constructors, -fno-elide-constructors
1421
Richard Smith081ad4d2017-01-24 19:39:46 +00001422.. option:: -feliminate-unused-debug-symbols, -fno-eliminate-unused-debug-symbols
1423
Richard Smith081ad4d2017-01-24 19:39:46 +00001424.. option:: -fembed-bitcode=<option>, -fembed-bitcode (equivalent to -fembed-bitcode=all), -fembed-bitcode-marker (equivalent to -fembed-bitcode=marker)
1425
1426Embed LLVM bitcode (option: off, all, bitcode, marker)
1427
Richard Smith081ad4d2017-01-24 19:39:46 +00001428.. option:: -femit-all-decls
1429
1430Emit all declarations, even if unused
1431
Richard Smith081ad4d2017-01-24 19:39:46 +00001432.. option:: -femulated-tls, -fno-emulated-tls
1433
1434Use emutls functions to access thread\_local variables
1435
Richard Smith081ad4d2017-01-24 19:39:46 +00001436.. option:: -fencoding=<arg>, --encoding <arg>, --encoding=<arg>
1437
Richard Smith081ad4d2017-01-24 19:39:46 +00001438.. option:: -ferror-limit=<arg>
1439
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00001440.. option:: -fescaping-block-tail-calls, -fno-escaping-block-tail-calls
1441
Richard Smith081ad4d2017-01-24 19:39:46 +00001442.. option:: -fexceptions, -fno-exceptions
1443
1444Enable support for exception handling
1445
Richard Smith081ad4d2017-01-24 19:39:46 +00001446.. option:: -fexec-charset=<arg>
1447
Richard Smith081ad4d2017-01-24 19:39:46 +00001448.. option:: -fextdirs=<arg>, --extdirs <arg>, --extdirs=<arg>
1449
Richard Smith081ad4d2017-01-24 19:39:46 +00001450.. option:: -ffast-math, -fno-fast-math
1451
1452Allow aggressive, lossy floating-point optimizations
1453
Richard Smith081ad4d2017-01-24 19:39:46 +00001454.. option:: -ffinite-math-only, -fno-finite-math-only
1455
Vedant Kumar368540f2018-08-23 17:55:03 +00001456.. option:: -ffixed-point, -fno-fixed-point
1457
1458Enable fixed point types
1459
Richard Smith081ad4d2017-01-24 19:39:46 +00001460.. option:: -ffor-scope, -fno-for-scope
1461
Vedant Kumar368540f2018-08-23 17:55:03 +00001462.. option:: -fforce-emit-vtables, -fno-force-emit-vtables
1463
1464Emits more virtual tables to improve devirtualization
1465
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00001466.. option:: -fforce-enable-int128, -fno-force-enable-int128
1467
1468Enable support for int128\_t type
1469
Richard Smith081ad4d2017-01-24 19:39:46 +00001470.. option:: -ffp-contract=<arg>
1471
1472Form fused FP ops (e.g. FMAs): fast (everywhere) \| on (according to FP\_CONTRACT pragma, default) \| off (never fuse)
1473
Richard Smith081ad4d2017-01-24 19:39:46 +00001474.. option:: -ffreestanding
1475
1476Assert that the compilation takes place in a freestanding environment
1477
Richard Smith081ad4d2017-01-24 19:39:46 +00001478.. option:: -ffunction-sections, -fno-function-sections
1479
1480Place each function in its own section (ELF Only)
1481
Richard Smith081ad4d2017-01-24 19:39:46 +00001482.. option:: -fgnu-inline-asm, -fno-gnu-inline-asm
1483
Richard Smith081ad4d2017-01-24 19:39:46 +00001484.. option:: -fgnu-keywords, -fno-gnu-keywords
1485
1486Allow GNU-extension keywords regardless of language standard
1487
Richard Smith081ad4d2017-01-24 19:39:46 +00001488.. option:: -fgnu-runtime
1489
1490Generate output compatible with the standard GNU Objective-C runtime
1491
Richard Smith081ad4d2017-01-24 19:39:46 +00001492.. option:: -fgnu89-inline, -fno-gnu89-inline
1493
1494Use the gnu89 inline semantics
1495
Richard Smith081ad4d2017-01-24 19:39:46 +00001496.. option:: -fhonor-infinities, -fhonor-infinites, -fno-honor-infinities
1497
Richard Smith081ad4d2017-01-24 19:39:46 +00001498.. option:: -fhonor-nans, -fno-honor-nans
1499
Richard Smith081ad4d2017-01-24 19:39:46 +00001500.. option:: -fhosted
1501
Richard Smith081ad4d2017-01-24 19:39:46 +00001502.. option:: -fimplicit-module-maps, -fmodule-maps, -fno-implicit-module-maps
1503
1504Implicitly search the file system for module map files.
1505
Richard Smith081ad4d2017-01-24 19:39:46 +00001506.. option:: -fimplicit-modules, -fno-implicit-modules
1507
Richard Smith081ad4d2017-01-24 19:39:46 +00001508.. option:: -finput-charset=<arg>
1509
Craig Topper188252d2017-12-11 21:09:16 +00001510.. option:: -finstrument-function-entry-bare
1511
1512Instrument function entry only, after inlining, without arguments to the instrumentation call
1513
Richard Smith081ad4d2017-01-24 19:39:46 +00001514.. option:: -finstrument-functions
1515
1516Generate calls to instrument function entry and exit
1517
Craig Topper16418662017-11-20 18:07:43 +00001518.. option:: -finstrument-functions-after-inlining
1519
1520Like -finstrument-functions, but insert the calls after inlining
1521
Richard Smith081ad4d2017-01-24 19:39:46 +00001522.. option:: -fintegrated-as, -fno-integrated-as, -integrated-as
1523
1524Enable the integrated assembler
1525
Richard Smith081ad4d2017-01-24 19:39:46 +00001526.. option:: -fjump-tables, -fno-jump-tables
1527
Vedant Kumar368540f2018-08-23 17:55:03 +00001528.. option:: -fkeep-static-consts
1529
1530Keep static const variables even if unused
1531
Richard Smith081ad4d2017-01-24 19:39:46 +00001532.. option:: -flax-vector-conversions, -fno-lax-vector-conversions
1533
Richard Smith081ad4d2017-01-24 19:39:46 +00001534.. option:: -flimited-precision=<arg>
1535
Richard Smith081ad4d2017-01-24 19:39:46 +00001536.. option:: -flto, -fno-lto
1537
1538Enable LTO in 'full' mode
1539
Richard Smith081ad4d2017-01-24 19:39:46 +00001540.. option:: -flto-jobs=<arg>
1541
1542Controls the backend parallelism of -flto=thin (default of 0 means the number of threads will be derived from the number of CPUs detected)
1543
Richard Smithb2c82a62017-01-27 01:54:42 +00001544.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001545.. option:: -flto=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001546.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001547
1548Set LTO mode to either 'full' or 'thin'
1549
Richard Smith081ad4d2017-01-24 19:39:46 +00001550.. option:: -fmacro-backtrace-limit=<arg>
1551
Richard Smith081ad4d2017-01-24 19:39:46 +00001552.. option:: -fmath-errno, -fno-math-errno
1553
1554Require math functions to indicate errors by setting errno
1555
Richard Smith081ad4d2017-01-24 19:39:46 +00001556.. option:: -fmax-type-align=<arg>
1557
1558Specify the maximum alignment to enforce on pointers lacking an explicit alignment
1559
Richard Smith081ad4d2017-01-24 19:39:46 +00001560.. option:: -fmerge-all-constants, -fno-merge-all-constants
1561
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00001562Allow merging of constants
1563
Richard Smith081ad4d2017-01-24 19:39:46 +00001564.. option:: -fmessage-length=<arg>
1565
Richard Smith081ad4d2017-01-24 19:39:46 +00001566.. option:: -fmodule-file-deps, -fno-module-file-deps
1567
Richard Smith081ad4d2017-01-24 19:39:46 +00001568.. option:: -fmodule-map-file=<file>
1569
1570Load this module map file
1571
Richard Smith081ad4d2017-01-24 19:39:46 +00001572.. option:: -fmodule-name=<name>, -fmodule-implementation-of <arg>, -fmodule-name <arg>
1573
1574Specify the name of the module to build
1575
Richard Smith081ad4d2017-01-24 19:39:46 +00001576.. option:: -fmodules, -fno-modules
1577
1578Enable the 'modules' language feature
1579
Richard Smith081ad4d2017-01-24 19:39:46 +00001580.. option:: -fmodules-decluse, -fno-modules-decluse
1581
1582Require declaration of modules used within a module
1583
Richard Smith081ad4d2017-01-24 19:39:46 +00001584.. option:: -fmodules-ignore-macro=<arg>
1585
1586Ignore the definition of the given macro when building and loading modules
1587
Richard Smith081ad4d2017-01-24 19:39:46 +00001588.. option:: -fmodules-search-all, -fno-modules-search-all
1589
1590Search even non-imported modules to resolve references
1591
Richard Smith081ad4d2017-01-24 19:39:46 +00001592.. option:: -fmodules-strict-decluse
1593
1594Like -fmodules-decluse but requires all headers to be in modules
1595
Richard Smith081ad4d2017-01-24 19:39:46 +00001596.. option:: -fmodules-ts
1597
1598Enable support for the C++ Modules TS
1599
Richard Smith081ad4d2017-01-24 19:39:46 +00001600.. option:: -fms-compatibility, -fno-ms-compatibility
1601
1602Enable full Microsoft Visual C++ compatibility
1603
Richard Smith081ad4d2017-01-24 19:39:46 +00001604.. option:: -fms-compatibility-version=<arg>
1605
1606Dot-separated value representing the Microsoft compiler version number to report in \_MSC\_VER (0 = don't define it (default))
1607
Richard Smith081ad4d2017-01-24 19:39:46 +00001608.. option:: -fms-extensions, -fno-ms-extensions
1609
1610Accept some non-standard constructs supported by the Microsoft compiler
1611
Richard Smith081ad4d2017-01-24 19:39:46 +00001612.. option:: -fms-memptr-rep=<arg>
1613
Richard Smith081ad4d2017-01-24 19:39:46 +00001614.. option:: -fms-volatile<arg>
1615
Richard Smith081ad4d2017-01-24 19:39:46 +00001616.. option:: -fmsc-version=<arg>
1617
1618Microsoft compiler version number to report in \_MSC\_VER (0 = don't define it (default))
1619
Richard Smith081ad4d2017-01-24 19:39:46 +00001620.. option:: -fmudflap
1621
Richard Smith081ad4d2017-01-24 19:39:46 +00001622.. option:: -fmudflapth
1623
Richard Smith081ad4d2017-01-24 19:39:46 +00001624.. option:: -fnested-functions
1625
Richard Smith081ad4d2017-01-24 19:39:46 +00001626.. option:: -fnew-alignment=<align>, -fnew-alignment <arg>
1627
1628Specifies the largest alignment guaranteed by '::operator new(size\_t)'
1629
Richard Smith081ad4d2017-01-24 19:39:46 +00001630.. option:: -fnext-runtime
1631
Richard Smith081ad4d2017-01-24 19:39:46 +00001632.. option:: -fno-builtin-<arg>
1633
1634Disable implicit builtin knowledge of a specific function
1635
Richard Smith081ad4d2017-01-24 19:39:46 +00001636.. option:: -fno-elide-type
1637
1638Do not elide types when printing diagnostics
1639
Richard Smith081ad4d2017-01-24 19:39:46 +00001640.. option:: -fno-max-type-align
1641
Richard Smith081ad4d2017-01-24 19:39:46 +00001642.. option:: -fno-operator-names
1643
1644Do not treat C++ operator name keywords as synonyms for operators
1645
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00001646.. option:: -fno-rtti-data
1647
1648Control emission of RTTI data
1649
Richard Smith081ad4d2017-01-24 19:39:46 +00001650.. option:: -fno-strict-modules-decluse
1651
Richard Smith081ad4d2017-01-24 19:39:46 +00001652.. option:: -fno-working-directory
1653
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00001654.. option:: -fnoxray-link-deps
1655
Richard Smith081ad4d2017-01-24 19:39:46 +00001656.. option:: -fobjc-abi-version=<arg>
1657
Richard Smith081ad4d2017-01-24 19:39:46 +00001658.. option:: -fobjc-arc, -fno-objc-arc
1659
1660Synthesize retain and release calls for Objective-C pointers
1661
Richard Smith081ad4d2017-01-24 19:39:46 +00001662.. option:: -fobjc-arc-exceptions, -fno-objc-arc-exceptions
1663
1664Use EH-safe code when synthesizing retains and releases in -fobjc-arc
1665
Richard Smith081ad4d2017-01-24 19:39:46 +00001666.. option:: -fobjc-exceptions, -fno-objc-exceptions
1667
1668Enable Objective-C exceptions
1669
Richard Smith081ad4d2017-01-24 19:39:46 +00001670.. option:: -fobjc-infer-related-result-type, -fno-objc-infer-related-result-type
1671
Richard Smith081ad4d2017-01-24 19:39:46 +00001672.. option:: -fobjc-legacy-dispatch, -fno-objc-legacy-dispatch
1673
Richard Smith081ad4d2017-01-24 19:39:46 +00001674.. option:: -fobjc-link-runtime
1675
Richard Smith081ad4d2017-01-24 19:39:46 +00001676.. option:: -fobjc-nonfragile-abi, -fno-objc-nonfragile-abi
1677
Richard Smith081ad4d2017-01-24 19:39:46 +00001678.. option:: -fobjc-nonfragile-abi-version=<arg>
1679
Richard Smith081ad4d2017-01-24 19:39:46 +00001680.. option:: -fobjc-runtime=<arg>
1681
1682Specify the target Objective-C runtime kind and version
1683
Richard Smith081ad4d2017-01-24 19:39:46 +00001684.. option:: -fobjc-sender-dependent-dispatch
1685
Richard Smith081ad4d2017-01-24 19:39:46 +00001686.. option:: -fobjc-weak, -fno-objc-weak
1687
1688Enable ARC-style weak references in Objective-C
1689
Richard Smith081ad4d2017-01-24 19:39:46 +00001690.. option:: -fomit-frame-pointer, -fno-omit-frame-pointer
1691
Richard Smith081ad4d2017-01-24 19:39:46 +00001692.. option:: -fopenmp, -fno-openmp
1693
Jonas Hahnfelda180fc42018-02-22 17:10:28 +00001694Parse OpenMP pragmas and generate parallel code.
Boris Kolpackovb150d242017-08-30 09:15:53 +00001695
Craig Topper287c8012018-01-03 18:29:12 +00001696.. option:: -fopenmp-simd, -fno-openmp-simd
1697
1698Emit OpenMP code only for SIMD-based constructs.
1699
Richard Smith081ad4d2017-01-24 19:39:46 +00001700.. option:: -fopenmp-version=<arg>
1701
Richard Smithb2c82a62017-01-27 01:54:42 +00001702.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001703.. option:: -fopenmp=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001704.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001705
Richard Smith081ad4d2017-01-24 19:39:46 +00001706.. option:: -foperator-arrow-depth=<arg>
1707
Francis Visoiu Mistrih3bd7cbb2019-12-04 10:19:41 -08001708.. option:: -foptimization-record-file=<file>
Richard Smith081ad4d2017-01-24 19:39:46 +00001709
Francis Visoiu Mistrih3bd7cbb2019-12-04 10:19:41 -08001710Implies -fsave-optimization-record. On Darwin platforms, this
1711 cannot be used with multiple -arch <arch> options.
1712
1713.. option:: -foptimization-record-passes=<regex>
1714
1715Only include passes which match a specified regular expression in the generated optimization record (by default, include all passes)
Richard Smith081ad4d2017-01-24 19:39:46 +00001716
Richard Smith081ad4d2017-01-24 19:39:46 +00001717.. option:: -foptimize-sibling-calls, -fno-optimize-sibling-calls
1718
Richard Smith081ad4d2017-01-24 19:39:46 +00001719.. option:: -foutput-class-dir=<arg>, --output-class-directory <arg>, --output-class-directory=<arg>
1720
Richard Smith081ad4d2017-01-24 19:39:46 +00001721.. option:: -fpack-struct, -fno-pack-struct
1722
Richard Smithb2c82a62017-01-27 01:54:42 +00001723.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001724.. option:: -fpack-struct=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001725.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001726
1727Specify the default maximum struct packing alignment
1728
Richard Smith081ad4d2017-01-24 19:39:46 +00001729.. option:: -fpascal-strings, -fno-pascal-strings, -mpascal-strings
1730
1731Recognize and construct Pascal-style string literals
1732
Richard Smith081ad4d2017-01-24 19:39:46 +00001733.. option:: -fpcc-struct-return
1734
1735Override the default ABI to return all structs on the stack
1736
Richard Smith081ad4d2017-01-24 19:39:46 +00001737.. option:: -fpch-preprocess
1738
Richard Smith081ad4d2017-01-24 19:39:46 +00001739.. option:: -fpic, -fno-pic
1740
Richard Smith081ad4d2017-01-24 19:39:46 +00001741.. option:: -fpie, -fno-pie
1742
Craig Topper16418662017-11-20 18:07:43 +00001743.. option:: -fplt, -fno-plt
1744
1745Use the PLT to make function calls
1746
Richard Smith081ad4d2017-01-24 19:39:46 +00001747.. option:: -fplugin=<dsopath>
1748
1749Load the named plugin (dynamic shared object)
1750
Richard Smith081ad4d2017-01-24 19:39:46 +00001751.. option:: -fpreserve-as-comments, -fno-preserve-as-comments
1752
Richard Smith081ad4d2017-01-24 19:39:46 +00001753.. option:: -fprofile-arcs, -fno-profile-arcs
1754
Richard Smith081ad4d2017-01-24 19:39:46 +00001755.. option:: -fprofile-dir=<arg>
1756
Richard Smith081ad4d2017-01-24 19:39:46 +00001757.. option:: -fprofile-generate, -fno-profile-generate
1758
1759Generate instrumented code to collect execution counts into default.profraw (overridden by LLVM\_PROFILE\_FILE env var)
1760
Richard Smithb2c82a62017-01-27 01:54:42 +00001761.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001762.. option:: -fprofile-generate=<directory>
Richard Smithb2c82a62017-01-27 01:54:42 +00001763.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001764
1765Generate instrumented code to collect execution counts into <directory>/default.profraw (overridden by LLVM\_PROFILE\_FILE env var)
1766
Richard Smith081ad4d2017-01-24 19:39:46 +00001767.. option:: -fprofile-instr-generate, -fno-profile-instr-generate
1768
1769Generate instrumented code to collect execution counts into default.profraw file (overridden by '=' form of option or LLVM\_PROFILE\_FILE env var)
1770
Richard Smithb2c82a62017-01-27 01:54:42 +00001771.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001772.. option:: -fprofile-instr-generate=<file>
Richard Smithb2c82a62017-01-27 01:54:42 +00001773.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001774
1775Generate instrumented code to collect execution counts into <file> (overridden by LLVM\_PROFILE\_FILE env var)
1776
Richard Smith081ad4d2017-01-24 19:39:46 +00001777.. option:: -fprofile-instr-use, -fno-profile-instr-use, -fprofile-use
1778
Richard Smithb2c82a62017-01-27 01:54:42 +00001779.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001780.. option:: -fprofile-instr-use=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001781.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001782
1783Use instrumentation data for profile-guided optimization
1784
Boris Kolpackovb150d242017-08-30 09:15:53 +00001785.. option:: -fprofile-sample-accurate, -fauto-profile-accurate, -fno-profile-sample-accurate
1786
1787Specifies that the sample profile is accurate. If the sample
1788 profile is accurate, callsites without profile samples are marked
1789 as cold. Otherwise, treat callsites without profile samples as if
1790 we have no profile
1791
Richard Smith78e23fd2017-04-13 22:39:49 +00001792.. option:: -fprofile-sample-use, -fauto-profile, -fno-profile-sample-use
1793
1794.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001795.. option:: -fprofile-sample-use=<arg>, -fauto-profile=<arg>
Richard Smith78e23fd2017-04-13 22:39:49 +00001796.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001797
1798Enable sample-based profile guided optimizations
1799
Richard Smithb2c82a62017-01-27 01:54:42 +00001800.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001801.. option:: -fprofile-use=<pathname>
Richard Smithb2c82a62017-01-27 01:54:42 +00001802.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001803
1804Use instrumentation data for profile-guided optimization. If pathname is a directory, it reads from <pathname>/default.profdata. Otherwise, it reads from file <pathname>.
1805
Richard Smith081ad4d2017-01-24 19:39:46 +00001806.. option:: -freciprocal-math, -fno-reciprocal-math
1807
1808Allow division operations to be reassociated
1809
Richard Smith081ad4d2017-01-24 19:39:46 +00001810.. option:: -freg-struct-return
1811
1812Override the default ABI to return small structs in registers
1813
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00001814.. option:: -fregister-global-dtors-with-atexit, -fno-register-global-dtors-with-atexit
1815
1816Use atexit or \_\_cxa\_atexit to register global destructors
1817
Richard Smith081ad4d2017-01-24 19:39:46 +00001818.. option:: -frelaxed-template-template-args, -fno-relaxed-template-template-args
1819
1820Enable C++17 relaxed template template argument matching
1821
Richard Smith081ad4d2017-01-24 19:39:46 +00001822.. option:: -freroll-loops, -fno-reroll-loops
1823
1824Turn on loop reroller
1825
Richard Smith081ad4d2017-01-24 19:39:46 +00001826.. option:: -fretain-comments-from-system-headers
1827
Craig Topperd23254a2017-07-20 17:52:48 +00001828.. option:: -frewrite-imports, -fno-rewrite-imports
1829
Richard Smith081ad4d2017-01-24 19:39:46 +00001830.. option:: -frewrite-includes, -fno-rewrite-includes
1831
Richard Smith081ad4d2017-01-24 19:39:46 +00001832.. option:: -frewrite-map-file <arg>
1833
Richard Smithb2c82a62017-01-27 01:54:42 +00001834.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001835.. option:: -frewrite-map-file=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001836.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001837
Richard Smith081ad4d2017-01-24 19:39:46 +00001838.. option:: -fropi, -fno-ropi
1839
Richard Smith081ad4d2017-01-24 19:39:46 +00001840.. option:: -frtti, -fno-rtti
1841
Richard Smith081ad4d2017-01-24 19:39:46 +00001842.. option:: -frwpi, -fno-rwpi
1843
Richard Smith081ad4d2017-01-24 19:39:46 +00001844.. option:: -fsave-optimization-record, -fno-save-optimization-record
1845
1846Generate a YAML optimization record file
1847
Francis Visoiu Mistrih3bd7cbb2019-12-04 10:19:41 -08001848.. program:: clang1
1849.. option:: -fsave-optimization-record=<format>
1850.. program:: clang
1851
1852Generate an optimization record file in a specific format.
1853
Craig Topper188252d2017-12-11 21:09:16 +00001854.. option:: -fseh-exceptions
1855
1856Use SEH style exceptions
1857
Richard Smith081ad4d2017-01-24 19:39:46 +00001858.. option:: -fshort-enums, -fno-short-enums
1859
1860Allocate to an enum type only as many bytes as it needs for the declared range of possible values
1861
Richard Smith081ad4d2017-01-24 19:39:46 +00001862.. option:: -fshort-wchar, -fno-short-wchar
1863
1864Force wchar\_t to be a short unsigned int
1865
Richard Smith081ad4d2017-01-24 19:39:46 +00001866.. option:: -fshow-column, -fno-show-column
1867
Richard Smith081ad4d2017-01-24 19:39:46 +00001868.. option:: -fshow-overloads=<arg>
1869
1870Which overload candidates to show when overload resolution fails: best\|all; defaults to all
1871
Richard Smith081ad4d2017-01-24 19:39:46 +00001872.. option:: -fshow-source-location, -fno-show-source-location
1873
Richard Smith081ad4d2017-01-24 19:39:46 +00001874.. option:: -fsignaling-math, -fno-signaling-math
1875
Richard Smith081ad4d2017-01-24 19:39:46 +00001876.. option:: -fsigned-bitfields
1877
Richard Smith081ad4d2017-01-24 19:39:46 +00001878.. option:: -fsigned-char, -fno-signed-char, --signed-char
1879
Richard Smith081ad4d2017-01-24 19:39:46 +00001880.. option:: -fsigned-zeros, -fno-signed-zeros
1881
Richard Smith081ad4d2017-01-24 19:39:46 +00001882.. option:: -fsized-deallocation, -fno-sized-deallocation
1883
1884Enable C++14 sized global deallocation functions
1885
Richard Smith081ad4d2017-01-24 19:39:46 +00001886.. option:: -fsjlj-exceptions
1887
1888Use SjLj style exceptions
1889
Richard Smith081ad4d2017-01-24 19:39:46 +00001890.. option:: -fslp-vectorize, -fno-slp-vectorize, -ftree-slp-vectorize
1891
1892Enable the superword-level parallelism vectorization passes
1893
Richard Smith081ad4d2017-01-24 19:39:46 +00001894.. option:: -fspell-checking, -fno-spell-checking
1895
Richard Smith081ad4d2017-01-24 19:39:46 +00001896.. option:: -fspell-checking-limit=<arg>
1897
Richard Smith081ad4d2017-01-24 19:39:46 +00001898.. option:: -fsplit-dwarf-inlining, -fno-split-dwarf-inlining
1899
Jonas Hahnfelda180fc42018-02-22 17:10:28 +00001900Provide 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 Smith081ad4d2017-01-24 19:39:46 +00001901
Richard Smith081ad4d2017-01-24 19:39:46 +00001902.. option:: -fsplit-stack
1903
Richard Smith081ad4d2017-01-24 19:39:46 +00001904.. option:: -fstack-protector, -fno-stack-protector
1905
1906Enable stack protectors for functions potentially vulnerable to stack smashing
1907
Richard Smith081ad4d2017-01-24 19:39:46 +00001908.. option:: -fstack-protector-all
1909
1910Force the usage of stack protectors for all functions
1911
Richard Smith081ad4d2017-01-24 19:39:46 +00001912.. option:: -fstack-protector-strong
1913
1914Use a strong heuristic to apply stack protectors to functions
1915
Craig Topper596527b2018-01-23 18:40:15 +00001916.. option:: -fstack-size-section, -fno-stack-size-section
1917
1918Emit section containing metadata on function stack sizes
1919
serge_sans_paillee67cbac2019-09-09 16:59:34 +02001920.. option:: -fstack-clash-protection, -fno-stack-clash-protection
1921
1922Instrument stack allocation to prevent stack clash attacks (x86, non-Windows only).
1923
Richard Smith081ad4d2017-01-24 19:39:46 +00001924.. option:: -fstandalone-debug, -fno-limit-debug-info, -fno-standalone-debug
1925
1926Emit full debug info for all types used by the program
1927
Richard Smith081ad4d2017-01-24 19:39:46 +00001928.. option:: -fstrict-aliasing, -fno-strict-aliasing
1929
Richard Smith081ad4d2017-01-24 19:39:46 +00001930.. option:: -fstrict-enums, -fno-strict-enums
1931
1932Enable optimizations based on the strict definition of an enum's value range
1933
Vedant Kumar368540f2018-08-23 17:55:03 +00001934.. option:: -fstrict-float-cast-overflow, -fno-strict-float-cast-overflow
1935
1936Assume that overflowing float-to-int casts are undefined (default)
1937
Richard Smith081ad4d2017-01-24 19:39:46 +00001938.. option:: -fstrict-overflow, -fno-strict-overflow
1939
Richard Smith081ad4d2017-01-24 19:39:46 +00001940.. option:: -fstrict-return, -fno-strict-return
1941
Richard Smith78e23fd2017-04-13 22:39:49 +00001942Always treat control flow paths that fall off the end of a non-void function as unreachable
Richard Smith081ad4d2017-01-24 19:39:46 +00001943
Richard Smith081ad4d2017-01-24 19:39:46 +00001944.. option:: -fstrict-vtable-pointers, -fno-strict-vtable-pointers
1945
1946Enable optimizations based on the strict rules for overwriting polymorphic C++ objects
1947
Richard Smith081ad4d2017-01-24 19:39:46 +00001948.. option:: -fstruct-path-tbaa, -fno-struct-path-tbaa
1949
Richard Smith081ad4d2017-01-24 19:39:46 +00001950.. option:: -ftabstop=<arg>
1951
Richard Smith081ad4d2017-01-24 19:39:46 +00001952.. option:: -ftemplate-backtrace-limit=<arg>
1953
Richard Smith081ad4d2017-01-24 19:39:46 +00001954.. option:: -ftemplate-depth-<arg>
1955
Richard Smith081ad4d2017-01-24 19:39:46 +00001956.. option:: -ftemplate-depth=<arg>
1957
Richard Smith081ad4d2017-01-24 19:39:46 +00001958.. option:: -ftest-coverage
1959
Richard Smith081ad4d2017-01-24 19:39:46 +00001960.. option:: -fthinlto-index=<arg>
1961
1962Perform ThinLTO importing using provided function summary index
1963
Richard Smith081ad4d2017-01-24 19:39:46 +00001964.. option:: -fthreadsafe-statics, -fno-threadsafe-statics
1965
Richard Smith081ad4d2017-01-24 19:39:46 +00001966.. option:: -ftime-report
1967
Anton Afanasyev4fdcabf2019-07-24 14:55:40 +00001968.. option:: -ftime-trace
1969
Sylvestre Ledru70092042019-10-01 07:52:42 +00001970Turn on time profiler. Results can be analyzed with chrome://tracing or
1971`Speedscope App <https://www.speedscope.app>`_ for flamegraph visualization
Anton Afanasyev4fdcabf2019-07-24 14:55:40 +00001972
1973.. option:: -ftime-trace-granularity=<arg>
1974
1975Minimum time granularity (in microseconds) traced by time profiler
1976
Richard Smith081ad4d2017-01-24 19:39:46 +00001977.. option:: -ftls-model=<arg>
1978
Richard Smith081ad4d2017-01-24 19:39:46 +00001979.. option:: -ftrap-function=<arg>
1980
1981Issue call to specified function rather than a trap instruction
1982
Richard Smith081ad4d2017-01-24 19:39:46 +00001983.. option:: -ftrapping-math, -fno-trapping-math
1984
Richard Smith081ad4d2017-01-24 19:39:46 +00001985.. option:: -ftrapv
1986
1987Trap on integer overflow
1988
Richard Smith081ad4d2017-01-24 19:39:46 +00001989.. option:: -ftrapv-handler <arg>
1990
Richard Smithb2c82a62017-01-27 01:54:42 +00001991.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001992.. option:: -ftrapv-handler=<function name>
Richard Smithb2c82a62017-01-27 01:54:42 +00001993.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001994
1995Specify the function to be called on overflow
1996
Richard Smith081ad4d2017-01-24 19:39:46 +00001997.. option:: -ftrigraphs, -fno-trigraphs, -trigraphs, --trigraphs
1998
1999Process trigraph sequences
2000
Richard Smith081ad4d2017-01-24 19:39:46 +00002001.. option:: -funique-section-names, -fno-unique-section-names
2002
2003Use unique names for text and data sections (ELF Only)
2004
Richard Smith081ad4d2017-01-24 19:39:46 +00002005.. option:: -funit-at-a-time, -fno-unit-at-a-time
2006
Richard Smith081ad4d2017-01-24 19:39:46 +00002007.. option:: -funroll-loops, -fno-unroll-loops
2008
2009Turn on loop unroller
2010
Richard Smith081ad4d2017-01-24 19:39:46 +00002011.. option:: -funsafe-math-optimizations, -fno-unsafe-math-optimizations
2012
Richard Smith081ad4d2017-01-24 19:39:46 +00002013.. option:: -funsigned-bitfields
2014
Richard Smith081ad4d2017-01-24 19:39:46 +00002015.. option:: -funsigned-char, -fno-unsigned-char, --unsigned-char
2016
Richard Smith081ad4d2017-01-24 19:39:46 +00002017.. option:: -funwind-tables, -fno-unwind-tables
2018
Richard Smith081ad4d2017-01-24 19:39:46 +00002019.. option:: -fuse-cxa-atexit, -fno-use-cxa-atexit
2020
Richard Smith081ad4d2017-01-24 19:39:46 +00002021.. option:: -fuse-init-array, -fno-use-init-array
2022
2023Use .init\_array instead of .ctors
2024
Richard Smith081ad4d2017-01-24 19:39:46 +00002025.. option:: -fuse-ld=<arg>
2026
Richard Smith081ad4d2017-01-24 19:39:46 +00002027.. option:: -fuse-line-directives, -fno-use-line-directives
2028
Richard Smith081ad4d2017-01-24 19:39:46 +00002029.. option:: -fveclib=<arg>
2030
2031Use the given vector functions library
2032
Richard Smith081ad4d2017-01-24 19:39:46 +00002033.. option:: -fvectorize, -fno-vectorize, -ftree-vectorize
2034
2035Enable the loop vectorization passes
2036
Erich Keanee30b71f2019-08-26 17:00:13 +00002037.. option:: -fverbose-asm, -fno-verbose-asm, -dA
Richard Smith081ad4d2017-01-24 19:39:46 +00002038
Richard Smith081ad4d2017-01-24 19:39:46 +00002039.. option:: -fvisibility-inlines-hidden
2040
Fangrui Songdf81b972018-07-19 22:45:41 +00002041Give inline C++ member functions hidden visibility by default
Richard Smith081ad4d2017-01-24 19:39:46 +00002042
Richard Smith081ad4d2017-01-24 19:39:46 +00002043.. option:: -fvisibility-ms-compat
2044
2045Give global types 'default' visibility and global functions and variables 'hidden' visibility by default
2046
Richard Smith081ad4d2017-01-24 19:39:46 +00002047.. option:: -fvisibility=<arg>
2048
2049Set the default symbol visibility for all global declarations
2050
Richard Smith081ad4d2017-01-24 19:39:46 +00002051.. option:: -fwhole-program-vtables, -fno-whole-program-vtables
2052
2053Enables whole-program vtable optimization. Requires -flto
2054
Richard Smith081ad4d2017-01-24 19:39:46 +00002055.. option:: -fwrapv, -fno-wrapv
2056
2057Treat signed integer overflow as two's complement
2058
Richard Smith081ad4d2017-01-24 19:39:46 +00002059.. option:: -fwritable-strings
2060
2061Store string literals as writable data
2062
Craig Topper188252d2017-12-11 21:09:16 +00002063.. option:: -fxray-always-emit-customevents, -fno-xray-always-emit-customevents
2064
2065Determine whether to always emit \_\_xray\_customevent(...) calls even if the function it appears in is not always instrumented.
2066
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00002067.. option:: -fxray-always-emit-typedevents, -fno-xray-always-emit-typedevents
2068
2069Determine whether to always emit \_\_xray\_typedevent(...) calls even if the function it appears in is not always instrumented.
2070
Richard Smith78e23fd2017-04-13 22:39:49 +00002071.. option:: -fxray-always-instrument=<arg>
2072
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00002073DEPRECATED: Filename defining the whitelist for imbuing the 'always instrument' XRay attribute.
2074
2075.. option:: -fxray-attr-list=<arg>
2076
2077Filename defining the list of functions/types for imbuing XRay attributes.
Richard Smith78e23fd2017-04-13 22:39:49 +00002078
Richard Smith081ad4d2017-01-24 19:39:46 +00002079.. option:: -fxray-instruction-threshold<arg>
2080
Richard Smithb2c82a62017-01-27 01:54:42 +00002081.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00002082.. option:: -fxray-instruction-threshold=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00002083.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00002084
2085Sets the minimum function size to instrument with XRay
2086
Richard Smith081ad4d2017-01-24 19:39:46 +00002087.. option:: -fxray-instrument, -fno-xray-instrument
2088
2089Generate XRay instrumentation sleds on function entry and exit
2090
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00002091.. option:: -fxray-instrumentation-bundle=<arg>
2092
2093Select which XRay instrumentation points to emit. Options: all, none, function, custom. Default is 'all'.
2094
2095.. option:: -fxray-link-deps
2096
2097Tells clang to add the link dependencies for XRay.
2098
2099.. option:: -fxray-modes=<arg>
2100
2101List of modes to link in by default into XRay instrumented binaries.
2102
Richard Smith78e23fd2017-04-13 22:39:49 +00002103.. option:: -fxray-never-instrument=<arg>
2104
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00002105DEPRECATED: Filename defining the whitelist for imbuing the 'never instrument' XRay attribute.
Richard Smith78e23fd2017-04-13 22:39:49 +00002106
Richard Smith081ad4d2017-01-24 19:39:46 +00002107.. option:: -fzero-initialized-in-bss, -fno-zero-initialized-in-bss
2108
Richard Smith081ad4d2017-01-24 19:39:46 +00002109.. option:: -fzvector, -fno-zvector, -mzvector
2110
2111Enable System z vector language extension
2112
Richard Smith081ad4d2017-01-24 19:39:46 +00002113.. option:: -pedantic, --pedantic, -no-pedantic, --no-pedantic
2114
Richard Smith081ad4d2017-01-24 19:39:46 +00002115.. option:: -pedantic-errors, --pedantic-errors
2116
2117OpenCL flags
2118------------
Richard Smith081ad4d2017-01-24 19:39:46 +00002119.. option:: -cl-denorms-are-zero
2120
2121OpenCL only. Allow denormals to be flushed to zero.
2122
Richard Smith081ad4d2017-01-24 19:39:46 +00002123.. option:: -cl-fast-relaxed-math
2124
2125OpenCL only. Sets -cl-finite-math-only and -cl-unsafe-math-optimizations, and defines \_\_FAST\_RELAXED\_MATH\_\_.
2126
Richard Smith081ad4d2017-01-24 19:39:46 +00002127.. option:: -cl-finite-math-only
2128
2129OpenCL only. Allow floating-point optimizations that assume arguments and results are not NaNs or +-Inf.
2130
Richard Smith081ad4d2017-01-24 19:39:46 +00002131.. option:: -cl-fp32-correctly-rounded-divide-sqrt
2132
2133OpenCL only. Specify that single precision floating-point divide and sqrt used in the program source are correctly rounded.
2134
Richard Smith081ad4d2017-01-24 19:39:46 +00002135.. option:: -cl-kernel-arg-info
2136
2137OpenCL only. Generate kernel argument metadata.
2138
Richard Smith081ad4d2017-01-24 19:39:46 +00002139.. option:: -cl-mad-enable
2140
2141OpenCL only. Allow use of less precise MAD computations in the generated binary.
2142
Richard Smith081ad4d2017-01-24 19:39:46 +00002143.. option:: -cl-no-signed-zeros
2144
2145OpenCL only. Allow use of less precise no signed zeros computations in the generated binary.
2146
Richard Smith081ad4d2017-01-24 19:39:46 +00002147.. option:: -cl-opt-disable
2148
2149OpenCL only. This option disables all optimizations. By default optimizations are enabled.
2150
Richard Smith081ad4d2017-01-24 19:39:46 +00002151.. option:: -cl-single-precision-constant
2152
2153OpenCL only. Treat double precision floating-point constant as single precision constant.
2154
Richard Smith081ad4d2017-01-24 19:39:46 +00002155.. option:: -cl-std=<arg>
2156
2157OpenCL language standard to compile for.
2158
Richard Smith081ad4d2017-01-24 19:39:46 +00002159.. option:: -cl-strict-aliasing
2160
2161OpenCL only. This option is added for compatibility with OpenCL 1.0.
2162
Jonas Hahnfelda180fc42018-02-22 17:10:28 +00002163.. option:: -cl-uniform-work-group-size
2164
2165OpenCL only. Defines that the global work-size be a multiple of the work-group size specified to clEnqueueNDRangeKernel
2166
Richard Smith081ad4d2017-01-24 19:39:46 +00002167.. option:: -cl-unsafe-math-optimizations
2168
2169OpenCL only. Allow unsafe floating-point optimizations. Also implies -cl-no-signed-zeros and -cl-mad-enable.
2170
2171Target-dependent compilation options
2172~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Richard Smithc5b2e002017-01-27 02:08:37 +00002173.. option:: -G<size>, -G=<arg>, -msmall-data-threshold=<arg>
2174
2175Put objects of at most <size> bytes into small data section (MIPS / Hexagon)
2176
Richard Smith081ad4d2017-01-24 19:39:46 +00002177.. option:: -m16
2178
Richard Smith081ad4d2017-01-24 19:39:46 +00002179.. option:: -m32
2180
Richard Smith081ad4d2017-01-24 19:39:46 +00002181.. option:: -m64
2182
Richard Smith081ad4d2017-01-24 19:39:46 +00002183.. option:: -mabi=<arg>
2184
Richard Smith081ad4d2017-01-24 19:39:46 +00002185.. option:: -malign-double
2186
2187Align doubles to two words in structs (x86 only)
2188
Richard Smith081ad4d2017-01-24 19:39:46 +00002189.. option:: -march=<arg>
2190
Richard Smith081ad4d2017-01-24 19:39:46 +00002191.. option:: -masm=<arg>
2192
Richard Smith081ad4d2017-01-24 19:39:46 +00002193.. option:: -mbackchain, -mno-backchain
2194
2195Link stack frames through backchain on System Z
2196
Richard Smith081ad4d2017-01-24 19:39:46 +00002197.. option:: -mcmodel=<arg>
2198
Richard Smith081ad4d2017-01-24 19:39:46 +00002199.. option:: -mconsole<arg>
2200
Krzysztof Parzyszek57e67062018-10-19 15:36:45 +00002201.. option:: -mcpu=<arg>, -mv5 (equivalent to -mcpu=hexagonv5), -mv55 (equivalent to -mcpu=hexagonv55), -mv60 (equivalent to -mcpu=hexagonv60), -mv62 (equivalent to -mcpu=hexagonv62), -mv65 (equivalent to -mcpu=hexagonv65)
Richard Smith081ad4d2017-01-24 19:39:46 +00002202
Ziang Wande94ac92019-06-25 23:57:14 +00002203Use -mcpu=? to see a list of supported cpu models.
2204
Vedant Kumar368540f2018-08-23 17:55:03 +00002205.. option:: -mcrc, -mno-crc
2206
2207Allow use of CRC instructions (ARM/Mips only)
2208
Craig Topperd23254a2017-07-20 17:52:48 +00002209.. option:: -mdefault-build-attributes<arg>, -mno-default-build-attributes<arg>
2210
Richard Smith081ad4d2017-01-24 19:39:46 +00002211.. option:: -mdll<arg>
2212
Richard Smith081ad4d2017-01-24 19:39:46 +00002213.. option:: -mdynamic-no-pic<arg>
2214
Richard Smith081ad4d2017-01-24 19:39:46 +00002215.. option:: -meabi <arg>
2216
2217Set EABI type, e.g. 4, 5 or gnu (default depends on triple)
2218
Richard Smith78e23fd2017-04-13 22:39:49 +00002219.. option:: -mfentry
2220
Jonas Paulsson81aa62a2019-09-20 13:13:50 +00002221Insert calls to fentry at function entry (x86/SystemZ only)
Richard Smith78e23fd2017-04-13 22:39:49 +00002222
Richard Smith081ad4d2017-01-24 19:39:46 +00002223.. option:: -mfloat-abi=<arg>
2224
Richard Smith081ad4d2017-01-24 19:39:46 +00002225.. option:: -mfpmath=<arg>
2226
Richard Smith081ad4d2017-01-24 19:39:46 +00002227.. option:: -mfpu=<arg>
2228
Richard Smith081ad4d2017-01-24 19:39:46 +00002229.. option:: -mglobal-merge, -mno-global-merge
2230
2231Enable merging of globals
2232
Richard Smith081ad4d2017-01-24 19:39:46 +00002233.. option:: -mhard-float
2234
Richard Smith081ad4d2017-01-24 19:39:46 +00002235.. option:: -mhwdiv=<arg>, --mhwdiv <arg>, --mhwdiv=<arg>
2236
Richard Smith081ad4d2017-01-24 19:39:46 +00002237.. option:: -miamcu, -mno-iamcu
2238
2239Use Intel MCU ABI
2240
Richard Smith081ad4d2017-01-24 19:39:46 +00002241.. option:: -mimplicit-float, -mno-implicit-float
2242
Richard Smith081ad4d2017-01-24 19:39:46 +00002243.. option:: -mimplicit-it=<arg>
2244
Richard Smith081ad4d2017-01-24 19:39:46 +00002245.. option:: -mincremental-linker-compatible, -mno-incremental-linker-compatible
2246
2247(integrated-as) Emit an object file which can be used with an incremental linker
2248
Richard Smith78e23fd2017-04-13 22:39:49 +00002249.. option:: -miphoneos-version-min=<arg>, -mios-version-min=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00002250
Richard Smith081ad4d2017-01-24 19:39:46 +00002251.. option:: -mkernel
2252
Richard Smith081ad4d2017-01-24 19:39:46 +00002253.. option:: -mlong-calls, -mno-long-calls
2254
2255Generate branches with extended addressability, usually via indirect jumps.
2256
Craig Topperd23254a2017-07-20 17:52:48 +00002257.. option:: -mmacosx-version-min=<arg>, -mmacos-version-min=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00002258
J. Ryan Stinnettd45eaf92019-05-30 16:46:22 +00002259Set macOS deployment target
Richard Smith081ad4d2017-01-24 19:39:46 +00002260
Craig Topperd23254a2017-07-20 17:52:48 +00002261.. option:: -mmcu=<arg>
2262
Richard Smith081ad4d2017-01-24 19:39:46 +00002263.. option:: -mms-bitfields, -mno-ms-bitfields
2264
2265Set the default structure layout to be compatible with the Microsoft compiler standard
2266
Richard Smith081ad4d2017-01-24 19:39:46 +00002267.. option:: -momit-leaf-frame-pointer, -mno-omit-leaf-frame-pointer
2268
2269Omit frame pointer setup for leaf functions
2270
Richard Smith081ad4d2017-01-24 19:39:46 +00002271.. option:: -moslib=<arg>
2272
Richard Smith081ad4d2017-01-24 19:39:46 +00002273.. option:: -mpie-copy-relocations, -mno-pie-copy-relocations
2274
2275Use copy relocations support for PIE builds
2276
Craig Topper9a724aa2017-12-11 21:09:19 +00002277.. option:: -mprefer-vector-width=<arg>
2278
2279Specifies preferred vector width for auto-vectorization. Defaults to 'none' which allows target specific decisions.
2280
Richard Smith081ad4d2017-01-24 19:39:46 +00002281.. option:: -mqdsp6-compat
2282
2283Enable hexagon-qdsp6 backward compatibility
2284
Richard Smith081ad4d2017-01-24 19:39:46 +00002285.. option:: -mrecip
2286
Richard Smithb2c82a62017-01-27 01:54:42 +00002287.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00002288.. option:: -mrecip=<arg1>,<arg2>...
Richard Smithb2c82a62017-01-27 01:54:42 +00002289.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00002290
Richard Smith081ad4d2017-01-24 19:39:46 +00002291.. option:: -mred-zone, -mno-red-zone
2292
Richard Smith081ad4d2017-01-24 19:39:46 +00002293.. option:: -mregparm=<arg>
2294
Richard Smith081ad4d2017-01-24 19:39:46 +00002295.. option:: -mrelax-all, -mno-relax-all
2296
2297(integrated-as) Relax all machine instructions
2298
Vedant Kumar368540f2018-08-23 17:55:03 +00002299.. option:: -mretpoline, -mno-retpoline
2300
Richard Smith081ad4d2017-01-24 19:39:46 +00002301.. option:: -mrtd, -mno-rtd
2302
2303Make StdCall calling convention the default
2304
Vedant Kumar368540f2018-08-23 17:55:03 +00002305.. option:: -msign-return-address=<arg>
2306
2307Select return address signing scope
Richard Smith081ad4d2017-01-24 19:39:46 +00002308
Richard Smith081ad4d2017-01-24 19:39:46 +00002309.. option:: -msoft-float, -mno-soft-float
2310
2311Use software floating point
2312
Richard Smith081ad4d2017-01-24 19:39:46 +00002313.. option:: -mstack-alignment=<arg>
2314
2315Set the stack alignment
2316
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00002317.. option:: -mstack-arg-probe, -mno-stack-arg-probe
2318
2319Enable stack probes
2320
Richard Smith081ad4d2017-01-24 19:39:46 +00002321.. option:: -mstack-probe-size=<arg>
2322
2323Set the stack probe size
2324
Richard Smith081ad4d2017-01-24 19:39:46 +00002325.. option:: -mstackrealign, -mno-stackrealign
2326
2327Force realign the stack at entry to every function
2328
Richard Smith081ad4d2017-01-24 19:39:46 +00002329.. option:: -mthread-model <arg>
2330
2331The thread model to use, e.g. posix, single (posix by default)
2332
Richard Smith081ad4d2017-01-24 19:39:46 +00002333.. option:: -mthreads<arg>
2334
Richard Smith081ad4d2017-01-24 19:39:46 +00002335.. option:: -mthumb, -mno-thumb
2336
Richard Smith081ad4d2017-01-24 19:39:46 +00002337.. option:: -mtune=<arg>
2338
Ziang Wande94ac92019-06-25 23:57:14 +00002339Use -mtune=? to see a list of supported cpu models.
2340
Richard Smith78e23fd2017-04-13 22:39:49 +00002341.. option:: -mtvos-version-min=<arg>, -mappletvos-version-min=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00002342
Richard Smith081ad4d2017-01-24 19:39:46 +00002343.. option:: -municode<arg>
2344
Richard Smith081ad4d2017-01-24 19:39:46 +00002345.. option:: -mvx, -mno-vx
2346
Richard Smith081ad4d2017-01-24 19:39:46 +00002347.. option:: -mwarn-nonportable-cfstrings, -mno-warn-nonportable-cfstrings
2348
Richard Smith78e23fd2017-04-13 22:39:49 +00002349.. option:: -mwatchos-version-min=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00002350
Richard Smith081ad4d2017-01-24 19:39:46 +00002351.. option:: -mwindows<arg>
2352
Richard Smith081ad4d2017-01-24 19:39:46 +00002353.. option:: -mx32
2354
Richard Smith081ad4d2017-01-24 19:39:46 +00002355AARCH64
2356-------
Tri Vo6e8abbc2018-09-12 23:45:04 +00002357.. option:: -ffixed-x1
2358
2359Reserve the x1 register (AArch64 only)
2360
2361.. option:: -ffixed-x2
2362
2363Reserve the x2 register (AArch64 only)
2364
2365.. option:: -ffixed-x3
2366
2367Reserve the x3 register (AArch64 only)
2368
2369.. option:: -ffixed-x4
2370
2371Reserve the x4 register (AArch64 only)
2372
2373.. option:: -ffixed-x5
2374
2375Reserve the x5 register (AArch64 only)
2376
2377.. option:: -ffixed-x6
2378
2379Reserve the x6 register (AArch64 only)
2380
2381.. option:: -ffixed-x7
2382
2383Reserve the x7 register (AArch64 only)
2384
Richard Smith081ad4d2017-01-24 19:39:46 +00002385.. option:: -ffixed-x18
2386
2387Reserve the x18 register (AArch64 only)
2388
Petr Hosek72509082018-06-12 20:00:50 +00002389.. option:: -ffixed-x20
2390
2391Reserve the x20 register (AArch64 only)
2392
Tri Vo28e7e602018-09-25 16:48:40 +00002393.. option:: -fcall-saved-x8
2394
2395Make the x8 register call-saved (AArch64 only)
2396
2397.. option:: -fcall-saved-x9
2398
2399Make the x9 register call-saved (AArch64 only)
2400
2401.. option:: -fcall-saved-x10
2402
2403Make the x10 register call-saved (AArch64 only)
2404
2405.. option:: -fcall-saved-x11
2406
2407Make the x11 register call-saved (AArch64 only)
2408
2409.. option:: -fcall-saved-x12
2410
2411Make the x12 register call-saved (AArch64 only)
2412
2413.. option:: -fcall-saved-x13
2414
2415Make the x13 register call-saved (AArch64 only)
2416
2417.. option:: -fcall-saved-x14
2418
2419Make the x14 register call-saved (AArch64 only)
2420
2421.. option:: -fcall-saved-x15
2422
2423Make the x15 register call-saved (AArch64 only)
2424
2425.. option:: -fcall-saved-x18
2426
2427Make the x18 register call-saved (AArch64 only)
2428
Richard Smith081ad4d2017-01-24 19:39:46 +00002429.. option:: -mfix-cortex-a53-835769, -mno-fix-cortex-a53-835769
2430
2431Workaround Cortex-A53 erratum 835769 (AArch64 only)
2432
Richard Smith081ad4d2017-01-24 19:39:46 +00002433.. option:: -mgeneral-regs-only
2434
2435Generate code which only uses the general purpose registers (AArch64 only)
2436
2437AMDGPU
2438------
Stanislav Mekhanoshin91792f12019-05-13 23:15:59 +00002439.. option:: -mcumode, -mno-cumode
2440
2441CU wavefront execution mode is used if enabled and WGP wavefront execution mode
2442is used if disabled (AMDGPU only)
2443
Stanislav Mekhanoshin8a8131a2019-06-13 23:47:59 +00002444.. option:: -mwavefrontsize64, -mno-wavefrontsize64
2445
2446Wavefront size 64 is used if enabled and wavefront size 32 if disabled (AMDGPU only)
2447
Craig Topper16418662017-11-20 18:07:43 +00002448.. option:: -mxnack, -mno-xnack
2449
2450Enable XNACK (AMDGPU only)
2451
Richard Smith081ad4d2017-01-24 19:39:46 +00002452ARM
2453---
Richard Smith081ad4d2017-01-24 19:39:46 +00002454.. option:: -ffixed-r9
2455
2456Reserve the r9 register (ARM only)
2457
Momchil Velikovac215352020-01-29 10:38:10 +00002458.. option:: -march=<name>[+<extension>...]
2459
2460Specify the target Arm ISA.
2461
2462The list of accepted architecture names is as follows:
2463``armv2``, ``armv2a``,
2464``armv3``, ``armv3m``,
2465``armv4``, ``armv4t``,
2466``armv5t``, ``armv5te``,
2467``armv6``, ``armv6k``, ``armv6t2``, ``armv6kz``, ``armv6-m``,
2468``armv7-a``, ``armv7ve``, ``armv7-r``, ``armv7-m``, ``armv7e-m``,
2469``armv8-a``, ``armv8.1-a``, ``armv8.2-a``, ``armv8.3-a``, ``armv8.5-a``, ``armv8-r``,
2470``armv8-m.base``, ``armv8-m.main``, ``armv8.1-m.main``,
2471``iwmmxt``,
2472``iwmmxt2``,
2473``xscale``,
2474``armv7s``,
2475``armv7k``
2476
2477Extension modifiers can be used to enable optional architecture features. The
2478syntax ``+no``<extension> can be used to disable previously enabled features.
2479
2480Some of the extension names are generic, but have an architecture specific
2481effect. For example, the extension syntax ``+fp`` might enable FPv4-SP-D16 for
2482the Armv7-M architecture, but VFPv3-D16 for the Armv7-A arrchitecture.
2483
2484The following extension names are recognised:
2485
2486``+crc``
2487 Enable Cyclic Redundancy Check instructions
2488``+crypto``
2489 Enable cryptographic instructions
2490``+sha2``
2491 Enable SHA1 and SHA256 support instructions
2492``+aes``
2493 Enable AES support instructions
2494``+dotprod``
2495 Enable dot product instructions
2496``+dsp``
2497 Enable digital signal processing (DSP) instructions in ARM and Thumb2
2498``+fp``
2499 Enable floating-point instructions for the baseline FPU implementation
2500 available for the given architecture
2501``+fp.dp``
2502 Enable optional double-precision floating-point instructions
2503``+mve``
2504 Enable integer-only MVE instructions. This extension also implicitly enables
2505 the DSP extension.
2506``+mve.fp``
2507 Enable floating-point MVE instructions. This extension also implicitly
2508 enables the MVE, DSP, FP16, and FPv5-sp-d16 extensions.
2509``+idiv``
2510 Enables the interget divide instructions in ARM and Thumb2
2511``+mp``
2512 Enabled the Multiprocessing extension
2513``+simd``
2514 Enables the baseline SIMD instructions for the given architecture
2515``+sec``
2516 Enable TrustZone security extension
2517``+virt``
2518 Enable Viritualization extensions
2519``+fp16``
2520 Enable half-precision floating-point instructions
2521``+ras``
2522 Enable Reliability, Availability, and Serviceability extensions
2523``+fp16fml``
2524 Enable half-precision floating-point fused multiply-add/sub instructions
2525``+sb``
2526 Enable v8.5a Speculation Barrier
2527``+lob``
2528 Enable Low Overhead Branch extensions
2529
Richard Smith081ad4d2017-01-24 19:39:46 +00002530.. option:: -mexecute-only, -mno-execute-only, -mpure-code
2531
2532Disallow generation of data access to code sections (ARM only)
2533
Momchil Velikovac215352020-01-29 10:38:10 +00002534.. option:: -mfpu=<name>
2535
2536Specify floating-point unit (or lack thereof) that is available on the target.
2537
2538The accepted values for <name> are:
2539
2540``none``
2541 Prevent the compiler from using floating-point instructions.
2542``vfp``
2543
2544``vfpv2``
2545 Enable VFPv2 instructions. Disable the Advanced SIMD extension.
2546``vfpv3``
2547 Enable VFPv3 instructions. Disable the Advanced SIMD extension.
2548``vfpv3-fp16``
2549 Enable VFPv3 instructions, including optional half-precision instructions.
2550 Disable the Advanced SIMD extension.
2551``vfpv3-d16``
2552 Enable VFPv3 instructions, with access to only 16 double-precision
2553 registers. Disable the Advanced SIMD extension.
2554``vfpv3-d16-fp16``
2555 Enable VFPv3 instructions, including optional half-precision instructions,
2556 with access to only 16 double-precision registers. Disable the Advanced
2557 SIMD extension.
2558``vfpv3xd``
2559 Enable VFPv3 insructions, with single-precision floating-point operations
2560 only and just 16 double-precision registers. Disable the Advanced SIMD
2561 extension.
2562``vfpv3xd-fp16``
2563 Enable VFPv3 instructions, with single-precision and half-precision,
2564 floating-point operations only. Disable the Advanced SIMD extension.
2565``vfpv4``
2566 Enable VFPv4 instructions. Disable the Advanced SIMD extension.
2567``vfpv4-d16``
2568 Enable VFPv4 instructions, with access to only 16 double-precision
2569 registers. Disable the Advanced SIMD extension.
2570``fpv4-sp-d16``
2571 Enable the Armv7-M FPv4-SP-D16 floating-point extension, with
2572 single-precision floating-point operations only, and only 16
2573 double-precision registers.
2574``fpv5-d16``
2575 Enable the Armv7-M FPv5-D16 floating-point extension, with only 16
2576 double-precision registers.
2577``fpv5-sp-d16``
2578 Enable the Armv7-M FPv5-SP-D16 floating-point extension, with
2579 single-precision floating-point operations only, and only 16
2580 double-precision registers.
2581``fp-armv8``
2582 Enable Armv8 floaing-point extension. Disable the cryptographic extension
2583 and the Advanced SIMD extension.
2584``fp-armv8-fullfp16-d16``
2585 Enable Armv8 floaing-point extension, with half-precision operations and
2586 only 16 double-precision registers.
2587``fp-armv8-fullfp16-sp-d16``
2588 Enable Armv8 floaing-point extension with only single- and half-precision
2589 operations and only 16 double-precision registers.
2590``neon``
2591 Enable VFPv3 and Advanced SIMD extensions.
2592``neon-fp16``
2593 Enable VFPv3, Advanced SIMD extensions, and half-precision instructions.
2594``neon-vfpv4``
2595 Enable VFPv4 and Advanced SIMD extensions.
2596``neon-fp-armv8``
2597 Enable Armv8 floaing-point and Advanced SIMD extensions.
2598``crypto-neon-fp-armv8``
2599 Enable the Armv8 floaing-point extension, the cryptographic extension, and
2600 the Advanced SIMD extension.
2601
Richard Smith081ad4d2017-01-24 19:39:46 +00002602.. option:: -mno-movt
2603
2604Disallow use of movt/movw pairs (ARM only)
2605
Richard Smith78e23fd2017-04-13 22:39:49 +00002606.. option:: -mno-neg-immediates
2607
2608Disallow converting instructions with negative immediates to their negation or inversion.
2609
Richard Smith081ad4d2017-01-24 19:39:46 +00002610.. option:: -mnocrc
2611
2612Disallow use of CRC instructions (ARM only)
2613
Richard Smith081ad4d2017-01-24 19:39:46 +00002614.. option:: -mrestrict-it, -mno-restrict-it
2615
2616Disallow generation of deprecated IT blocks for ARMv8. It is on by default for ARMv8 Thumb mode.
2617
Craig Topper16418662017-11-20 18:07:43 +00002618.. option:: -mtp=<arg>
2619
2620Read thread pointer from coprocessor register (ARM only)
2621
Richard Smith081ad4d2017-01-24 19:39:46 +00002622.. option:: -munaligned-access, -mno-unaligned-access
2623
2624Allow memory accesses to be unaligned (AArch32/AArch64 only)
2625
2626Hexagon
2627-------
Craig Topper16418662017-11-20 18:07:43 +00002628.. option:: -mieee-rnd-near
2629
Vedant Kumar368540f2018-08-23 17:55:03 +00002630.. option:: -mmemops, -mno-memops
2631
2632Enable generation of memop instructions
2633
2634.. option:: -mnvj, -mno-nvj
2635
2636Enable generation of new-value jumps
2637
2638.. option:: -mnvs, -mno-nvs
2639
2640Enable generation of new-value stores
2641
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00002642.. option:: -mpackets, -mno-packets
2643
2644Enable generation of instruction packets
2645
Craig Topper16418662017-11-20 18:07:43 +00002646Hexagon
2647-------
Richard Smith081ad4d2017-01-24 19:39:46 +00002648.. option:: -mhvx, -mno-hvx
2649
2650Enable Hexagon Vector eXtensions
2651
Craig Topper16418662017-11-20 18:07:43 +00002652.. option:: -mhvx-length=<arg>
2653
2654Set Hexagon Vector Length
2655
2656.. program:: clang1
2657.. option:: -mhvx=<arg>
2658.. program:: clang
2659
2660Enable Hexagon Vector eXtensions
Richard Smith081ad4d2017-01-24 19:39:46 +00002661
Vedant Kumar368540f2018-08-23 17:55:03 +00002662MIPS
2663----
2664.. option:: -mabicalls, -mno-abicalls
2665
2666Enable SVR4-style position-independent code (Mips only)
2667
2668.. option:: -mabs=<arg>
2669
2670.. option:: -mcheck-zero-division, -mno-check-zero-division
2671
2672.. option:: -mcompact-branches=<arg>
2673
2674.. option:: -mdouble-float
2675
2676.. option:: -mdsp, -mno-dsp
2677
2678.. option:: -mdspr2, -mno-dspr2
2679
2680.. option:: -membedded-data, -mno-embedded-data
2681
2682Place constants in the .rodata section instead of the .sdata section even if they meet the -G <size> threshold (MIPS)
2683
2684.. option:: -mextern-sdata, -mno-extern-sdata
2685
2686Assume that externally defined data is in the small data if it meets the -G <size> threshold (MIPS)
2687
2688.. option:: -mfp32
2689
2690Use 32-bit floating point registers (MIPS only)
2691
2692.. option:: -mfp64
2693
2694Use 64-bit floating point registers (MIPS only)
2695
2696.. option:: -mginv, -mno-ginv
2697
2698.. option:: -mgpopt, -mno-gpopt
2699
2700Use GP relative accesses for symbols known to be in a small data section (MIPS)
2701
2702.. option:: -mindirect-jump=<arg>
2703
2704Change indirect jump instructions to inhibit speculation
2705
2706.. option:: -mips16
2707
2708.. option:: -mldc1-sdc1, -mno-ldc1-sdc1
2709
2710.. option:: -mlocal-sdata, -mno-local-sdata
2711
2712Extend the -G behaviour to object local data (MIPS)
2713
2714.. option:: -mmadd4, -mno-madd4
2715
2716Enable the generation of 4-operand madd.s, madd.d and related instructions.
2717
2718.. option:: -mmicromips, -mno-micromips
2719
2720.. option:: -mmsa, -mno-msa
2721
2722Enable MSA ASE (MIPS only)
2723
2724.. option:: -mmt, -mno-mt
2725
2726Enable MT ASE (MIPS only)
2727
2728.. option:: -mnan=<arg>
2729
2730.. option:: -mno-mips16
2731
2732.. option:: -msingle-float
2733
2734.. option:: -mvirt, -mno-virt
2735
2736.. option:: -mxgot, -mno-xgot
2737
Richard Smith081ad4d2017-01-24 19:39:46 +00002738PowerPC
2739-------
Richard Smith78e23fd2017-04-13 22:39:49 +00002740.. option:: -maltivec, -mno-altivec
2741
Richard Smith081ad4d2017-01-24 19:39:46 +00002742.. option:: -mcmpb, -mno-cmpb
2743
Richard Smith081ad4d2017-01-24 19:39:46 +00002744.. option:: -mcrbits, -mno-crbits
2745
Richard Smith081ad4d2017-01-24 19:39:46 +00002746.. option:: -mcrypto, -mno-crypto
2747
Richard Smith081ad4d2017-01-24 19:39:46 +00002748.. option:: -mdirect-move, -mno-direct-move
2749
Richard Smith081ad4d2017-01-24 19:39:46 +00002750.. option:: -mfloat128, -mno-float128
2751
Richard Smith081ad4d2017-01-24 19:39:46 +00002752.. option:: -mfprnd, -mno-fprnd
2753
Richard Smith081ad4d2017-01-24 19:39:46 +00002754.. option:: -mhtm, -mno-htm
2755
Richard Smith081ad4d2017-01-24 19:39:46 +00002756.. option:: -minvariant-function-descriptors, -mno-invariant-function-descriptors
2757
Richard Smith081ad4d2017-01-24 19:39:46 +00002758.. option:: -misel, -mno-isel
2759
Richard Smith081ad4d2017-01-24 19:39:46 +00002760.. option:: -mlongcall, -mno-longcall
2761
Richard Smith081ad4d2017-01-24 19:39:46 +00002762.. option:: -mmfocrf, -mmfcrf, -mno-mfocrf
2763
Richard Smith081ad4d2017-01-24 19:39:46 +00002764.. option:: -mpopcntd, -mno-popcntd
2765
Richard Smith081ad4d2017-01-24 19:39:46 +00002766.. option:: -mpower8-vector, -mno-power8-vector
2767
Richard Smith081ad4d2017-01-24 19:39:46 +00002768.. option:: -mpower9-vector, -mno-power9-vector
2769
Richard Smith081ad4d2017-01-24 19:39:46 +00002770.. option:: -mqpx, -mno-qpx
2771
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00002772.. option:: -msecure-plt
2773
Richard Smith081ad4d2017-01-24 19:39:46 +00002774.. option:: -mvsx, -mno-vsx
2775
2776WebAssembly
2777-----------
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00002778.. option:: -mexception-handling, -mno-exception-handling
2779
Craig Topper188252d2017-12-11 21:09:16 +00002780.. option:: -mnontrapping-fptoint, -mno-nontrapping-fptoint
2781
Dan Gohmand0c4e1e2018-01-19 17:16:32 +00002782.. option:: -msign-ext, -mno-sign-ext
2783
Richard Smith081ad4d2017-01-24 19:39:46 +00002784.. option:: -msimd128, -mno-simd128
2785
2786X86
2787---
Richard Smith081ad4d2017-01-24 19:39:46 +00002788.. option:: -m3dnow, -mno-3dnow
2789
Richard Smith081ad4d2017-01-24 19:39:46 +00002790.. option:: -m3dnowa, -mno-3dnowa
2791
Richard Smith081ad4d2017-01-24 19:39:46 +00002792.. option:: -madx, -mno-adx
2793
Richard Smith081ad4d2017-01-24 19:39:46 +00002794.. option:: -maes, -mno-aes
2795
Richard Smith081ad4d2017-01-24 19:39:46 +00002796.. option:: -mavx, -mno-avx
2797
Richard Smith081ad4d2017-01-24 19:39:46 +00002798.. option:: -mavx2, -mno-avx2
2799
Craig Topper287c8012018-01-03 18:29:12 +00002800.. option:: -mavx512bitalg, -mno-avx512bitalg
2801
Luo, Yuanke844f6622019-05-06 08:25:11 +00002802.. option:: -mavx512bf16, -mno-avx512bf16
2803
Richard Smith081ad4d2017-01-24 19:39:46 +00002804.. option:: -mavx512bw, -mno-avx512bw
2805
Richard Smith081ad4d2017-01-24 19:39:46 +00002806.. option:: -mavx512cd, -mno-avx512cd
2807
Richard Smith081ad4d2017-01-24 19:39:46 +00002808.. option:: -mavx512dq, -mno-avx512dq
2809
Richard Smith081ad4d2017-01-24 19:39:46 +00002810.. option:: -mavx512er, -mno-avx512er
2811
Richard Smith081ad4d2017-01-24 19:39:46 +00002812.. option:: -mavx512f, -mno-avx512f
2813
Richard Smith081ad4d2017-01-24 19:39:46 +00002814.. option:: -mavx512ifma, -mno-avx512ifma
2815
Richard Smith081ad4d2017-01-24 19:39:46 +00002816.. option:: -mavx512pf, -mno-avx512pf
2817
Richard Smith081ad4d2017-01-24 19:39:46 +00002818.. option:: -mavx512vbmi, -mno-avx512vbmi
2819
Craig Topper287c8012018-01-03 18:29:12 +00002820.. option:: -mavx512vbmi2, -mno-avx512vbmi2
2821
Richard Smith081ad4d2017-01-24 19:39:46 +00002822.. option:: -mavx512vl, -mno-avx512vl
2823
Craig Topper287c8012018-01-03 18:29:12 +00002824.. option:: -mavx512vnni, -mno-avx512vnni
2825
Pengfei Wangcc3629d2019-05-31 06:09:35 +00002826.. option:: -mavx512vp2intersect, -mno-avx512vp2intersect
2827
Craig Topperd23254a2017-07-20 17:52:48 +00002828.. option:: -mavx512vpopcntdq, -mno-avx512vpopcntdq
2829
Richard Smith081ad4d2017-01-24 19:39:46 +00002830.. option:: -mbmi, -mno-bmi
2831
Richard Smith081ad4d2017-01-24 19:39:46 +00002832.. option:: -mbmi2, -mno-bmi2
2833
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00002834.. option:: -mcldemote, -mno-cldemote
2835
Craig Topper78b47872017-02-08 06:48:58 +00002836.. option:: -mclflushopt, -mno-clflushopt
2837
Craig Topper177a57c2017-02-08 07:57:01 +00002838.. option:: -mclwb, -mno-clwb
2839
Richard Smith78e23fd2017-04-13 22:39:49 +00002840.. option:: -mclzero, -mno-clzero
2841
Richard Smith081ad4d2017-01-24 19:39:46 +00002842.. option:: -mcx16, -mno-cx16
2843
Pengfei Wang3a29f7c2019-06-06 08:28:42 +00002844.. option:: -menqcmd, -mno-enqcmd
2845
Richard Smith081ad4d2017-01-24 19:39:46 +00002846.. option:: -mf16c, -mno-f16c
2847
Richard Smith081ad4d2017-01-24 19:39:46 +00002848.. option:: -mfma, -mno-fma
2849
Richard Smith081ad4d2017-01-24 19:39:46 +00002850.. option:: -mfma4, -mno-fma4
2851
Richard Smith081ad4d2017-01-24 19:39:46 +00002852.. option:: -mfsgsbase, -mno-fsgsbase
2853
Richard Smith081ad4d2017-01-24 19:39:46 +00002854.. option:: -mfxsr, -mno-fxsr
2855
Craig Topper287c8012018-01-03 18:29:12 +00002856.. option:: -mgfni, -mno-gfni
2857
Vedant Kumar368540f2018-08-23 17:55:03 +00002858.. option:: -minvpcid, -mno-invpcid
2859
Craig Topperd23254a2017-07-20 17:52:48 +00002860.. option:: -mlwp, -mno-lwp
2861
Richard Smith081ad4d2017-01-24 19:39:46 +00002862.. option:: -mlzcnt, -mno-lzcnt
2863
Richard Smith081ad4d2017-01-24 19:39:46 +00002864.. option:: -mmmx, -mno-mmx
2865
Craig Topper177a57c2017-02-08 07:57:01 +00002866.. option:: -mmovbe, -mno-movbe
2867
Gabor Buellaa51e0c22018-05-01 10:05:42 +00002868.. option:: -mmovdir64b, -mno-movdir64b
2869
Vedant Kumar368540f2018-08-23 17:55:03 +00002870.. option:: -mmovdiri, -mno-movdiri
2871
Craig Topperb16cb822017-02-08 07:56:42 +00002872.. option:: -mmpx, -mno-mpx
2873
Richard Smith081ad4d2017-01-24 19:39:46 +00002874.. option:: -mmwaitx, -mno-mwaitx
2875
Richard Smith081ad4d2017-01-24 19:39:46 +00002876.. option:: -mpclmul, -mno-pclmul
2877
Vedant Kumar368540f2018-08-23 17:55:03 +00002878.. option:: -mpconfig, -mno-pconfig
2879
Richard Smith081ad4d2017-01-24 19:39:46 +00002880.. option:: -mpku, -mno-pku
2881
Richard Smith081ad4d2017-01-24 19:39:46 +00002882.. option:: -mpopcnt, -mno-popcnt
2883
Craig Topperd2bf7b02017-02-08 08:23:40 +00002884.. option:: -mprefetchwt1, -mno-prefetchwt1
2885
Richard Smith081ad4d2017-01-24 19:39:46 +00002886.. option:: -mprfchw, -mno-prfchw
2887
Vedant Kumar368540f2018-08-23 17:55:03 +00002888.. option:: -mptwrite, -mno-ptwrite
2889
Craig Topper596527b2018-01-23 18:40:15 +00002890.. option:: -mrdpid, -mno-rdpid
2891
Richard Smith081ad4d2017-01-24 19:39:46 +00002892.. option:: -mrdrnd, -mno-rdrnd
2893
Richard Smith081ad4d2017-01-24 19:39:46 +00002894.. option:: -mrdseed, -mno-rdseed
2895
Craig Topper596527b2018-01-23 18:40:15 +00002896.. option:: -mretpoline-external-thunk, -mno-retpoline-external-thunk
2897
Richard Smith081ad4d2017-01-24 19:39:46 +00002898.. option:: -mrtm, -mno-rtm
2899
Jonas Hahnfelda180fc42018-02-22 17:10:28 +00002900.. option:: -msahf, -mno-sahf
2901
Craig Topper204ecff2017-02-08 08:23:17 +00002902.. option:: -msgx, -mno-sgx
2903
Richard Smith081ad4d2017-01-24 19:39:46 +00002904.. option:: -msha, -mno-sha
2905
Craig Topper188252d2017-12-11 21:09:16 +00002906.. option:: -mshstk, -mno-shstk
2907
Richard Smith081ad4d2017-01-24 19:39:46 +00002908.. option:: -msse, -mno-sse
2909
Richard Smith081ad4d2017-01-24 19:39:46 +00002910.. option:: -msse2, -mno-sse2
2911
Richard Smith081ad4d2017-01-24 19:39:46 +00002912.. option:: -msse3, -mno-sse3
2913
Richard Smith081ad4d2017-01-24 19:39:46 +00002914.. option:: -msse4.1, -mno-sse4.1
2915
Richard Smithb2c82a62017-01-27 01:54:42 +00002916.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00002917.. option:: -msse4.2, -mno-sse4.2, -msse4
Richard Smithb2c82a62017-01-27 01:54:42 +00002918.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00002919
Richard Smith081ad4d2017-01-24 19:39:46 +00002920.. option:: -msse4a, -mno-sse4a
2921
Richard Smith081ad4d2017-01-24 19:39:46 +00002922.. option:: -mssse3, -mno-ssse3
2923
Richard Smith081ad4d2017-01-24 19:39:46 +00002924.. option:: -mtbm, -mno-tbm
2925
Craig Topper287c8012018-01-03 18:29:12 +00002926.. option:: -mvaes, -mno-vaes
2927
2928.. option:: -mvpclmulqdq, -mno-vpclmulqdq
2929
Craig Topper42da9cb2018-04-23 21:41:06 +00002930.. option:: -mwaitpkg, -mno-waitpkg
2931
Gabor Buellaa0520162018-04-11 20:09:09 +00002932.. option:: -mwbnoinvd, -mno-wbnoinvd
2933
Richard Smith081ad4d2017-01-24 19:39:46 +00002934.. option:: -mx87, -m80387, -mno-x87
2935
Richard Smith081ad4d2017-01-24 19:39:46 +00002936.. option:: -mxop, -mno-xop
2937
Richard Smith081ad4d2017-01-24 19:39:46 +00002938.. option:: -mxsave, -mno-xsave
2939
Richard Smith081ad4d2017-01-24 19:39:46 +00002940.. option:: -mxsavec, -mno-xsavec
2941
Richard Smith081ad4d2017-01-24 19:39:46 +00002942.. option:: -mxsaveopt, -mno-xsaveopt
2943
Richard Smith081ad4d2017-01-24 19:39:46 +00002944.. option:: -mxsaves, -mno-xsaves
2945
Vedant Kumar368540f2018-08-23 17:55:03 +00002946RISCV
2947-----
2948.. option:: -mrelax, -mno-relax
2949
2950Enable linker relaxation
2951
Richard Smith081ad4d2017-01-24 19:39:46 +00002952Optimization level
2953~~~~~~~~~~~~~~~~~~
2954
2955Flags controlling how much optimization should be performed.
2956
Richard Smith081ad4d2017-01-24 19:39:46 +00002957.. option:: -O<arg>, -O (equivalent to -O2), --optimize, --optimize=<arg>
2958
Richard Smith081ad4d2017-01-24 19:39:46 +00002959.. option:: -Ofast<arg>
2960
2961Debug information generation
2962~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2963
2964Flags controlling how much and what kind of debug information should be
2965generated.
2966
2967Kind and level of debug information
2968-----------------------------------
Richard Smith081ad4d2017-01-24 19:39:46 +00002969.. option:: -g, --debug, --debug=<arg>
2970
2971Generate source-level debug information
2972
Richard Smith081ad4d2017-01-24 19:39:46 +00002973.. option:: -gdwarf-2
2974
2975Generate source-level debug information with dwarf version 2
2976
Richard Smith081ad4d2017-01-24 19:39:46 +00002977.. option:: -gdwarf-3
2978
2979Generate source-level debug information with dwarf version 3
2980
Richard Smith081ad4d2017-01-24 19:39:46 +00002981.. option:: -gdwarf-4, -gdwarf
2982
2983Generate source-level debug information with dwarf version 4
2984
Richard Smith081ad4d2017-01-24 19:39:46 +00002985.. option:: -gdwarf-5
2986
2987Generate source-level debug information with dwarf version 5
2988
Richard Smith081ad4d2017-01-24 19:39:46 +00002989.. option:: -gfull
2990
Richard Smith081ad4d2017-01-24 19:39:46 +00002991.. option:: -gused
2992
2993Debug level
2994___________
Richard Smith081ad4d2017-01-24 19:39:46 +00002995.. option:: -g0
2996
Richard Smith081ad4d2017-01-24 19:39:46 +00002997.. option:: -g2
2998
Richard Smith081ad4d2017-01-24 19:39:46 +00002999.. option:: -g3
3000
Richard Smith081ad4d2017-01-24 19:39:46 +00003001.. option:: -ggdb0
3002
Richard Smith081ad4d2017-01-24 19:39:46 +00003003.. option:: -ggdb1
3004
Richard Smith081ad4d2017-01-24 19:39:46 +00003005.. option:: -ggdb2
3006
Richard Smith081ad4d2017-01-24 19:39:46 +00003007.. option:: -ggdb3
3008
Richard Smith081ad4d2017-01-24 19:39:46 +00003009.. option:: -gline-tables-only, -g1, -gmlt
3010
3011Emit debug line number tables only
3012
Richard Smith081ad4d2017-01-24 19:39:46 +00003013.. option:: -gmodules
3014
3015Generate debug info with external references to clang modules or precompiled headers
3016
3017Debugger to tune debug information for
3018______________________________________
Richard Smith081ad4d2017-01-24 19:39:46 +00003019.. option:: -ggdb
3020
Richard Smith081ad4d2017-01-24 19:39:46 +00003021.. option:: -glldb
3022
Richard Smith081ad4d2017-01-24 19:39:46 +00003023.. option:: -gsce
3024
3025Debug information flags
3026-----------------------
Richard Smith081ad4d2017-01-24 19:39:46 +00003027.. option:: -gcolumn-info, -gno-column-info
3028
Richard Smith081ad4d2017-01-24 19:39:46 +00003029.. option:: -gdwarf-aranges
3030
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00003031.. option:: -gembed-source, -gno-embed-source
Scott Lindera2fbcef2018-02-26 17:32:31 +00003032
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00003033Embed source text in DWARF debug sections
Scott Lindera2fbcef2018-02-26 17:32:31 +00003034
Vedant Kumar368540f2018-08-23 17:55:03 +00003035.. option:: -ggnu-pubnames, -gno-gnu-pubnames
3036
3037.. option:: -gpubnames, -gno-pubnames
Richard Smith081ad4d2017-01-24 19:39:46 +00003038
Scott Linderde6beb02018-12-14 15:38:15 +00003039.. option:: -grecord-command-line, -grecord-gcc-switches, -gno-record-command-line, -gno-record-gcc-switches
Richard Smith081ad4d2017-01-24 19:39:46 +00003040
Richard Smith081ad4d2017-01-24 19:39:46 +00003041.. option:: -gsplit-dwarf
3042
Richard Smith081ad4d2017-01-24 19:39:46 +00003043.. option:: -gstrict-dwarf, -gno-strict-dwarf
3044
Craig Topperd23254a2017-07-20 17:52:48 +00003045.. option:: -gz
3046
3047DWARF debug sections compression type
3048
3049.. program:: clang1
3050.. option:: -gz=<arg>
3051.. program:: clang
3052
3053DWARF debug sections compression type
3054
Richard Smithc5b2e002017-01-27 02:08:37 +00003055Static analyzer flags
3056=====================
Richard Smith081ad4d2017-01-24 19:39:46 +00003057
Richard Smithc5b2e002017-01-27 02:08:37 +00003058Flags controlling the behavior of the Clang Static Analyzer.
Richard Smith081ad4d2017-01-24 19:39:46 +00003059
Richard Smithc5b2e002017-01-27 02:08:37 +00003060.. option:: -Xanalyzer <arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00003061
Richard Smithc5b2e002017-01-27 02:08:37 +00003062Pass <arg> to the static analyzer
Richard Smith081ad4d2017-01-24 19:39:46 +00003063
3064Fortran compilation flags
3065=========================
3066
3067Flags that will be passed onto the ``gfortran`` compiler when Clang is given
3068a Fortran input.
3069
Richard Smithc5b2e002017-01-27 02:08:37 +00003070.. option:: -A<arg>, --assert <arg>, --assert=<arg>
3071
Richard Smith081ad4d2017-01-24 19:39:46 +00003072.. option:: -A-<arg>
3073
Richard Smith081ad4d2017-01-24 19:39:46 +00003074.. option:: -J<arg>
3075
Richard Smith081ad4d2017-01-24 19:39:46 +00003076.. option:: -cpp
3077
Richard Smith081ad4d2017-01-24 19:39:46 +00003078.. option:: -faggressive-function-elimination, -fno-aggressive-function-elimination
3079
Richard Smith081ad4d2017-01-24 19:39:46 +00003080.. option:: -falign-commons, -fno-align-commons
3081
Richard Smith081ad4d2017-01-24 19:39:46 +00003082.. option:: -fall-intrinsics, -fno-all-intrinsics
3083
Richard Smith081ad4d2017-01-24 19:39:46 +00003084.. option:: -fautomatic, -fno-automatic
3085
Richard Smith081ad4d2017-01-24 19:39:46 +00003086.. option:: -fbackslash, -fno-backslash
3087
Richard Smith081ad4d2017-01-24 19:39:46 +00003088.. option:: -fbacktrace, -fno-backtrace
3089
Richard Smith081ad4d2017-01-24 19:39:46 +00003090.. option:: -fblas-matmul-limit=<arg>
3091
Richard Smith081ad4d2017-01-24 19:39:46 +00003092.. option:: -fbounds-check, -fno-bounds-check
3093
Richard Smith081ad4d2017-01-24 19:39:46 +00003094.. option:: -fcheck-array-temporaries, -fno-check-array-temporaries
3095
Richard Smith081ad4d2017-01-24 19:39:46 +00003096.. option:: -fcheck=<arg>
3097
Richard Smith081ad4d2017-01-24 19:39:46 +00003098.. option:: -fcoarray=<arg>
3099
Richard Smith081ad4d2017-01-24 19:39:46 +00003100.. option:: -fconvert=<arg>
3101
Richard Smith081ad4d2017-01-24 19:39:46 +00003102.. option:: -fcray-pointer, -fno-cray-pointer
3103
Richard Smith081ad4d2017-01-24 19:39:46 +00003104.. option:: -fd-lines-as-code, -fno-d-lines-as-code
3105
Richard Smith081ad4d2017-01-24 19:39:46 +00003106.. option:: -fd-lines-as-comments, -fno-d-lines-as-comments
3107
Richard Smith081ad4d2017-01-24 19:39:46 +00003108.. option:: -fdefault-double-8, -fno-default-double-8
3109
Richard Smith081ad4d2017-01-24 19:39:46 +00003110.. option:: -fdefault-integer-8, -fno-default-integer-8
3111
Richard Smith081ad4d2017-01-24 19:39:46 +00003112.. option:: -fdefault-real-8, -fno-default-real-8
3113
Richard Smith081ad4d2017-01-24 19:39:46 +00003114.. option:: -fdollar-ok, -fno-dollar-ok
3115
Richard Smith081ad4d2017-01-24 19:39:46 +00003116.. option:: -fdump-fortran-optimized, -fno-dump-fortran-optimized
3117
Richard Smith081ad4d2017-01-24 19:39:46 +00003118.. option:: -fdump-fortran-original, -fno-dump-fortran-original
3119
Richard Smith081ad4d2017-01-24 19:39:46 +00003120.. option:: -fdump-parse-tree, -fno-dump-parse-tree
3121
Richard Smith081ad4d2017-01-24 19:39:46 +00003122.. option:: -fexternal-blas, -fno-external-blas
3123
Richard Smith081ad4d2017-01-24 19:39:46 +00003124.. option:: -ff2c, -fno-f2c
3125
Richard Smith081ad4d2017-01-24 19:39:46 +00003126.. option:: -ffixed-form, -fno-fixed-form
3127
Richard Smith081ad4d2017-01-24 19:39:46 +00003128.. option:: -ffixed-line-length-<arg>
3129
Richard Smith081ad4d2017-01-24 19:39:46 +00003130.. option:: -ffpe-trap=<arg>
3131
Richard Smith081ad4d2017-01-24 19:39:46 +00003132.. option:: -ffree-form, -fno-free-form
3133
Richard Smith081ad4d2017-01-24 19:39:46 +00003134.. option:: -ffree-line-length-<arg>
3135
Richard Smith081ad4d2017-01-24 19:39:46 +00003136.. option:: -ffrontend-optimize, -fno-frontend-optimize
3137
Richard Smith081ad4d2017-01-24 19:39:46 +00003138.. option:: -fimplicit-none, -fno-implicit-none
3139
Richard Smith081ad4d2017-01-24 19:39:46 +00003140.. option:: -finit-character=<arg>
3141
Richard Smith081ad4d2017-01-24 19:39:46 +00003142.. option:: -finit-integer=<arg>
3143
Richard Smith081ad4d2017-01-24 19:39:46 +00003144.. option:: -finit-local-zero, -fno-init-local-zero
3145
Richard Smith081ad4d2017-01-24 19:39:46 +00003146.. option:: -finit-logical=<arg>
3147
Richard Smith081ad4d2017-01-24 19:39:46 +00003148.. option:: -finit-real=<arg>
3149
Richard Smith081ad4d2017-01-24 19:39:46 +00003150.. option:: -finteger-4-integer-8, -fno-integer-4-integer-8
3151
Richard Smith081ad4d2017-01-24 19:39:46 +00003152.. option:: -fintrinsic-modules-path, -fno-intrinsic-modules-path
3153
Richard Smith081ad4d2017-01-24 19:39:46 +00003154.. option:: -fmax-array-constructor=<arg>
3155
Richard Smith081ad4d2017-01-24 19:39:46 +00003156.. option:: -fmax-errors=<arg>
3157
Richard Smith081ad4d2017-01-24 19:39:46 +00003158.. option:: -fmax-identifier-length, -fno-max-identifier-length
3159
Richard Smith081ad4d2017-01-24 19:39:46 +00003160.. option:: -fmax-stack-var-size=<arg>
3161
Richard Smith081ad4d2017-01-24 19:39:46 +00003162.. option:: -fmax-subrecord-length=<arg>
3163
Richard Smith081ad4d2017-01-24 19:39:46 +00003164.. option:: -fmodule-private, -fno-module-private
3165
Richard Smith081ad4d2017-01-24 19:39:46 +00003166.. option:: -fpack-derived, -fno-pack-derived
3167
Richard Smith081ad4d2017-01-24 19:39:46 +00003168.. option:: -fprotect-parens, -fno-protect-parens
3169
Richard Smith081ad4d2017-01-24 19:39:46 +00003170.. option:: -frange-check, -fno-range-check
3171
Richard Smith081ad4d2017-01-24 19:39:46 +00003172.. option:: -freal-4-real-10, -fno-real-4-real-10
3173
Richard Smith081ad4d2017-01-24 19:39:46 +00003174.. option:: -freal-4-real-16, -fno-real-4-real-16
3175
Richard Smith081ad4d2017-01-24 19:39:46 +00003176.. option:: -freal-4-real-8, -fno-real-4-real-8
3177
Richard Smith081ad4d2017-01-24 19:39:46 +00003178.. option:: -freal-8-real-10, -fno-real-8-real-10
3179
Richard Smith081ad4d2017-01-24 19:39:46 +00003180.. option:: -freal-8-real-16, -fno-real-8-real-16
3181
Richard Smith081ad4d2017-01-24 19:39:46 +00003182.. option:: -freal-8-real-4, -fno-real-8-real-4
3183
Richard Smith081ad4d2017-01-24 19:39:46 +00003184.. option:: -frealloc-lhs, -fno-realloc-lhs
3185
Richard Smith081ad4d2017-01-24 19:39:46 +00003186.. option:: -frecord-marker=<arg>
3187
Richard Smith081ad4d2017-01-24 19:39:46 +00003188.. option:: -frecursive, -fno-recursive
3189
Richard Smith081ad4d2017-01-24 19:39:46 +00003190.. option:: -frepack-arrays, -fno-repack-arrays
3191
Richard Smith081ad4d2017-01-24 19:39:46 +00003192.. option:: -fsecond-underscore, -fno-second-underscore
3193
Richard Smith081ad4d2017-01-24 19:39:46 +00003194.. option:: -fsign-zero, -fno-sign-zero
3195
Richard Smith081ad4d2017-01-24 19:39:46 +00003196.. option:: -fstack-arrays, -fno-stack-arrays
3197
Richard Smith081ad4d2017-01-24 19:39:46 +00003198.. option:: -funderscoring, -fno-underscoring
3199
Richard Smith081ad4d2017-01-24 19:39:46 +00003200.. option:: -fwhole-file, -fno-whole-file
3201
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00003202.. option:: -imultilib <arg>
3203
Richard Smith081ad4d2017-01-24 19:39:46 +00003204.. option:: -nocpp
3205
Richard Smith081ad4d2017-01-24 19:39:46 +00003206.. option:: -static-libgfortran
3207
Richard Smithc5b2e002017-01-27 02:08:37 +00003208Linker flags
3209============
3210Flags that are passed on to the linker
3211
3212.. option:: -L<dir>, --library-directory <arg>, --library-directory=<arg>
3213
3214Add directory to library search path
3215
3216.. option:: -Mach
3217
3218.. option:: -T<script>
3219
3220Specify <script> as linker script
3221
Richard Smith78e23fd2017-04-13 22:39:49 +00003222.. option:: -Tbss<addr>
Richard Smithc5b2e002017-01-27 02:08:37 +00003223
3224Set starting address of BSS to <addr>
3225
Richard Smith78e23fd2017-04-13 22:39:49 +00003226.. option:: -Tdata<addr>
Richard Smithc5b2e002017-01-27 02:08:37 +00003227
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00003228Set starting address of DATA to <addr>
Richard Smithc5b2e002017-01-27 02:08:37 +00003229
Richard Smith78e23fd2017-04-13 22:39:49 +00003230.. option:: -Ttext<addr>
Richard Smithc5b2e002017-01-27 02:08:37 +00003231
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00003232Set starting address of TEXT to <addr>
Richard Smithc5b2e002017-01-27 02:08:37 +00003233
3234.. option:: -Wl,<arg>,<arg2>...
3235
3236Pass the comma separated arguments in <arg> to the linker
3237
3238.. option:: -X
3239
3240.. option:: -Xlinker <arg>, --for-linker <arg>, --for-linker=<arg>
3241
3242Pass <arg> to the linker
3243
3244.. program:: clang1
3245.. option:: -Z
3246.. program:: clang
3247
3248.. option:: -e<arg>, --entry
3249
3250.. option:: -filelist <arg>
3251
Vedant Kumar368540f2018-08-23 17:55:03 +00003252.. option:: --hip-device-lib-path=<arg>
3253
3254HIP device library path
3255
3256.. option:: --hip-device-lib=<arg>
3257
3258HIP device library
3259
Richard Smithc5b2e002017-01-27 02:08:37 +00003260.. option:: -l<arg>
3261
3262.. option:: -r
3263
3264.. option:: -rpath <arg>
3265
3266.. option:: -s
3267
3268.. option:: -t
3269
3270.. option:: -u<arg>, --force-link <arg>, --force-link=<arg>
3271
3272.. option:: -undef
3273
3274undef all system defines
3275
3276.. option:: -undefined<arg>, --no-undefined
3277
3278.. option:: -z <arg>
3279
3280Pass -z <arg> to the linker
3281