blob: 5c15482cb251d9b9852c760c19ae9b371e176d2f [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
Craig Topper42da9cb2018-04-23 21:41:06 +000039.. option:: -Qn
40
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
Craig Topper42da9cb2018-04-23 21:41:06 +000047.. option:: -Qy
48
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:: --analyze-auto
90
Richard Smith081ad4d2017-01-24 19:39:46 +000091.. option:: --analyzer-no-default-checks
92
Richard Smith081ad4d2017-01-24 19:39:46 +000093.. option:: --analyzer-output<arg>
94
95Static analyzer report output format (html\|plist\|plist-multi-file\|plist-html\|text).
96
Richard Smith081ad4d2017-01-24 19:39:46 +000097.. option:: -ansi, --ansi
98
Richard Smith081ad4d2017-01-24 19:39:46 +000099.. option:: -arch <arg>
100
Richard Smithb2c82a62017-01-27 01:54:42 +0000101.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000102.. option:: -arch\_errors\_fatal
Richard Smithb2c82a62017-01-27 01:54:42 +0000103.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000104
Richard Smithb2c82a62017-01-27 01:54:42 +0000105.. program:: clang2
Richard Smith081ad4d2017-01-24 19:39:46 +0000106.. option:: -arch\_only <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000107.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000108
Richard Smith081ad4d2017-01-24 19:39:46 +0000109.. option:: -arcmt-migrate-emit-errors
110
111Emit ARC errors even if the migrator can fix them
112
Richard Smith081ad4d2017-01-24 19:39:46 +0000113.. option:: -arcmt-migrate-report-output <arg>
114
115Output path for the plist report
116
Craig Topperd23254a2017-07-20 17:52:48 +0000117.. option:: --autocomplete=<arg>
118
Richard Smith081ad4d2017-01-24 19:39:46 +0000119.. option:: -bind\_at\_load
120
Richard Smith081ad4d2017-01-24 19:39:46 +0000121.. option:: -bundle
122
Richard Smithb2c82a62017-01-27 01:54:42 +0000123.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000124.. option:: -bundle\_loader <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000125.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000126
Craig Topper596527b2018-01-23 18:40:15 +0000127.. option:: -cfguard
128
129Emit tables required for Windows Control Flow Guard.
130
Richard Smith081ad4d2017-01-24 19:39:46 +0000131.. option:: -client\_name<arg>
132
Richard Smith081ad4d2017-01-24 19:39:46 +0000133.. option:: -compatibility\_version<arg>
134
Craig Topper287c8012018-01-03 18:29:12 +0000135.. option:: --config <arg>
136
137Specifies configuration file
138
Richard Smith081ad4d2017-01-24 19:39:46 +0000139.. option:: --constant-cfstrings
140
Richard Smith081ad4d2017-01-24 19:39:46 +0000141.. option:: -coverage, --coverage
142
Richard Smith081ad4d2017-01-24 19:39:46 +0000143.. option:: --cuda-compile-host-device
144
145Compile CUDA code for both host and device (default). Has no effect on non-CUDA compilations.
146
Richard Smith081ad4d2017-01-24 19:39:46 +0000147.. option:: --cuda-device-only
148
149Compile CUDA code for device only
150
Richard Smith081ad4d2017-01-24 19:39:46 +0000151.. option:: --cuda-gpu-arch=<arg>, --no-cuda-gpu-arch=<arg>
152
153CUDA GPU architecture (e.g. sm\_35). May be specified more than once.
154
Richard Smith081ad4d2017-01-24 19:39:46 +0000155.. option:: --cuda-host-only
156
157Compile CUDA code for host only. Has no effect on non-CUDA compilations.
158
Jonas Hahnfeld06039e82018-04-20 13:26:03 +0000159.. option:: --cuda-include-ptx=<arg>, --no-cuda-include-ptx=<arg>
160
161Include PTX for the follwing GPU architecture (e.g. sm\_35) or 'all'. May be specified more than once.
162
Richard Smith081ad4d2017-01-24 19:39:46 +0000163.. option:: --cuda-noopt-device-debug, --no-cuda-noopt-device-debug
164
165Enable device-side debug info generation. Disables ptxas optimizations.
166
Richard Smith081ad4d2017-01-24 19:39:46 +0000167.. option:: -current\_version<arg>
168
Richard Smith081ad4d2017-01-24 19:39:46 +0000169.. option:: -dead\_strip
170
Richard Smith081ad4d2017-01-24 19:39:46 +0000171.. option:: -dependency-dot <arg>
172
173Filename to write DOT-formatted header dependencies to
174
Richard Smith081ad4d2017-01-24 19:39:46 +0000175.. option:: -dependency-file <arg>
176
177Filename (or -) to write dependency output to
178
Richard Smith081ad4d2017-01-24 19:39:46 +0000179.. option:: -dumpmachine
180
Richard Smith081ad4d2017-01-24 19:39:46 +0000181.. option:: -dumpversion
182
Richard Smith081ad4d2017-01-24 19:39:46 +0000183.. option:: --dyld-prefix=<arg>, --dyld-prefix <arg>
184
Richard Smith081ad4d2017-01-24 19:39:46 +0000185.. option:: -dylib\_file <arg>
186
Richard Smith081ad4d2017-01-24 19:39:46 +0000187.. option:: -dylinker
188
Richard Smithb2c82a62017-01-27 01:54:42 +0000189.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000190.. option:: -dylinker\_install\_name<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000191.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000192
Richard Smith081ad4d2017-01-24 19:39:46 +0000193.. option:: -dynamic
194
Richard Smith081ad4d2017-01-24 19:39:46 +0000195.. option:: -dynamiclib
196
Richard Smith081ad4d2017-01-24 19:39:46 +0000197.. option:: -emit-ast
198
199Emit Clang AST files for source inputs
200
Richard Smith081ad4d2017-01-24 19:39:46 +0000201.. option:: -exported\_symbols\_list <arg>
202
Richard Smith081ad4d2017-01-24 19:39:46 +0000203.. option:: -faligned-new=<arg>
204
Richard Smith081ad4d2017-01-24 19:39:46 +0000205.. option:: -fcuda-approx-transcendentals, -fno-cuda-approx-transcendentals
206
207Use approximate transcendental functions
208
Richard Smith081ad4d2017-01-24 19:39:46 +0000209.. option:: -fcuda-flush-denormals-to-zero, -fno-cuda-flush-denormals-to-zero
210
211Flush denormal floating point values to zero in CUDA device mode.
212
Craig Topper42da9cb2018-04-23 21:41:06 +0000213.. option:: -fcuda-rdc, -fno-cuda-rdc
214
215Generate relocatable device code, also known as separate compilation mode.
216
Jonas Hahnfeld06039e82018-04-20 13:26:03 +0000217.. option:: -ffixed-r19
218
219Reserve the r19 register (Hexagon only)
220
Richard Smith081ad4d2017-01-24 19:39:46 +0000221.. option:: -fheinous-gnu-extensions
222
Richard Smith081ad4d2017-01-24 19:39:46 +0000223.. option:: -flat\_namespace
224
Richard Smith081ad4d2017-01-24 19:39:46 +0000225.. option:: -fopenmp-targets=<arg1>,<arg2>...
226
227Specify comma-separated list of triples OpenMP offloading targets to be supported
228
Richard Smith081ad4d2017-01-24 19:39:46 +0000229.. option:: -force\_cpusubtype\_ALL
230
Richard Smithb2c82a62017-01-27 01:54:42 +0000231.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000232.. option:: -force\_flat\_namespace
Richard Smithb2c82a62017-01-27 01:54:42 +0000233.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000234
Richard Smithb2c82a62017-01-27 01:54:42 +0000235.. program:: clang2
Richard Smith081ad4d2017-01-24 19:39:46 +0000236.. option:: -force\_load <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000237.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000238
Richard Smith081ad4d2017-01-24 19:39:46 +0000239.. option:: -framework <arg>
240
Richard Smith78e23fd2017-04-13 22:39:49 +0000241.. option:: -frtlib-add-rpath, -fno-rtlib-add-rpath
242
243Add -rpath with architecture-specific resource directory to the linker flags
244
Richard Smith081ad4d2017-01-24 19:39:46 +0000245.. option:: --gcc-toolchain=<arg>, -gcc-toolchain <arg>
246
247Use the gcc toolchain at the given directory
248
Richard Smith081ad4d2017-01-24 19:39:46 +0000249.. option:: -gcodeview
250
251Generate CodeView debug information
252
Richard Smith081ad4d2017-01-24 19:39:46 +0000253.. option:: -headerpad\_max\_install\_names<arg>
254
Richard Smith081ad4d2017-01-24 19:39:46 +0000255.. option:: -help, --help
256
257Display available options
258
Richard Smith081ad4d2017-01-24 19:39:46 +0000259.. option:: --help-hidden
260
Jonas Hahnfeld06039e82018-04-20 13:26:03 +0000261Display help for hidden options
262
Richard Smith081ad4d2017-01-24 19:39:46 +0000263.. option:: -image\_base <arg>
264
Richard Smith081ad4d2017-01-24 19:39:46 +0000265.. option:: -index-header-map
266
267Make the next included directory (-I or -F) an indexer header map
268
Richard Smith081ad4d2017-01-24 19:39:46 +0000269.. option:: -init <arg>
270
Richard Smith081ad4d2017-01-24 19:39:46 +0000271.. option:: -install\_name <arg>
272
Richard Smith081ad4d2017-01-24 19:39:46 +0000273.. option:: -keep\_private\_externs
274
Richard Smith081ad4d2017-01-24 19:39:46 +0000275.. option:: -lazy\_framework <arg>
276
Richard Smithb2c82a62017-01-27 01:54:42 +0000277.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000278.. option:: -lazy\_library <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000279.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000280
Richard Smith081ad4d2017-01-24 19:39:46 +0000281.. option:: -mbig-endian, -EB
282
Richard Smith081ad4d2017-01-24 19:39:46 +0000283.. option:: --migrate
284
285Run the migrator
286
Richard Smith78e23fd2017-04-13 22:39:49 +0000287.. option:: -mios-simulator-version-min=<arg>, -miphonesimulator-version-min=<arg>
288
Richard Smith081ad4d2017-01-24 19:39:46 +0000289.. option:: -mlinker-version=<arg>
290
Richard Smith081ad4d2017-01-24 19:39:46 +0000291.. option:: -mlittle-endian, -EL
292
Richard Smith081ad4d2017-01-24 19:39:46 +0000293.. option:: -mllvm <arg>
294
295Additional arguments to forward to LLVM's option processing
296
Richard Smith081ad4d2017-01-24 19:39:46 +0000297.. option:: -module-dependency-dir <arg>
298
299Directory to dump module dependencies to
300
Richard Smith78e23fd2017-04-13 22:39:49 +0000301.. option:: -mtvos-simulator-version-min=<arg>, -mappletvsimulator-version-min=<arg>
302
Richard Smith081ad4d2017-01-24 19:39:46 +0000303.. option:: -multi\_module
304
Richard Smith081ad4d2017-01-24 19:39:46 +0000305.. option:: -multiply\_defined <arg>
306
Richard Smithb2c82a62017-01-27 01:54:42 +0000307.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000308.. option:: -multiply\_defined\_unused <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000309.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000310
Richard Smith78e23fd2017-04-13 22:39:49 +0000311.. option:: -mwatchos-simulator-version-min=<arg>, -mwatchsimulator-version-min=<arg>
312
Richard Smith081ad4d2017-01-24 19:39:46 +0000313.. option:: --no-cuda-version-check
314
315Don't error out if the detected version of the CUDA install is too low for the requested CUDA gpu architecture.
316
Richard Smith081ad4d2017-01-24 19:39:46 +0000317.. option:: -no-integrated-cpp, --no-integrated-cpp
318
Richard Smith081ad4d2017-01-24 19:39:46 +0000319.. option:: -no\_dead\_strip\_inits\_and\_terms
320
Richard Smith081ad4d2017-01-24 19:39:46 +0000321.. option:: -nobuiltininc
322
323Disable builtin #include directories
324
Richard Smith081ad4d2017-01-24 19:39:46 +0000325.. option:: -nocudainc
326
Richard Smith081ad4d2017-01-24 19:39:46 +0000327.. option:: -nocudalib
328
Richard Smith081ad4d2017-01-24 19:39:46 +0000329.. option:: -nodefaultlibs
330
Richard Smith081ad4d2017-01-24 19:39:46 +0000331.. option:: -nofixprebinding
332
Richard Smith081ad4d2017-01-24 19:39:46 +0000333.. option:: -nolibc
334
Richard Smith081ad4d2017-01-24 19:39:46 +0000335.. option:: -nomultidefs
336
Craig Topperd23254a2017-07-20 17:52:48 +0000337.. option:: -nopie, -no-pie
Richard Smith081ad4d2017-01-24 19:39:46 +0000338
Richard Smith081ad4d2017-01-24 19:39:46 +0000339.. option:: -noprebind
340
Richard Smith081ad4d2017-01-24 19:39:46 +0000341.. option:: -noseglinkedit
342
Richard Smith081ad4d2017-01-24 19:39:46 +0000343.. option:: -nostartfiles
344
Richard Smith081ad4d2017-01-24 19:39:46 +0000345.. option:: -nostdinc, --no-standard-includes
346
Richard Smithb2c82a62017-01-27 01:54:42 +0000347.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000348.. option:: -nostdinc++
Richard Smithb2c82a62017-01-27 01:54:42 +0000349.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000350
351Disable standard #include directories for the C++ standard library
352
Richard Smith081ad4d2017-01-24 19:39:46 +0000353.. option:: -nostdlib, --no-standard-libraries
354
Boris Kolpackovb150d242017-08-30 09:15:53 +0000355.. program:: clang1
356.. option:: -nostdlib++
357.. program:: clang
358
Richard Smith081ad4d2017-01-24 19:39:46 +0000359.. option:: -nostdlibinc
360
Richard Smith081ad4d2017-01-24 19:39:46 +0000361.. option:: -o<file>, --output <arg>, --output=<arg>
362
363Write output to <file>
364
Richard Smith081ad4d2017-01-24 19:39:46 +0000365.. option:: -objcmt-atomic-property
366
367Make migration to 'atomic' properties
368
Richard Smith081ad4d2017-01-24 19:39:46 +0000369.. option:: -objcmt-migrate-all
370
371Enable migration to modern ObjC
372
Richard Smith081ad4d2017-01-24 19:39:46 +0000373.. option:: -objcmt-migrate-annotation
374
375Enable migration to property and method annotations
376
Richard Smith081ad4d2017-01-24 19:39:46 +0000377.. option:: -objcmt-migrate-designated-init
378
379Enable migration to infer NS\_DESIGNATED\_INITIALIZER for initializer methods
380
Richard Smith081ad4d2017-01-24 19:39:46 +0000381.. option:: -objcmt-migrate-instancetype
382
383Enable migration to infer instancetype for method result type
384
Richard Smith081ad4d2017-01-24 19:39:46 +0000385.. option:: -objcmt-migrate-literals
386
387Enable migration to modern ObjC literals
388
Richard Smith081ad4d2017-01-24 19:39:46 +0000389.. option:: -objcmt-migrate-ns-macros
390
391Enable migration to NS\_ENUM/NS\_OPTIONS macros
392
Richard Smith081ad4d2017-01-24 19:39:46 +0000393.. option:: -objcmt-migrate-property
394
395Enable migration to modern ObjC property
396
Richard Smith081ad4d2017-01-24 19:39:46 +0000397.. option:: -objcmt-migrate-property-dot-syntax
398
399Enable migration of setter/getter messages to property-dot syntax
400
Richard Smith081ad4d2017-01-24 19:39:46 +0000401.. option:: -objcmt-migrate-protocol-conformance
402
403Enable migration to add protocol conformance on classes
404
Richard Smith081ad4d2017-01-24 19:39:46 +0000405.. option:: -objcmt-migrate-readonly-property
406
407Enable migration to modern ObjC readonly property
408
Richard Smith081ad4d2017-01-24 19:39:46 +0000409.. option:: -objcmt-migrate-readwrite-property
410
411Enable migration to modern ObjC readwrite property
412
Richard Smith081ad4d2017-01-24 19:39:46 +0000413.. option:: -objcmt-migrate-subscripting
414
415Enable migration to modern ObjC subscripting
416
Richard Smith081ad4d2017-01-24 19:39:46 +0000417.. option:: -objcmt-ns-nonatomic-iosonly
418
419Enable migration to use NS\_NONATOMIC\_IOSONLY macro for setting property's 'atomic' attribute
420
Richard Smith081ad4d2017-01-24 19:39:46 +0000421.. option:: -objcmt-returns-innerpointer-property
422
423Enable migration to annotate property with NS\_RETURNS\_INNER\_POINTER
424
Richard Smith081ad4d2017-01-24 19:39:46 +0000425.. option:: -objcmt-whitelist-dir-path=<arg>, -objcmt-white-list-dir-path=<arg>
426
427Only modify files with a filename contained in the provided directory path
428
Richard Smith081ad4d2017-01-24 19:39:46 +0000429.. option:: -object
430
Richard Smith081ad4d2017-01-24 19:39:46 +0000431.. option:: -p, --profile
432
Richard Smith081ad4d2017-01-24 19:39:46 +0000433.. option:: -pagezero\_size<arg>
434
Richard Smith081ad4d2017-01-24 19:39:46 +0000435.. option:: -pg
436
437Enable mcount instrumentation
438
Richard Smith081ad4d2017-01-24 19:39:46 +0000439.. option:: -pie
440
Richard Smith081ad4d2017-01-24 19:39:46 +0000441.. option:: -pipe, --pipe
442
443Use pipes between commands, when possible
444
Richard Smith081ad4d2017-01-24 19:39:46 +0000445.. option:: -prebind
446
Richard Smithb2c82a62017-01-27 01:54:42 +0000447.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000448.. option:: -prebind\_all\_twolevel\_modules
Richard Smithb2c82a62017-01-27 01:54:42 +0000449.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000450
Richard Smith081ad4d2017-01-24 19:39:46 +0000451.. option:: -preload
452
Richard Smith081ad4d2017-01-24 19:39:46 +0000453.. option:: --print-diagnostic-categories
454
Richard Smith081ad4d2017-01-24 19:39:46 +0000455.. option:: -print-file-name=<file>, --print-file-name=<file>, --print-file-name <arg>
456
457Print the full library path of <file>
458
Richard Smith081ad4d2017-01-24 19:39:46 +0000459.. option:: -print-ivar-layout
460
461Enable Objective-C Ivar layout bitmap print trace
462
Richard Smith081ad4d2017-01-24 19:39:46 +0000463.. option:: -print-libgcc-file-name, --print-libgcc-file-name
464
465Print the library path for the currently used compiler runtime library ("libgcc.a" or "libclang\_rt.builtins.\*.a")
466
Richard Smith081ad4d2017-01-24 19:39:46 +0000467.. option:: -print-multi-directory, --print-multi-directory
468
Richard Smith081ad4d2017-01-24 19:39:46 +0000469.. option:: -print-multi-lib, --print-multi-lib
470
Richard Smith081ad4d2017-01-24 19:39:46 +0000471.. option:: -print-prog-name=<name>, --print-prog-name=<name>, --print-prog-name <arg>
472
473Print the full program path of <name>
474
Richard Smith78e23fd2017-04-13 22:39:49 +0000475.. option:: -print-resource-dir, --print-resource-dir
476
477Print the resource directory pathname
478
Richard Smith081ad4d2017-01-24 19:39:46 +0000479.. option:: -print-search-dirs, --print-search-dirs
480
481Print the paths used for finding libraries and programs
482
Richard Smith081ad4d2017-01-24 19:39:46 +0000483.. option:: -private\_bundle
484
Richard Smith081ad4d2017-01-24 19:39:46 +0000485.. option:: -pthread, -no-pthread
486
487Support POSIX threads in generated code
488
Richard Smith081ad4d2017-01-24 19:39:46 +0000489.. option:: -pthreads
490
Richard Smith081ad4d2017-01-24 19:39:46 +0000491.. option:: -rdynamic
492
Richard Smith081ad4d2017-01-24 19:39:46 +0000493.. option:: -read\_only\_relocs <arg>
494
Richard Smith081ad4d2017-01-24 19:39:46 +0000495.. option:: -relocatable-pch, --relocatable-pch
496
497Whether to build a relocatable precompiled header
498
Richard Smith081ad4d2017-01-24 19:39:46 +0000499.. option:: -remap
500
Richard Smith081ad4d2017-01-24 19:39:46 +0000501.. option:: -rewrite-legacy-objc
502
503Rewrite Legacy Objective-C source to C++
504
Richard Smith081ad4d2017-01-24 19:39:46 +0000505.. option:: -rtlib=<arg>, --rtlib=<arg>, --rtlib <arg>
506
507Compiler runtime library to use
508
Richard Smith081ad4d2017-01-24 19:39:46 +0000509.. option:: -save-stats=<arg>, --save-stats=<arg>, -save-stats (equivalent to -save-stats=cwd), --save-stats (equivalent to -save-stats=cwd)
510
511Save llvm statistics.
512
Richard Smith081ad4d2017-01-24 19:39:46 +0000513.. option:: -save-temps=<arg>, --save-temps=<arg>, -save-temps (equivalent to -save-temps=cwd), --save-temps (equivalent to -save-temps=cwd)
514
515Save intermediate compilation results.
516
Richard Smith081ad4d2017-01-24 19:39:46 +0000517.. option:: -sectalign <arg1> <arg2> <arg3>
518
Richard Smith081ad4d2017-01-24 19:39:46 +0000519.. option:: -sectcreate <arg1> <arg2> <arg3>
520
Richard Smith081ad4d2017-01-24 19:39:46 +0000521.. option:: -sectobjectsymbols <arg1> <arg2>
522
Richard Smith081ad4d2017-01-24 19:39:46 +0000523.. option:: -sectorder <arg1> <arg2> <arg3>
524
Richard Smith081ad4d2017-01-24 19:39:46 +0000525.. option:: -seg1addr<arg>
526
Richard Smith081ad4d2017-01-24 19:39:46 +0000527.. option:: -seg\_addr\_table <arg>
528
Richard Smithb2c82a62017-01-27 01:54:42 +0000529.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000530.. option:: -seg\_addr\_table\_filename <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000531.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000532
Richard Smith081ad4d2017-01-24 19:39:46 +0000533.. option:: -segaddr <arg1> <arg2>
534
Richard Smith081ad4d2017-01-24 19:39:46 +0000535.. option:: -segcreate <arg1> <arg2> <arg3>
536
Richard Smith081ad4d2017-01-24 19:39:46 +0000537.. option:: -seglinkedit
538
Richard Smith081ad4d2017-01-24 19:39:46 +0000539.. option:: -segprot <arg1> <arg2> <arg3>
540
Richard Smith081ad4d2017-01-24 19:39:46 +0000541.. option:: -segs\_read\_<arg>
542
Richard Smithb2c82a62017-01-27 01:54:42 +0000543.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000544.. option:: -segs\_read\_only\_addr <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000545.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000546
Richard Smithb2c82a62017-01-27 01:54:42 +0000547.. program:: clang2
Richard Smith081ad4d2017-01-24 19:39:46 +0000548.. option:: -segs\_read\_write\_addr <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000549.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000550
Richard Smith081ad4d2017-01-24 19:39:46 +0000551.. option:: -serialize-diagnostics <arg>, --serialize-diagnostics <arg>
552
553Serialize compiler diagnostics to a file
554
Richard Smith081ad4d2017-01-24 19:39:46 +0000555.. option:: -shared, --shared
556
Richard Smith081ad4d2017-01-24 19:39:46 +0000557.. option:: -shared-libgcc
558
Craig Topper16418662017-11-20 18:07:43 +0000559.. option:: -shared-libsan, -shared-libasan
560
Richard Smith081ad4d2017-01-24 19:39:46 +0000561.. option:: -single\_module
562
Richard Smith081ad4d2017-01-24 19:39:46 +0000563.. option:: -specs=<arg>, --specs=<arg>
564
Richard Smith081ad4d2017-01-24 19:39:46 +0000565.. option:: -static, --static
566
Richard Smith081ad4d2017-01-24 19:39:46 +0000567.. option:: -static-libgcc
568
Craig Topper16418662017-11-20 18:07:43 +0000569.. option:: -static-libsan
570
Richard Smith081ad4d2017-01-24 19:39:46 +0000571.. option:: -static-libstdc++
572
Richard Smith081ad4d2017-01-24 19:39:46 +0000573.. option:: -std-default=<arg>
574
Richard Smith081ad4d2017-01-24 19:39:46 +0000575.. option:: -stdlib=<arg>, --stdlib=<arg>, --stdlib <arg>
576
577C++ standard library to use
578
Richard Smith081ad4d2017-01-24 19:39:46 +0000579.. option:: -sub\_library<arg>
580
Richard Smithb2c82a62017-01-27 01:54:42 +0000581.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000582.. option:: -sub\_umbrella<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000583.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000584
Richard Smith081ad4d2017-01-24 19:39:46 +0000585.. option:: --sysroot=<arg>, --sysroot <arg>
586
Richard Smith081ad4d2017-01-24 19:39:46 +0000587.. option:: --target-help
588
Richard Smith081ad4d2017-01-24 19:39:46 +0000589.. option:: --target=<arg>, -target <arg>
590
591Generate code for the given target
592
Richard Smith081ad4d2017-01-24 19:39:46 +0000593.. option:: -time
594
595Time individual commands
596
Richard Smith081ad4d2017-01-24 19:39:46 +0000597.. option:: -traditional, --traditional
598
Richard Smith081ad4d2017-01-24 19:39:46 +0000599.. option:: -traditional-cpp, --traditional-cpp
600
601Enable some traditional CPP emulation
602
Richard Smith081ad4d2017-01-24 19:39:46 +0000603.. option:: -twolevel\_namespace
604
Richard Smithb2c82a62017-01-27 01:54:42 +0000605.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000606.. option:: -twolevel\_namespace\_hints
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:: -umbrella <arg>
610
Richard Smith081ad4d2017-01-24 19:39:46 +0000611.. option:: -unexported\_symbols\_list <arg>
612
Richard Smith081ad4d2017-01-24 19:39:46 +0000613.. option:: -v, --verbose
614
615Show commands to run and use verbose output
616
Richard Smith081ad4d2017-01-24 19:39:46 +0000617.. option:: --verify-debug-info
618
619Verify the binary representation of debug output
620
Richard Smith081ad4d2017-01-24 19:39:46 +0000621.. option:: --version
622
Craig Topper16418662017-11-20 18:07:43 +0000623Print version information
624
Richard Smith081ad4d2017-01-24 19:39:46 +0000625.. option:: -w, --no-warnings
626
627Suppress all warnings
628
Richard Smith081ad4d2017-01-24 19:39:46 +0000629.. option:: -weak-l<arg>
630
Richard Smith081ad4d2017-01-24 19:39:46 +0000631.. option:: -weak\_framework <arg>
632
Richard Smithb2c82a62017-01-27 01:54:42 +0000633.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000634.. option:: -weak\_library <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000635.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000636
Richard Smithb2c82a62017-01-27 01:54:42 +0000637.. program:: clang2
Richard Smith081ad4d2017-01-24 19:39:46 +0000638.. option:: -weak\_reference\_mismatches <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000639.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000640
Richard Smith081ad4d2017-01-24 19:39:46 +0000641.. option:: -whatsloaded
642
Richard Smith081ad4d2017-01-24 19:39:46 +0000643.. option:: -whyload
644
Richard Smith081ad4d2017-01-24 19:39:46 +0000645.. option:: -working-directory<arg>, -working-directory=<arg>
646
647Resolve file paths relative to the specified directory
648
Richard Smith081ad4d2017-01-24 19:39:46 +0000649.. option:: -x<language>, --language <arg>, --language=<arg>
650
651Treat subsequent input files as having type <language>
652
Richard Smith081ad4d2017-01-24 19:39:46 +0000653.. option:: -y<arg>
654
655Actions
656=======
657The action to perform on the input.
658
Richard Smith081ad4d2017-01-24 19:39:46 +0000659.. option:: -E, --preprocess
660
661Only run the preprocessor
662
Richard Smith081ad4d2017-01-24 19:39:46 +0000663.. option:: -S, --assemble
664
665Only run preprocess and compilation steps
666
Richard Smithc5b2e002017-01-27 02:08:37 +0000667.. option:: -c, --compile
668
669Only run preprocess, compile, and assemble steps
670
Richard Smith081ad4d2017-01-24 19:39:46 +0000671.. option:: -emit-llvm
672
673Use the LLVM representation for assembler and object files
674
Richard Smith081ad4d2017-01-24 19:39:46 +0000675.. option:: -fsyntax-only
676
Richard Smith081ad4d2017-01-24 19:39:46 +0000677.. option:: -module-file-info
678
679Provide information about a particular module file
680
Richard Smith081ad4d2017-01-24 19:39:46 +0000681.. option:: --precompile
682
683Only precompile the input
684
Richard Smith081ad4d2017-01-24 19:39:46 +0000685.. option:: -rewrite-objc
686
687Rewrite Objective-C source to C++
688
Richard Smith081ad4d2017-01-24 19:39:46 +0000689.. option:: -verify-pch
690
691Load and verify that a pre-compiled header file is not stale
692
693Compilation flags
694=================
695
696Flags controlling the behavior of Clang during compilation. These flags have
697no effect during actions that do not perform compilation.
698
Richard Smithc5b2e002017-01-27 02:08:37 +0000699.. option:: -Xassembler <arg>
Richard Smith081ad4d2017-01-24 19:39:46 +0000700
Richard Smithc5b2e002017-01-27 02:08:37 +0000701Pass <arg> to the assembler
Richard Smith081ad4d2017-01-24 19:39:46 +0000702
Richard Smith081ad4d2017-01-24 19:39:46 +0000703.. option:: -Xclang <arg>
704
705Pass <arg> to the clang compiler
706
Boris Kolpackovb150d242017-08-30 09:15:53 +0000707.. option:: -fclang-abi-compat=<version>
708
709Attempt to match the ABI of Clang <version>
710
Richard Smith081ad4d2017-01-24 19:39:46 +0000711.. option:: -fcomment-block-commands=<arg>,<arg2>...
712
713Treat each comma separated argument in <arg> as a documentation comment block command
714
Richard Smith081ad4d2017-01-24 19:39:46 +0000715.. option:: -fdeclspec, -fno-declspec
716
717Allow \_\_declspec as a keyword
718
Richard Smith081ad4d2017-01-24 19:39:46 +0000719.. option:: -fdepfile-entry=<arg>
720
Richard Smith081ad4d2017-01-24 19:39:46 +0000721.. option:: -fdiagnostics-fixit-info, -fno-diagnostics-fixit-info
722
Richard Smith081ad4d2017-01-24 19:39:46 +0000723.. option:: -fdiagnostics-format=<arg>
724
Richard Smith081ad4d2017-01-24 19:39:46 +0000725.. option:: -fdiagnostics-parseable-fixits
726
727Print fix-its in machine parseable form
728
Richard Smith081ad4d2017-01-24 19:39:46 +0000729.. option:: -fdiagnostics-print-source-range-info
730
731Print source range spans in numeric form
732
Richard Smith081ad4d2017-01-24 19:39:46 +0000733.. option:: -fdiagnostics-show-category=<arg>
734
Jonas Hahnfelda180fc42018-02-22 17:10:28 +0000735.. option:: -fdiscard-value-names, -fno-discard-value-names
736
737Discard value names in LLVM IR
738
739.. option:: -fexperimental-isel, -fno-experimental-isel
740
741Enables the experimental global instruction selector
742
Richard Smith081ad4d2017-01-24 19:39:46 +0000743.. option:: -fexperimental-new-pass-manager, -fno-experimental-new-pass-manager
744
745Enables an experimental new pass manager in LLVM.
746
Craig Topper16418662017-11-20 18:07:43 +0000747.. option:: -ffine-grained-bitfield-accesses, -fno-fine-grained-bitfield-accesses
748
749Use separate accesses for bitfields with legal widths and alignments.
750
Richard Smith081ad4d2017-01-24 19:39:46 +0000751.. option:: -finline-functions, -fno-inline-functions
752
753Inline suitable functions
754
Richard Smith081ad4d2017-01-24 19:39:46 +0000755.. option:: -finline-hint-functions
756
757Inline functions which are (explicitly or implicitly) marked inline
758
Richard Smith081ad4d2017-01-24 19:39:46 +0000759.. option:: -fno-crash-diagnostics
760
Richard Smith78e23fd2017-04-13 22:39:49 +0000761Disable auto-generation of preprocessed source files and a script for reproduction during a clang crash
762
Richard Smith081ad4d2017-01-24 19:39:46 +0000763.. option:: -fno-sanitize-blacklist
764
765Don't use blacklist file for sanitizers
766
Richard Smith081ad4d2017-01-24 19:39:46 +0000767.. option:: -fparse-all-comments
768
Richard Smith081ad4d2017-01-24 19:39:46 +0000769.. option:: -fsanitize-address-field-padding=<arg>
770
771Level of field padding for AddressSanitizer
772
Craig Topperd23254a2017-07-20 17:52:48 +0000773.. option:: -fsanitize-address-globals-dead-stripping
774
775Enable linker dead stripping of globals in AddressSanitizer
776
Jonas Hahnfelda180fc42018-02-22 17:10:28 +0000777.. option:: -fsanitize-address-poison-class-member-array-new-cookie, -fno-sanitize-address-poison-class-member-array-new-cookie
778
779Enable poisoning array cookies when using class member operator new\[\] in AddressSanitizer
780
Richard Smith081ad4d2017-01-24 19:39:46 +0000781.. option:: -fsanitize-address-use-after-scope, -fno-sanitize-address-use-after-scope
782
783Enable use-after-scope detection in AddressSanitizer
784
Richard Smith081ad4d2017-01-24 19:39:46 +0000785.. option:: -fsanitize-blacklist=<arg>
786
787Path to blacklist file for sanitizers
788
Richard Smith081ad4d2017-01-24 19:39:46 +0000789.. option:: -fsanitize-cfi-cross-dso, -fno-sanitize-cfi-cross-dso
790
791Enable control flow integrity (CFI) checks for cross-DSO calls.
792
Vlad Tsyrklevich634c6012017-10-31 22:39:44 +0000793.. option:: -fsanitize-cfi-icall-generalize-pointers
794
Craig Topper16418662017-11-20 18:07:43 +0000795Generalize pointers in CFI indirect call type signature checks
Vlad Tsyrklevich634c6012017-10-31 22:39:44 +0000796
Richard Smith081ad4d2017-01-24 19:39:46 +0000797.. option:: -fsanitize-coverage=<arg1>,<arg2>..., -fno-sanitize-coverage=<arg1>,<arg2>...
798
799Specify the type of coverage instrumentation for Sanitizers
800
Richard Smith081ad4d2017-01-24 19:39:46 +0000801.. option:: -fsanitize-link-c++-runtime
802
Richard Smith081ad4d2017-01-24 19:39:46 +0000803.. option:: -fsanitize-memory-track-origins, -fno-sanitize-memory-track-origins
804
805Enable origins tracking in MemorySanitizer
806
Richard Smithb2c82a62017-01-27 01:54:42 +0000807.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000808.. option:: -fsanitize-memory-track-origins=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000809.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000810
811Enable origins tracking in MemorySanitizer
812
Craig Topper16418662017-11-20 18:07:43 +0000813.. option:: -fsanitize-memory-use-after-dtor, -fno-sanitize-memory-use-after-dtor
Richard Smith081ad4d2017-01-24 19:39:46 +0000814
815Enable use-after-destroy detection in MemorySanitizer
816
Boris Kolpackovb150d242017-08-30 09:15:53 +0000817.. option:: -fsanitize-minimal-runtime, -fno-sanitize-minimal-runtime
818
Richard Smith081ad4d2017-01-24 19:39:46 +0000819.. option:: -fsanitize-recover, -fno-sanitize-recover
820
Richard Smithb2c82a62017-01-27 01:54:42 +0000821.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000822.. option:: -fsanitize-recover=<arg1>,<arg2>..., -fno-sanitize-recover=<arg1>,<arg2>...
Richard Smithb2c82a62017-01-27 01:54:42 +0000823.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000824
825Enable recovery for specified sanitizers
826
Richard Smith081ad4d2017-01-24 19:39:46 +0000827.. option:: -fsanitize-stats, -fno-sanitize-stats
828
829Enable sanitizer statistics gathering.
830
Richard Smith081ad4d2017-01-24 19:39:46 +0000831.. option:: -fsanitize-thread-atomics, -fno-sanitize-thread-atomics
832
833Enable atomic operations instrumentation in ThreadSanitizer (default)
834
Richard Smith081ad4d2017-01-24 19:39:46 +0000835.. option:: -fsanitize-thread-func-entry-exit, -fno-sanitize-thread-func-entry-exit
836
837Enable function entry/exit instrumentation in ThreadSanitizer (default)
838
Richard Smith081ad4d2017-01-24 19:39:46 +0000839.. option:: -fsanitize-thread-memory-access, -fno-sanitize-thread-memory-access
840
841Enable memory access instrumentation in ThreadSanitizer (default)
842
Richard Smith081ad4d2017-01-24 19:39:46 +0000843.. option:: -fsanitize-trap=<arg1>,<arg2>..., -fno-sanitize-trap=<arg1>,<arg2>...
844
845Enable trapping for specified sanitizers
846
Richard Smith081ad4d2017-01-24 19:39:46 +0000847.. option:: -fsanitize-undefined-strip-path-components=<number>
848
849Strip (or keep only, if negative) a given number of path components when emitting check metadata.
850
Richard Smith081ad4d2017-01-24 19:39:46 +0000851.. option:: -fsanitize-undefined-trap-on-error, -fno-sanitize-undefined-trap-on-error
852
Richard Smith081ad4d2017-01-24 19:39:46 +0000853.. option:: -fsanitize=<check>,<arg2>..., -fno-sanitize=<arg1>,<arg2>...
854
855Turn on runtime checks for various forms of undefined or suspicious behavior. See user manual for available checks
856
Richard Smith081ad4d2017-01-24 19:39:46 +0000857.. option:: --param <arg>, --param=<arg>
858
Richard Smith081ad4d2017-01-24 19:39:46 +0000859.. option:: -std=<arg>, --std=<arg>, --std <arg>
860
861Language standard to compile for
862
Richard Smithc5b2e002017-01-27 02:08:37 +0000863Preprocessor flags
864~~~~~~~~~~~~~~~~~~
865
866Flags controlling the behavior of the Clang preprocessor.
867
868.. option:: -C, --comments
869
870Include comments in preprocessed output
871
872.. option:: -CC, --comments-in-macros
873
874Include comments from within macros in preprocessed output
875
876.. option:: -D<macro>=<value>, --define-macro <arg>, --define-macro=<arg>
877
878Define <macro> to <value> (or 1 if <value> omitted)
879
880.. option:: -H, --trace-includes
881
882Show header includes and nesting depth
883
884.. option:: -P, --no-line-commands
885
886Disable linemarker output in -E mode
887
888.. option:: -U<macro>, --undefine-macro <arg>, --undefine-macro=<arg>
889
890Undefine macro <macro>
891
892.. option:: -Wp,<arg>,<arg2>...
893
894Pass the comma separated arguments in <arg> to the preprocessor
895
896.. option:: -Xpreprocessor <arg>
897
898Pass <arg> to the preprocessor
899
Richard Smith081ad4d2017-01-24 19:39:46 +0000900Include path management
Richard Smithc5b2e002017-01-27 02:08:37 +0000901-----------------------
Richard Smith081ad4d2017-01-24 19:39:46 +0000902
903Flags controlling how ``#include``\s are resolved to files.
904
Richard Smithc5b2e002017-01-27 02:08:37 +0000905.. option:: -I<dir>, --include-directory <arg>, --include-directory=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +0000906
907Add directory to include search path
908
Richard Smith081ad4d2017-01-24 19:39:46 +0000909.. option:: -I-, --include-barrier
910
Richard Smithc5b2e002017-01-27 02:08:37 +0000911Restrict all prior -I flags to double-quoted inclusion and remove current directory from include path
912
Jonas Hahnfelda180fc42018-02-22 17:10:28 +0000913.. option:: --cuda-path-ignore-env
914
915Ignore environment variables to detect CUDA installation
916
Richard Smith081ad4d2017-01-24 19:39:46 +0000917.. option:: --cuda-path=<arg>
918
919CUDA installation path
920
Richard Smith081ad4d2017-01-24 19:39:46 +0000921.. option:: -cxx-isystem<directory>
922
923Add directory to the C++ SYSTEM include search path
924
Richard Smith081ad4d2017-01-24 19:39:46 +0000925.. option:: -fbuild-session-file=<file>
926
927Use the last modification time of <file> as the build session timestamp
928
Richard Smith081ad4d2017-01-24 19:39:46 +0000929.. option:: -fbuild-session-timestamp=<time since Epoch in seconds>
930
931Time when the current build session started
932
Boris Kolpackovb150d242017-08-30 09:15:53 +0000933.. option:: -fmodule-file=\[<name>=\]<file>
934
935Specify the mapping of module name to precompiled module file, or load a module file if name is omitted.
936
Richard Smith081ad4d2017-01-24 19:39:46 +0000937.. option:: -fmodules-cache-path=<directory>
938
939Specify the module cache path
940
Richard Smith081ad4d2017-01-24 19:39:46 +0000941.. option:: -fmodules-disable-diagnostic-validation
942
943Disable validation of the diagnostic options when loading the module
944
Richard Smith081ad4d2017-01-24 19:39:46 +0000945.. option:: -fmodules-prune-after=<seconds>
946
947Specify the interval (in seconds) after which a module file will be considered unused
948
Richard Smith081ad4d2017-01-24 19:39:46 +0000949.. option:: -fmodules-prune-interval=<seconds>
950
951Specify the interval (in seconds) between attempts to prune the module cache
952
Richard Smith081ad4d2017-01-24 19:39:46 +0000953.. option:: -fmodules-user-build-path <directory>
954
955Specify the module user build path
956
Richard Smith081ad4d2017-01-24 19:39:46 +0000957.. option:: -fmodules-validate-once-per-build-session
958
959Don't verify input files for the modules if the module has been successfully validated or loaded during this build session
960
Jonas Hahnfeld06039e82018-04-20 13:26:03 +0000961.. option:: -fmodules-validate-system-headers, -fno-modules-validate-system-headers
Richard Smith081ad4d2017-01-24 19:39:46 +0000962
963Validate the system headers that a module depends on when loading the module
964
Richard Smith081ad4d2017-01-24 19:39:46 +0000965.. option:: -fprebuilt-module-path=<directory>
966
967Specify the prebuilt module path
968
Richard Smith081ad4d2017-01-24 19:39:46 +0000969.. option:: -idirafter<arg>, --include-directory-after <arg>, --include-directory-after=<arg>
970
971Add directory to AFTER include search path
972
Richard Smith081ad4d2017-01-24 19:39:46 +0000973.. option:: -iframework<arg>
974
975Add directory to SYSTEM framework search path
976
Richard Smith78e23fd2017-04-13 22:39:49 +0000977.. option:: -iframeworkwithsysroot<directory>
978
979Add directory to SYSTEM framework search path, absolute paths are relative to -isysroot
980
Richard Smith081ad4d2017-01-24 19:39:46 +0000981.. option:: -imacros<file>, --imacros<file>, --imacros=<arg>
982
983Include macros from file before parsing
984
Richard Smith081ad4d2017-01-24 19:39:46 +0000985.. option:: -include<file>, --include<file>, --include=<arg>
986
987Include file before parsing
988
Richard Smith081ad4d2017-01-24 19:39:46 +0000989.. option:: -include-pch <file>
990
991Include precompiled header file
992
Richard Smith081ad4d2017-01-24 19:39:46 +0000993.. option:: -iprefix<dir>, --include-prefix <arg>, --include-prefix=<arg>
994
995Set the -iwithprefix/-iwithprefixbefore prefix
996
Richard Smith081ad4d2017-01-24 19:39:46 +0000997.. option:: -iquote<directory>
998
999Add directory to QUOTE include search path
1000
Richard Smith081ad4d2017-01-24 19:39:46 +00001001.. option:: -isysroot<dir>
1002
1003Set the system root directory (usually /)
1004
Richard Smith081ad4d2017-01-24 19:39:46 +00001005.. option:: -isystem<directory>
1006
1007Add directory to SYSTEM include search path
1008
Richard Smith081ad4d2017-01-24 19:39:46 +00001009.. option:: -isystem-after<directory>
1010
1011Add directory to end of the SYSTEM include search path
1012
Richard Smith081ad4d2017-01-24 19:39:46 +00001013.. option:: -ivfsoverlay<arg>
1014
1015Overlay the virtual filesystem described by file over the real file system
1016
Richard Smith081ad4d2017-01-24 19:39:46 +00001017.. option:: -iwithprefix<dir>, --include-with-prefix <arg>, --include-with-prefix-after <arg>, --include-with-prefix-after=<arg>, --include-with-prefix=<arg>
1018
1019Set directory to SYSTEM include search path with prefix
1020
Richard Smith081ad4d2017-01-24 19:39:46 +00001021.. option:: -iwithprefixbefore<dir>, --include-with-prefix-before <arg>, --include-with-prefix-before=<arg>
1022
1023Set directory to include search path with prefix
1024
Richard Smith081ad4d2017-01-24 19:39:46 +00001025.. option:: -iwithsysroot<directory>
1026
1027Add directory to SYSTEM include search path, absolute paths are relative to -isysroot
1028
Richard Smith081ad4d2017-01-24 19:39:46 +00001029.. option:: --ptxas-path=<arg>
1030
1031Path to ptxas (used for compiling CUDA code)
1032
Richard Smith081ad4d2017-01-24 19:39:46 +00001033.. option:: --system-header-prefix=<prefix>, --no-system-header-prefix=<prefix>, --system-header-prefix <arg>
1034
1035Treat all #include paths starting with <prefix> as including a system header.
1036
1037Dependency file generation
Richard Smithc5b2e002017-01-27 02:08:37 +00001038--------------------------
Richard Smith081ad4d2017-01-24 19:39:46 +00001039
1040Flags controlling generation of a dependency file for ``make``-like build
1041systems.
1042
Richard Smith081ad4d2017-01-24 19:39:46 +00001043.. option:: -M, --dependencies
1044
1045Like -MD, but also implies -E and writes to stdout by default
1046
Richard Smith081ad4d2017-01-24 19:39:46 +00001047.. option:: -MD, --write-dependencies
1048
1049Write a depfile containing user and system headers
1050
Richard Smith081ad4d2017-01-24 19:39:46 +00001051.. option:: -MF<file>
1052
1053Write depfile output from -MMD, -MD, -MM, or -M to <file>
1054
Richard Smith081ad4d2017-01-24 19:39:46 +00001055.. option:: -MG, --print-missing-file-dependencies
1056
1057Add missing headers to depfile
1058
Richard Smith081ad4d2017-01-24 19:39:46 +00001059.. option:: -MJ<arg>
1060
1061Write a compilation database entry per input
1062
Richard Smith081ad4d2017-01-24 19:39:46 +00001063.. option:: -MM, --user-dependencies
1064
1065Like -MMD, but also implies -E and writes to stdout by default
1066
Richard Smith081ad4d2017-01-24 19:39:46 +00001067.. option:: -MMD, --write-user-dependencies
1068
1069Write a depfile containing user headers
1070
Richard Smith081ad4d2017-01-24 19:39:46 +00001071.. option:: -MP
1072
1073Create phony target for each dependency (other than main file)
1074
Richard Smith081ad4d2017-01-24 19:39:46 +00001075.. option:: -MQ<arg>
1076
1077Specify name of main file output to quote in depfile
1078
Richard Smith081ad4d2017-01-24 19:39:46 +00001079.. option:: -MT<arg>
1080
1081Specify name of main file output in depfile
1082
Richard Smith081ad4d2017-01-24 19:39:46 +00001083.. option:: -MV
1084
1085Use NMake/Jom format for the depfile
1086
1087Dumping preprocessor state
Richard Smithc5b2e002017-01-27 02:08:37 +00001088--------------------------
Richard Smith081ad4d2017-01-24 19:39:46 +00001089
1090Flags allowing the state of the preprocessor to be dumped in various ways.
1091
Richard Smith081ad4d2017-01-24 19:39:46 +00001092.. option:: -d
1093
Richard Smithb2c82a62017-01-27 01:54:42 +00001094.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001095.. option:: -d<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001096.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001097
Richard Smith081ad4d2017-01-24 19:39:46 +00001098.. option:: -dA
1099
Richard Smith081ad4d2017-01-24 19:39:46 +00001100.. option:: -dD
1101
1102Print macro definitions in -E mode in addition to normal output
1103
Richard Smith081ad4d2017-01-24 19:39:46 +00001104.. option:: -dI
1105
1106Print include directives in -E mode in addition to normal output
1107
Richard Smith081ad4d2017-01-24 19:39:46 +00001108.. option:: -dM
1109
1110Print macro definitions in -E mode instead of normal output
1111
1112Diagnostic flags
1113~~~~~~~~~~~~~~~~
1114
1115Flags controlling which warnings, errors, and remarks Clang will generate.
1116See the :doc:`full list of warning and remark flags <DiagnosticsReference>`.
1117
Richard Smith081ad4d2017-01-24 19:39:46 +00001118.. option:: -R<remark>
1119
1120Enable the specified remark
1121
Richard Smith081ad4d2017-01-24 19:39:46 +00001122.. option:: -Rpass-analysis=<arg>
1123
1124Report transformation analysis from optimization passes whose name matches the given POSIX regular expression
1125
Richard Smith081ad4d2017-01-24 19:39:46 +00001126.. option:: -Rpass-missed=<arg>
1127
1128Report missed transformations by optimization passes whose name matches the given POSIX regular expression
1129
Richard Smith081ad4d2017-01-24 19:39:46 +00001130.. option:: -Rpass=<arg>
1131
1132Report transformations performed by optimization passes whose name matches the given POSIX regular expression
1133
Richard Smith081ad4d2017-01-24 19:39:46 +00001134.. option:: -W<warning>, --extra-warnings, --warn-<arg>, --warn-=<arg>
1135
1136Enable the specified warning
1137
Richard Smith081ad4d2017-01-24 19:39:46 +00001138.. option:: -Wdeprecated, -Wno-deprecated
1139
Richard Smithc5b2e002017-01-27 02:08:37 +00001140Enable warnings for deprecated constructs and define \_\_DEPRECATED
Richard Smith081ad4d2017-01-24 19:39:46 +00001141
Richard Smith081ad4d2017-01-24 19:39:46 +00001142.. option:: -Wnonportable-cfstrings<arg>, -Wno-nonportable-cfstrings<arg>
1143
Richard Smith081ad4d2017-01-24 19:39:46 +00001144Target-independent compilation options
1145~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Richard Smith081ad4d2017-01-24 19:39:46 +00001146.. option:: -Wframe-larger-than=<arg>
1147
Richard Smith081ad4d2017-01-24 19:39:46 +00001148.. option:: -fPIC, -fno-PIC
1149
Richard Smith081ad4d2017-01-24 19:39:46 +00001150.. option:: -fPIE, -fno-PIE
1151
Richard Smith081ad4d2017-01-24 19:39:46 +00001152.. option:: -faccess-control, -fno-access-control
1153
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00001154.. option:: -falign-functions, -fno-align-functions
1155
1156.. program:: clang1
1157.. option:: -falign-functions=<arg>
1158.. program:: clang
1159
Richard Smithb2c82a62017-01-27 01:54:42 +00001160.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001161.. option:: -faligned-allocation, -faligned-new, -fno-aligned-allocation
Richard Smithb2c82a62017-01-27 01:54:42 +00001162.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001163
1164Enable C++17 aligned allocation functions
1165
Craig Topperd23254a2017-07-20 17:52:48 +00001166.. option:: -fallow-editor-placeholders, -fno-allow-editor-placeholders
1167
1168Treat editor placeholders as valid source code
1169
Richard Smith081ad4d2017-01-24 19:39:46 +00001170.. option:: -fallow-unsupported
1171
Richard Smith78e23fd2017-04-13 22:39:49 +00001172.. option:: -faltivec, -fno-altivec
Richard Smith081ad4d2017-01-24 19:39:46 +00001173
Richard Smith081ad4d2017-01-24 19:39:46 +00001174.. option:: -fansi-escape-codes
1175
1176Use ANSI escape codes for diagnostics
1177
Richard Smith081ad4d2017-01-24 19:39:46 +00001178.. option:: -fapple-kext, -findirect-virtual-calls, -fterminated-vtables
1179
1180Use Apple's kernel extensions ABI
1181
Richard Smith081ad4d2017-01-24 19:39:46 +00001182.. option:: -fapple-pragma-pack, -fno-apple-pragma-pack
1183
1184Enable Apple gcc-compatible #pragma pack handling
1185
Richard Smith081ad4d2017-01-24 19:39:46 +00001186.. option:: -fapplication-extension, -fno-application-extension
1187
1188Restrict code to those available for App Extensions
1189
Richard Smith081ad4d2017-01-24 19:39:46 +00001190.. option:: -fasm, -fno-asm
1191
Richard Smith081ad4d2017-01-24 19:39:46 +00001192.. option:: -fasm-blocks, -fno-asm-blocks
1193
Richard Smith081ad4d2017-01-24 19:39:46 +00001194.. option:: -fassociative-math, -fno-associative-math
1195
Richard Smith081ad4d2017-01-24 19:39:46 +00001196.. option:: -fassume-sane-operator-new, -fno-assume-sane-operator-new
1197
Richard Smith081ad4d2017-01-24 19:39:46 +00001198.. option:: -fast
1199
Richard Smith081ad4d2017-01-24 19:39:46 +00001200.. option:: -fastcp
1201
Richard Smith081ad4d2017-01-24 19:39:46 +00001202.. option:: -fastf
1203
Richard Smith081ad4d2017-01-24 19:39:46 +00001204.. option:: -fasynchronous-unwind-tables, -fno-asynchronous-unwind-tables
1205
Richard Smith081ad4d2017-01-24 19:39:46 +00001206.. option:: -fautolink, -fno-autolink
1207
Richard Smith081ad4d2017-01-24 19:39:46 +00001208.. option:: -fblocks, -fno-blocks
1209
1210Enable the 'blocks' language feature
1211
Richard Smith081ad4d2017-01-24 19:39:46 +00001212.. option:: -fbootclasspath=<arg>, --bootclasspath <arg>, --bootclasspath=<arg>
1213
Richard Smith081ad4d2017-01-24 19:39:46 +00001214.. option:: -fborland-extensions, -fno-borland-extensions
1215
1216Accept non-standard constructs supported by the Borland compiler
1217
Richard Smith081ad4d2017-01-24 19:39:46 +00001218.. option:: -fbracket-depth=<arg>
1219
Richard Smith081ad4d2017-01-24 19:39:46 +00001220.. option:: -fbuiltin, -fno-builtin
1221
Richard Smith081ad4d2017-01-24 19:39:46 +00001222.. option:: -fbuiltin-module-map
1223
1224Load the clang builtins module map file.
1225
Richard Smith081ad4d2017-01-24 19:39:46 +00001226.. option:: -fcaret-diagnostics, -fno-caret-diagnostics
1227
Craig Topper596527b2018-01-23 18:40:15 +00001228.. option:: -fcf-protection=<arg>, -fcf-protection (equivalent to -fcf-protection=full)
1229
1230Instrument control-flow architecture protection. Options: return, branch, full, none.
1231
Richard Smith081ad4d2017-01-24 19:39:46 +00001232.. option:: -fclasspath=<arg>, --CLASSPATH <arg>, --CLASSPATH=<arg>, --classpath <arg>, --classpath=<arg>
1233
Richard Smith081ad4d2017-01-24 19:39:46 +00001234.. option:: -fcolor-diagnostics, -fno-color-diagnostics
1235
1236Use colors in diagnostics
1237
Richard Smith081ad4d2017-01-24 19:39:46 +00001238.. option:: -fcommon, -fno-common
1239
Richard Smith081ad4d2017-01-24 19:39:46 +00001240.. option:: -fcompile-resource=<arg>, --resource <arg>, --resource=<arg>
1241
Richard Smith081ad4d2017-01-24 19:39:46 +00001242.. option:: -fconstant-cfstrings, -fno-constant-cfstrings
1243
Richard Smith081ad4d2017-01-24 19:39:46 +00001244.. option:: -fconstant-string-class=<arg>
1245
Richard Smith081ad4d2017-01-24 19:39:46 +00001246.. option:: -fconstexpr-backtrace-limit=<arg>
1247
Richard Smith081ad4d2017-01-24 19:39:46 +00001248.. option:: -fconstexpr-depth=<arg>
1249
Richard Smith081ad4d2017-01-24 19:39:46 +00001250.. option:: -fconstexpr-steps=<arg>
1251
Richard Smith081ad4d2017-01-24 19:39:46 +00001252.. option:: -fcoroutines-ts, -fno-coroutines-ts
1253
1254Enable support for the C++ Coroutines TS
1255
Richard Smith081ad4d2017-01-24 19:39:46 +00001256.. option:: -fcoverage-mapping, -fno-coverage-mapping
1257
1258Generate coverage mapping to enable code coverage analysis
1259
Richard Smith081ad4d2017-01-24 19:39:46 +00001260.. option:: -fcreate-profile
1261
Richard Smith081ad4d2017-01-24 19:39:46 +00001262.. option:: -fcxx-exceptions, -fno-cxx-exceptions
1263
1264Enable C++ exceptions
1265
Richard Smith081ad4d2017-01-24 19:39:46 +00001266.. option:: -fcxx-modules, -fno-cxx-modules
1267
Richard Smith081ad4d2017-01-24 19:39:46 +00001268.. option:: -fdata-sections, -fno-data-sections
1269
1270Place each data in its own section (ELF Only)
1271
Richard Smith081ad4d2017-01-24 19:39:46 +00001272.. option:: -fdebug-info-for-profiling, -fno-debug-info-for-profiling
1273
1274Emit extra debug info to make sample profile more accurate.
1275
Richard Smith78e23fd2017-04-13 22:39:49 +00001276.. option:: -fdebug-macro, -fno-debug-macro
1277
1278Emit macro debug information
1279
Richard Smith081ad4d2017-01-24 19:39:46 +00001280.. option:: -fdebug-pass-arguments
1281
Richard Smith081ad4d2017-01-24 19:39:46 +00001282.. option:: -fdebug-pass-structure
1283
Richard Smith081ad4d2017-01-24 19:39:46 +00001284.. option:: -fdebug-prefix-map=<arg>
1285
1286remap file source paths in debug info
1287
Richard Smith081ad4d2017-01-24 19:39:46 +00001288.. option:: -fdebug-types-section, -fno-debug-types-section
1289
1290Place debug types in their own section (ELF Only)
1291
Richard Smith081ad4d2017-01-24 19:39:46 +00001292.. option:: -fdelayed-template-parsing, -fno-delayed-template-parsing
1293
1294Parse templated function definitions at the end of the translation unit
1295
Richard Smith081ad4d2017-01-24 19:39:46 +00001296.. option:: -fdenormal-fp-math=<arg>
1297
Richard Smith081ad4d2017-01-24 19:39:46 +00001298.. option:: -fdiagnostics-absolute-paths
1299
1300Print absolute paths in diagnostics
1301
Richard Smith081ad4d2017-01-24 19:39:46 +00001302.. option:: -fdiagnostics-color, -fno-diagnostics-color
1303
Richard Smithb2c82a62017-01-27 01:54:42 +00001304.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001305.. option:: -fdiagnostics-color=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001306.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001307
Craig Topperd23254a2017-07-20 17:52:48 +00001308.. option:: -fdiagnostics-hotness-threshold=<number>
1309
1310Prevent optimization remarks from being output if they do not have at least this profile count
1311
Richard Smith081ad4d2017-01-24 19:39:46 +00001312.. option:: -fdiagnostics-show-hotness, -fno-diagnostics-show-hotness
1313
1314Enable profile hotness information in diagnostic line
1315
Richard Smith081ad4d2017-01-24 19:39:46 +00001316.. option:: -fdiagnostics-show-note-include-stack, -fno-diagnostics-show-note-include-stack
1317
1318Display include stacks for diagnostic notes
1319
Richard Smith081ad4d2017-01-24 19:39:46 +00001320.. option:: -fdiagnostics-show-option, -fno-diagnostics-show-option
1321
1322Print option name with mappable diagnostics
1323
Richard Smith081ad4d2017-01-24 19:39:46 +00001324.. option:: -fdiagnostics-show-template-tree
1325
1326Print a template comparison tree for differing templates
1327
Richard Smith081ad4d2017-01-24 19:39:46 +00001328.. option:: -fdollars-in-identifiers, -fno-dollars-in-identifiers
1329
1330Allow '$' in identifiers
1331
Craig Topper16418662017-11-20 18:07:43 +00001332.. option:: -fdouble-square-bracket-attributes, -fno-double-square-bracket-attributes
1333
1334Enable '\[\[\]\]' attributes in all C and C++ language modes
1335
Richard Smith081ad4d2017-01-24 19:39:46 +00001336.. option:: -fdwarf-directory-asm, -fno-dwarf-directory-asm
1337
Craig Topper188252d2017-12-11 21:09:16 +00001338.. option:: -fdwarf-exceptions
1339
1340Use DWARF style exceptions
1341
Richard Smith081ad4d2017-01-24 19:39:46 +00001342.. option:: -felide-constructors, -fno-elide-constructors
1343
Richard Smith081ad4d2017-01-24 19:39:46 +00001344.. option:: -feliminate-unused-debug-symbols, -fno-eliminate-unused-debug-symbols
1345
Richard Smith081ad4d2017-01-24 19:39:46 +00001346.. option:: -fembed-bitcode=<option>, -fembed-bitcode (equivalent to -fembed-bitcode=all), -fembed-bitcode-marker (equivalent to -fembed-bitcode=marker)
1347
1348Embed LLVM bitcode (option: off, all, bitcode, marker)
1349
Richard Smith081ad4d2017-01-24 19:39:46 +00001350.. option:: -femit-all-decls
1351
1352Emit all declarations, even if unused
1353
Richard Smith081ad4d2017-01-24 19:39:46 +00001354.. option:: -femulated-tls, -fno-emulated-tls
1355
1356Use emutls functions to access thread\_local variables
1357
Richard Smith081ad4d2017-01-24 19:39:46 +00001358.. option:: -fencoding=<arg>, --encoding <arg>, --encoding=<arg>
1359
Richard Smith081ad4d2017-01-24 19:39:46 +00001360.. option:: -ferror-limit=<arg>
1361
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00001362.. option:: -fescaping-block-tail-calls, -fno-escaping-block-tail-calls
1363
Richard Smith081ad4d2017-01-24 19:39:46 +00001364.. option:: -fexceptions, -fno-exceptions
1365
1366Enable support for exception handling
1367
Richard Smith081ad4d2017-01-24 19:39:46 +00001368.. option:: -fexec-charset=<arg>
1369
Richard Smith081ad4d2017-01-24 19:39:46 +00001370.. option:: -fextdirs=<arg>, --extdirs <arg>, --extdirs=<arg>
1371
Richard Smith081ad4d2017-01-24 19:39:46 +00001372.. option:: -ffast-math, -fno-fast-math
1373
1374Allow aggressive, lossy floating-point optimizations
1375
Richard Smith081ad4d2017-01-24 19:39:46 +00001376.. option:: -ffinite-math-only, -fno-finite-math-only
1377
Richard Smith081ad4d2017-01-24 19:39:46 +00001378.. option:: -ffor-scope, -fno-for-scope
1379
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00001380.. option:: -fforce-enable-int128, -fno-force-enable-int128
1381
1382Enable support for int128\_t type
1383
Richard Smith081ad4d2017-01-24 19:39:46 +00001384.. option:: -ffp-contract=<arg>
1385
1386Form fused FP ops (e.g. FMAs): fast (everywhere) \| on (according to FP\_CONTRACT pragma, default) \| off (never fuse)
1387
Richard Smith081ad4d2017-01-24 19:39:46 +00001388.. option:: -ffreestanding
1389
1390Assert that the compilation takes place in a freestanding environment
1391
Richard Smith081ad4d2017-01-24 19:39:46 +00001392.. option:: -ffunction-sections, -fno-function-sections
1393
1394Place each function in its own section (ELF Only)
1395
Richard Smith081ad4d2017-01-24 19:39:46 +00001396.. option:: -fgnu-inline-asm, -fno-gnu-inline-asm
1397
Richard Smith081ad4d2017-01-24 19:39:46 +00001398.. option:: -fgnu-keywords, -fno-gnu-keywords
1399
1400Allow GNU-extension keywords regardless of language standard
1401
Richard Smith081ad4d2017-01-24 19:39:46 +00001402.. option:: -fgnu-runtime
1403
1404Generate output compatible with the standard GNU Objective-C runtime
1405
Richard Smith081ad4d2017-01-24 19:39:46 +00001406.. option:: -fgnu89-inline, -fno-gnu89-inline
1407
1408Use the gnu89 inline semantics
1409
Richard Smith081ad4d2017-01-24 19:39:46 +00001410.. option:: -fhonor-infinities, -fhonor-infinites, -fno-honor-infinities
1411
Richard Smith081ad4d2017-01-24 19:39:46 +00001412.. option:: -fhonor-nans, -fno-honor-nans
1413
Richard Smith081ad4d2017-01-24 19:39:46 +00001414.. option:: -fhosted
1415
Richard Smith081ad4d2017-01-24 19:39:46 +00001416.. option:: -fimplicit-module-maps, -fmodule-maps, -fno-implicit-module-maps
1417
1418Implicitly search the file system for module map files.
1419
Richard Smith081ad4d2017-01-24 19:39:46 +00001420.. option:: -fimplicit-modules, -fno-implicit-modules
1421
Richard Smith081ad4d2017-01-24 19:39:46 +00001422.. option:: -finput-charset=<arg>
1423
Craig Topper188252d2017-12-11 21:09:16 +00001424.. option:: -finstrument-function-entry-bare
1425
1426Instrument function entry only, after inlining, without arguments to the instrumentation call
1427
Richard Smith081ad4d2017-01-24 19:39:46 +00001428.. option:: -finstrument-functions
1429
1430Generate calls to instrument function entry and exit
1431
Craig Topper16418662017-11-20 18:07:43 +00001432.. option:: -finstrument-functions-after-inlining
1433
1434Like -finstrument-functions, but insert the calls after inlining
1435
Richard Smith081ad4d2017-01-24 19:39:46 +00001436.. option:: -fintegrated-as, -fno-integrated-as, -integrated-as
1437
1438Enable the integrated assembler
1439
Richard Smith081ad4d2017-01-24 19:39:46 +00001440.. option:: -fjump-tables, -fno-jump-tables
1441
Richard Smith081ad4d2017-01-24 19:39:46 +00001442.. option:: -flax-vector-conversions, -fno-lax-vector-conversions
1443
Richard Smith081ad4d2017-01-24 19:39:46 +00001444.. option:: -flimited-precision=<arg>
1445
Richard Smith081ad4d2017-01-24 19:39:46 +00001446.. option:: -flto, -fno-lto
1447
1448Enable LTO in 'full' mode
1449
Richard Smith081ad4d2017-01-24 19:39:46 +00001450.. option:: -flto-jobs=<arg>
1451
1452Controls the backend parallelism of -flto=thin (default of 0 means the number of threads will be derived from the number of CPUs detected)
1453
Richard Smithb2c82a62017-01-27 01:54:42 +00001454.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001455.. option:: -flto=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001456.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001457
1458Set LTO mode to either 'full' or 'thin'
1459
Richard Smith081ad4d2017-01-24 19:39:46 +00001460.. option:: -fmacro-backtrace-limit=<arg>
1461
Richard Smith081ad4d2017-01-24 19:39:46 +00001462.. option:: -fmath-errno, -fno-math-errno
1463
1464Require math functions to indicate errors by setting errno
1465
Richard Smith081ad4d2017-01-24 19:39:46 +00001466.. option:: -fmax-type-align=<arg>
1467
1468Specify the maximum alignment to enforce on pointers lacking an explicit alignment
1469
Richard Smith081ad4d2017-01-24 19:39:46 +00001470.. option:: -fmerge-all-constants, -fno-merge-all-constants
1471
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00001472Allow merging of constants
1473
Richard Smith081ad4d2017-01-24 19:39:46 +00001474.. option:: -fmessage-length=<arg>
1475
Richard Smith081ad4d2017-01-24 19:39:46 +00001476.. option:: -fmodule-file-deps, -fno-module-file-deps
1477
Richard Smith081ad4d2017-01-24 19:39:46 +00001478.. option:: -fmodule-map-file=<file>
1479
1480Load this module map file
1481
Richard Smith081ad4d2017-01-24 19:39:46 +00001482.. option:: -fmodule-name=<name>, -fmodule-implementation-of <arg>, -fmodule-name <arg>
1483
1484Specify the name of the module to build
1485
Richard Smith081ad4d2017-01-24 19:39:46 +00001486.. option:: -fmodules, -fno-modules
1487
1488Enable the 'modules' language feature
1489
Richard Smith081ad4d2017-01-24 19:39:46 +00001490.. option:: -fmodules-decluse, -fno-modules-decluse
1491
1492Require declaration of modules used within a module
1493
Richard Smith081ad4d2017-01-24 19:39:46 +00001494.. option:: -fmodules-ignore-macro=<arg>
1495
1496Ignore the definition of the given macro when building and loading modules
1497
Richard Smith081ad4d2017-01-24 19:39:46 +00001498.. option:: -fmodules-search-all, -fno-modules-search-all
1499
1500Search even non-imported modules to resolve references
1501
Richard Smith081ad4d2017-01-24 19:39:46 +00001502.. option:: -fmodules-strict-decluse
1503
1504Like -fmodules-decluse but requires all headers to be in modules
1505
Richard Smith081ad4d2017-01-24 19:39:46 +00001506.. option:: -fmodules-ts
1507
1508Enable support for the C++ Modules TS
1509
Richard Smith081ad4d2017-01-24 19:39:46 +00001510.. option:: -fms-compatibility, -fno-ms-compatibility
1511
1512Enable full Microsoft Visual C++ compatibility
1513
Richard Smith081ad4d2017-01-24 19:39:46 +00001514.. option:: -fms-compatibility-version=<arg>
1515
1516Dot-separated value representing the Microsoft compiler version number to report in \_MSC\_VER (0 = don't define it (default))
1517
Richard Smith081ad4d2017-01-24 19:39:46 +00001518.. option:: -fms-extensions, -fno-ms-extensions
1519
1520Accept some non-standard constructs supported by the Microsoft compiler
1521
Richard Smith081ad4d2017-01-24 19:39:46 +00001522.. option:: -fms-memptr-rep=<arg>
1523
Richard Smith081ad4d2017-01-24 19:39:46 +00001524.. option:: -fms-volatile<arg>
1525
Richard Smith081ad4d2017-01-24 19:39:46 +00001526.. option:: -fmsc-version=<arg>
1527
1528Microsoft compiler version number to report in \_MSC\_VER (0 = don't define it (default))
1529
Richard Smith081ad4d2017-01-24 19:39:46 +00001530.. option:: -fmudflap
1531
Richard Smith081ad4d2017-01-24 19:39:46 +00001532.. option:: -fmudflapth
1533
Richard Smith081ad4d2017-01-24 19:39:46 +00001534.. option:: -fnested-functions
1535
Richard Smith081ad4d2017-01-24 19:39:46 +00001536.. option:: -fnew-alignment=<align>, -fnew-alignment <arg>
1537
1538Specifies the largest alignment guaranteed by '::operator new(size\_t)'
1539
Richard Smith081ad4d2017-01-24 19:39:46 +00001540.. option:: -fnext-runtime
1541
Richard Smith081ad4d2017-01-24 19:39:46 +00001542.. option:: -fno-builtin-<arg>
1543
1544Disable implicit builtin knowledge of a specific function
1545
Manoj Guptada08f6a2018-07-19 00:44:52 +00001546.. option:: -fdelete-null-pointer-checks, -fno-delete-null-pointer-checks
1547
1548When enabled, treat null pointer dereference, creation of a reference to null,
1549or passing a null pointer to a function parameter annotated with the "nonnull"
1550attribute as undefined behavior. (And, thus the optimizer may assume that any
1551pointer used in such a way must not have been null and optimize away the
1552branches accordingly.) On by default.
1553
Richard Smith081ad4d2017-01-24 19:39:46 +00001554.. option:: -fno-elide-type
1555
1556Do not elide types when printing diagnostics
1557
Richard Smith081ad4d2017-01-24 19:39:46 +00001558.. option:: -fno-max-type-align
1559
Richard Smith081ad4d2017-01-24 19:39:46 +00001560.. option:: -fno-operator-names
1561
1562Do not treat C++ operator name keywords as synonyms for operators
1563
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00001564.. option:: -fno-rtti-data
1565
1566Control emission of RTTI data
1567
Richard Smith081ad4d2017-01-24 19:39:46 +00001568.. option:: -fno-strict-modules-decluse
1569
Richard Smith081ad4d2017-01-24 19:39:46 +00001570.. option:: -fno-working-directory
1571
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00001572.. option:: -fnoxray-link-deps
1573
Richard Smith081ad4d2017-01-24 19:39:46 +00001574.. option:: -fobjc-abi-version=<arg>
1575
Richard Smith081ad4d2017-01-24 19:39:46 +00001576.. option:: -fobjc-arc, -fno-objc-arc
1577
1578Synthesize retain and release calls for Objective-C pointers
1579
Richard Smith081ad4d2017-01-24 19:39:46 +00001580.. option:: -fobjc-arc-exceptions, -fno-objc-arc-exceptions
1581
1582Use EH-safe code when synthesizing retains and releases in -fobjc-arc
1583
Richard Smith081ad4d2017-01-24 19:39:46 +00001584.. option:: -fobjc-exceptions, -fno-objc-exceptions
1585
1586Enable Objective-C exceptions
1587
Richard Smith081ad4d2017-01-24 19:39:46 +00001588.. option:: -fobjc-infer-related-result-type, -fno-objc-infer-related-result-type
1589
Richard Smith081ad4d2017-01-24 19:39:46 +00001590.. option:: -fobjc-legacy-dispatch, -fno-objc-legacy-dispatch
1591
Richard Smith081ad4d2017-01-24 19:39:46 +00001592.. option:: -fobjc-link-runtime
1593
Richard Smith081ad4d2017-01-24 19:39:46 +00001594.. option:: -fobjc-nonfragile-abi, -fno-objc-nonfragile-abi
1595
Richard Smith081ad4d2017-01-24 19:39:46 +00001596.. option:: -fobjc-nonfragile-abi-version=<arg>
1597
Richard Smith081ad4d2017-01-24 19:39:46 +00001598.. option:: -fobjc-runtime=<arg>
1599
1600Specify the target Objective-C runtime kind and version
1601
Richard Smith081ad4d2017-01-24 19:39:46 +00001602.. option:: -fobjc-sender-dependent-dispatch
1603
Richard Smith081ad4d2017-01-24 19:39:46 +00001604.. option:: -fobjc-weak, -fno-objc-weak
1605
1606Enable ARC-style weak references in Objective-C
1607
Richard Smith081ad4d2017-01-24 19:39:46 +00001608.. option:: -fomit-frame-pointer, -fno-omit-frame-pointer
1609
Richard Smith081ad4d2017-01-24 19:39:46 +00001610.. option:: -fopenmp, -fno-openmp
1611
Jonas Hahnfelda180fc42018-02-22 17:10:28 +00001612Parse OpenMP pragmas and generate parallel code.
Boris Kolpackovb150d242017-08-30 09:15:53 +00001613
Craig Topper287c8012018-01-03 18:29:12 +00001614.. option:: -fopenmp-simd, -fno-openmp-simd
1615
1616Emit OpenMP code only for SIMD-based constructs.
1617
Richard Smith081ad4d2017-01-24 19:39:46 +00001618.. option:: -fopenmp-version=<arg>
1619
Richard Smithb2c82a62017-01-27 01:54:42 +00001620.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001621.. option:: -fopenmp=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001622.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001623
Richard Smith081ad4d2017-01-24 19:39:46 +00001624.. option:: -foperator-arrow-depth=<arg>
1625
Richard Smith081ad4d2017-01-24 19:39:46 +00001626.. option:: -foptimization-record-file=<arg>
1627
1628Specify the file name of any generated YAML optimization record
1629
Richard Smith081ad4d2017-01-24 19:39:46 +00001630.. option:: -foptimize-sibling-calls, -fno-optimize-sibling-calls
1631
Richard Smith081ad4d2017-01-24 19:39:46 +00001632.. option:: -foutput-class-dir=<arg>, --output-class-directory <arg>, --output-class-directory=<arg>
1633
Richard Smith081ad4d2017-01-24 19:39:46 +00001634.. option:: -fpack-struct, -fno-pack-struct
1635
Richard Smithb2c82a62017-01-27 01:54:42 +00001636.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001637.. option:: -fpack-struct=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001638.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001639
1640Specify the default maximum struct packing alignment
1641
Richard Smith081ad4d2017-01-24 19:39:46 +00001642.. option:: -fpascal-strings, -fno-pascal-strings, -mpascal-strings
1643
1644Recognize and construct Pascal-style string literals
1645
Richard Smith081ad4d2017-01-24 19:39:46 +00001646.. option:: -fpcc-struct-return
1647
1648Override the default ABI to return all structs on the stack
1649
Richard Smith081ad4d2017-01-24 19:39:46 +00001650.. option:: -fpch-preprocess
1651
Richard Smith081ad4d2017-01-24 19:39:46 +00001652.. option:: -fpic, -fno-pic
1653
Richard Smith081ad4d2017-01-24 19:39:46 +00001654.. option:: -fpie, -fno-pie
1655
Craig Topper16418662017-11-20 18:07:43 +00001656.. option:: -fplt, -fno-plt
1657
1658Use the PLT to make function calls
1659
Richard Smith081ad4d2017-01-24 19:39:46 +00001660.. option:: -fplugin=<dsopath>
1661
1662Load the named plugin (dynamic shared object)
1663
Richard Smith081ad4d2017-01-24 19:39:46 +00001664.. option:: -fpreserve-as-comments, -fno-preserve-as-comments
1665
Richard Smith081ad4d2017-01-24 19:39:46 +00001666.. option:: -fprofile-arcs, -fno-profile-arcs
1667
Richard Smith081ad4d2017-01-24 19:39:46 +00001668.. option:: -fprofile-dir=<arg>
1669
Richard Smith081ad4d2017-01-24 19:39:46 +00001670.. option:: -fprofile-generate, -fno-profile-generate
1671
1672Generate instrumented code to collect execution counts into default.profraw (overridden by LLVM\_PROFILE\_FILE env var)
1673
Richard Smithb2c82a62017-01-27 01:54:42 +00001674.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001675.. option:: -fprofile-generate=<directory>
Richard Smithb2c82a62017-01-27 01:54:42 +00001676.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001677
1678Generate instrumented code to collect execution counts into <directory>/default.profraw (overridden by LLVM\_PROFILE\_FILE env var)
1679
Richard Smith081ad4d2017-01-24 19:39:46 +00001680.. option:: -fprofile-instr-generate, -fno-profile-instr-generate
1681
1682Generate instrumented code to collect execution counts into default.profraw file (overridden by '=' form of option or LLVM\_PROFILE\_FILE env var)
1683
Richard Smithb2c82a62017-01-27 01:54:42 +00001684.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001685.. option:: -fprofile-instr-generate=<file>
Richard Smithb2c82a62017-01-27 01:54:42 +00001686.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001687
1688Generate instrumented code to collect execution counts into <file> (overridden by LLVM\_PROFILE\_FILE env var)
1689
Richard Smith081ad4d2017-01-24 19:39:46 +00001690.. option:: -fprofile-instr-use, -fno-profile-instr-use, -fprofile-use
1691
Richard Smithb2c82a62017-01-27 01:54:42 +00001692.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001693.. option:: -fprofile-instr-use=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001694.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001695
1696Use instrumentation data for profile-guided optimization
1697
Boris Kolpackovb150d242017-08-30 09:15:53 +00001698.. option:: -fprofile-sample-accurate, -fauto-profile-accurate, -fno-profile-sample-accurate
1699
1700Specifies that the sample profile is accurate. If the sample
1701 profile is accurate, callsites without profile samples are marked
1702 as cold. Otherwise, treat callsites without profile samples as if
1703 we have no profile
1704
Richard Smith78e23fd2017-04-13 22:39:49 +00001705.. option:: -fprofile-sample-use, -fauto-profile, -fno-profile-sample-use
1706
1707.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001708.. option:: -fprofile-sample-use=<arg>, -fauto-profile=<arg>
Richard Smith78e23fd2017-04-13 22:39:49 +00001709.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001710
1711Enable sample-based profile guided optimizations
1712
Richard Smithb2c82a62017-01-27 01:54:42 +00001713.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001714.. option:: -fprofile-use=<pathname>
Richard Smithb2c82a62017-01-27 01:54:42 +00001715.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001716
1717Use instrumentation data for profile-guided optimization. If pathname is a directory, it reads from <pathname>/default.profdata. Otherwise, it reads from file <pathname>.
1718
Richard Smith081ad4d2017-01-24 19:39:46 +00001719.. option:: -freciprocal-math, -fno-reciprocal-math
1720
1721Allow division operations to be reassociated
1722
Richard Smith081ad4d2017-01-24 19:39:46 +00001723.. option:: -freg-struct-return
1724
1725Override the default ABI to return small structs in registers
1726
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00001727.. option:: -fregister-global-dtors-with-atexit, -fno-register-global-dtors-with-atexit
1728
1729Use atexit or \_\_cxa\_atexit to register global destructors
1730
Richard Smith081ad4d2017-01-24 19:39:46 +00001731.. option:: -frelaxed-template-template-args, -fno-relaxed-template-template-args
1732
1733Enable C++17 relaxed template template argument matching
1734
Richard Smith081ad4d2017-01-24 19:39:46 +00001735.. option:: -freroll-loops, -fno-reroll-loops
1736
1737Turn on loop reroller
1738
Richard Smith081ad4d2017-01-24 19:39:46 +00001739.. option:: -fretain-comments-from-system-headers
1740
Craig Topperd23254a2017-07-20 17:52:48 +00001741.. option:: -frewrite-imports, -fno-rewrite-imports
1742
Richard Smith081ad4d2017-01-24 19:39:46 +00001743.. option:: -frewrite-includes, -fno-rewrite-includes
1744
Richard Smith081ad4d2017-01-24 19:39:46 +00001745.. option:: -frewrite-map-file <arg>
1746
Richard Smithb2c82a62017-01-27 01:54:42 +00001747.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001748.. option:: -frewrite-map-file=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001749.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001750
Richard Smith081ad4d2017-01-24 19:39:46 +00001751.. option:: -fropi, -fno-ropi
1752
Richard Smith081ad4d2017-01-24 19:39:46 +00001753.. option:: -frtti, -fno-rtti
1754
Richard Smith081ad4d2017-01-24 19:39:46 +00001755.. option:: -frwpi, -fno-rwpi
1756
Richard Smith081ad4d2017-01-24 19:39:46 +00001757.. option:: -fsave-optimization-record, -fno-save-optimization-record
1758
1759Generate a YAML optimization record file
1760
Craig Topper188252d2017-12-11 21:09:16 +00001761.. option:: -fseh-exceptions
1762
1763Use SEH style exceptions
1764
Richard Smith081ad4d2017-01-24 19:39:46 +00001765.. option:: -fshort-enums, -fno-short-enums
1766
1767Allocate to an enum type only as many bytes as it needs for the declared range of possible values
1768
Richard Smith081ad4d2017-01-24 19:39:46 +00001769.. option:: -fshort-wchar, -fno-short-wchar
1770
1771Force wchar\_t to be a short unsigned int
1772
Richard Smith081ad4d2017-01-24 19:39:46 +00001773.. option:: -fshow-column, -fno-show-column
1774
Richard Smith081ad4d2017-01-24 19:39:46 +00001775.. option:: -fshow-overloads=<arg>
1776
1777Which overload candidates to show when overload resolution fails: best\|all; defaults to all
1778
Richard Smith081ad4d2017-01-24 19:39:46 +00001779.. option:: -fshow-source-location, -fno-show-source-location
1780
Richard Smith081ad4d2017-01-24 19:39:46 +00001781.. option:: -fsignaling-math, -fno-signaling-math
1782
Richard Smith081ad4d2017-01-24 19:39:46 +00001783.. option:: -fsigned-bitfields
1784
Richard Smith081ad4d2017-01-24 19:39:46 +00001785.. option:: -fsigned-char, -fno-signed-char, --signed-char
1786
Richard Smith081ad4d2017-01-24 19:39:46 +00001787.. option:: -fsigned-zeros, -fno-signed-zeros
1788
Richard Smith081ad4d2017-01-24 19:39:46 +00001789.. option:: -fsized-deallocation, -fno-sized-deallocation
1790
1791Enable C++14 sized global deallocation functions
1792
Richard Smith081ad4d2017-01-24 19:39:46 +00001793.. option:: -fsjlj-exceptions
1794
1795Use SjLj style exceptions
1796
Richard Smith081ad4d2017-01-24 19:39:46 +00001797.. option:: -fslp-vectorize, -fno-slp-vectorize, -ftree-slp-vectorize
1798
1799Enable the superword-level parallelism vectorization passes
1800
Richard Smith081ad4d2017-01-24 19:39:46 +00001801.. option:: -fspell-checking, -fno-spell-checking
1802
Richard Smith081ad4d2017-01-24 19:39:46 +00001803.. option:: -fspell-checking-limit=<arg>
1804
Richard Smith081ad4d2017-01-24 19:39:46 +00001805.. option:: -fsplit-dwarf-inlining, -fno-split-dwarf-inlining
1806
Jonas Hahnfelda180fc42018-02-22 17:10:28 +00001807Provide 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 +00001808
Richard Smith081ad4d2017-01-24 19:39:46 +00001809.. option:: -fsplit-stack
1810
Richard Smith081ad4d2017-01-24 19:39:46 +00001811.. option:: -fstack-protector, -fno-stack-protector
1812
1813Enable stack protectors for functions potentially vulnerable to stack smashing
1814
Richard Smith081ad4d2017-01-24 19:39:46 +00001815.. option:: -fstack-protector-all
1816
1817Force the usage of stack protectors for all functions
1818
Richard Smith081ad4d2017-01-24 19:39:46 +00001819.. option:: -fstack-protector-strong
1820
1821Use a strong heuristic to apply stack protectors to functions
1822
Craig Topper596527b2018-01-23 18:40:15 +00001823.. option:: -fstack-size-section, -fno-stack-size-section
1824
1825Emit section containing metadata on function stack sizes
1826
Richard Smith081ad4d2017-01-24 19:39:46 +00001827.. option:: -fstandalone-debug, -fno-limit-debug-info, -fno-standalone-debug
1828
1829Emit full debug info for all types used by the program
1830
Richard Smith081ad4d2017-01-24 19:39:46 +00001831.. option:: -fstrict-aliasing, -fno-strict-aliasing
1832
Richard Smith081ad4d2017-01-24 19:39:46 +00001833.. option:: -fstrict-enums, -fno-strict-enums
1834
1835Enable optimizations based on the strict definition of an enum's value range
1836
Richard Smith081ad4d2017-01-24 19:39:46 +00001837.. option:: -fstrict-overflow, -fno-strict-overflow
1838
Richard Smith081ad4d2017-01-24 19:39:46 +00001839.. option:: -fstrict-return, -fno-strict-return
1840
Richard Smith78e23fd2017-04-13 22:39:49 +00001841Always treat control flow paths that fall off the end of a non-void function as unreachable
Richard Smith081ad4d2017-01-24 19:39:46 +00001842
Richard Smith081ad4d2017-01-24 19:39:46 +00001843.. option:: -fstrict-vtable-pointers, -fno-strict-vtable-pointers
1844
1845Enable optimizations based on the strict rules for overwriting polymorphic C++ objects
1846
Richard Smith081ad4d2017-01-24 19:39:46 +00001847.. option:: -fstruct-path-tbaa, -fno-struct-path-tbaa
1848
Richard Smith081ad4d2017-01-24 19:39:46 +00001849.. option:: -ftabstop=<arg>
1850
Richard Smith081ad4d2017-01-24 19:39:46 +00001851.. option:: -ftemplate-backtrace-limit=<arg>
1852
Richard Smith081ad4d2017-01-24 19:39:46 +00001853.. option:: -ftemplate-depth-<arg>
1854
Richard Smith081ad4d2017-01-24 19:39:46 +00001855.. option:: -ftemplate-depth=<arg>
1856
Richard Smith081ad4d2017-01-24 19:39:46 +00001857.. option:: -ftest-coverage
1858
Richard Smith081ad4d2017-01-24 19:39:46 +00001859.. option:: -fthinlto-index=<arg>
1860
1861Perform ThinLTO importing using provided function summary index
1862
Richard Smith081ad4d2017-01-24 19:39:46 +00001863.. option:: -fthreadsafe-statics, -fno-threadsafe-statics
1864
Richard Smith081ad4d2017-01-24 19:39:46 +00001865.. option:: -ftime-report
1866
Richard Smith081ad4d2017-01-24 19:39:46 +00001867.. option:: -ftls-model=<arg>
1868
Richard Smith081ad4d2017-01-24 19:39:46 +00001869.. option:: -ftrap-function=<arg>
1870
1871Issue call to specified function rather than a trap instruction
1872
Richard Smith081ad4d2017-01-24 19:39:46 +00001873.. option:: -ftrapping-math, -fno-trapping-math
1874
Richard Smith081ad4d2017-01-24 19:39:46 +00001875.. option:: -ftrapv
1876
1877Trap on integer overflow
1878
Richard Smith081ad4d2017-01-24 19:39:46 +00001879.. option:: -ftrapv-handler <arg>
1880
Richard Smithb2c82a62017-01-27 01:54:42 +00001881.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001882.. option:: -ftrapv-handler=<function name>
Richard Smithb2c82a62017-01-27 01:54:42 +00001883.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001884
1885Specify the function to be called on overflow
1886
Richard Smith081ad4d2017-01-24 19:39:46 +00001887.. option:: -ftrigraphs, -fno-trigraphs, -trigraphs, --trigraphs
1888
1889Process trigraph sequences
1890
Richard Smith081ad4d2017-01-24 19:39:46 +00001891.. option:: -funique-section-names, -fno-unique-section-names
1892
1893Use unique names for text and data sections (ELF Only)
1894
Richard Smith081ad4d2017-01-24 19:39:46 +00001895.. option:: -funit-at-a-time, -fno-unit-at-a-time
1896
Richard Smith081ad4d2017-01-24 19:39:46 +00001897.. option:: -funroll-loops, -fno-unroll-loops
1898
1899Turn on loop unroller
1900
Richard Smith081ad4d2017-01-24 19:39:46 +00001901.. option:: -funsafe-math-optimizations, -fno-unsafe-math-optimizations
1902
Richard Smith081ad4d2017-01-24 19:39:46 +00001903.. option:: -funsigned-bitfields
1904
Richard Smith081ad4d2017-01-24 19:39:46 +00001905.. option:: -funsigned-char, -fno-unsigned-char, --unsigned-char
1906
Richard Smith081ad4d2017-01-24 19:39:46 +00001907.. option:: -funwind-tables, -fno-unwind-tables
1908
Richard Smith081ad4d2017-01-24 19:39:46 +00001909.. option:: -fuse-cxa-atexit, -fno-use-cxa-atexit
1910
Richard Smith081ad4d2017-01-24 19:39:46 +00001911.. option:: -fuse-init-array, -fno-use-init-array
1912
1913Use .init\_array instead of .ctors
1914
Richard Smith081ad4d2017-01-24 19:39:46 +00001915.. option:: -fuse-ld=<arg>
1916
Richard Smith081ad4d2017-01-24 19:39:46 +00001917.. option:: -fuse-line-directives, -fno-use-line-directives
1918
Richard Smith081ad4d2017-01-24 19:39:46 +00001919.. option:: -fveclib=<arg>
1920
1921Use the given vector functions library
1922
Richard Smith081ad4d2017-01-24 19:39:46 +00001923.. option:: -fvectorize, -fno-vectorize, -ftree-vectorize
1924
1925Enable the loop vectorization passes
1926
Richard Smith081ad4d2017-01-24 19:39:46 +00001927.. option:: -fverbose-asm, -fno-verbose-asm
1928
Richard Smith081ad4d2017-01-24 19:39:46 +00001929.. option:: -fvisibility-inlines-hidden
1930
Fangrui Songdf81b972018-07-19 22:45:41 +00001931Give inline C++ member functions hidden visibility by default
Richard Smith081ad4d2017-01-24 19:39:46 +00001932
Richard Smith081ad4d2017-01-24 19:39:46 +00001933.. option:: -fvisibility-ms-compat
1934
1935Give global types 'default' visibility and global functions and variables 'hidden' visibility by default
1936
Richard Smith081ad4d2017-01-24 19:39:46 +00001937.. option:: -fvisibility=<arg>
1938
1939Set the default symbol visibility for all global declarations
1940
Richard Smith081ad4d2017-01-24 19:39:46 +00001941.. option:: -fwhole-program-vtables, -fno-whole-program-vtables
1942
1943Enables whole-program vtable optimization. Requires -flto
1944
Piotr Padlewskie368de32018-06-13 13:55:42 +00001945.. option:: -fforce-emit-vtables, -fno-force-emit-vtables
1946
1947In order to improve devirtualization, forces emitting of vtables even in
1948modules where it isn't necessary. It causes more inline virtual functions
1949to be emitted.
1950
Richard Smith081ad4d2017-01-24 19:39:46 +00001951.. option:: -fwrapv, -fno-wrapv
1952
1953Treat signed integer overflow as two's complement
1954
Richard Smith081ad4d2017-01-24 19:39:46 +00001955.. option:: -fwritable-strings
1956
1957Store string literals as writable data
1958
Craig Topper188252d2017-12-11 21:09:16 +00001959.. option:: -fxray-always-emit-customevents, -fno-xray-always-emit-customevents
1960
1961Determine whether to always emit \_\_xray\_customevent(...) calls even if the function it appears in is not always instrumented.
1962
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00001963.. option:: -fxray-always-emit-typedevents, -fno-xray-always-emit-typedevents
1964
1965Determine whether to always emit \_\_xray\_typedevent(...) calls even if the function it appears in is not always instrumented.
1966
Richard Smith78e23fd2017-04-13 22:39:49 +00001967.. option:: -fxray-always-instrument=<arg>
1968
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00001969DEPRECATED: Filename defining the whitelist for imbuing the 'always instrument' XRay attribute.
1970
1971.. option:: -fxray-attr-list=<arg>
1972
1973Filename defining the list of functions/types for imbuing XRay attributes.
Richard Smith78e23fd2017-04-13 22:39:49 +00001974
Richard Smith081ad4d2017-01-24 19:39:46 +00001975.. option:: -fxray-instruction-threshold<arg>
1976
Richard Smithb2c82a62017-01-27 01:54:42 +00001977.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001978.. option:: -fxray-instruction-threshold=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001979.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001980
1981Sets the minimum function size to instrument with XRay
1982
Richard Smith081ad4d2017-01-24 19:39:46 +00001983.. option:: -fxray-instrument, -fno-xray-instrument
1984
1985Generate XRay instrumentation sleds on function entry and exit
1986
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00001987.. option:: -fxray-instrumentation-bundle=<arg>
1988
1989Select which XRay instrumentation points to emit. Options: all, none, function, custom. Default is 'all'.
1990
1991.. option:: -fxray-link-deps
1992
1993Tells clang to add the link dependencies for XRay.
1994
1995.. option:: -fxray-modes=<arg>
1996
1997List of modes to link in by default into XRay instrumented binaries.
1998
Richard Smith78e23fd2017-04-13 22:39:49 +00001999.. option:: -fxray-never-instrument=<arg>
2000
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00002001DEPRECATED: Filename defining the whitelist for imbuing the 'never instrument' XRay attribute.
Richard Smith78e23fd2017-04-13 22:39:49 +00002002
Richard Smith081ad4d2017-01-24 19:39:46 +00002003.. option:: -fzero-initialized-in-bss, -fno-zero-initialized-in-bss
2004
Richard Smith081ad4d2017-01-24 19:39:46 +00002005.. option:: -fzvector, -fno-zvector, -mzvector
2006
2007Enable System z vector language extension
2008
Richard Smith081ad4d2017-01-24 19:39:46 +00002009.. option:: -pedantic, --pedantic, -no-pedantic, --no-pedantic
2010
Richard Smith081ad4d2017-01-24 19:39:46 +00002011.. option:: -pedantic-errors, --pedantic-errors
2012
2013OpenCL flags
2014------------
Richard Smith081ad4d2017-01-24 19:39:46 +00002015.. option:: -cl-denorms-are-zero
2016
2017OpenCL only. Allow denormals to be flushed to zero.
2018
Richard Smith081ad4d2017-01-24 19:39:46 +00002019.. option:: -cl-fast-relaxed-math
2020
2021OpenCL only. Sets -cl-finite-math-only and -cl-unsafe-math-optimizations, and defines \_\_FAST\_RELAXED\_MATH\_\_.
2022
Richard Smith081ad4d2017-01-24 19:39:46 +00002023.. option:: -cl-finite-math-only
2024
2025OpenCL only. Allow floating-point optimizations that assume arguments and results are not NaNs or +-Inf.
2026
Richard Smith081ad4d2017-01-24 19:39:46 +00002027.. option:: -cl-fp32-correctly-rounded-divide-sqrt
2028
2029OpenCL only. Specify that single precision floating-point divide and sqrt used in the program source are correctly rounded.
2030
Richard Smith081ad4d2017-01-24 19:39:46 +00002031.. option:: -cl-kernel-arg-info
2032
2033OpenCL only. Generate kernel argument metadata.
2034
Richard Smith081ad4d2017-01-24 19:39:46 +00002035.. option:: -cl-mad-enable
2036
2037OpenCL only. Allow use of less precise MAD computations in the generated binary.
2038
Richard Smith081ad4d2017-01-24 19:39:46 +00002039.. option:: -cl-no-signed-zeros
2040
2041OpenCL only. Allow use of less precise no signed zeros computations in the generated binary.
2042
Richard Smith081ad4d2017-01-24 19:39:46 +00002043.. option:: -cl-opt-disable
2044
2045OpenCL only. This option disables all optimizations. By default optimizations are enabled.
2046
Richard Smith081ad4d2017-01-24 19:39:46 +00002047.. option:: -cl-single-precision-constant
2048
2049OpenCL only. Treat double precision floating-point constant as single precision constant.
2050
Richard Smith081ad4d2017-01-24 19:39:46 +00002051.. option:: -cl-std=<arg>
2052
2053OpenCL language standard to compile for.
2054
Richard Smith081ad4d2017-01-24 19:39:46 +00002055.. option:: -cl-strict-aliasing
2056
2057OpenCL only. This option is added for compatibility with OpenCL 1.0.
2058
Jonas Hahnfelda180fc42018-02-22 17:10:28 +00002059.. option:: -cl-uniform-work-group-size
2060
2061OpenCL only. Defines that the global work-size be a multiple of the work-group size specified to clEnqueueNDRangeKernel
2062
Richard Smith081ad4d2017-01-24 19:39:46 +00002063.. option:: -cl-unsafe-math-optimizations
2064
2065OpenCL only. Allow unsafe floating-point optimizations. Also implies -cl-no-signed-zeros and -cl-mad-enable.
2066
2067Target-dependent compilation options
2068~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Richard Smithc5b2e002017-01-27 02:08:37 +00002069.. option:: -G<size>, -G=<arg>, -msmall-data-threshold=<arg>
2070
2071Put objects of at most <size> bytes into small data section (MIPS / Hexagon)
2072
Richard Smith081ad4d2017-01-24 19:39:46 +00002073.. option:: -m16
2074
Richard Smith081ad4d2017-01-24 19:39:46 +00002075.. option:: -m32
2076
Richard Smith081ad4d2017-01-24 19:39:46 +00002077.. option:: -m64
2078
Richard Smith081ad4d2017-01-24 19:39:46 +00002079.. option:: -mabi=<arg>
2080
Richard Smith081ad4d2017-01-24 19:39:46 +00002081.. option:: -mabicalls, -mno-abicalls
2082
2083Enable SVR4-style position-independent code (Mips only)
2084
Boris Kolpackovb150d242017-08-30 09:15:53 +00002085.. option:: -mabs=<arg>
2086
Richard Smith081ad4d2017-01-24 19:39:46 +00002087.. option:: -malign-double
2088
2089Align doubles to two words in structs (x86 only)
2090
Richard Smith081ad4d2017-01-24 19:39:46 +00002091.. option:: -march=<arg>
2092
Richard Smith081ad4d2017-01-24 19:39:46 +00002093.. option:: -masm=<arg>
2094
Richard Smith081ad4d2017-01-24 19:39:46 +00002095.. option:: -mbackchain, -mno-backchain
2096
2097Link stack frames through backchain on System Z
2098
Richard Smith081ad4d2017-01-24 19:39:46 +00002099.. option:: -mcheck-zero-division, -mno-check-zero-division
2100
Richard Smith081ad4d2017-01-24 19:39:46 +00002101.. option:: -mcmodel=<arg>
2102
Richard Smith081ad4d2017-01-24 19:39:46 +00002103.. option:: -mcompact-branches=<arg>
2104
Richard Smith081ad4d2017-01-24 19:39:46 +00002105.. option:: -mconsole<arg>
2106
Craig Topper287c8012018-01-03 18:29:12 +00002107.. option:: -mcpu=<arg>, -mv4 (equivalent to -mcpu=hexagonv4), -mv5 (equivalent to -mcpu=hexagonv5), -mv55 (equivalent to -mcpu=hexagonv55), -mv60 (equivalent to -mcpu=hexagonv60), -mv62 (equivalent to -mcpu=hexagonv62), -mv65 (equivalent to -mcpu=hexagonv65)
Richard Smith081ad4d2017-01-24 19:39:46 +00002108
Craig Topperd23254a2017-07-20 17:52:48 +00002109.. option:: -mdefault-build-attributes<arg>, -mno-default-build-attributes<arg>
2110
Richard Smith081ad4d2017-01-24 19:39:46 +00002111.. option:: -mdll<arg>
2112
Richard Smith081ad4d2017-01-24 19:39:46 +00002113.. option:: -mdouble-float
2114
Richard Smith081ad4d2017-01-24 19:39:46 +00002115.. option:: -mdsp, -mno-dsp
2116
Richard Smith081ad4d2017-01-24 19:39:46 +00002117.. option:: -mdspr2, -mno-dspr2
2118
Richard Smith081ad4d2017-01-24 19:39:46 +00002119.. option:: -mdynamic-no-pic<arg>
2120
Richard Smith081ad4d2017-01-24 19:39:46 +00002121.. option:: -meabi <arg>
2122
2123Set EABI type, e.g. 4, 5 or gnu (default depends on triple)
2124
Boris Kolpackovb150d242017-08-30 09:15:53 +00002125.. option:: -membedded-data, -mno-embedded-data
2126
2127Place constants in the .rodata section instead of the .sdata section even if they meet the -G <size> threshold (MIPS)
2128
2129.. option:: -mextern-sdata, -mno-extern-sdata
2130
2131Assume that externally defined data is in the small data if it meets the -G <size> threshold (MIPS)
2132
Richard Smith78e23fd2017-04-13 22:39:49 +00002133.. option:: -mfentry
2134
2135Insert calls to fentry at function entry (x86 only)
2136
Richard Smith081ad4d2017-01-24 19:39:46 +00002137.. option:: -mfloat-abi=<arg>
2138
Richard Smith081ad4d2017-01-24 19:39:46 +00002139.. option:: -mfp32
2140
2141Use 32-bit floating point registers (MIPS only)
2142
Richard Smith081ad4d2017-01-24 19:39:46 +00002143.. option:: -mfp64
2144
2145Use 64-bit floating point registers (MIPS only)
2146
Richard Smith081ad4d2017-01-24 19:39:46 +00002147.. option:: -mfpmath=<arg>
2148
Richard Smith081ad4d2017-01-24 19:39:46 +00002149.. option:: -mfpu=<arg>
2150
Richard Smith081ad4d2017-01-24 19:39:46 +00002151.. option:: -mglobal-merge, -mno-global-merge
2152
2153Enable merging of globals
2154
Craig Topperd23254a2017-07-20 17:52:48 +00002155.. option:: -mgpopt, -mno-gpopt
2156
2157Use GP relative accesses for symbols known to be in a small data section (MIPS)
2158
Richard Smith081ad4d2017-01-24 19:39:46 +00002159.. option:: -mhard-float
2160
Richard Smith081ad4d2017-01-24 19:39:46 +00002161.. option:: -mhwdiv=<arg>, --mhwdiv <arg>, --mhwdiv=<arg>
2162
Richard Smith081ad4d2017-01-24 19:39:46 +00002163.. option:: -miamcu, -mno-iamcu
2164
2165Use Intel MCU ABI
2166
Richard Smith081ad4d2017-01-24 19:39:46 +00002167.. option:: -mimplicit-float, -mno-implicit-float
2168
Richard Smith081ad4d2017-01-24 19:39:46 +00002169.. option:: -mimplicit-it=<arg>
2170
Richard Smith081ad4d2017-01-24 19:39:46 +00002171.. option:: -mincremental-linker-compatible, -mno-incremental-linker-compatible
2172
2173(integrated-as) Emit an object file which can be used with an incremental linker
2174
Jonas Hahnfelda180fc42018-02-22 17:10:28 +00002175.. option:: -mindirect-jump=<arg>
2176
2177Change indirect jump instructions to inhibit speculation
2178
Richard Smith78e23fd2017-04-13 22:39:49 +00002179.. option:: -miphoneos-version-min=<arg>, -mios-version-min=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00002180
Richard Smith081ad4d2017-01-24 19:39:46 +00002181.. option:: -mips16
2182
Richard Smith081ad4d2017-01-24 19:39:46 +00002183.. option:: -mkernel
2184
Richard Smith081ad4d2017-01-24 19:39:46 +00002185.. option:: -mldc1-sdc1, -mno-ldc1-sdc1
2186
Boris Kolpackovb150d242017-08-30 09:15:53 +00002187.. option:: -mlocal-sdata, -mno-local-sdata
2188
2189Extend the -G behaviour to object local data (MIPS)
2190
Richard Smith081ad4d2017-01-24 19:39:46 +00002191.. option:: -mlong-calls, -mno-long-calls
2192
2193Generate branches with extended addressability, usually via indirect jumps.
2194
Craig Topperd23254a2017-07-20 17:52:48 +00002195.. option:: -mmacosx-version-min=<arg>, -mmacos-version-min=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00002196
2197Set Mac OS X deployment target
2198
Craig Topperd23254a2017-07-20 17:52:48 +00002199.. option:: -mmadd4, -mno-madd4
2200
2201Enable the generation of 4-operand madd.s, madd.d and related instructions.
2202
2203.. option:: -mmcu=<arg>
2204
Richard Smith081ad4d2017-01-24 19:39:46 +00002205.. option:: -mmicromips, -mno-micromips
2206
Richard Smith081ad4d2017-01-24 19:39:46 +00002207.. option:: -mms-bitfields, -mno-ms-bitfields
2208
2209Set the default structure layout to be compatible with the Microsoft compiler standard
2210
Richard Smith081ad4d2017-01-24 19:39:46 +00002211.. option:: -mmsa, -mno-msa
2212
2213Enable MSA ASE (MIPS only)
2214
Craig Topperd23254a2017-07-20 17:52:48 +00002215.. option:: -mmt, -mno-mt
2216
2217Enable MT ASE (MIPS only)
2218
Richard Smith081ad4d2017-01-24 19:39:46 +00002219.. option:: -mnan=<arg>
2220
Richard Smith081ad4d2017-01-24 19:39:46 +00002221.. option:: -mno-mips16
2222
Richard Smith081ad4d2017-01-24 19:39:46 +00002223.. option:: -momit-leaf-frame-pointer, -mno-omit-leaf-frame-pointer
2224
2225Omit frame pointer setup for leaf functions
2226
Richard Smith081ad4d2017-01-24 19:39:46 +00002227.. option:: -moslib=<arg>
2228
Richard Smith081ad4d2017-01-24 19:39:46 +00002229.. option:: -mpie-copy-relocations, -mno-pie-copy-relocations
2230
2231Use copy relocations support for PIE builds
2232
Craig Topper9a724aa2017-12-11 21:09:19 +00002233.. option:: -mprefer-vector-width=<arg>
2234
2235Specifies preferred vector width for auto-vectorization. Defaults to 'none' which allows target specific decisions.
2236
Richard Smith081ad4d2017-01-24 19:39:46 +00002237.. option:: -mqdsp6-compat
2238
2239Enable hexagon-qdsp6 backward compatibility
2240
Richard Smith081ad4d2017-01-24 19:39:46 +00002241.. option:: -mrecip
2242
Richard Smithb2c82a62017-01-27 01:54:42 +00002243.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00002244.. option:: -mrecip=<arg1>,<arg2>...
Richard Smithb2c82a62017-01-27 01:54:42 +00002245.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00002246
Richard Smith081ad4d2017-01-24 19:39:46 +00002247.. option:: -mred-zone, -mno-red-zone
2248
Richard Smith081ad4d2017-01-24 19:39:46 +00002249.. option:: -mregparm=<arg>
2250
Richard Smith081ad4d2017-01-24 19:39:46 +00002251.. option:: -mrelax-all, -mno-relax-all
2252
2253(integrated-as) Relax all machine instructions
2254
Richard Smith081ad4d2017-01-24 19:39:46 +00002255.. option:: -mrtd, -mno-rtd
2256
2257Make StdCall calling convention the default
2258
Richard Smith081ad4d2017-01-24 19:39:46 +00002259.. option:: -msingle-float
2260
Richard Smith081ad4d2017-01-24 19:39:46 +00002261.. option:: -msoft-float, -mno-soft-float
2262
2263Use software floating point
2264
Richard Smith081ad4d2017-01-24 19:39:46 +00002265.. option:: -mstack-alignment=<arg>
2266
2267Set the stack alignment
2268
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00002269.. option:: -mstack-arg-probe, -mno-stack-arg-probe
2270
2271Enable stack probes
2272
Richard Smith081ad4d2017-01-24 19:39:46 +00002273.. option:: -mstack-probe-size=<arg>
2274
2275Set the stack probe size
2276
Richard Smith081ad4d2017-01-24 19:39:46 +00002277.. option:: -mstackrealign, -mno-stackrealign
2278
2279Force realign the stack at entry to every function
2280
Richard Smith081ad4d2017-01-24 19:39:46 +00002281.. option:: -mthread-model <arg>
2282
2283The thread model to use, e.g. posix, single (posix by default)
2284
Richard Smith081ad4d2017-01-24 19:39:46 +00002285.. option:: -mthreads<arg>
2286
Richard Smith081ad4d2017-01-24 19:39:46 +00002287.. option:: -mthumb, -mno-thumb
2288
Richard Smith081ad4d2017-01-24 19:39:46 +00002289.. option:: -mtune=<arg>
2290
Richard Smith78e23fd2017-04-13 22:39:49 +00002291.. option:: -mtvos-version-min=<arg>, -mappletvos-version-min=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00002292
Richard Smith081ad4d2017-01-24 19:39:46 +00002293.. option:: -municode<arg>
2294
Richard Smith081ad4d2017-01-24 19:39:46 +00002295.. option:: -mvx, -mno-vx
2296
Richard Smith081ad4d2017-01-24 19:39:46 +00002297.. option:: -mwarn-nonportable-cfstrings, -mno-warn-nonportable-cfstrings
2298
Richard Smith78e23fd2017-04-13 22:39:49 +00002299.. option:: -mwatchos-version-min=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00002300
Richard Smith081ad4d2017-01-24 19:39:46 +00002301.. option:: -mwindows<arg>
2302
Richard Smith081ad4d2017-01-24 19:39:46 +00002303.. option:: -mx32
2304
Richard Smith081ad4d2017-01-24 19:39:46 +00002305.. option:: -mxgot, -mno-xgot
2306
2307AARCH64
2308-------
Richard Smith081ad4d2017-01-24 19:39:46 +00002309.. option:: -ffixed-x18
2310
2311Reserve the x18 register (AArch64 only)
2312
Petr Hosek72509082018-06-12 20:00:50 +00002313.. option:: -ffixed-x20
2314
2315Reserve the x20 register (AArch64 only)
2316
Richard Smith081ad4d2017-01-24 19:39:46 +00002317.. option:: -mfix-cortex-a53-835769, -mno-fix-cortex-a53-835769
2318
2319Workaround Cortex-A53 erratum 835769 (AArch64 only)
2320
Richard Smith081ad4d2017-01-24 19:39:46 +00002321.. option:: -mgeneral-regs-only
2322
2323Generate code which only uses the general purpose registers (AArch64 only)
2324
2325AMDGPU
2326------
Craig Topper16418662017-11-20 18:07:43 +00002327.. option:: -mxnack, -mno-xnack
2328
2329Enable XNACK (AMDGPU only)
2330
Richard Smith081ad4d2017-01-24 19:39:46 +00002331ARM
2332---
Richard Smith081ad4d2017-01-24 19:39:46 +00002333.. option:: -ffixed-r9
2334
2335Reserve the r9 register (ARM only)
2336
Richard Smith081ad4d2017-01-24 19:39:46 +00002337.. option:: -mcrc
2338
2339Allow use of CRC instructions (ARM only)
2340
Richard Smith081ad4d2017-01-24 19:39:46 +00002341.. option:: -mexecute-only, -mno-execute-only, -mpure-code
2342
2343Disallow generation of data access to code sections (ARM only)
2344
Richard Smith081ad4d2017-01-24 19:39:46 +00002345.. option:: -mno-movt
2346
2347Disallow use of movt/movw pairs (ARM only)
2348
Richard Smith78e23fd2017-04-13 22:39:49 +00002349.. option:: -mno-neg-immediates
2350
2351Disallow converting instructions with negative immediates to their negation or inversion.
2352
Richard Smith081ad4d2017-01-24 19:39:46 +00002353.. option:: -mnocrc
2354
2355Disallow use of CRC instructions (ARM only)
2356
Richard Smith081ad4d2017-01-24 19:39:46 +00002357.. option:: -mrestrict-it, -mno-restrict-it
2358
2359Disallow generation of deprecated IT blocks for ARMv8. It is on by default for ARMv8 Thumb mode.
2360
Craig Topper16418662017-11-20 18:07:43 +00002361.. option:: -mtp=<arg>
2362
2363Read thread pointer from coprocessor register (ARM only)
2364
Richard Smith081ad4d2017-01-24 19:39:46 +00002365.. option:: -munaligned-access, -mno-unaligned-access
2366
2367Allow memory accesses to be unaligned (AArch32/AArch64 only)
2368
2369Hexagon
2370-------
Craig Topper16418662017-11-20 18:07:43 +00002371.. option:: -mieee-rnd-near
2372
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00002373.. option:: -mpackets, -mno-packets
2374
2375Enable generation of instruction packets
2376
Craig Topper16418662017-11-20 18:07:43 +00002377Hexagon
2378-------
Richard Smith081ad4d2017-01-24 19:39:46 +00002379.. option:: -mhvx, -mno-hvx
2380
2381Enable Hexagon Vector eXtensions
2382
Craig Topper16418662017-11-20 18:07:43 +00002383.. option:: -mhvx-length=<arg>
2384
2385Set Hexagon Vector Length
2386
2387.. program:: clang1
2388.. option:: -mhvx=<arg>
2389.. program:: clang
2390
2391Enable Hexagon Vector eXtensions
Richard Smith081ad4d2017-01-24 19:39:46 +00002392
2393PowerPC
2394-------
Richard Smith78e23fd2017-04-13 22:39:49 +00002395.. option:: -maltivec, -mno-altivec
2396
Richard Smith081ad4d2017-01-24 19:39:46 +00002397.. option:: -mcmpb, -mno-cmpb
2398
Richard Smith081ad4d2017-01-24 19:39:46 +00002399.. option:: -mcrbits, -mno-crbits
2400
Richard Smith081ad4d2017-01-24 19:39:46 +00002401.. option:: -mcrypto, -mno-crypto
2402
Richard Smith081ad4d2017-01-24 19:39:46 +00002403.. option:: -mdirect-move, -mno-direct-move
2404
Richard Smith081ad4d2017-01-24 19:39:46 +00002405.. option:: -mfloat128, -mno-float128
2406
Richard Smith081ad4d2017-01-24 19:39:46 +00002407.. option:: -mfprnd, -mno-fprnd
2408
Richard Smith081ad4d2017-01-24 19:39:46 +00002409.. option:: -mhtm, -mno-htm
2410
Richard Smith081ad4d2017-01-24 19:39:46 +00002411.. option:: -minvariant-function-descriptors, -mno-invariant-function-descriptors
2412
Richard Smith081ad4d2017-01-24 19:39:46 +00002413.. option:: -misel, -mno-isel
2414
Richard Smith081ad4d2017-01-24 19:39:46 +00002415.. option:: -mlongcall, -mno-longcall
2416
Richard Smith081ad4d2017-01-24 19:39:46 +00002417.. option:: -mmfocrf, -mmfcrf, -mno-mfocrf
2418
Richard Smith081ad4d2017-01-24 19:39:46 +00002419.. option:: -mpopcntd, -mno-popcntd
2420
Richard Smith081ad4d2017-01-24 19:39:46 +00002421.. option:: -mpower8-vector, -mno-power8-vector
2422
Richard Smith081ad4d2017-01-24 19:39:46 +00002423.. option:: -mpower9-vector, -mno-power9-vector
2424
Richard Smith081ad4d2017-01-24 19:39:46 +00002425.. option:: -mqpx, -mno-qpx
2426
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00002427.. option:: -msecure-plt
2428
Richard Smith081ad4d2017-01-24 19:39:46 +00002429.. option:: -mvsx, -mno-vsx
2430
2431WebAssembly
2432-----------
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00002433.. option:: -mexception-handling, -mno-exception-handling
2434
Craig Topper188252d2017-12-11 21:09:16 +00002435.. option:: -mnontrapping-fptoint, -mno-nontrapping-fptoint
2436
Dan Gohmand0c4e1e2018-01-19 17:16:32 +00002437.. option:: -msign-ext, -mno-sign-ext
2438
Richard Smith081ad4d2017-01-24 19:39:46 +00002439.. option:: -msimd128, -mno-simd128
2440
2441X86
2442---
Richard Smith081ad4d2017-01-24 19:39:46 +00002443.. option:: -m3dnow, -mno-3dnow
2444
Richard Smith081ad4d2017-01-24 19:39:46 +00002445.. option:: -m3dnowa, -mno-3dnowa
2446
Richard Smith081ad4d2017-01-24 19:39:46 +00002447.. option:: -madx, -mno-adx
2448
Richard Smith081ad4d2017-01-24 19:39:46 +00002449.. option:: -maes, -mno-aes
2450
Richard Smith081ad4d2017-01-24 19:39:46 +00002451.. option:: -mavx, -mno-avx
2452
Richard Smith081ad4d2017-01-24 19:39:46 +00002453.. option:: -mavx2, -mno-avx2
2454
Craig Topper287c8012018-01-03 18:29:12 +00002455.. option:: -mavx512bitalg, -mno-avx512bitalg
2456
Richard Smith081ad4d2017-01-24 19:39:46 +00002457.. option:: -mavx512bw, -mno-avx512bw
2458
Richard Smith081ad4d2017-01-24 19:39:46 +00002459.. option:: -mavx512cd, -mno-avx512cd
2460
Richard Smith081ad4d2017-01-24 19:39:46 +00002461.. option:: -mavx512dq, -mno-avx512dq
2462
Richard Smith081ad4d2017-01-24 19:39:46 +00002463.. option:: -mavx512er, -mno-avx512er
2464
Richard Smith081ad4d2017-01-24 19:39:46 +00002465.. option:: -mavx512f, -mno-avx512f
2466
Richard Smith081ad4d2017-01-24 19:39:46 +00002467.. option:: -mavx512ifma, -mno-avx512ifma
2468
Richard Smith081ad4d2017-01-24 19:39:46 +00002469.. option:: -mavx512pf, -mno-avx512pf
2470
Richard Smith081ad4d2017-01-24 19:39:46 +00002471.. option:: -mavx512vbmi, -mno-avx512vbmi
2472
Craig Topper287c8012018-01-03 18:29:12 +00002473.. option:: -mavx512vbmi2, -mno-avx512vbmi2
2474
Richard Smith081ad4d2017-01-24 19:39:46 +00002475.. option:: -mavx512vl, -mno-avx512vl
2476
Craig Topper287c8012018-01-03 18:29:12 +00002477.. option:: -mavx512vnni, -mno-avx512vnni
2478
Craig Topperd23254a2017-07-20 17:52:48 +00002479.. option:: -mavx512vpopcntdq, -mno-avx512vpopcntdq
2480
Richard Smith081ad4d2017-01-24 19:39:46 +00002481.. option:: -mbmi, -mno-bmi
2482
Richard Smith081ad4d2017-01-24 19:39:46 +00002483.. option:: -mbmi2, -mno-bmi2
2484
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00002485.. option:: -mcldemote, -mno-cldemote
2486
Craig Topper78b47872017-02-08 06:48:58 +00002487.. option:: -mclflushopt, -mno-clflushopt
2488
Craig Topper177a57c2017-02-08 07:57:01 +00002489.. option:: -mclwb, -mno-clwb
2490
Richard Smith78e23fd2017-04-13 22:39:49 +00002491.. option:: -mclzero, -mno-clzero
2492
Richard Smith081ad4d2017-01-24 19:39:46 +00002493.. option:: -mcx16, -mno-cx16
2494
Richard Smith081ad4d2017-01-24 19:39:46 +00002495.. option:: -mf16c, -mno-f16c
2496
Richard Smith081ad4d2017-01-24 19:39:46 +00002497.. option:: -mfma, -mno-fma
2498
Richard Smith081ad4d2017-01-24 19:39:46 +00002499.. option:: -mfma4, -mno-fma4
2500
Richard Smith081ad4d2017-01-24 19:39:46 +00002501.. option:: -mfsgsbase, -mno-fsgsbase
2502
Richard Smith081ad4d2017-01-24 19:39:46 +00002503.. option:: -mfxsr, -mno-fxsr
2504
Craig Topper287c8012018-01-03 18:29:12 +00002505.. option:: -mgfni, -mno-gfni
2506
Craig Topperd23254a2017-07-20 17:52:48 +00002507.. option:: -mlwp, -mno-lwp
2508
Richard Smith081ad4d2017-01-24 19:39:46 +00002509.. option:: -mlzcnt, -mno-lzcnt
2510
Richard Smith081ad4d2017-01-24 19:39:46 +00002511.. option:: -mmmx, -mno-mmx
2512
Craig Topper177a57c2017-02-08 07:57:01 +00002513.. option:: -mmovbe, -mno-movbe
2514
Gabor Buellaa51e0c22018-05-01 10:05:42 +00002515.. option:: -mmovdiri, -mno-movdiri
2516
2517.. option:: -mmovdir64b, -mno-movdir64b
2518
Craig Topperb16cb822017-02-08 07:56:42 +00002519.. option:: -mmpx, -mno-mpx
2520
Richard Smith081ad4d2017-01-24 19:39:46 +00002521.. option:: -mmwaitx, -mno-mwaitx
2522
Richard Smith081ad4d2017-01-24 19:39:46 +00002523.. option:: -mpclmul, -mno-pclmul
2524
Richard Smith081ad4d2017-01-24 19:39:46 +00002525.. option:: -mpku, -mno-pku
2526
Richard Smith081ad4d2017-01-24 19:39:46 +00002527.. option:: -mpopcnt, -mno-popcnt
2528
Craig Topperd2bf7b02017-02-08 08:23:40 +00002529.. option:: -mprefetchwt1, -mno-prefetchwt1
2530
Richard Smith081ad4d2017-01-24 19:39:46 +00002531.. option:: -mprfchw, -mno-prfchw
2532
Craig Topper596527b2018-01-23 18:40:15 +00002533.. option:: -mrdpid, -mno-rdpid
2534
Richard Smith081ad4d2017-01-24 19:39:46 +00002535.. option:: -mrdrnd, -mno-rdrnd
2536
Richard Smith081ad4d2017-01-24 19:39:46 +00002537.. option:: -mrdseed, -mno-rdseed
2538
Craig Topper596527b2018-01-23 18:40:15 +00002539.. option:: -mretpoline, -mno-retpoline
2540
2541.. option:: -mretpoline-external-thunk, -mno-retpoline-external-thunk
2542
Richard Smith081ad4d2017-01-24 19:39:46 +00002543.. option:: -mrtm, -mno-rtm
2544
Jonas Hahnfelda180fc42018-02-22 17:10:28 +00002545.. option:: -msahf, -mno-sahf
2546
Craig Topper204ecff2017-02-08 08:23:17 +00002547.. option:: -msgx, -mno-sgx
2548
Richard Smith081ad4d2017-01-24 19:39:46 +00002549.. option:: -msha, -mno-sha
2550
Craig Topper188252d2017-12-11 21:09:16 +00002551.. option:: -mshstk, -mno-shstk
2552
Richard Smith081ad4d2017-01-24 19:39:46 +00002553.. option:: -msse, -mno-sse
2554
Richard Smith081ad4d2017-01-24 19:39:46 +00002555.. option:: -msse2, -mno-sse2
2556
Richard Smith081ad4d2017-01-24 19:39:46 +00002557.. option:: -msse3, -mno-sse3
2558
Richard Smith081ad4d2017-01-24 19:39:46 +00002559.. option:: -msse4.1, -mno-sse4.1
2560
Richard Smithb2c82a62017-01-27 01:54:42 +00002561.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00002562.. option:: -msse4.2, -mno-sse4.2, -msse4
Richard Smithb2c82a62017-01-27 01:54:42 +00002563.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00002564
Richard Smith081ad4d2017-01-24 19:39:46 +00002565.. option:: -msse4a, -mno-sse4a
2566
Richard Smith081ad4d2017-01-24 19:39:46 +00002567.. option:: -mssse3, -mno-ssse3
2568
Richard Smith081ad4d2017-01-24 19:39:46 +00002569.. option:: -mtbm, -mno-tbm
2570
Craig Topper287c8012018-01-03 18:29:12 +00002571.. option:: -mvaes, -mno-vaes
2572
2573.. option:: -mvpclmulqdq, -mno-vpclmulqdq
2574
Craig Topper42da9cb2018-04-23 21:41:06 +00002575.. option:: -mwaitpkg, -mno-waitpkg
2576
Gabor Buellaa0520162018-04-11 20:09:09 +00002577.. option:: -mwbnoinvd, -mno-wbnoinvd
2578
Richard Smith081ad4d2017-01-24 19:39:46 +00002579.. option:: -mx87, -m80387, -mno-x87
2580
Richard Smith081ad4d2017-01-24 19:39:46 +00002581.. option:: -mxop, -mno-xop
2582
Richard Smith081ad4d2017-01-24 19:39:46 +00002583.. option:: -mxsave, -mno-xsave
2584
Richard Smith081ad4d2017-01-24 19:39:46 +00002585.. option:: -mxsavec, -mno-xsavec
2586
Richard Smith081ad4d2017-01-24 19:39:46 +00002587.. option:: -mxsaveopt, -mno-xsaveopt
2588
Richard Smith081ad4d2017-01-24 19:39:46 +00002589.. option:: -mxsaves, -mno-xsaves
2590
2591Optimization level
2592~~~~~~~~~~~~~~~~~~
2593
2594Flags controlling how much optimization should be performed.
2595
Richard Smith081ad4d2017-01-24 19:39:46 +00002596.. option:: -O<arg>, -O (equivalent to -O2), --optimize, --optimize=<arg>
2597
Richard Smith081ad4d2017-01-24 19:39:46 +00002598.. option:: -Ofast<arg>
2599
2600Debug information generation
2601~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2602
2603Flags controlling how much and what kind of debug information should be
2604generated.
2605
2606Kind and level of debug information
2607-----------------------------------
Richard Smith081ad4d2017-01-24 19:39:46 +00002608.. option:: -g, --debug, --debug=<arg>
2609
2610Generate source-level debug information
2611
Richard Smith081ad4d2017-01-24 19:39:46 +00002612.. option:: -gdwarf-2
2613
2614Generate source-level debug information with dwarf version 2
2615
Richard Smith081ad4d2017-01-24 19:39:46 +00002616.. option:: -gdwarf-3
2617
2618Generate source-level debug information with dwarf version 3
2619
Richard Smith081ad4d2017-01-24 19:39:46 +00002620.. option:: -gdwarf-4, -gdwarf
2621
2622Generate source-level debug information with dwarf version 4
2623
Richard Smith081ad4d2017-01-24 19:39:46 +00002624.. option:: -gdwarf-5
2625
2626Generate source-level debug information with dwarf version 5
2627
Richard Smith081ad4d2017-01-24 19:39:46 +00002628.. option:: -gfull
2629
Richard Smith081ad4d2017-01-24 19:39:46 +00002630.. option:: -gused
2631
2632Debug level
2633___________
Richard Smith081ad4d2017-01-24 19:39:46 +00002634.. option:: -g0
2635
Richard Smith081ad4d2017-01-24 19:39:46 +00002636.. option:: -g2
2637
Richard Smith081ad4d2017-01-24 19:39:46 +00002638.. option:: -g3
2639
Richard Smith081ad4d2017-01-24 19:39:46 +00002640.. option:: -ggdb0
2641
Richard Smith081ad4d2017-01-24 19:39:46 +00002642.. option:: -ggdb1
2643
Richard Smith081ad4d2017-01-24 19:39:46 +00002644.. option:: -ggdb2
2645
Richard Smith081ad4d2017-01-24 19:39:46 +00002646.. option:: -ggdb3
2647
Richard Smith081ad4d2017-01-24 19:39:46 +00002648.. option:: -gline-tables-only, -g1, -gmlt
2649
2650Emit debug line number tables only
2651
Richard Smith081ad4d2017-01-24 19:39:46 +00002652.. option:: -gmodules
2653
2654Generate debug info with external references to clang modules or precompiled headers
2655
2656Debugger to tune debug information for
2657______________________________________
Richard Smith081ad4d2017-01-24 19:39:46 +00002658.. option:: -ggdb
2659
Richard Smith081ad4d2017-01-24 19:39:46 +00002660.. option:: -glldb
2661
Richard Smith081ad4d2017-01-24 19:39:46 +00002662.. option:: -gsce
2663
2664Debug information flags
2665-----------------------
Richard Smith081ad4d2017-01-24 19:39:46 +00002666.. option:: -gcolumn-info, -gno-column-info
2667
Richard Smith081ad4d2017-01-24 19:39:46 +00002668.. option:: -gdwarf-aranges
2669
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00002670.. option:: -gembed-source, -gno-embed-source
Scott Lindera2fbcef2018-02-26 17:32:31 +00002671
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00002672Embed source text in DWARF debug sections
Scott Lindera2fbcef2018-02-26 17:32:31 +00002673
Richard Smith081ad4d2017-01-24 19:39:46 +00002674.. option:: -ggnu-pubnames
2675
Richard Smith081ad4d2017-01-24 19:39:46 +00002676.. option:: -grecord-gcc-switches, -gno-record-gcc-switches
2677
Richard Smith081ad4d2017-01-24 19:39:46 +00002678.. option:: -gsplit-dwarf
2679
Richard Smith081ad4d2017-01-24 19:39:46 +00002680.. option:: -gstrict-dwarf, -gno-strict-dwarf
2681
Craig Topperd23254a2017-07-20 17:52:48 +00002682.. option:: -gz
2683
2684DWARF debug sections compression type
2685
2686.. program:: clang1
2687.. option:: -gz=<arg>
2688.. program:: clang
2689
2690DWARF debug sections compression type
2691
Richard Smithc5b2e002017-01-27 02:08:37 +00002692Static analyzer flags
2693=====================
Richard Smith081ad4d2017-01-24 19:39:46 +00002694
Richard Smithc5b2e002017-01-27 02:08:37 +00002695Flags controlling the behavior of the Clang Static Analyzer.
Richard Smith081ad4d2017-01-24 19:39:46 +00002696
Richard Smithc5b2e002017-01-27 02:08:37 +00002697.. option:: -Xanalyzer <arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00002698
Richard Smithc5b2e002017-01-27 02:08:37 +00002699Pass <arg> to the static analyzer
Richard Smith081ad4d2017-01-24 19:39:46 +00002700
2701Fortran compilation flags
2702=========================
2703
2704Flags that will be passed onto the ``gfortran`` compiler when Clang is given
2705a Fortran input.
2706
Richard Smithc5b2e002017-01-27 02:08:37 +00002707.. option:: -A<arg>, --assert <arg>, --assert=<arg>
2708
Richard Smith081ad4d2017-01-24 19:39:46 +00002709.. option:: -A-<arg>
2710
Richard Smith081ad4d2017-01-24 19:39:46 +00002711.. option:: -J<arg>
2712
Richard Smith081ad4d2017-01-24 19:39:46 +00002713.. option:: -cpp
2714
Richard Smith081ad4d2017-01-24 19:39:46 +00002715.. option:: -faggressive-function-elimination, -fno-aggressive-function-elimination
2716
Richard Smith081ad4d2017-01-24 19:39:46 +00002717.. option:: -falign-commons, -fno-align-commons
2718
Richard Smith081ad4d2017-01-24 19:39:46 +00002719.. option:: -fall-intrinsics, -fno-all-intrinsics
2720
Richard Smith081ad4d2017-01-24 19:39:46 +00002721.. option:: -fautomatic, -fno-automatic
2722
Richard Smith081ad4d2017-01-24 19:39:46 +00002723.. option:: -fbackslash, -fno-backslash
2724
Richard Smith081ad4d2017-01-24 19:39:46 +00002725.. option:: -fbacktrace, -fno-backtrace
2726
Richard Smith081ad4d2017-01-24 19:39:46 +00002727.. option:: -fblas-matmul-limit=<arg>
2728
Richard Smith081ad4d2017-01-24 19:39:46 +00002729.. option:: -fbounds-check, -fno-bounds-check
2730
Richard Smith081ad4d2017-01-24 19:39:46 +00002731.. option:: -fcheck-array-temporaries, -fno-check-array-temporaries
2732
Richard Smith081ad4d2017-01-24 19:39:46 +00002733.. option:: -fcheck=<arg>
2734
Richard Smith081ad4d2017-01-24 19:39:46 +00002735.. option:: -fcoarray=<arg>
2736
Richard Smith081ad4d2017-01-24 19:39:46 +00002737.. option:: -fconvert=<arg>
2738
Richard Smith081ad4d2017-01-24 19:39:46 +00002739.. option:: -fcray-pointer, -fno-cray-pointer
2740
Richard Smith081ad4d2017-01-24 19:39:46 +00002741.. option:: -fd-lines-as-code, -fno-d-lines-as-code
2742
Richard Smith081ad4d2017-01-24 19:39:46 +00002743.. option:: -fd-lines-as-comments, -fno-d-lines-as-comments
2744
Richard Smith081ad4d2017-01-24 19:39:46 +00002745.. option:: -fdefault-double-8, -fno-default-double-8
2746
Richard Smith081ad4d2017-01-24 19:39:46 +00002747.. option:: -fdefault-integer-8, -fno-default-integer-8
2748
Richard Smith081ad4d2017-01-24 19:39:46 +00002749.. option:: -fdefault-real-8, -fno-default-real-8
2750
Richard Smith081ad4d2017-01-24 19:39:46 +00002751.. option:: -fdollar-ok, -fno-dollar-ok
2752
Richard Smith081ad4d2017-01-24 19:39:46 +00002753.. option:: -fdump-fortran-optimized, -fno-dump-fortran-optimized
2754
Richard Smith081ad4d2017-01-24 19:39:46 +00002755.. option:: -fdump-fortran-original, -fno-dump-fortran-original
2756
Richard Smith081ad4d2017-01-24 19:39:46 +00002757.. option:: -fdump-parse-tree, -fno-dump-parse-tree
2758
Richard Smith081ad4d2017-01-24 19:39:46 +00002759.. option:: -fexternal-blas, -fno-external-blas
2760
Richard Smith081ad4d2017-01-24 19:39:46 +00002761.. option:: -ff2c, -fno-f2c
2762
Richard Smith081ad4d2017-01-24 19:39:46 +00002763.. option:: -ffixed-form, -fno-fixed-form
2764
Richard Smith081ad4d2017-01-24 19:39:46 +00002765.. option:: -ffixed-line-length-<arg>
2766
Richard Smith081ad4d2017-01-24 19:39:46 +00002767.. option:: -ffpe-trap=<arg>
2768
Richard Smith081ad4d2017-01-24 19:39:46 +00002769.. option:: -ffree-form, -fno-free-form
2770
Richard Smith081ad4d2017-01-24 19:39:46 +00002771.. option:: -ffree-line-length-<arg>
2772
Richard Smith081ad4d2017-01-24 19:39:46 +00002773.. option:: -ffrontend-optimize, -fno-frontend-optimize
2774
Richard Smith081ad4d2017-01-24 19:39:46 +00002775.. option:: -fimplicit-none, -fno-implicit-none
2776
Richard Smith081ad4d2017-01-24 19:39:46 +00002777.. option:: -finit-character=<arg>
2778
Richard Smith081ad4d2017-01-24 19:39:46 +00002779.. option:: -finit-integer=<arg>
2780
Richard Smith081ad4d2017-01-24 19:39:46 +00002781.. option:: -finit-local-zero, -fno-init-local-zero
2782
Richard Smith081ad4d2017-01-24 19:39:46 +00002783.. option:: -finit-logical=<arg>
2784
Richard Smith081ad4d2017-01-24 19:39:46 +00002785.. option:: -finit-real=<arg>
2786
Richard Smith081ad4d2017-01-24 19:39:46 +00002787.. option:: -finteger-4-integer-8, -fno-integer-4-integer-8
2788
Richard Smith081ad4d2017-01-24 19:39:46 +00002789.. option:: -fintrinsic-modules-path, -fno-intrinsic-modules-path
2790
Richard Smith081ad4d2017-01-24 19:39:46 +00002791.. option:: -fmax-array-constructor=<arg>
2792
Richard Smith081ad4d2017-01-24 19:39:46 +00002793.. option:: -fmax-errors=<arg>
2794
Richard Smith081ad4d2017-01-24 19:39:46 +00002795.. option:: -fmax-identifier-length, -fno-max-identifier-length
2796
Richard Smith081ad4d2017-01-24 19:39:46 +00002797.. option:: -fmax-stack-var-size=<arg>
2798
Richard Smith081ad4d2017-01-24 19:39:46 +00002799.. option:: -fmax-subrecord-length=<arg>
2800
Richard Smith081ad4d2017-01-24 19:39:46 +00002801.. option:: -fmodule-private, -fno-module-private
2802
Richard Smith081ad4d2017-01-24 19:39:46 +00002803.. option:: -fpack-derived, -fno-pack-derived
2804
Richard Smith081ad4d2017-01-24 19:39:46 +00002805.. option:: -fprotect-parens, -fno-protect-parens
2806
Richard Smith081ad4d2017-01-24 19:39:46 +00002807.. option:: -frange-check, -fno-range-check
2808
Richard Smith081ad4d2017-01-24 19:39:46 +00002809.. option:: -freal-4-real-10, -fno-real-4-real-10
2810
Richard Smith081ad4d2017-01-24 19:39:46 +00002811.. option:: -freal-4-real-16, -fno-real-4-real-16
2812
Richard Smith081ad4d2017-01-24 19:39:46 +00002813.. option:: -freal-4-real-8, -fno-real-4-real-8
2814
Richard Smith081ad4d2017-01-24 19:39:46 +00002815.. option:: -freal-8-real-10, -fno-real-8-real-10
2816
Richard Smith081ad4d2017-01-24 19:39:46 +00002817.. option:: -freal-8-real-16, -fno-real-8-real-16
2818
Richard Smith081ad4d2017-01-24 19:39:46 +00002819.. option:: -freal-8-real-4, -fno-real-8-real-4
2820
Richard Smith081ad4d2017-01-24 19:39:46 +00002821.. option:: -frealloc-lhs, -fno-realloc-lhs
2822
Richard Smith081ad4d2017-01-24 19:39:46 +00002823.. option:: -frecord-marker=<arg>
2824
Richard Smith081ad4d2017-01-24 19:39:46 +00002825.. option:: -frecursive, -fno-recursive
2826
Richard Smith081ad4d2017-01-24 19:39:46 +00002827.. option:: -frepack-arrays, -fno-repack-arrays
2828
Richard Smith081ad4d2017-01-24 19:39:46 +00002829.. option:: -fsecond-underscore, -fno-second-underscore
2830
Richard Smith081ad4d2017-01-24 19:39:46 +00002831.. option:: -fsign-zero, -fno-sign-zero
2832
Richard Smith081ad4d2017-01-24 19:39:46 +00002833.. option:: -fstack-arrays, -fno-stack-arrays
2834
Richard Smith081ad4d2017-01-24 19:39:46 +00002835.. option:: -funderscoring, -fno-underscoring
2836
Richard Smith081ad4d2017-01-24 19:39:46 +00002837.. option:: -fwhole-file, -fno-whole-file
2838
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00002839.. option:: -imultilib <arg>
2840
Richard Smith081ad4d2017-01-24 19:39:46 +00002841.. option:: -nocpp
2842
Richard Smith081ad4d2017-01-24 19:39:46 +00002843.. option:: -static-libgfortran
2844
Richard Smithc5b2e002017-01-27 02:08:37 +00002845Linker flags
2846============
2847Flags that are passed on to the linker
2848
2849.. option:: -L<dir>, --library-directory <arg>, --library-directory=<arg>
2850
2851Add directory to library search path
2852
2853.. option:: -Mach
2854
2855.. option:: -T<script>
2856
2857Specify <script> as linker script
2858
Richard Smith78e23fd2017-04-13 22:39:49 +00002859.. option:: -Tbss<addr>
Richard Smithc5b2e002017-01-27 02:08:37 +00002860
2861Set starting address of BSS to <addr>
2862
Richard Smith78e23fd2017-04-13 22:39:49 +00002863.. option:: -Tdata<addr>
Richard Smithc5b2e002017-01-27 02:08:37 +00002864
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00002865Set starting address of DATA to <addr>
Richard Smithc5b2e002017-01-27 02:08:37 +00002866
Richard Smith78e23fd2017-04-13 22:39:49 +00002867.. option:: -Ttext<addr>
Richard Smithc5b2e002017-01-27 02:08:37 +00002868
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00002869Set starting address of TEXT to <addr>
Richard Smithc5b2e002017-01-27 02:08:37 +00002870
2871.. option:: -Wl,<arg>,<arg2>...
2872
2873Pass the comma separated arguments in <arg> to the linker
2874
2875.. option:: -X
2876
2877.. option:: -Xlinker <arg>, --for-linker <arg>, --for-linker=<arg>
2878
2879Pass <arg> to the linker
2880
2881.. program:: clang1
2882.. option:: -Z
2883.. program:: clang
2884
2885.. option:: -e<arg>, --entry
2886
2887.. option:: -filelist <arg>
2888
2889.. option:: -l<arg>
2890
2891.. option:: -r
2892
2893.. option:: -rpath <arg>
2894
2895.. option:: -s
2896
2897.. option:: -t
2898
2899.. option:: -u<arg>, --force-link <arg>, --force-link=<arg>
2900
2901.. option:: -undef
2902
2903undef all system defines
2904
2905.. option:: -undefined<arg>, --no-undefined
2906
2907.. option:: -z <arg>
2908
2909Pass -z <arg> to the linker
2910