blob: fefce3391f06f4ee466074c68229433256b7dac6 [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
Richard Smith081ad4d2017-01-24 19:39:46 +000039.. option:: -Qunused-arguments
40
41Don't emit warning for unused driver arguments
42
Richard Smith081ad4d2017-01-24 19:39:46 +000043.. option:: -Wa,<arg>,<arg2>...
44
45Pass the comma separated arguments in <arg> to the assembler
46
Richard Smith081ad4d2017-01-24 19:39:46 +000047.. option:: -Wlarge-by-value-copy=<arg>
48
Richard Smith081ad4d2017-01-24 19:39:46 +000049.. option:: -Xarch\_<arg1> <arg2>
50
Richard Smith081ad4d2017-01-24 19:39:46 +000051.. option:: -Xcuda-fatbinary <arg>
52
53Pass <arg> to fatbinary invocation
54
Richard Smith081ad4d2017-01-24 19:39:46 +000055.. option:: -Xcuda-ptxas <arg>
56
57Pass <arg> to the ptxas assembler
58
Boris Kolpackovb150d242017-08-30 09:15:53 +000059.. option:: -Xopenmp-target <arg>
60
61Pass <arg> to the target offloading toolchain.
62
63.. program:: clang1
Jonas Hahnfelda180fc42018-02-22 17:10:28 +000064.. option:: -Xopenmp-target=<triple> <arg>
Boris Kolpackovb150d242017-08-30 09:15:53 +000065.. program:: clang
66
Jonas Hahnfelda180fc42018-02-22 17:10:28 +000067Pass <arg> to the target offloading toolchain identified by <triple>.
Boris Kolpackovb150d242017-08-30 09:15:53 +000068
Richard Smith081ad4d2017-01-24 19:39:46 +000069.. option:: -Z<arg>
70
Richard Smith081ad4d2017-01-24 19:39:46 +000071.. option:: -a<arg>, --profile-blocks
72
Richard Smith081ad4d2017-01-24 19:39:46 +000073.. option:: -all\_load
74
Richard Smith081ad4d2017-01-24 19:39:46 +000075.. option:: -allowable\_client <arg>
76
Richard Smith081ad4d2017-01-24 19:39:46 +000077.. option:: --analyze
78
79Run the static analyzer
80
Richard Smith081ad4d2017-01-24 19:39:46 +000081.. option:: --analyze-auto
82
Richard Smith081ad4d2017-01-24 19:39:46 +000083.. option:: --analyzer-no-default-checks
84
Richard Smith081ad4d2017-01-24 19:39:46 +000085.. option:: --analyzer-output<arg>
86
87Static analyzer report output format (html\|plist\|plist-multi-file\|plist-html\|text).
88
Richard Smith081ad4d2017-01-24 19:39:46 +000089.. option:: -ansi, --ansi
90
Richard Smith081ad4d2017-01-24 19:39:46 +000091.. option:: -arch <arg>
92
Richard Smithb2c82a62017-01-27 01:54:42 +000093.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +000094.. option:: -arch\_errors\_fatal
Richard Smithb2c82a62017-01-27 01:54:42 +000095.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +000096
Richard Smithb2c82a62017-01-27 01:54:42 +000097.. program:: clang2
Richard Smith081ad4d2017-01-24 19:39:46 +000098.. option:: -arch\_only <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +000099.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000100
Richard Smith081ad4d2017-01-24 19:39:46 +0000101.. option:: -arcmt-migrate-emit-errors
102
103Emit ARC errors even if the migrator can fix them
104
Richard Smith081ad4d2017-01-24 19:39:46 +0000105.. option:: -arcmt-migrate-report-output <arg>
106
107Output path for the plist report
108
Craig Topperd23254a2017-07-20 17:52:48 +0000109.. option:: --autocomplete=<arg>
110
Richard Smith081ad4d2017-01-24 19:39:46 +0000111.. option:: -bind\_at\_load
112
Richard Smith081ad4d2017-01-24 19:39:46 +0000113.. option:: -bundle
114
Richard Smithb2c82a62017-01-27 01:54:42 +0000115.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000116.. option:: -bundle\_loader <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000117.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000118
Craig Topper596527b2018-01-23 18:40:15 +0000119.. option:: -cfguard
120
121Emit tables required for Windows Control Flow Guard.
122
Richard Smith081ad4d2017-01-24 19:39:46 +0000123.. option:: -client\_name<arg>
124
Richard Smith081ad4d2017-01-24 19:39:46 +0000125.. option:: -compatibility\_version<arg>
126
Craig Topper287c8012018-01-03 18:29:12 +0000127.. option:: --config <arg>
128
129Specifies configuration file
130
Richard Smith081ad4d2017-01-24 19:39:46 +0000131.. option:: --constant-cfstrings
132
Richard Smith081ad4d2017-01-24 19:39:46 +0000133.. option:: -coverage, --coverage
134
Richard Smith081ad4d2017-01-24 19:39:46 +0000135.. option:: --cuda-compile-host-device
136
137Compile CUDA code for both host and device (default). Has no effect on non-CUDA compilations.
138
Richard Smith081ad4d2017-01-24 19:39:46 +0000139.. option:: --cuda-device-only
140
141Compile CUDA code for device only
142
Richard Smith081ad4d2017-01-24 19:39:46 +0000143.. option:: --cuda-gpu-arch=<arg>, --no-cuda-gpu-arch=<arg>
144
145CUDA GPU architecture (e.g. sm\_35). May be specified more than once.
146
Richard Smith081ad4d2017-01-24 19:39:46 +0000147.. option:: --cuda-host-only
148
149Compile CUDA code for host only. Has no effect on non-CUDA compilations.
150
Jonas Hahnfeld06039e82018-04-20 13:26:03 +0000151.. option:: --cuda-include-ptx=<arg>, --no-cuda-include-ptx=<arg>
152
153Include PTX for the follwing GPU architecture (e.g. sm\_35) or 'all'. May be specified more than once.
154
Richard Smith081ad4d2017-01-24 19:39:46 +0000155.. option:: --cuda-noopt-device-debug, --no-cuda-noopt-device-debug
156
157Enable device-side debug info generation. Disables ptxas optimizations.
158
Richard Smith081ad4d2017-01-24 19:39:46 +0000159.. option:: -current\_version<arg>
160
Richard Smith081ad4d2017-01-24 19:39:46 +0000161.. option:: -dead\_strip
162
Richard Smith081ad4d2017-01-24 19:39:46 +0000163.. option:: -dependency-dot <arg>
164
165Filename to write DOT-formatted header dependencies to
166
Richard Smith081ad4d2017-01-24 19:39:46 +0000167.. option:: -dependency-file <arg>
168
169Filename (or -) to write dependency output to
170
Richard Smith081ad4d2017-01-24 19:39:46 +0000171.. option:: -dumpmachine
172
Richard Smith081ad4d2017-01-24 19:39:46 +0000173.. option:: -dumpversion
174
Richard Smith081ad4d2017-01-24 19:39:46 +0000175.. option:: --dyld-prefix=<arg>, --dyld-prefix <arg>
176
Richard Smith081ad4d2017-01-24 19:39:46 +0000177.. option:: -dylib\_file <arg>
178
Richard Smith081ad4d2017-01-24 19:39:46 +0000179.. option:: -dylinker
180
Richard Smithb2c82a62017-01-27 01:54:42 +0000181.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000182.. option:: -dylinker\_install\_name<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000183.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000184
Richard Smith081ad4d2017-01-24 19:39:46 +0000185.. option:: -dynamic
186
Richard Smith081ad4d2017-01-24 19:39:46 +0000187.. option:: -dynamiclib
188
Richard Smith081ad4d2017-01-24 19:39:46 +0000189.. option:: -emit-ast
190
191Emit Clang AST files for source inputs
192
Richard Smith081ad4d2017-01-24 19:39:46 +0000193.. option:: -exported\_symbols\_list <arg>
194
Richard Smith081ad4d2017-01-24 19:39:46 +0000195.. option:: -faligned-new=<arg>
196
Richard Smith081ad4d2017-01-24 19:39:46 +0000197.. option:: -fcuda-approx-transcendentals, -fno-cuda-approx-transcendentals
198
199Use approximate transcendental functions
200
Richard Smith081ad4d2017-01-24 19:39:46 +0000201.. option:: -fcuda-flush-denormals-to-zero, -fno-cuda-flush-denormals-to-zero
202
203Flush denormal floating point values to zero in CUDA device mode.
204
Jonas Hahnfeld06039e82018-04-20 13:26:03 +0000205.. option:: -ffixed-r19
206
207Reserve the r19 register (Hexagon only)
208
Richard Smith081ad4d2017-01-24 19:39:46 +0000209.. option:: -fheinous-gnu-extensions
210
Richard Smith081ad4d2017-01-24 19:39:46 +0000211.. option:: -flat\_namespace
212
Richard Smith081ad4d2017-01-24 19:39:46 +0000213.. option:: -fopenmp-targets=<arg1>,<arg2>...
214
215Specify comma-separated list of triples OpenMP offloading targets to be supported
216
Richard Smith081ad4d2017-01-24 19:39:46 +0000217.. option:: -force\_cpusubtype\_ALL
218
Richard Smithb2c82a62017-01-27 01:54:42 +0000219.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000220.. option:: -force\_flat\_namespace
Richard Smithb2c82a62017-01-27 01:54:42 +0000221.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000222
Richard Smithb2c82a62017-01-27 01:54:42 +0000223.. program:: clang2
Richard Smith081ad4d2017-01-24 19:39:46 +0000224.. option:: -force\_load <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000225.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000226
Richard Smith081ad4d2017-01-24 19:39:46 +0000227.. option:: -framework <arg>
228
Richard Smith78e23fd2017-04-13 22:39:49 +0000229.. option:: -frtlib-add-rpath, -fno-rtlib-add-rpath
230
231Add -rpath with architecture-specific resource directory to the linker flags
232
Richard Smith081ad4d2017-01-24 19:39:46 +0000233.. option:: --gcc-toolchain=<arg>, -gcc-toolchain <arg>
234
235Use the gcc toolchain at the given directory
236
Richard Smith081ad4d2017-01-24 19:39:46 +0000237.. option:: -gcodeview
238
239Generate CodeView debug information
240
Richard Smith081ad4d2017-01-24 19:39:46 +0000241.. option:: -headerpad\_max\_install\_names<arg>
242
Richard Smith081ad4d2017-01-24 19:39:46 +0000243.. option:: -help, --help
244
245Display available options
246
Richard Smith081ad4d2017-01-24 19:39:46 +0000247.. option:: --help-hidden
248
Jonas Hahnfeld06039e82018-04-20 13:26:03 +0000249Display help for hidden options
250
Richard Smith081ad4d2017-01-24 19:39:46 +0000251.. option:: -image\_base <arg>
252
Richard Smith081ad4d2017-01-24 19:39:46 +0000253.. option:: -index-header-map
254
255Make the next included directory (-I or -F) an indexer header map
256
Richard Smith081ad4d2017-01-24 19:39:46 +0000257.. option:: -init <arg>
258
Richard Smith081ad4d2017-01-24 19:39:46 +0000259.. option:: -install\_name <arg>
260
Richard Smith081ad4d2017-01-24 19:39:46 +0000261.. option:: -keep\_private\_externs
262
Richard Smith081ad4d2017-01-24 19:39:46 +0000263.. option:: -lazy\_framework <arg>
264
Richard Smithb2c82a62017-01-27 01:54:42 +0000265.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000266.. option:: -lazy\_library <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000267.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000268
Richard Smith081ad4d2017-01-24 19:39:46 +0000269.. option:: -mbig-endian, -EB
270
Richard Smith081ad4d2017-01-24 19:39:46 +0000271.. option:: --migrate
272
273Run the migrator
274
Richard Smith78e23fd2017-04-13 22:39:49 +0000275.. option:: -mios-simulator-version-min=<arg>, -miphonesimulator-version-min=<arg>
276
Richard Smith081ad4d2017-01-24 19:39:46 +0000277.. option:: -mlinker-version=<arg>
278
Richard Smith081ad4d2017-01-24 19:39:46 +0000279.. option:: -mlittle-endian, -EL
280
Richard Smith081ad4d2017-01-24 19:39:46 +0000281.. option:: -mllvm <arg>
282
283Additional arguments to forward to LLVM's option processing
284
Richard Smith081ad4d2017-01-24 19:39:46 +0000285.. option:: -module-dependency-dir <arg>
286
287Directory to dump module dependencies to
288
Richard Smith78e23fd2017-04-13 22:39:49 +0000289.. option:: -mtvos-simulator-version-min=<arg>, -mappletvsimulator-version-min=<arg>
290
Richard Smith081ad4d2017-01-24 19:39:46 +0000291.. option:: -multi\_module
292
Richard Smith081ad4d2017-01-24 19:39:46 +0000293.. option:: -multiply\_defined <arg>
294
Richard Smithb2c82a62017-01-27 01:54:42 +0000295.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000296.. option:: -multiply\_defined\_unused <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000297.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000298
Richard Smith78e23fd2017-04-13 22:39:49 +0000299.. option:: -mwatchos-simulator-version-min=<arg>, -mwatchsimulator-version-min=<arg>
300
Richard Smith081ad4d2017-01-24 19:39:46 +0000301.. option:: --no-cuda-version-check
302
303Don't error out if the detected version of the CUDA install is too low for the requested CUDA gpu architecture.
304
Richard Smith081ad4d2017-01-24 19:39:46 +0000305.. option:: -no-integrated-cpp, --no-integrated-cpp
306
Richard Smith081ad4d2017-01-24 19:39:46 +0000307.. option:: -no\_dead\_strip\_inits\_and\_terms
308
Richard Smith081ad4d2017-01-24 19:39:46 +0000309.. option:: -nobuiltininc
310
311Disable builtin #include directories
312
Richard Smith081ad4d2017-01-24 19:39:46 +0000313.. option:: -nocudainc
314
Richard Smith081ad4d2017-01-24 19:39:46 +0000315.. option:: -nocudalib
316
Richard Smith081ad4d2017-01-24 19:39:46 +0000317.. option:: -nodefaultlibs
318
Richard Smith081ad4d2017-01-24 19:39:46 +0000319.. option:: -nofixprebinding
320
Richard Smith081ad4d2017-01-24 19:39:46 +0000321.. option:: -nolibc
322
Richard Smith081ad4d2017-01-24 19:39:46 +0000323.. option:: -nomultidefs
324
Craig Topperd23254a2017-07-20 17:52:48 +0000325.. option:: -nopie, -no-pie
Richard Smith081ad4d2017-01-24 19:39:46 +0000326
Richard Smith081ad4d2017-01-24 19:39:46 +0000327.. option:: -noprebind
328
Richard Smith081ad4d2017-01-24 19:39:46 +0000329.. option:: -noseglinkedit
330
Richard Smith081ad4d2017-01-24 19:39:46 +0000331.. option:: -nostartfiles
332
Richard Smith081ad4d2017-01-24 19:39:46 +0000333.. option:: -nostdinc, --no-standard-includes
334
Richard Smithb2c82a62017-01-27 01:54:42 +0000335.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000336.. option:: -nostdinc++
Richard Smithb2c82a62017-01-27 01:54:42 +0000337.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000338
339Disable standard #include directories for the C++ standard library
340
Richard Smith081ad4d2017-01-24 19:39:46 +0000341.. option:: -nostdlib, --no-standard-libraries
342
Boris Kolpackovb150d242017-08-30 09:15:53 +0000343.. program:: clang1
344.. option:: -nostdlib++
345.. program:: clang
346
Richard Smith081ad4d2017-01-24 19:39:46 +0000347.. option:: -nostdlibinc
348
Richard Smith081ad4d2017-01-24 19:39:46 +0000349.. option:: -o<file>, --output <arg>, --output=<arg>
350
351Write output to <file>
352
Richard Smith081ad4d2017-01-24 19:39:46 +0000353.. option:: -objcmt-atomic-property
354
355Make migration to 'atomic' properties
356
Richard Smith081ad4d2017-01-24 19:39:46 +0000357.. option:: -objcmt-migrate-all
358
359Enable migration to modern ObjC
360
Richard Smith081ad4d2017-01-24 19:39:46 +0000361.. option:: -objcmt-migrate-annotation
362
363Enable migration to property and method annotations
364
Richard Smith081ad4d2017-01-24 19:39:46 +0000365.. option:: -objcmt-migrate-designated-init
366
367Enable migration to infer NS\_DESIGNATED\_INITIALIZER for initializer methods
368
Richard Smith081ad4d2017-01-24 19:39:46 +0000369.. option:: -objcmt-migrate-instancetype
370
371Enable migration to infer instancetype for method result type
372
Richard Smith081ad4d2017-01-24 19:39:46 +0000373.. option:: -objcmt-migrate-literals
374
375Enable migration to modern ObjC literals
376
Richard Smith081ad4d2017-01-24 19:39:46 +0000377.. option:: -objcmt-migrate-ns-macros
378
379Enable migration to NS\_ENUM/NS\_OPTIONS macros
380
Richard Smith081ad4d2017-01-24 19:39:46 +0000381.. option:: -objcmt-migrate-property
382
383Enable migration to modern ObjC property
384
Richard Smith081ad4d2017-01-24 19:39:46 +0000385.. option:: -objcmt-migrate-property-dot-syntax
386
387Enable migration of setter/getter messages to property-dot syntax
388
Richard Smith081ad4d2017-01-24 19:39:46 +0000389.. option:: -objcmt-migrate-protocol-conformance
390
391Enable migration to add protocol conformance on classes
392
Richard Smith081ad4d2017-01-24 19:39:46 +0000393.. option:: -objcmt-migrate-readonly-property
394
395Enable migration to modern ObjC readonly property
396
Richard Smith081ad4d2017-01-24 19:39:46 +0000397.. option:: -objcmt-migrate-readwrite-property
398
399Enable migration to modern ObjC readwrite property
400
Richard Smith081ad4d2017-01-24 19:39:46 +0000401.. option:: -objcmt-migrate-subscripting
402
403Enable migration to modern ObjC subscripting
404
Richard Smith081ad4d2017-01-24 19:39:46 +0000405.. option:: -objcmt-ns-nonatomic-iosonly
406
407Enable migration to use NS\_NONATOMIC\_IOSONLY macro for setting property's 'atomic' attribute
408
Richard Smith081ad4d2017-01-24 19:39:46 +0000409.. option:: -objcmt-returns-innerpointer-property
410
411Enable migration to annotate property with NS\_RETURNS\_INNER\_POINTER
412
Richard Smith081ad4d2017-01-24 19:39:46 +0000413.. option:: -objcmt-whitelist-dir-path=<arg>, -objcmt-white-list-dir-path=<arg>
414
415Only modify files with a filename contained in the provided directory path
416
Richard Smith081ad4d2017-01-24 19:39:46 +0000417.. option:: -object
418
Richard Smith081ad4d2017-01-24 19:39:46 +0000419.. option:: -p, --profile
420
Richard Smith081ad4d2017-01-24 19:39:46 +0000421.. option:: -pagezero\_size<arg>
422
Richard Smith081ad4d2017-01-24 19:39:46 +0000423.. option:: -pg
424
425Enable mcount instrumentation
426
Richard Smith081ad4d2017-01-24 19:39:46 +0000427.. option:: -pie
428
Richard Smith081ad4d2017-01-24 19:39:46 +0000429.. option:: -pipe, --pipe
430
431Use pipes between commands, when possible
432
Richard Smith081ad4d2017-01-24 19:39:46 +0000433.. option:: -prebind
434
Richard Smithb2c82a62017-01-27 01:54:42 +0000435.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000436.. option:: -prebind\_all\_twolevel\_modules
Richard Smithb2c82a62017-01-27 01:54:42 +0000437.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000438
Richard Smith081ad4d2017-01-24 19:39:46 +0000439.. option:: -preload
440
Richard Smith081ad4d2017-01-24 19:39:46 +0000441.. option:: --print-diagnostic-categories
442
Richard Smith081ad4d2017-01-24 19:39:46 +0000443.. option:: -print-file-name=<file>, --print-file-name=<file>, --print-file-name <arg>
444
445Print the full library path of <file>
446
Richard Smith081ad4d2017-01-24 19:39:46 +0000447.. option:: -print-ivar-layout
448
449Enable Objective-C Ivar layout bitmap print trace
450
Richard Smith081ad4d2017-01-24 19:39:46 +0000451.. option:: -print-libgcc-file-name, --print-libgcc-file-name
452
453Print the library path for the currently used compiler runtime library ("libgcc.a" or "libclang\_rt.builtins.\*.a")
454
Richard Smith081ad4d2017-01-24 19:39:46 +0000455.. option:: -print-multi-directory, --print-multi-directory
456
Richard Smith081ad4d2017-01-24 19:39:46 +0000457.. option:: -print-multi-lib, --print-multi-lib
458
Richard Smith081ad4d2017-01-24 19:39:46 +0000459.. option:: -print-prog-name=<name>, --print-prog-name=<name>, --print-prog-name <arg>
460
461Print the full program path of <name>
462
Richard Smith78e23fd2017-04-13 22:39:49 +0000463.. option:: -print-resource-dir, --print-resource-dir
464
465Print the resource directory pathname
466
Richard Smith081ad4d2017-01-24 19:39:46 +0000467.. option:: -print-search-dirs, --print-search-dirs
468
469Print the paths used for finding libraries and programs
470
Richard Smith081ad4d2017-01-24 19:39:46 +0000471.. option:: -private\_bundle
472
Richard Smith081ad4d2017-01-24 19:39:46 +0000473.. option:: -pthread, -no-pthread
474
475Support POSIX threads in generated code
476
Richard Smith081ad4d2017-01-24 19:39:46 +0000477.. option:: -pthreads
478
Richard Smith081ad4d2017-01-24 19:39:46 +0000479.. option:: -rdynamic
480
Richard Smith081ad4d2017-01-24 19:39:46 +0000481.. option:: -read\_only\_relocs <arg>
482
Richard Smith081ad4d2017-01-24 19:39:46 +0000483.. option:: -relocatable-pch, --relocatable-pch
484
485Whether to build a relocatable precompiled header
486
Richard Smith081ad4d2017-01-24 19:39:46 +0000487.. option:: -remap
488
Richard Smith081ad4d2017-01-24 19:39:46 +0000489.. option:: -rewrite-legacy-objc
490
491Rewrite Legacy Objective-C source to C++
492
Richard Smith081ad4d2017-01-24 19:39:46 +0000493.. option:: -rtlib=<arg>, --rtlib=<arg>, --rtlib <arg>
494
495Compiler runtime library to use
496
Richard Smith081ad4d2017-01-24 19:39:46 +0000497.. option:: -save-stats=<arg>, --save-stats=<arg>, -save-stats (equivalent to -save-stats=cwd), --save-stats (equivalent to -save-stats=cwd)
498
499Save llvm statistics.
500
Richard Smith081ad4d2017-01-24 19:39:46 +0000501.. option:: -save-temps=<arg>, --save-temps=<arg>, -save-temps (equivalent to -save-temps=cwd), --save-temps (equivalent to -save-temps=cwd)
502
503Save intermediate compilation results.
504
Richard Smith081ad4d2017-01-24 19:39:46 +0000505.. option:: -sectalign <arg1> <arg2> <arg3>
506
Richard Smith081ad4d2017-01-24 19:39:46 +0000507.. option:: -sectcreate <arg1> <arg2> <arg3>
508
Richard Smith081ad4d2017-01-24 19:39:46 +0000509.. option:: -sectobjectsymbols <arg1> <arg2>
510
Richard Smith081ad4d2017-01-24 19:39:46 +0000511.. option:: -sectorder <arg1> <arg2> <arg3>
512
Richard Smith081ad4d2017-01-24 19:39:46 +0000513.. option:: -seg1addr<arg>
514
Richard Smith081ad4d2017-01-24 19:39:46 +0000515.. option:: -seg\_addr\_table <arg>
516
Richard Smithb2c82a62017-01-27 01:54:42 +0000517.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000518.. option:: -seg\_addr\_table\_filename <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000519.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000520
Richard Smith081ad4d2017-01-24 19:39:46 +0000521.. option:: -segaddr <arg1> <arg2>
522
Richard Smith081ad4d2017-01-24 19:39:46 +0000523.. option:: -segcreate <arg1> <arg2> <arg3>
524
Richard Smith081ad4d2017-01-24 19:39:46 +0000525.. option:: -seglinkedit
526
Richard Smith081ad4d2017-01-24 19:39:46 +0000527.. option:: -segprot <arg1> <arg2> <arg3>
528
Richard Smith081ad4d2017-01-24 19:39:46 +0000529.. option:: -segs\_read\_<arg>
530
Richard Smithb2c82a62017-01-27 01:54:42 +0000531.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000532.. option:: -segs\_read\_only\_addr <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000533.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000534
Richard Smithb2c82a62017-01-27 01:54:42 +0000535.. program:: clang2
Richard Smith081ad4d2017-01-24 19:39:46 +0000536.. option:: -segs\_read\_write\_addr <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000537.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000538
Richard Smith081ad4d2017-01-24 19:39:46 +0000539.. option:: -serialize-diagnostics <arg>, --serialize-diagnostics <arg>
540
541Serialize compiler diagnostics to a file
542
Richard Smith081ad4d2017-01-24 19:39:46 +0000543.. option:: -shared, --shared
544
Richard Smith081ad4d2017-01-24 19:39:46 +0000545.. option:: -shared-libgcc
546
Craig Topper16418662017-11-20 18:07:43 +0000547.. option:: -shared-libsan, -shared-libasan
548
Richard Smith081ad4d2017-01-24 19:39:46 +0000549.. option:: -single\_module
550
Richard Smith081ad4d2017-01-24 19:39:46 +0000551.. option:: -specs=<arg>, --specs=<arg>
552
Richard Smith081ad4d2017-01-24 19:39:46 +0000553.. option:: -static, --static
554
Richard Smith081ad4d2017-01-24 19:39:46 +0000555.. option:: -static-libgcc
556
Craig Topper16418662017-11-20 18:07:43 +0000557.. option:: -static-libsan
558
Richard Smith081ad4d2017-01-24 19:39:46 +0000559.. option:: -static-libstdc++
560
Richard Smith081ad4d2017-01-24 19:39:46 +0000561.. option:: -std-default=<arg>
562
Richard Smith081ad4d2017-01-24 19:39:46 +0000563.. option:: -stdlib=<arg>, --stdlib=<arg>, --stdlib <arg>
564
565C++ standard library to use
566
Richard Smith081ad4d2017-01-24 19:39:46 +0000567.. option:: -sub\_library<arg>
568
Richard Smithb2c82a62017-01-27 01:54:42 +0000569.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000570.. option:: -sub\_umbrella<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000571.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000572
Richard Smith081ad4d2017-01-24 19:39:46 +0000573.. option:: --sysroot=<arg>, --sysroot <arg>
574
Richard Smith081ad4d2017-01-24 19:39:46 +0000575.. option:: --target-help
576
Richard Smith081ad4d2017-01-24 19:39:46 +0000577.. option:: --target=<arg>, -target <arg>
578
579Generate code for the given target
580
Richard Smith081ad4d2017-01-24 19:39:46 +0000581.. option:: -time
582
583Time individual commands
584
Richard Smith081ad4d2017-01-24 19:39:46 +0000585.. option:: -traditional, --traditional
586
Richard Smith081ad4d2017-01-24 19:39:46 +0000587.. option:: -traditional-cpp, --traditional-cpp
588
589Enable some traditional CPP emulation
590
Richard Smith081ad4d2017-01-24 19:39:46 +0000591.. option:: -twolevel\_namespace
592
Richard Smithb2c82a62017-01-27 01:54:42 +0000593.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000594.. option:: -twolevel\_namespace\_hints
Richard Smithb2c82a62017-01-27 01:54:42 +0000595.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000596
Richard Smith081ad4d2017-01-24 19:39:46 +0000597.. option:: -umbrella <arg>
598
Richard Smith081ad4d2017-01-24 19:39:46 +0000599.. option:: -unexported\_symbols\_list <arg>
600
Richard Smith081ad4d2017-01-24 19:39:46 +0000601.. option:: -v, --verbose
602
603Show commands to run and use verbose output
604
Richard Smith081ad4d2017-01-24 19:39:46 +0000605.. option:: --verify-debug-info
606
607Verify the binary representation of debug output
608
Richard Smith081ad4d2017-01-24 19:39:46 +0000609.. option:: --version
610
Craig Topper16418662017-11-20 18:07:43 +0000611Print version information
612
Richard Smith081ad4d2017-01-24 19:39:46 +0000613.. option:: -w, --no-warnings
614
615Suppress all warnings
616
Richard Smith081ad4d2017-01-24 19:39:46 +0000617.. option:: -weak-l<arg>
618
Richard Smith081ad4d2017-01-24 19:39:46 +0000619.. option:: -weak\_framework <arg>
620
Richard Smithb2c82a62017-01-27 01:54:42 +0000621.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000622.. option:: -weak\_library <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000623.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000624
Richard Smithb2c82a62017-01-27 01:54:42 +0000625.. program:: clang2
Richard Smith081ad4d2017-01-24 19:39:46 +0000626.. option:: -weak\_reference\_mismatches <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000627.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000628
Richard Smith081ad4d2017-01-24 19:39:46 +0000629.. option:: -whatsloaded
630
Richard Smith081ad4d2017-01-24 19:39:46 +0000631.. option:: -whyload
632
Richard Smith081ad4d2017-01-24 19:39:46 +0000633.. option:: -working-directory<arg>, -working-directory=<arg>
634
635Resolve file paths relative to the specified directory
636
Richard Smith081ad4d2017-01-24 19:39:46 +0000637.. option:: -x<language>, --language <arg>, --language=<arg>
638
639Treat subsequent input files as having type <language>
640
Richard Smith081ad4d2017-01-24 19:39:46 +0000641.. option:: -y<arg>
642
643Actions
644=======
645The action to perform on the input.
646
Richard Smith081ad4d2017-01-24 19:39:46 +0000647.. option:: -E, --preprocess
648
649Only run the preprocessor
650
Richard Smith081ad4d2017-01-24 19:39:46 +0000651.. option:: -S, --assemble
652
653Only run preprocess and compilation steps
654
Richard Smithc5b2e002017-01-27 02:08:37 +0000655.. option:: -c, --compile
656
657Only run preprocess, compile, and assemble steps
658
Richard Smith081ad4d2017-01-24 19:39:46 +0000659.. option:: -emit-llvm
660
661Use the LLVM representation for assembler and object files
662
Richard Smith081ad4d2017-01-24 19:39:46 +0000663.. option:: -fsyntax-only
664
Richard Smith081ad4d2017-01-24 19:39:46 +0000665.. option:: -module-file-info
666
667Provide information about a particular module file
668
Richard Smith081ad4d2017-01-24 19:39:46 +0000669.. option:: --precompile
670
671Only precompile the input
672
Richard Smith081ad4d2017-01-24 19:39:46 +0000673.. option:: -rewrite-objc
674
675Rewrite Objective-C source to C++
676
Richard Smith081ad4d2017-01-24 19:39:46 +0000677.. option:: -verify-pch
678
679Load and verify that a pre-compiled header file is not stale
680
681Compilation flags
682=================
683
684Flags controlling the behavior of Clang during compilation. These flags have
685no effect during actions that do not perform compilation.
686
Richard Smithc5b2e002017-01-27 02:08:37 +0000687.. option:: -Xassembler <arg>
Richard Smith081ad4d2017-01-24 19:39:46 +0000688
Richard Smithc5b2e002017-01-27 02:08:37 +0000689Pass <arg> to the assembler
Richard Smith081ad4d2017-01-24 19:39:46 +0000690
Richard Smith081ad4d2017-01-24 19:39:46 +0000691.. option:: -Xclang <arg>
692
693Pass <arg> to the clang compiler
694
Boris Kolpackovb150d242017-08-30 09:15:53 +0000695.. option:: -fclang-abi-compat=<version>
696
697Attempt to match the ABI of Clang <version>
698
Richard Smith081ad4d2017-01-24 19:39:46 +0000699.. option:: -fcomment-block-commands=<arg>,<arg2>...
700
701Treat each comma separated argument in <arg> as a documentation comment block command
702
Richard Smith081ad4d2017-01-24 19:39:46 +0000703.. option:: -fdeclspec, -fno-declspec
704
705Allow \_\_declspec as a keyword
706
Richard Smith081ad4d2017-01-24 19:39:46 +0000707.. option:: -fdepfile-entry=<arg>
708
Richard Smith081ad4d2017-01-24 19:39:46 +0000709.. option:: -fdiagnostics-fixit-info, -fno-diagnostics-fixit-info
710
Richard Smith081ad4d2017-01-24 19:39:46 +0000711.. option:: -fdiagnostics-format=<arg>
712
Richard Smith081ad4d2017-01-24 19:39:46 +0000713.. option:: -fdiagnostics-parseable-fixits
714
715Print fix-its in machine parseable form
716
Richard Smith081ad4d2017-01-24 19:39:46 +0000717.. option:: -fdiagnostics-print-source-range-info
718
719Print source range spans in numeric form
720
Richard Smith081ad4d2017-01-24 19:39:46 +0000721.. option:: -fdiagnostics-show-category=<arg>
722
Jonas Hahnfelda180fc42018-02-22 17:10:28 +0000723.. option:: -fdiscard-value-names, -fno-discard-value-names
724
725Discard value names in LLVM IR
726
727.. option:: -fexperimental-isel, -fno-experimental-isel
728
729Enables the experimental global instruction selector
730
Richard Smith081ad4d2017-01-24 19:39:46 +0000731.. option:: -fexperimental-new-pass-manager, -fno-experimental-new-pass-manager
732
733Enables an experimental new pass manager in LLVM.
734
Craig Topper16418662017-11-20 18:07:43 +0000735.. option:: -ffine-grained-bitfield-accesses, -fno-fine-grained-bitfield-accesses
736
737Use separate accesses for bitfields with legal widths and alignments.
738
Richard Smith081ad4d2017-01-24 19:39:46 +0000739.. option:: -finline-functions, -fno-inline-functions
740
741Inline suitable functions
742
Richard Smith081ad4d2017-01-24 19:39:46 +0000743.. option:: -finline-hint-functions
744
745Inline functions which are (explicitly or implicitly) marked inline
746
Richard Smith081ad4d2017-01-24 19:39:46 +0000747.. option:: -fno-crash-diagnostics
748
Richard Smith78e23fd2017-04-13 22:39:49 +0000749Disable auto-generation of preprocessed source files and a script for reproduction during a clang crash
750
Richard Smith081ad4d2017-01-24 19:39:46 +0000751.. option:: -fno-sanitize-blacklist
752
753Don't use blacklist file for sanitizers
754
Richard Smith081ad4d2017-01-24 19:39:46 +0000755.. option:: -fparse-all-comments
756
Richard Smith081ad4d2017-01-24 19:39:46 +0000757.. option:: -fsanitize-address-field-padding=<arg>
758
759Level of field padding for AddressSanitizer
760
Craig Topperd23254a2017-07-20 17:52:48 +0000761.. option:: -fsanitize-address-globals-dead-stripping
762
763Enable linker dead stripping of globals in AddressSanitizer
764
Jonas Hahnfelda180fc42018-02-22 17:10:28 +0000765.. option:: -fsanitize-address-poison-class-member-array-new-cookie, -fno-sanitize-address-poison-class-member-array-new-cookie
766
767Enable poisoning array cookies when using class member operator new\[\] in AddressSanitizer
768
Richard Smith081ad4d2017-01-24 19:39:46 +0000769.. option:: -fsanitize-address-use-after-scope, -fno-sanitize-address-use-after-scope
770
771Enable use-after-scope detection in AddressSanitizer
772
Richard Smith081ad4d2017-01-24 19:39:46 +0000773.. option:: -fsanitize-blacklist=<arg>
774
775Path to blacklist file for sanitizers
776
Richard Smith081ad4d2017-01-24 19:39:46 +0000777.. option:: -fsanitize-cfi-cross-dso, -fno-sanitize-cfi-cross-dso
778
779Enable control flow integrity (CFI) checks for cross-DSO calls.
780
Vlad Tsyrklevich634c6012017-10-31 22:39:44 +0000781.. option:: -fsanitize-cfi-icall-generalize-pointers
782
Craig Topper16418662017-11-20 18:07:43 +0000783Generalize pointers in CFI indirect call type signature checks
Vlad Tsyrklevich634c6012017-10-31 22:39:44 +0000784
Richard Smith081ad4d2017-01-24 19:39:46 +0000785.. option:: -fsanitize-coverage=<arg1>,<arg2>..., -fno-sanitize-coverage=<arg1>,<arg2>...
786
787Specify the type of coverage instrumentation for Sanitizers
788
Richard Smith081ad4d2017-01-24 19:39:46 +0000789.. option:: -fsanitize-link-c++-runtime
790
Richard Smith081ad4d2017-01-24 19:39:46 +0000791.. option:: -fsanitize-memory-track-origins, -fno-sanitize-memory-track-origins
792
793Enable origins tracking in MemorySanitizer
794
Richard Smithb2c82a62017-01-27 01:54:42 +0000795.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000796.. option:: -fsanitize-memory-track-origins=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000797.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000798
799Enable origins tracking in MemorySanitizer
800
Craig Topper16418662017-11-20 18:07:43 +0000801.. option:: -fsanitize-memory-use-after-dtor, -fno-sanitize-memory-use-after-dtor
Richard Smith081ad4d2017-01-24 19:39:46 +0000802
803Enable use-after-destroy detection in MemorySanitizer
804
Boris Kolpackovb150d242017-08-30 09:15:53 +0000805.. option:: -fsanitize-minimal-runtime, -fno-sanitize-minimal-runtime
806
Richard Smith081ad4d2017-01-24 19:39:46 +0000807.. option:: -fsanitize-recover, -fno-sanitize-recover
808
Richard Smithb2c82a62017-01-27 01:54:42 +0000809.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000810.. option:: -fsanitize-recover=<arg1>,<arg2>..., -fno-sanitize-recover=<arg1>,<arg2>...
Richard Smithb2c82a62017-01-27 01:54:42 +0000811.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000812
813Enable recovery for specified sanitizers
814
Richard Smith081ad4d2017-01-24 19:39:46 +0000815.. option:: -fsanitize-stats, -fno-sanitize-stats
816
817Enable sanitizer statistics gathering.
818
Richard Smith081ad4d2017-01-24 19:39:46 +0000819.. option:: -fsanitize-thread-atomics, -fno-sanitize-thread-atomics
820
821Enable atomic operations instrumentation in ThreadSanitizer (default)
822
Richard Smith081ad4d2017-01-24 19:39:46 +0000823.. option:: -fsanitize-thread-func-entry-exit, -fno-sanitize-thread-func-entry-exit
824
825Enable function entry/exit instrumentation in ThreadSanitizer (default)
826
Richard Smith081ad4d2017-01-24 19:39:46 +0000827.. option:: -fsanitize-thread-memory-access, -fno-sanitize-thread-memory-access
828
829Enable memory access instrumentation in ThreadSanitizer (default)
830
Richard Smith081ad4d2017-01-24 19:39:46 +0000831.. option:: -fsanitize-trap=<arg1>,<arg2>..., -fno-sanitize-trap=<arg1>,<arg2>...
832
833Enable trapping for specified sanitizers
834
Richard Smith081ad4d2017-01-24 19:39:46 +0000835.. option:: -fsanitize-undefined-strip-path-components=<number>
836
837Strip (or keep only, if negative) a given number of path components when emitting check metadata.
838
Richard Smith081ad4d2017-01-24 19:39:46 +0000839.. option:: -fsanitize-undefined-trap-on-error, -fno-sanitize-undefined-trap-on-error
840
Richard Smith081ad4d2017-01-24 19:39:46 +0000841.. option:: -fsanitize=<check>,<arg2>..., -fno-sanitize=<arg1>,<arg2>...
842
843Turn on runtime checks for various forms of undefined or suspicious behavior. See user manual for available checks
844
Richard Smith081ad4d2017-01-24 19:39:46 +0000845.. option:: --param <arg>, --param=<arg>
846
Richard Smith081ad4d2017-01-24 19:39:46 +0000847.. option:: -std=<arg>, --std=<arg>, --std <arg>
848
849Language standard to compile for
850
Richard Smithc5b2e002017-01-27 02:08:37 +0000851Preprocessor flags
852~~~~~~~~~~~~~~~~~~
853
854Flags controlling the behavior of the Clang preprocessor.
855
856.. option:: -C, --comments
857
858Include comments in preprocessed output
859
860.. option:: -CC, --comments-in-macros
861
862Include comments from within macros in preprocessed output
863
864.. option:: -D<macro>=<value>, --define-macro <arg>, --define-macro=<arg>
865
866Define <macro> to <value> (or 1 if <value> omitted)
867
868.. option:: -H, --trace-includes
869
870Show header includes and nesting depth
871
872.. option:: -P, --no-line-commands
873
874Disable linemarker output in -E mode
875
876.. option:: -U<macro>, --undefine-macro <arg>, --undefine-macro=<arg>
877
878Undefine macro <macro>
879
880.. option:: -Wp,<arg>,<arg2>...
881
882Pass the comma separated arguments in <arg> to the preprocessor
883
884.. option:: -Xpreprocessor <arg>
885
886Pass <arg> to the preprocessor
887
Richard Smith081ad4d2017-01-24 19:39:46 +0000888Include path management
Richard Smithc5b2e002017-01-27 02:08:37 +0000889-----------------------
Richard Smith081ad4d2017-01-24 19:39:46 +0000890
891Flags controlling how ``#include``\s are resolved to files.
892
Richard Smithc5b2e002017-01-27 02:08:37 +0000893.. option:: -I<dir>, --include-directory <arg>, --include-directory=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +0000894
895Add directory to include search path
896
Richard Smith081ad4d2017-01-24 19:39:46 +0000897.. option:: -I-, --include-barrier
898
Richard Smithc5b2e002017-01-27 02:08:37 +0000899Restrict all prior -I flags to double-quoted inclusion and remove current directory from include path
900
Jonas Hahnfelda180fc42018-02-22 17:10:28 +0000901.. option:: --cuda-path-ignore-env
902
903Ignore environment variables to detect CUDA installation
904
Richard Smith081ad4d2017-01-24 19:39:46 +0000905.. option:: --cuda-path=<arg>
906
907CUDA installation path
908
Richard Smith081ad4d2017-01-24 19:39:46 +0000909.. option:: -cxx-isystem<directory>
910
911Add directory to the C++ SYSTEM include search path
912
Richard Smith081ad4d2017-01-24 19:39:46 +0000913.. option:: -fbuild-session-file=<file>
914
915Use the last modification time of <file> as the build session timestamp
916
Richard Smith081ad4d2017-01-24 19:39:46 +0000917.. option:: -fbuild-session-timestamp=<time since Epoch in seconds>
918
919Time when the current build session started
920
Boris Kolpackovb150d242017-08-30 09:15:53 +0000921.. option:: -fmodule-file=\[<name>=\]<file>
922
923Specify the mapping of module name to precompiled module file, or load a module file if name is omitted.
924
Richard Smith081ad4d2017-01-24 19:39:46 +0000925.. option:: -fmodules-cache-path=<directory>
926
927Specify the module cache path
928
Richard Smith081ad4d2017-01-24 19:39:46 +0000929.. option:: -fmodules-disable-diagnostic-validation
930
931Disable validation of the diagnostic options when loading the module
932
Richard Smith081ad4d2017-01-24 19:39:46 +0000933.. option:: -fmodules-prune-after=<seconds>
934
935Specify the interval (in seconds) after which a module file will be considered unused
936
Richard Smith081ad4d2017-01-24 19:39:46 +0000937.. option:: -fmodules-prune-interval=<seconds>
938
939Specify the interval (in seconds) between attempts to prune the module cache
940
Richard Smith081ad4d2017-01-24 19:39:46 +0000941.. option:: -fmodules-user-build-path <directory>
942
943Specify the module user build path
944
Richard Smith081ad4d2017-01-24 19:39:46 +0000945.. option:: -fmodules-validate-once-per-build-session
946
947Don't verify input files for the modules if the module has been successfully validated or loaded during this build session
948
Jonas Hahnfeld06039e82018-04-20 13:26:03 +0000949.. option:: -fmodules-validate-system-headers, -fno-modules-validate-system-headers
Richard Smith081ad4d2017-01-24 19:39:46 +0000950
951Validate the system headers that a module depends on when loading the module
952
Richard Smith081ad4d2017-01-24 19:39:46 +0000953.. option:: -fprebuilt-module-path=<directory>
954
955Specify the prebuilt module path
956
Richard Smith081ad4d2017-01-24 19:39:46 +0000957.. option:: -idirafter<arg>, --include-directory-after <arg>, --include-directory-after=<arg>
958
959Add directory to AFTER include search path
960
Richard Smith081ad4d2017-01-24 19:39:46 +0000961.. option:: -iframework<arg>
962
963Add directory to SYSTEM framework search path
964
Richard Smith78e23fd2017-04-13 22:39:49 +0000965.. option:: -iframeworkwithsysroot<directory>
966
967Add directory to SYSTEM framework search path, absolute paths are relative to -isysroot
968
Richard Smith081ad4d2017-01-24 19:39:46 +0000969.. option:: -imacros<file>, --imacros<file>, --imacros=<arg>
970
971Include macros from file before parsing
972
Richard Smith081ad4d2017-01-24 19:39:46 +0000973.. option:: -include<file>, --include<file>, --include=<arg>
974
975Include file before parsing
976
Richard Smith081ad4d2017-01-24 19:39:46 +0000977.. option:: -include-pch <file>
978
979Include precompiled header file
980
Richard Smith081ad4d2017-01-24 19:39:46 +0000981.. option:: -iprefix<dir>, --include-prefix <arg>, --include-prefix=<arg>
982
983Set the -iwithprefix/-iwithprefixbefore prefix
984
Richard Smith081ad4d2017-01-24 19:39:46 +0000985.. option:: -iquote<directory>
986
987Add directory to QUOTE include search path
988
Richard Smith081ad4d2017-01-24 19:39:46 +0000989.. option:: -isysroot<dir>
990
991Set the system root directory (usually /)
992
Richard Smith081ad4d2017-01-24 19:39:46 +0000993.. option:: -isystem<directory>
994
995Add directory to SYSTEM include search path
996
Richard Smith081ad4d2017-01-24 19:39:46 +0000997.. option:: -isystem-after<directory>
998
999Add directory to end of the SYSTEM include search path
1000
Richard Smith081ad4d2017-01-24 19:39:46 +00001001.. option:: -ivfsoverlay<arg>
1002
1003Overlay the virtual filesystem described by file over the real file system
1004
Richard Smith081ad4d2017-01-24 19:39:46 +00001005.. option:: -iwithprefix<dir>, --include-with-prefix <arg>, --include-with-prefix-after <arg>, --include-with-prefix-after=<arg>, --include-with-prefix=<arg>
1006
1007Set directory to SYSTEM include search path with prefix
1008
Richard Smith081ad4d2017-01-24 19:39:46 +00001009.. option:: -iwithprefixbefore<dir>, --include-with-prefix-before <arg>, --include-with-prefix-before=<arg>
1010
1011Set directory to include search path with prefix
1012
Richard Smith081ad4d2017-01-24 19:39:46 +00001013.. option:: -iwithsysroot<directory>
1014
1015Add directory to SYSTEM include search path, absolute paths are relative to -isysroot
1016
Richard Smith081ad4d2017-01-24 19:39:46 +00001017.. option:: --ptxas-path=<arg>
1018
1019Path to ptxas (used for compiling CUDA code)
1020
Richard Smith081ad4d2017-01-24 19:39:46 +00001021.. option:: --system-header-prefix=<prefix>, --no-system-header-prefix=<prefix>, --system-header-prefix <arg>
1022
1023Treat all #include paths starting with <prefix> as including a system header.
1024
1025Dependency file generation
Richard Smithc5b2e002017-01-27 02:08:37 +00001026--------------------------
Richard Smith081ad4d2017-01-24 19:39:46 +00001027
1028Flags controlling generation of a dependency file for ``make``-like build
1029systems.
1030
Richard Smith081ad4d2017-01-24 19:39:46 +00001031.. option:: -M, --dependencies
1032
1033Like -MD, but also implies -E and writes to stdout by default
1034
Richard Smith081ad4d2017-01-24 19:39:46 +00001035.. option:: -MD, --write-dependencies
1036
1037Write a depfile containing user and system headers
1038
Richard Smith081ad4d2017-01-24 19:39:46 +00001039.. option:: -MF<file>
1040
1041Write depfile output from -MMD, -MD, -MM, or -M to <file>
1042
Richard Smith081ad4d2017-01-24 19:39:46 +00001043.. option:: -MG, --print-missing-file-dependencies
1044
1045Add missing headers to depfile
1046
Richard Smith081ad4d2017-01-24 19:39:46 +00001047.. option:: -MJ<arg>
1048
1049Write a compilation database entry per input
1050
Richard Smith081ad4d2017-01-24 19:39:46 +00001051.. option:: -MM, --user-dependencies
1052
1053Like -MMD, but also implies -E and writes to stdout by default
1054
Richard Smith081ad4d2017-01-24 19:39:46 +00001055.. option:: -MMD, --write-user-dependencies
1056
1057Write a depfile containing user headers
1058
Richard Smith081ad4d2017-01-24 19:39:46 +00001059.. option:: -MP
1060
1061Create phony target for each dependency (other than main file)
1062
Richard Smith081ad4d2017-01-24 19:39:46 +00001063.. option:: -MQ<arg>
1064
1065Specify name of main file output to quote in depfile
1066
Richard Smith081ad4d2017-01-24 19:39:46 +00001067.. option:: -MT<arg>
1068
1069Specify name of main file output in depfile
1070
Richard Smith081ad4d2017-01-24 19:39:46 +00001071.. option:: -MV
1072
1073Use NMake/Jom format for the depfile
1074
1075Dumping preprocessor state
Richard Smithc5b2e002017-01-27 02:08:37 +00001076--------------------------
Richard Smith081ad4d2017-01-24 19:39:46 +00001077
1078Flags allowing the state of the preprocessor to be dumped in various ways.
1079
Richard Smith081ad4d2017-01-24 19:39:46 +00001080.. option:: -d
1081
Richard Smithb2c82a62017-01-27 01:54:42 +00001082.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001083.. option:: -d<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001084.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001085
Richard Smith081ad4d2017-01-24 19:39:46 +00001086.. option:: -dA
1087
Richard Smith081ad4d2017-01-24 19:39:46 +00001088.. option:: -dD
1089
1090Print macro definitions in -E mode in addition to normal output
1091
Richard Smith081ad4d2017-01-24 19:39:46 +00001092.. option:: -dI
1093
1094Print include directives in -E mode in addition to normal output
1095
Richard Smith081ad4d2017-01-24 19:39:46 +00001096.. option:: -dM
1097
1098Print macro definitions in -E mode instead of normal output
1099
1100Diagnostic flags
1101~~~~~~~~~~~~~~~~
1102
1103Flags controlling which warnings, errors, and remarks Clang will generate.
1104See the :doc:`full list of warning and remark flags <DiagnosticsReference>`.
1105
Richard Smith081ad4d2017-01-24 19:39:46 +00001106.. option:: -R<remark>
1107
1108Enable the specified remark
1109
Richard Smith081ad4d2017-01-24 19:39:46 +00001110.. option:: -Rpass-analysis=<arg>
1111
1112Report transformation analysis from optimization passes whose name matches the given POSIX regular expression
1113
Richard Smith081ad4d2017-01-24 19:39:46 +00001114.. option:: -Rpass-missed=<arg>
1115
1116Report missed transformations by optimization passes whose name matches the given POSIX regular expression
1117
Richard Smith081ad4d2017-01-24 19:39:46 +00001118.. option:: -Rpass=<arg>
1119
1120Report transformations performed by optimization passes whose name matches the given POSIX regular expression
1121
Richard Smith081ad4d2017-01-24 19:39:46 +00001122.. option:: -W<warning>, --extra-warnings, --warn-<arg>, --warn-=<arg>
1123
1124Enable the specified warning
1125
Richard Smith081ad4d2017-01-24 19:39:46 +00001126.. option:: -Wdeprecated, -Wno-deprecated
1127
Richard Smithc5b2e002017-01-27 02:08:37 +00001128Enable warnings for deprecated constructs and define \_\_DEPRECATED
Richard Smith081ad4d2017-01-24 19:39:46 +00001129
Richard Smith081ad4d2017-01-24 19:39:46 +00001130.. option:: -Wnonportable-cfstrings<arg>, -Wno-nonportable-cfstrings<arg>
1131
Richard Smith081ad4d2017-01-24 19:39:46 +00001132Target-independent compilation options
1133~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Richard Smith081ad4d2017-01-24 19:39:46 +00001134.. option:: -Wframe-larger-than=<arg>
1135
Richard Smith081ad4d2017-01-24 19:39:46 +00001136.. option:: -fPIC, -fno-PIC
1137
Richard Smith081ad4d2017-01-24 19:39:46 +00001138.. option:: -fPIE, -fno-PIE
1139
Richard Smith081ad4d2017-01-24 19:39:46 +00001140.. option:: -faccess-control, -fno-access-control
1141
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00001142.. option:: -falign-functions, -fno-align-functions
1143
1144.. program:: clang1
1145.. option:: -falign-functions=<arg>
1146.. program:: clang
1147
Richard Smithb2c82a62017-01-27 01:54:42 +00001148.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001149.. option:: -faligned-allocation, -faligned-new, -fno-aligned-allocation
Richard Smithb2c82a62017-01-27 01:54:42 +00001150.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001151
1152Enable C++17 aligned allocation functions
1153
Craig Topperd23254a2017-07-20 17:52:48 +00001154.. option:: -fallow-editor-placeholders, -fno-allow-editor-placeholders
1155
1156Treat editor placeholders as valid source code
1157
Richard Smith081ad4d2017-01-24 19:39:46 +00001158.. option:: -fallow-unsupported
1159
Richard Smith78e23fd2017-04-13 22:39:49 +00001160.. option:: -faltivec, -fno-altivec
Richard Smith081ad4d2017-01-24 19:39:46 +00001161
Richard Smith081ad4d2017-01-24 19:39:46 +00001162.. option:: -fansi-escape-codes
1163
1164Use ANSI escape codes for diagnostics
1165
Richard Smith081ad4d2017-01-24 19:39:46 +00001166.. option:: -fapple-kext, -findirect-virtual-calls, -fterminated-vtables
1167
1168Use Apple's kernel extensions ABI
1169
Richard Smith081ad4d2017-01-24 19:39:46 +00001170.. option:: -fapple-pragma-pack, -fno-apple-pragma-pack
1171
1172Enable Apple gcc-compatible #pragma pack handling
1173
Richard Smith081ad4d2017-01-24 19:39:46 +00001174.. option:: -fapplication-extension, -fno-application-extension
1175
1176Restrict code to those available for App Extensions
1177
Richard Smith081ad4d2017-01-24 19:39:46 +00001178.. option:: -fasm, -fno-asm
1179
Richard Smith081ad4d2017-01-24 19:39:46 +00001180.. option:: -fasm-blocks, -fno-asm-blocks
1181
Richard Smith081ad4d2017-01-24 19:39:46 +00001182.. option:: -fassociative-math, -fno-associative-math
1183
Richard Smith081ad4d2017-01-24 19:39:46 +00001184.. option:: -fassume-sane-operator-new, -fno-assume-sane-operator-new
1185
Richard Smith081ad4d2017-01-24 19:39:46 +00001186.. option:: -fast
1187
Richard Smith081ad4d2017-01-24 19:39:46 +00001188.. option:: -fastcp
1189
Richard Smith081ad4d2017-01-24 19:39:46 +00001190.. option:: -fastf
1191
Richard Smith081ad4d2017-01-24 19:39:46 +00001192.. option:: -fasynchronous-unwind-tables, -fno-asynchronous-unwind-tables
1193
Richard Smith081ad4d2017-01-24 19:39:46 +00001194.. option:: -fautolink, -fno-autolink
1195
Richard Smith081ad4d2017-01-24 19:39:46 +00001196.. option:: -fblocks, -fno-blocks
1197
1198Enable the 'blocks' language feature
1199
Richard Smith081ad4d2017-01-24 19:39:46 +00001200.. option:: -fbootclasspath=<arg>, --bootclasspath <arg>, --bootclasspath=<arg>
1201
Richard Smith081ad4d2017-01-24 19:39:46 +00001202.. option:: -fborland-extensions, -fno-borland-extensions
1203
1204Accept non-standard constructs supported by the Borland compiler
1205
Richard Smith081ad4d2017-01-24 19:39:46 +00001206.. option:: -fbracket-depth=<arg>
1207
Richard Smith081ad4d2017-01-24 19:39:46 +00001208.. option:: -fbuiltin, -fno-builtin
1209
Richard Smith081ad4d2017-01-24 19:39:46 +00001210.. option:: -fbuiltin-module-map
1211
1212Load the clang builtins module map file.
1213
Richard Smith081ad4d2017-01-24 19:39:46 +00001214.. option:: -fcaret-diagnostics, -fno-caret-diagnostics
1215
Craig Topper596527b2018-01-23 18:40:15 +00001216.. option:: -fcf-protection=<arg>, -fcf-protection (equivalent to -fcf-protection=full)
1217
1218Instrument control-flow architecture protection. Options: return, branch, full, none.
1219
Richard Smith081ad4d2017-01-24 19:39:46 +00001220.. option:: -fclasspath=<arg>, --CLASSPATH <arg>, --CLASSPATH=<arg>, --classpath <arg>, --classpath=<arg>
1221
Richard Smith081ad4d2017-01-24 19:39:46 +00001222.. option:: -fcolor-diagnostics, -fno-color-diagnostics
1223
1224Use colors in diagnostics
1225
Richard Smith081ad4d2017-01-24 19:39:46 +00001226.. option:: -fcommon, -fno-common
1227
Richard Smith081ad4d2017-01-24 19:39:46 +00001228.. option:: -fcompile-resource=<arg>, --resource <arg>, --resource=<arg>
1229
Richard Smith081ad4d2017-01-24 19:39:46 +00001230.. option:: -fconstant-cfstrings, -fno-constant-cfstrings
1231
Richard Smith081ad4d2017-01-24 19:39:46 +00001232.. option:: -fconstant-string-class=<arg>
1233
Richard Smith081ad4d2017-01-24 19:39:46 +00001234.. option:: -fconstexpr-backtrace-limit=<arg>
1235
Richard Smith081ad4d2017-01-24 19:39:46 +00001236.. option:: -fconstexpr-depth=<arg>
1237
Richard Smith081ad4d2017-01-24 19:39:46 +00001238.. option:: -fconstexpr-steps=<arg>
1239
Richard Smith081ad4d2017-01-24 19:39:46 +00001240.. option:: -fcoroutines-ts, -fno-coroutines-ts
1241
1242Enable support for the C++ Coroutines TS
1243
Richard Smith081ad4d2017-01-24 19:39:46 +00001244.. option:: -fcoverage-mapping, -fno-coverage-mapping
1245
1246Generate coverage mapping to enable code coverage analysis
1247
Richard Smith081ad4d2017-01-24 19:39:46 +00001248.. option:: -fcreate-profile
1249
Richard Smith081ad4d2017-01-24 19:39:46 +00001250.. option:: -fcxx-exceptions, -fno-cxx-exceptions
1251
1252Enable C++ exceptions
1253
Richard Smith081ad4d2017-01-24 19:39:46 +00001254.. option:: -fcxx-modules, -fno-cxx-modules
1255
Richard Smith081ad4d2017-01-24 19:39:46 +00001256.. option:: -fdata-sections, -fno-data-sections
1257
1258Place each data in its own section (ELF Only)
1259
Richard Smith081ad4d2017-01-24 19:39:46 +00001260.. option:: -fdebug-info-for-profiling, -fno-debug-info-for-profiling
1261
1262Emit extra debug info to make sample profile more accurate.
1263
Richard Smith78e23fd2017-04-13 22:39:49 +00001264.. option:: -fdebug-macro, -fno-debug-macro
1265
1266Emit macro debug information
1267
Richard Smith081ad4d2017-01-24 19:39:46 +00001268.. option:: -fdebug-pass-arguments
1269
Richard Smith081ad4d2017-01-24 19:39:46 +00001270.. option:: -fdebug-pass-structure
1271
Richard Smith081ad4d2017-01-24 19:39:46 +00001272.. option:: -fdebug-prefix-map=<arg>
1273
1274remap file source paths in debug info
1275
Richard Smith081ad4d2017-01-24 19:39:46 +00001276.. option:: -fdebug-types-section, -fno-debug-types-section
1277
1278Place debug types in their own section (ELF Only)
1279
Richard Smith081ad4d2017-01-24 19:39:46 +00001280.. option:: -fdelayed-template-parsing, -fno-delayed-template-parsing
1281
1282Parse templated function definitions at the end of the translation unit
1283
Richard Smith081ad4d2017-01-24 19:39:46 +00001284.. option:: -fdenormal-fp-math=<arg>
1285
Richard Smith081ad4d2017-01-24 19:39:46 +00001286.. option:: -fdiagnostics-absolute-paths
1287
1288Print absolute paths in diagnostics
1289
Richard Smith081ad4d2017-01-24 19:39:46 +00001290.. option:: -fdiagnostics-color, -fno-diagnostics-color
1291
Richard Smithb2c82a62017-01-27 01:54:42 +00001292.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001293.. option:: -fdiagnostics-color=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001294.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001295
Craig Topperd23254a2017-07-20 17:52:48 +00001296.. option:: -fdiagnostics-hotness-threshold=<number>
1297
1298Prevent optimization remarks from being output if they do not have at least this profile count
1299
Richard Smith081ad4d2017-01-24 19:39:46 +00001300.. option:: -fdiagnostics-show-hotness, -fno-diagnostics-show-hotness
1301
1302Enable profile hotness information in diagnostic line
1303
Richard Smith081ad4d2017-01-24 19:39:46 +00001304.. option:: -fdiagnostics-show-note-include-stack, -fno-diagnostics-show-note-include-stack
1305
1306Display include stacks for diagnostic notes
1307
Richard Smith081ad4d2017-01-24 19:39:46 +00001308.. option:: -fdiagnostics-show-option, -fno-diagnostics-show-option
1309
1310Print option name with mappable diagnostics
1311
Richard Smith081ad4d2017-01-24 19:39:46 +00001312.. option:: -fdiagnostics-show-template-tree
1313
1314Print a template comparison tree for differing templates
1315
Richard Smith081ad4d2017-01-24 19:39:46 +00001316.. option:: -fdollars-in-identifiers, -fno-dollars-in-identifiers
1317
1318Allow '$' in identifiers
1319
Craig Topper16418662017-11-20 18:07:43 +00001320.. option:: -fdouble-square-bracket-attributes, -fno-double-square-bracket-attributes
1321
1322Enable '\[\[\]\]' attributes in all C and C++ language modes
1323
Richard Smith081ad4d2017-01-24 19:39:46 +00001324.. option:: -fdwarf-directory-asm, -fno-dwarf-directory-asm
1325
Craig Topper188252d2017-12-11 21:09:16 +00001326.. option:: -fdwarf-exceptions
1327
1328Use DWARF style exceptions
1329
Richard Smith081ad4d2017-01-24 19:39:46 +00001330.. option:: -felide-constructors, -fno-elide-constructors
1331
Richard Smith081ad4d2017-01-24 19:39:46 +00001332.. option:: -feliminate-unused-debug-symbols, -fno-eliminate-unused-debug-symbols
1333
Richard Smith081ad4d2017-01-24 19:39:46 +00001334.. option:: -fembed-bitcode=<option>, -fembed-bitcode (equivalent to -fembed-bitcode=all), -fembed-bitcode-marker (equivalent to -fembed-bitcode=marker)
1335
1336Embed LLVM bitcode (option: off, all, bitcode, marker)
1337
Richard Smith081ad4d2017-01-24 19:39:46 +00001338.. option:: -femit-all-decls
1339
1340Emit all declarations, even if unused
1341
Richard Smith081ad4d2017-01-24 19:39:46 +00001342.. option:: -femulated-tls, -fno-emulated-tls
1343
1344Use emutls functions to access thread\_local variables
1345
Richard Smith081ad4d2017-01-24 19:39:46 +00001346.. option:: -fencoding=<arg>, --encoding <arg>, --encoding=<arg>
1347
Richard Smith081ad4d2017-01-24 19:39:46 +00001348.. option:: -ferror-limit=<arg>
1349
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00001350.. option:: -fescaping-block-tail-calls, -fno-escaping-block-tail-calls
1351
Richard Smith081ad4d2017-01-24 19:39:46 +00001352.. option:: -fexceptions, -fno-exceptions
1353
1354Enable support for exception handling
1355
Richard Smith081ad4d2017-01-24 19:39:46 +00001356.. option:: -fexec-charset=<arg>
1357
Richard Smith081ad4d2017-01-24 19:39:46 +00001358.. option:: -fextdirs=<arg>, --extdirs <arg>, --extdirs=<arg>
1359
Richard Smith081ad4d2017-01-24 19:39:46 +00001360.. option:: -ffast-math, -fno-fast-math
1361
1362Allow aggressive, lossy floating-point optimizations
1363
Richard Smith081ad4d2017-01-24 19:39:46 +00001364.. option:: -ffinite-math-only, -fno-finite-math-only
1365
Richard Smith081ad4d2017-01-24 19:39:46 +00001366.. option:: -ffor-scope, -fno-for-scope
1367
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00001368.. option:: -fforce-enable-int128, -fno-force-enable-int128
1369
1370Enable support for int128\_t type
1371
Richard Smith081ad4d2017-01-24 19:39:46 +00001372.. option:: -ffp-contract=<arg>
1373
1374Form fused FP ops (e.g. FMAs): fast (everywhere) \| on (according to FP\_CONTRACT pragma, default) \| off (never fuse)
1375
Richard Smith081ad4d2017-01-24 19:39:46 +00001376.. option:: -ffreestanding
1377
1378Assert that the compilation takes place in a freestanding environment
1379
Richard Smith081ad4d2017-01-24 19:39:46 +00001380.. option:: -ffunction-sections, -fno-function-sections
1381
1382Place each function in its own section (ELF Only)
1383
Richard Smith081ad4d2017-01-24 19:39:46 +00001384.. option:: -fgnu-inline-asm, -fno-gnu-inline-asm
1385
Richard Smith081ad4d2017-01-24 19:39:46 +00001386.. option:: -fgnu-keywords, -fno-gnu-keywords
1387
1388Allow GNU-extension keywords regardless of language standard
1389
Richard Smith081ad4d2017-01-24 19:39:46 +00001390.. option:: -fgnu-runtime
1391
1392Generate output compatible with the standard GNU Objective-C runtime
1393
Richard Smith081ad4d2017-01-24 19:39:46 +00001394.. option:: -fgnu89-inline, -fno-gnu89-inline
1395
1396Use the gnu89 inline semantics
1397
Richard Smith081ad4d2017-01-24 19:39:46 +00001398.. option:: -fhonor-infinities, -fhonor-infinites, -fno-honor-infinities
1399
Richard Smith081ad4d2017-01-24 19:39:46 +00001400.. option:: -fhonor-nans, -fno-honor-nans
1401
Richard Smith081ad4d2017-01-24 19:39:46 +00001402.. option:: -fhosted
1403
Richard Smith081ad4d2017-01-24 19:39:46 +00001404.. option:: -fimplicit-module-maps, -fmodule-maps, -fno-implicit-module-maps
1405
1406Implicitly search the file system for module map files.
1407
Richard Smith081ad4d2017-01-24 19:39:46 +00001408.. option:: -fimplicit-modules, -fno-implicit-modules
1409
Richard Smith081ad4d2017-01-24 19:39:46 +00001410.. option:: -finput-charset=<arg>
1411
Craig Topper188252d2017-12-11 21:09:16 +00001412.. option:: -finstrument-function-entry-bare
1413
1414Instrument function entry only, after inlining, without arguments to the instrumentation call
1415
Richard Smith081ad4d2017-01-24 19:39:46 +00001416.. option:: -finstrument-functions
1417
1418Generate calls to instrument function entry and exit
1419
Craig Topper16418662017-11-20 18:07:43 +00001420.. option:: -finstrument-functions-after-inlining
1421
1422Like -finstrument-functions, but insert the calls after inlining
1423
Richard Smith081ad4d2017-01-24 19:39:46 +00001424.. option:: -fintegrated-as, -fno-integrated-as, -integrated-as
1425
1426Enable the integrated assembler
1427
Richard Smith081ad4d2017-01-24 19:39:46 +00001428.. option:: -fjump-tables, -fno-jump-tables
1429
Richard Smith081ad4d2017-01-24 19:39:46 +00001430.. option:: -flax-vector-conversions, -fno-lax-vector-conversions
1431
Richard Smith081ad4d2017-01-24 19:39:46 +00001432.. option:: -flimited-precision=<arg>
1433
Richard Smith081ad4d2017-01-24 19:39:46 +00001434.. option:: -flto, -fno-lto
1435
1436Enable LTO in 'full' mode
1437
Richard Smith081ad4d2017-01-24 19:39:46 +00001438.. option:: -flto-jobs=<arg>
1439
1440Controls the backend parallelism of -flto=thin (default of 0 means the number of threads will be derived from the number of CPUs detected)
1441
Richard Smithb2c82a62017-01-27 01:54:42 +00001442.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001443.. option:: -flto=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001444.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001445
1446Set LTO mode to either 'full' or 'thin'
1447
Richard Smith081ad4d2017-01-24 19:39:46 +00001448.. option:: -fmacro-backtrace-limit=<arg>
1449
Richard Smith081ad4d2017-01-24 19:39:46 +00001450.. option:: -fmath-errno, -fno-math-errno
1451
1452Require math functions to indicate errors by setting errno
1453
Richard Smith081ad4d2017-01-24 19:39:46 +00001454.. option:: -fmax-type-align=<arg>
1455
1456Specify the maximum alignment to enforce on pointers lacking an explicit alignment
1457
Richard Smith081ad4d2017-01-24 19:39:46 +00001458.. option:: -fmerge-all-constants, -fno-merge-all-constants
1459
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00001460Allow merging of constants
1461
Richard Smith081ad4d2017-01-24 19:39:46 +00001462.. option:: -fmessage-length=<arg>
1463
Richard Smith081ad4d2017-01-24 19:39:46 +00001464.. option:: -fmodule-file-deps, -fno-module-file-deps
1465
Richard Smith081ad4d2017-01-24 19:39:46 +00001466.. option:: -fmodule-map-file=<file>
1467
1468Load this module map file
1469
Richard Smith081ad4d2017-01-24 19:39:46 +00001470.. option:: -fmodule-name=<name>, -fmodule-implementation-of <arg>, -fmodule-name <arg>
1471
1472Specify the name of the module to build
1473
Richard Smith081ad4d2017-01-24 19:39:46 +00001474.. option:: -fmodules, -fno-modules
1475
1476Enable the 'modules' language feature
1477
Richard Smith081ad4d2017-01-24 19:39:46 +00001478.. option:: -fmodules-decluse, -fno-modules-decluse
1479
1480Require declaration of modules used within a module
1481
Richard Smith081ad4d2017-01-24 19:39:46 +00001482.. option:: -fmodules-ignore-macro=<arg>
1483
1484Ignore the definition of the given macro when building and loading modules
1485
Richard Smith081ad4d2017-01-24 19:39:46 +00001486.. option:: -fmodules-search-all, -fno-modules-search-all
1487
1488Search even non-imported modules to resolve references
1489
Richard Smith081ad4d2017-01-24 19:39:46 +00001490.. option:: -fmodules-strict-decluse
1491
1492Like -fmodules-decluse but requires all headers to be in modules
1493
Richard Smith081ad4d2017-01-24 19:39:46 +00001494.. option:: -fmodules-ts
1495
1496Enable support for the C++ Modules TS
1497
Richard Smith081ad4d2017-01-24 19:39:46 +00001498.. option:: -fms-compatibility, -fno-ms-compatibility
1499
1500Enable full Microsoft Visual C++ compatibility
1501
Richard Smith081ad4d2017-01-24 19:39:46 +00001502.. option:: -fms-compatibility-version=<arg>
1503
1504Dot-separated value representing the Microsoft compiler version number to report in \_MSC\_VER (0 = don't define it (default))
1505
Richard Smith081ad4d2017-01-24 19:39:46 +00001506.. option:: -fms-extensions, -fno-ms-extensions
1507
1508Accept some non-standard constructs supported by the Microsoft compiler
1509
Richard Smith081ad4d2017-01-24 19:39:46 +00001510.. option:: -fms-memptr-rep=<arg>
1511
Richard Smith081ad4d2017-01-24 19:39:46 +00001512.. option:: -fms-volatile<arg>
1513
Richard Smith081ad4d2017-01-24 19:39:46 +00001514.. option:: -fmsc-version=<arg>
1515
1516Microsoft compiler version number to report in \_MSC\_VER (0 = don't define it (default))
1517
Richard Smith081ad4d2017-01-24 19:39:46 +00001518.. option:: -fmudflap
1519
Richard Smith081ad4d2017-01-24 19:39:46 +00001520.. option:: -fmudflapth
1521
Richard Smith081ad4d2017-01-24 19:39:46 +00001522.. option:: -fnested-functions
1523
Richard Smith081ad4d2017-01-24 19:39:46 +00001524.. option:: -fnew-alignment=<align>, -fnew-alignment <arg>
1525
1526Specifies the largest alignment guaranteed by '::operator new(size\_t)'
1527
Richard Smith081ad4d2017-01-24 19:39:46 +00001528.. option:: -fnext-runtime
1529
Richard Smith081ad4d2017-01-24 19:39:46 +00001530.. option:: -fno-builtin-<arg>
1531
1532Disable implicit builtin knowledge of a specific function
1533
Richard Smith081ad4d2017-01-24 19:39:46 +00001534.. option:: -fno-elide-type
1535
1536Do not elide types when printing diagnostics
1537
Richard Smith081ad4d2017-01-24 19:39:46 +00001538.. option:: -fno-max-type-align
1539
Richard Smith081ad4d2017-01-24 19:39:46 +00001540.. option:: -fno-operator-names
1541
1542Do not treat C++ operator name keywords as synonyms for operators
1543
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00001544.. option:: -fno-rtti-data
1545
1546Control emission of RTTI data
1547
Richard Smith081ad4d2017-01-24 19:39:46 +00001548.. option:: -fno-strict-modules-decluse
1549
Richard Smith081ad4d2017-01-24 19:39:46 +00001550.. option:: -fno-working-directory
1551
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00001552.. option:: -fnoxray-link-deps
1553
Richard Smith081ad4d2017-01-24 19:39:46 +00001554.. option:: -fobjc-abi-version=<arg>
1555
Richard Smith081ad4d2017-01-24 19:39:46 +00001556.. option:: -fobjc-arc, -fno-objc-arc
1557
1558Synthesize retain and release calls for Objective-C pointers
1559
Richard Smith081ad4d2017-01-24 19:39:46 +00001560.. option:: -fobjc-arc-exceptions, -fno-objc-arc-exceptions
1561
1562Use EH-safe code when synthesizing retains and releases in -fobjc-arc
1563
Richard Smith081ad4d2017-01-24 19:39:46 +00001564.. option:: -fobjc-exceptions, -fno-objc-exceptions
1565
1566Enable Objective-C exceptions
1567
Richard Smith081ad4d2017-01-24 19:39:46 +00001568.. option:: -fobjc-infer-related-result-type, -fno-objc-infer-related-result-type
1569
Richard Smith081ad4d2017-01-24 19:39:46 +00001570.. option:: -fobjc-legacy-dispatch, -fno-objc-legacy-dispatch
1571
Richard Smith081ad4d2017-01-24 19:39:46 +00001572.. option:: -fobjc-link-runtime
1573
Richard Smith081ad4d2017-01-24 19:39:46 +00001574.. option:: -fobjc-nonfragile-abi, -fno-objc-nonfragile-abi
1575
Richard Smith081ad4d2017-01-24 19:39:46 +00001576.. option:: -fobjc-nonfragile-abi-version=<arg>
1577
Richard Smith081ad4d2017-01-24 19:39:46 +00001578.. option:: -fobjc-runtime=<arg>
1579
1580Specify the target Objective-C runtime kind and version
1581
Richard Smith081ad4d2017-01-24 19:39:46 +00001582.. option:: -fobjc-sender-dependent-dispatch
1583
Richard Smith081ad4d2017-01-24 19:39:46 +00001584.. option:: -fobjc-weak, -fno-objc-weak
1585
1586Enable ARC-style weak references in Objective-C
1587
Richard Smith081ad4d2017-01-24 19:39:46 +00001588.. option:: -fomit-frame-pointer, -fno-omit-frame-pointer
1589
Richard Smith081ad4d2017-01-24 19:39:46 +00001590.. option:: -fopenmp, -fno-openmp
1591
Jonas Hahnfelda180fc42018-02-22 17:10:28 +00001592Parse OpenMP pragmas and generate parallel code.
Boris Kolpackovb150d242017-08-30 09:15:53 +00001593
Craig Topper287c8012018-01-03 18:29:12 +00001594.. option:: -fopenmp-simd, -fno-openmp-simd
1595
1596Emit OpenMP code only for SIMD-based constructs.
1597
Richard Smith081ad4d2017-01-24 19:39:46 +00001598.. option:: -fopenmp-version=<arg>
1599
Richard Smithb2c82a62017-01-27 01:54:42 +00001600.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001601.. option:: -fopenmp=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001602.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001603
Richard Smith081ad4d2017-01-24 19:39:46 +00001604.. option:: -foperator-arrow-depth=<arg>
1605
Richard Smith081ad4d2017-01-24 19:39:46 +00001606.. option:: -foptimization-record-file=<arg>
1607
1608Specify the file name of any generated YAML optimization record
1609
Richard Smith081ad4d2017-01-24 19:39:46 +00001610.. option:: -foptimize-sibling-calls, -fno-optimize-sibling-calls
1611
Richard Smith081ad4d2017-01-24 19:39:46 +00001612.. option:: -foutput-class-dir=<arg>, --output-class-directory <arg>, --output-class-directory=<arg>
1613
Richard Smith081ad4d2017-01-24 19:39:46 +00001614.. option:: -fpack-struct, -fno-pack-struct
1615
Richard Smithb2c82a62017-01-27 01:54:42 +00001616.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001617.. option:: -fpack-struct=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001618.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001619
1620Specify the default maximum struct packing alignment
1621
Richard Smith081ad4d2017-01-24 19:39:46 +00001622.. option:: -fpascal-strings, -fno-pascal-strings, -mpascal-strings
1623
1624Recognize and construct Pascal-style string literals
1625
Richard Smith081ad4d2017-01-24 19:39:46 +00001626.. option:: -fpcc-struct-return
1627
1628Override the default ABI to return all structs on the stack
1629
Richard Smith081ad4d2017-01-24 19:39:46 +00001630.. option:: -fpch-preprocess
1631
Richard Smith081ad4d2017-01-24 19:39:46 +00001632.. option:: -fpic, -fno-pic
1633
Richard Smith081ad4d2017-01-24 19:39:46 +00001634.. option:: -fpie, -fno-pie
1635
Craig Topper16418662017-11-20 18:07:43 +00001636.. option:: -fplt, -fno-plt
1637
1638Use the PLT to make function calls
1639
Richard Smith081ad4d2017-01-24 19:39:46 +00001640.. option:: -fplugin=<dsopath>
1641
1642Load the named plugin (dynamic shared object)
1643
Richard Smith081ad4d2017-01-24 19:39:46 +00001644.. option:: -fpreserve-as-comments, -fno-preserve-as-comments
1645
Richard Smith081ad4d2017-01-24 19:39:46 +00001646.. option:: -fprofile-arcs, -fno-profile-arcs
1647
Richard Smith081ad4d2017-01-24 19:39:46 +00001648.. option:: -fprofile-dir=<arg>
1649
Richard Smith081ad4d2017-01-24 19:39:46 +00001650.. option:: -fprofile-generate, -fno-profile-generate
1651
1652Generate instrumented code to collect execution counts into default.profraw (overridden by LLVM\_PROFILE\_FILE env var)
1653
Richard Smithb2c82a62017-01-27 01:54:42 +00001654.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001655.. option:: -fprofile-generate=<directory>
Richard Smithb2c82a62017-01-27 01:54:42 +00001656.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001657
1658Generate instrumented code to collect execution counts into <directory>/default.profraw (overridden by LLVM\_PROFILE\_FILE env var)
1659
Richard Smith081ad4d2017-01-24 19:39:46 +00001660.. option:: -fprofile-instr-generate, -fno-profile-instr-generate
1661
1662Generate instrumented code to collect execution counts into default.profraw file (overridden by '=' form of option or LLVM\_PROFILE\_FILE env var)
1663
Richard Smithb2c82a62017-01-27 01:54:42 +00001664.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001665.. option:: -fprofile-instr-generate=<file>
Richard Smithb2c82a62017-01-27 01:54:42 +00001666.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001667
1668Generate instrumented code to collect execution counts into <file> (overridden by LLVM\_PROFILE\_FILE env var)
1669
Richard Smith081ad4d2017-01-24 19:39:46 +00001670.. option:: -fprofile-instr-use, -fno-profile-instr-use, -fprofile-use
1671
Richard Smithb2c82a62017-01-27 01:54:42 +00001672.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001673.. option:: -fprofile-instr-use=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001674.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001675
1676Use instrumentation data for profile-guided optimization
1677
Boris Kolpackovb150d242017-08-30 09:15:53 +00001678.. option:: -fprofile-sample-accurate, -fauto-profile-accurate, -fno-profile-sample-accurate
1679
1680Specifies that the sample profile is accurate. If the sample
1681 profile is accurate, callsites without profile samples are marked
1682 as cold. Otherwise, treat callsites without profile samples as if
1683 we have no profile
1684
Richard Smith78e23fd2017-04-13 22:39:49 +00001685.. option:: -fprofile-sample-use, -fauto-profile, -fno-profile-sample-use
1686
1687.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001688.. option:: -fprofile-sample-use=<arg>, -fauto-profile=<arg>
Richard Smith78e23fd2017-04-13 22:39:49 +00001689.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001690
1691Enable sample-based profile guided optimizations
1692
Richard Smithb2c82a62017-01-27 01:54:42 +00001693.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001694.. option:: -fprofile-use=<pathname>
Richard Smithb2c82a62017-01-27 01:54:42 +00001695.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001696
1697Use instrumentation data for profile-guided optimization. If pathname is a directory, it reads from <pathname>/default.profdata. Otherwise, it reads from file <pathname>.
1698
Richard Smith081ad4d2017-01-24 19:39:46 +00001699.. option:: -freciprocal-math, -fno-reciprocal-math
1700
1701Allow division operations to be reassociated
1702
Richard Smith081ad4d2017-01-24 19:39:46 +00001703.. option:: -freg-struct-return
1704
1705Override the default ABI to return small structs in registers
1706
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00001707.. option:: -fregister-global-dtors-with-atexit, -fno-register-global-dtors-with-atexit
1708
1709Use atexit or \_\_cxa\_atexit to register global destructors
1710
Richard Smith081ad4d2017-01-24 19:39:46 +00001711.. option:: -frelaxed-template-template-args, -fno-relaxed-template-template-args
1712
1713Enable C++17 relaxed template template argument matching
1714
Richard Smith081ad4d2017-01-24 19:39:46 +00001715.. option:: -freroll-loops, -fno-reroll-loops
1716
1717Turn on loop reroller
1718
Richard Smith081ad4d2017-01-24 19:39:46 +00001719.. option:: -fretain-comments-from-system-headers
1720
Craig Topperd23254a2017-07-20 17:52:48 +00001721.. option:: -frewrite-imports, -fno-rewrite-imports
1722
Richard Smith081ad4d2017-01-24 19:39:46 +00001723.. option:: -frewrite-includes, -fno-rewrite-includes
1724
Richard Smith081ad4d2017-01-24 19:39:46 +00001725.. option:: -frewrite-map-file <arg>
1726
Richard Smithb2c82a62017-01-27 01:54:42 +00001727.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001728.. option:: -frewrite-map-file=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001729.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001730
Richard Smith081ad4d2017-01-24 19:39:46 +00001731.. option:: -fropi, -fno-ropi
1732
Richard Smith081ad4d2017-01-24 19:39:46 +00001733.. option:: -frtti, -fno-rtti
1734
Richard Smith081ad4d2017-01-24 19:39:46 +00001735.. option:: -frwpi, -fno-rwpi
1736
Richard Smith081ad4d2017-01-24 19:39:46 +00001737.. option:: -fsave-optimization-record, -fno-save-optimization-record
1738
1739Generate a YAML optimization record file
1740
Craig Topper188252d2017-12-11 21:09:16 +00001741.. option:: -fseh-exceptions
1742
1743Use SEH style exceptions
1744
Richard Smith081ad4d2017-01-24 19:39:46 +00001745.. option:: -fshort-enums, -fno-short-enums
1746
1747Allocate to an enum type only as many bytes as it needs for the declared range of possible values
1748
Richard Smith081ad4d2017-01-24 19:39:46 +00001749.. option:: -fshort-wchar, -fno-short-wchar
1750
1751Force wchar\_t to be a short unsigned int
1752
Richard Smith081ad4d2017-01-24 19:39:46 +00001753.. option:: -fshow-column, -fno-show-column
1754
Richard Smith081ad4d2017-01-24 19:39:46 +00001755.. option:: -fshow-overloads=<arg>
1756
1757Which overload candidates to show when overload resolution fails: best\|all; defaults to all
1758
Richard Smith081ad4d2017-01-24 19:39:46 +00001759.. option:: -fshow-source-location, -fno-show-source-location
1760
Richard Smith081ad4d2017-01-24 19:39:46 +00001761.. option:: -fsignaling-math, -fno-signaling-math
1762
Richard Smith081ad4d2017-01-24 19:39:46 +00001763.. option:: -fsigned-bitfields
1764
Richard Smith081ad4d2017-01-24 19:39:46 +00001765.. option:: -fsigned-char, -fno-signed-char, --signed-char
1766
Richard Smith081ad4d2017-01-24 19:39:46 +00001767.. option:: -fsigned-zeros, -fno-signed-zeros
1768
Richard Smith081ad4d2017-01-24 19:39:46 +00001769.. option:: -fsized-deallocation, -fno-sized-deallocation
1770
1771Enable C++14 sized global deallocation functions
1772
Richard Smith081ad4d2017-01-24 19:39:46 +00001773.. option:: -fsjlj-exceptions
1774
1775Use SjLj style exceptions
1776
Richard Smith081ad4d2017-01-24 19:39:46 +00001777.. option:: -fslp-vectorize, -fno-slp-vectorize, -ftree-slp-vectorize
1778
1779Enable the superword-level parallelism vectorization passes
1780
Richard Smith081ad4d2017-01-24 19:39:46 +00001781.. option:: -fspell-checking, -fno-spell-checking
1782
Richard Smith081ad4d2017-01-24 19:39:46 +00001783.. option:: -fspell-checking-limit=<arg>
1784
Richard Smith081ad4d2017-01-24 19:39:46 +00001785.. option:: -fsplit-dwarf-inlining, -fno-split-dwarf-inlining
1786
Jonas Hahnfelda180fc42018-02-22 17:10:28 +00001787Provide 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 +00001788
Richard Smith081ad4d2017-01-24 19:39:46 +00001789.. option:: -fsplit-stack
1790
Richard Smith081ad4d2017-01-24 19:39:46 +00001791.. option:: -fstack-protector, -fno-stack-protector
1792
1793Enable stack protectors for functions potentially vulnerable to stack smashing
1794
Richard Smith081ad4d2017-01-24 19:39:46 +00001795.. option:: -fstack-protector-all
1796
1797Force the usage of stack protectors for all functions
1798
Richard Smith081ad4d2017-01-24 19:39:46 +00001799.. option:: -fstack-protector-strong
1800
1801Use a strong heuristic to apply stack protectors to functions
1802
Craig Topper596527b2018-01-23 18:40:15 +00001803.. option:: -fstack-size-section, -fno-stack-size-section
1804
1805Emit section containing metadata on function stack sizes
1806
Richard Smith081ad4d2017-01-24 19:39:46 +00001807.. option:: -fstandalone-debug, -fno-limit-debug-info, -fno-standalone-debug
1808
1809Emit full debug info for all types used by the program
1810
Richard Smith081ad4d2017-01-24 19:39:46 +00001811.. option:: -fstrict-aliasing, -fno-strict-aliasing
1812
Richard Smith081ad4d2017-01-24 19:39:46 +00001813.. option:: -fstrict-enums, -fno-strict-enums
1814
1815Enable optimizations based on the strict definition of an enum's value range
1816
Richard Smith081ad4d2017-01-24 19:39:46 +00001817.. option:: -fstrict-overflow, -fno-strict-overflow
1818
Richard Smith081ad4d2017-01-24 19:39:46 +00001819.. option:: -fstrict-return, -fno-strict-return
1820
Richard Smith78e23fd2017-04-13 22:39:49 +00001821Always treat control flow paths that fall off the end of a non-void function as unreachable
Richard Smith081ad4d2017-01-24 19:39:46 +00001822
Richard Smith081ad4d2017-01-24 19:39:46 +00001823.. option:: -fstrict-vtable-pointers, -fno-strict-vtable-pointers
1824
1825Enable optimizations based on the strict rules for overwriting polymorphic C++ objects
1826
Richard Smith081ad4d2017-01-24 19:39:46 +00001827.. option:: -fstruct-path-tbaa, -fno-struct-path-tbaa
1828
Richard Smith081ad4d2017-01-24 19:39:46 +00001829.. option:: -ftabstop=<arg>
1830
Richard Smith081ad4d2017-01-24 19:39:46 +00001831.. option:: -ftemplate-backtrace-limit=<arg>
1832
Richard Smith081ad4d2017-01-24 19:39:46 +00001833.. option:: -ftemplate-depth-<arg>
1834
Richard Smith081ad4d2017-01-24 19:39:46 +00001835.. option:: -ftemplate-depth=<arg>
1836
Richard Smith081ad4d2017-01-24 19:39:46 +00001837.. option:: -ftest-coverage
1838
Richard Smith081ad4d2017-01-24 19:39:46 +00001839.. option:: -fthinlto-index=<arg>
1840
1841Perform ThinLTO importing using provided function summary index
1842
Richard Smith081ad4d2017-01-24 19:39:46 +00001843.. option:: -fthreadsafe-statics, -fno-threadsafe-statics
1844
Richard Smith081ad4d2017-01-24 19:39:46 +00001845.. option:: -ftime-report
1846
Richard Smith081ad4d2017-01-24 19:39:46 +00001847.. option:: -ftls-model=<arg>
1848
Richard Smith081ad4d2017-01-24 19:39:46 +00001849.. option:: -ftrap-function=<arg>
1850
1851Issue call to specified function rather than a trap instruction
1852
Richard Smith081ad4d2017-01-24 19:39:46 +00001853.. option:: -ftrapping-math, -fno-trapping-math
1854
Richard Smith081ad4d2017-01-24 19:39:46 +00001855.. option:: -ftrapv
1856
1857Trap on integer overflow
1858
Richard Smith081ad4d2017-01-24 19:39:46 +00001859.. option:: -ftrapv-handler <arg>
1860
Richard Smithb2c82a62017-01-27 01:54:42 +00001861.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001862.. option:: -ftrapv-handler=<function name>
Richard Smithb2c82a62017-01-27 01:54:42 +00001863.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001864
1865Specify the function to be called on overflow
1866
Richard Smith081ad4d2017-01-24 19:39:46 +00001867.. option:: -ftrigraphs, -fno-trigraphs, -trigraphs, --trigraphs
1868
1869Process trigraph sequences
1870
Richard Smith081ad4d2017-01-24 19:39:46 +00001871.. option:: -funique-section-names, -fno-unique-section-names
1872
1873Use unique names for text and data sections (ELF Only)
1874
Richard Smith081ad4d2017-01-24 19:39:46 +00001875.. option:: -funit-at-a-time, -fno-unit-at-a-time
1876
Richard Smith081ad4d2017-01-24 19:39:46 +00001877.. option:: -funroll-loops, -fno-unroll-loops
1878
1879Turn on loop unroller
1880
Richard Smith081ad4d2017-01-24 19:39:46 +00001881.. option:: -funsafe-math-optimizations, -fno-unsafe-math-optimizations
1882
Richard Smith081ad4d2017-01-24 19:39:46 +00001883.. option:: -funsigned-bitfields
1884
Richard Smith081ad4d2017-01-24 19:39:46 +00001885.. option:: -funsigned-char, -fno-unsigned-char, --unsigned-char
1886
Richard Smith081ad4d2017-01-24 19:39:46 +00001887.. option:: -funwind-tables, -fno-unwind-tables
1888
Richard Smith081ad4d2017-01-24 19:39:46 +00001889.. option:: -fuse-cxa-atexit, -fno-use-cxa-atexit
1890
Richard Smith081ad4d2017-01-24 19:39:46 +00001891.. option:: -fuse-init-array, -fno-use-init-array
1892
1893Use .init\_array instead of .ctors
1894
Richard Smith081ad4d2017-01-24 19:39:46 +00001895.. option:: -fuse-ld=<arg>
1896
Richard Smith081ad4d2017-01-24 19:39:46 +00001897.. option:: -fuse-line-directives, -fno-use-line-directives
1898
Richard Smith081ad4d2017-01-24 19:39:46 +00001899.. option:: -fveclib=<arg>
1900
1901Use the given vector functions library
1902
Richard Smith081ad4d2017-01-24 19:39:46 +00001903.. option:: -fvectorize, -fno-vectorize, -ftree-vectorize
1904
1905Enable the loop vectorization passes
1906
Richard Smith081ad4d2017-01-24 19:39:46 +00001907.. option:: -fverbose-asm, -fno-verbose-asm
1908
Richard Smith081ad4d2017-01-24 19:39:46 +00001909.. option:: -fvisibility-inlines-hidden
1910
1911Give inline C++ member functions default visibility by default
1912
Richard Smith081ad4d2017-01-24 19:39:46 +00001913.. option:: -fvisibility-ms-compat
1914
1915Give global types 'default' visibility and global functions and variables 'hidden' visibility by default
1916
Richard Smith081ad4d2017-01-24 19:39:46 +00001917.. option:: -fvisibility=<arg>
1918
1919Set the default symbol visibility for all global declarations
1920
Richard Smith081ad4d2017-01-24 19:39:46 +00001921.. option:: -fwhole-program-vtables, -fno-whole-program-vtables
1922
1923Enables whole-program vtable optimization. Requires -flto
1924
Richard Smith081ad4d2017-01-24 19:39:46 +00001925.. option:: -fwrapv, -fno-wrapv
1926
1927Treat signed integer overflow as two's complement
1928
Richard Smith081ad4d2017-01-24 19:39:46 +00001929.. option:: -fwritable-strings
1930
1931Store string literals as writable data
1932
Craig Topper188252d2017-12-11 21:09:16 +00001933.. option:: -fxray-always-emit-customevents, -fno-xray-always-emit-customevents
1934
1935Determine whether to always emit \_\_xray\_customevent(...) calls even if the function it appears in is not always instrumented.
1936
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00001937.. option:: -fxray-always-emit-typedevents, -fno-xray-always-emit-typedevents
1938
1939Determine whether to always emit \_\_xray\_typedevent(...) calls even if the function it appears in is not always instrumented.
1940
Richard Smith78e23fd2017-04-13 22:39:49 +00001941.. option:: -fxray-always-instrument=<arg>
1942
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00001943DEPRECATED: Filename defining the whitelist for imbuing the 'always instrument' XRay attribute.
1944
1945.. option:: -fxray-attr-list=<arg>
1946
1947Filename defining the list of functions/types for imbuing XRay attributes.
Richard Smith78e23fd2017-04-13 22:39:49 +00001948
Richard Smith081ad4d2017-01-24 19:39:46 +00001949.. option:: -fxray-instruction-threshold<arg>
1950
Richard Smithb2c82a62017-01-27 01:54:42 +00001951.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001952.. option:: -fxray-instruction-threshold=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001953.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001954
1955Sets the minimum function size to instrument with XRay
1956
Richard Smith081ad4d2017-01-24 19:39:46 +00001957.. option:: -fxray-instrument, -fno-xray-instrument
1958
1959Generate XRay instrumentation sleds on function entry and exit
1960
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00001961.. option:: -fxray-instrumentation-bundle=<arg>
1962
1963Select which XRay instrumentation points to emit. Options: all, none, function, custom. Default is 'all'.
1964
1965.. option:: -fxray-link-deps
1966
1967Tells clang to add the link dependencies for XRay.
1968
1969.. option:: -fxray-modes=<arg>
1970
1971List of modes to link in by default into XRay instrumented binaries.
1972
Richard Smith78e23fd2017-04-13 22:39:49 +00001973.. option:: -fxray-never-instrument=<arg>
1974
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00001975DEPRECATED: Filename defining the whitelist for imbuing the 'never instrument' XRay attribute.
Richard Smith78e23fd2017-04-13 22:39:49 +00001976
Richard Smith081ad4d2017-01-24 19:39:46 +00001977.. option:: -fzero-initialized-in-bss, -fno-zero-initialized-in-bss
1978
Richard Smith081ad4d2017-01-24 19:39:46 +00001979.. option:: -fzvector, -fno-zvector, -mzvector
1980
1981Enable System z vector language extension
1982
Richard Smith081ad4d2017-01-24 19:39:46 +00001983.. option:: -pedantic, --pedantic, -no-pedantic, --no-pedantic
1984
Richard Smith081ad4d2017-01-24 19:39:46 +00001985.. option:: -pedantic-errors, --pedantic-errors
1986
1987OpenCL flags
1988------------
Richard Smith081ad4d2017-01-24 19:39:46 +00001989.. option:: -cl-denorms-are-zero
1990
1991OpenCL only. Allow denormals to be flushed to zero.
1992
Richard Smith081ad4d2017-01-24 19:39:46 +00001993.. option:: -cl-fast-relaxed-math
1994
1995OpenCL only. Sets -cl-finite-math-only and -cl-unsafe-math-optimizations, and defines \_\_FAST\_RELAXED\_MATH\_\_.
1996
Richard Smith081ad4d2017-01-24 19:39:46 +00001997.. option:: -cl-finite-math-only
1998
1999OpenCL only. Allow floating-point optimizations that assume arguments and results are not NaNs or +-Inf.
2000
Richard Smith081ad4d2017-01-24 19:39:46 +00002001.. option:: -cl-fp32-correctly-rounded-divide-sqrt
2002
2003OpenCL only. Specify that single precision floating-point divide and sqrt used in the program source are correctly rounded.
2004
Richard Smith081ad4d2017-01-24 19:39:46 +00002005.. option:: -cl-kernel-arg-info
2006
2007OpenCL only. Generate kernel argument metadata.
2008
Richard Smith081ad4d2017-01-24 19:39:46 +00002009.. option:: -cl-mad-enable
2010
2011OpenCL only. Allow use of less precise MAD computations in the generated binary.
2012
Richard Smith081ad4d2017-01-24 19:39:46 +00002013.. option:: -cl-no-signed-zeros
2014
2015OpenCL only. Allow use of less precise no signed zeros computations in the generated binary.
2016
Richard Smith081ad4d2017-01-24 19:39:46 +00002017.. option:: -cl-opt-disable
2018
2019OpenCL only. This option disables all optimizations. By default optimizations are enabled.
2020
Richard Smith081ad4d2017-01-24 19:39:46 +00002021.. option:: -cl-single-precision-constant
2022
2023OpenCL only. Treat double precision floating-point constant as single precision constant.
2024
Richard Smith081ad4d2017-01-24 19:39:46 +00002025.. option:: -cl-std=<arg>
2026
2027OpenCL language standard to compile for.
2028
Richard Smith081ad4d2017-01-24 19:39:46 +00002029.. option:: -cl-strict-aliasing
2030
2031OpenCL only. This option is added for compatibility with OpenCL 1.0.
2032
Jonas Hahnfelda180fc42018-02-22 17:10:28 +00002033.. option:: -cl-uniform-work-group-size
2034
2035OpenCL only. Defines that the global work-size be a multiple of the work-group size specified to clEnqueueNDRangeKernel
2036
Richard Smith081ad4d2017-01-24 19:39:46 +00002037.. option:: -cl-unsafe-math-optimizations
2038
2039OpenCL only. Allow unsafe floating-point optimizations. Also implies -cl-no-signed-zeros and -cl-mad-enable.
2040
2041Target-dependent compilation options
2042~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Richard Smithc5b2e002017-01-27 02:08:37 +00002043.. option:: -G<size>, -G=<arg>, -msmall-data-threshold=<arg>
2044
2045Put objects of at most <size> bytes into small data section (MIPS / Hexagon)
2046
Richard Smith081ad4d2017-01-24 19:39:46 +00002047.. option:: -m16
2048
Richard Smith081ad4d2017-01-24 19:39:46 +00002049.. option:: -m32
2050
Richard Smith081ad4d2017-01-24 19:39:46 +00002051.. option:: -m64
2052
Richard Smith081ad4d2017-01-24 19:39:46 +00002053.. option:: -mabi=<arg>
2054
Richard Smith081ad4d2017-01-24 19:39:46 +00002055.. option:: -mabicalls, -mno-abicalls
2056
2057Enable SVR4-style position-independent code (Mips only)
2058
Boris Kolpackovb150d242017-08-30 09:15:53 +00002059.. option:: -mabs=<arg>
2060
Richard Smith081ad4d2017-01-24 19:39:46 +00002061.. option:: -malign-double
2062
2063Align doubles to two words in structs (x86 only)
2064
Richard Smith081ad4d2017-01-24 19:39:46 +00002065.. option:: -march=<arg>
2066
Richard Smith081ad4d2017-01-24 19:39:46 +00002067.. option:: -masm=<arg>
2068
Richard Smith081ad4d2017-01-24 19:39:46 +00002069.. option:: -mbackchain, -mno-backchain
2070
2071Link stack frames through backchain on System Z
2072
Richard Smith081ad4d2017-01-24 19:39:46 +00002073.. option:: -mcheck-zero-division, -mno-check-zero-division
2074
Richard Smith081ad4d2017-01-24 19:39:46 +00002075.. option:: -mcmodel=<arg>
2076
Richard Smith081ad4d2017-01-24 19:39:46 +00002077.. option:: -mcompact-branches=<arg>
2078
Richard Smith081ad4d2017-01-24 19:39:46 +00002079.. option:: -mconsole<arg>
2080
Craig Topper287c8012018-01-03 18:29:12 +00002081.. 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 +00002082
Craig Topperd23254a2017-07-20 17:52:48 +00002083.. option:: -mdefault-build-attributes<arg>, -mno-default-build-attributes<arg>
2084
Richard Smith081ad4d2017-01-24 19:39:46 +00002085.. option:: -mdll<arg>
2086
Richard Smith081ad4d2017-01-24 19:39:46 +00002087.. option:: -mdouble-float
2088
Richard Smith081ad4d2017-01-24 19:39:46 +00002089.. option:: -mdsp, -mno-dsp
2090
Richard Smith081ad4d2017-01-24 19:39:46 +00002091.. option:: -mdspr2, -mno-dspr2
2092
Richard Smith081ad4d2017-01-24 19:39:46 +00002093.. option:: -mdynamic-no-pic<arg>
2094
Richard Smith081ad4d2017-01-24 19:39:46 +00002095.. option:: -meabi <arg>
2096
2097Set EABI type, e.g. 4, 5 or gnu (default depends on triple)
2098
Boris Kolpackovb150d242017-08-30 09:15:53 +00002099.. option:: -membedded-data, -mno-embedded-data
2100
2101Place constants in the .rodata section instead of the .sdata section even if they meet the -G <size> threshold (MIPS)
2102
2103.. option:: -mextern-sdata, -mno-extern-sdata
2104
2105Assume that externally defined data is in the small data if it meets the -G <size> threshold (MIPS)
2106
Richard Smith78e23fd2017-04-13 22:39:49 +00002107.. option:: -mfentry
2108
2109Insert calls to fentry at function entry (x86 only)
2110
Richard Smith081ad4d2017-01-24 19:39:46 +00002111.. option:: -mfloat-abi=<arg>
2112
Richard Smith081ad4d2017-01-24 19:39:46 +00002113.. option:: -mfp32
2114
2115Use 32-bit floating point registers (MIPS only)
2116
Richard Smith081ad4d2017-01-24 19:39:46 +00002117.. option:: -mfp64
2118
2119Use 64-bit floating point registers (MIPS only)
2120
Richard Smith081ad4d2017-01-24 19:39:46 +00002121.. option:: -mfpmath=<arg>
2122
Richard Smith081ad4d2017-01-24 19:39:46 +00002123.. option:: -mfpu=<arg>
2124
Richard Smith081ad4d2017-01-24 19:39:46 +00002125.. option:: -mglobal-merge, -mno-global-merge
2126
2127Enable merging of globals
2128
Craig Topperd23254a2017-07-20 17:52:48 +00002129.. option:: -mgpopt, -mno-gpopt
2130
2131Use GP relative accesses for symbols known to be in a small data section (MIPS)
2132
Richard Smith081ad4d2017-01-24 19:39:46 +00002133.. option:: -mhard-float
2134
Richard Smith081ad4d2017-01-24 19:39:46 +00002135.. option:: -mhwdiv=<arg>, --mhwdiv <arg>, --mhwdiv=<arg>
2136
Richard Smith081ad4d2017-01-24 19:39:46 +00002137.. option:: -miamcu, -mno-iamcu
2138
2139Use Intel MCU ABI
2140
Richard Smith081ad4d2017-01-24 19:39:46 +00002141.. option:: -mimplicit-float, -mno-implicit-float
2142
Richard Smith081ad4d2017-01-24 19:39:46 +00002143.. option:: -mimplicit-it=<arg>
2144
Richard Smith081ad4d2017-01-24 19:39:46 +00002145.. option:: -mincremental-linker-compatible, -mno-incremental-linker-compatible
2146
2147(integrated-as) Emit an object file which can be used with an incremental linker
2148
Jonas Hahnfelda180fc42018-02-22 17:10:28 +00002149.. option:: -mindirect-jump=<arg>
2150
2151Change indirect jump instructions to inhibit speculation
2152
Richard Smith78e23fd2017-04-13 22:39:49 +00002153.. option:: -miphoneos-version-min=<arg>, -mios-version-min=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00002154
Richard Smith081ad4d2017-01-24 19:39:46 +00002155.. option:: -mips16
2156
Richard Smith081ad4d2017-01-24 19:39:46 +00002157.. option:: -mkernel
2158
Richard Smith081ad4d2017-01-24 19:39:46 +00002159.. option:: -mldc1-sdc1, -mno-ldc1-sdc1
2160
Boris Kolpackovb150d242017-08-30 09:15:53 +00002161.. option:: -mlocal-sdata, -mno-local-sdata
2162
2163Extend the -G behaviour to object local data (MIPS)
2164
Richard Smith081ad4d2017-01-24 19:39:46 +00002165.. option:: -mlong-calls, -mno-long-calls
2166
2167Generate branches with extended addressability, usually via indirect jumps.
2168
Craig Topperd23254a2017-07-20 17:52:48 +00002169.. option:: -mmacosx-version-min=<arg>, -mmacos-version-min=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00002170
2171Set Mac OS X deployment target
2172
Craig Topperd23254a2017-07-20 17:52:48 +00002173.. option:: -mmadd4, -mno-madd4
2174
2175Enable the generation of 4-operand madd.s, madd.d and related instructions.
2176
2177.. option:: -mmcu=<arg>
2178
Richard Smith081ad4d2017-01-24 19:39:46 +00002179.. option:: -mmicromips, -mno-micromips
2180
Richard Smith081ad4d2017-01-24 19:39:46 +00002181.. option:: -mms-bitfields, -mno-ms-bitfields
2182
2183Set the default structure layout to be compatible with the Microsoft compiler standard
2184
Richard Smith081ad4d2017-01-24 19:39:46 +00002185.. option:: -mmsa, -mno-msa
2186
2187Enable MSA ASE (MIPS only)
2188
Craig Topperd23254a2017-07-20 17:52:48 +00002189.. option:: -mmt, -mno-mt
2190
2191Enable MT ASE (MIPS only)
2192
Richard Smith081ad4d2017-01-24 19:39:46 +00002193.. option:: -mnan=<arg>
2194
Richard Smith081ad4d2017-01-24 19:39:46 +00002195.. option:: -mno-mips16
2196
Richard Smith081ad4d2017-01-24 19:39:46 +00002197.. option:: -momit-leaf-frame-pointer, -mno-omit-leaf-frame-pointer
2198
2199Omit frame pointer setup for leaf functions
2200
Richard Smith081ad4d2017-01-24 19:39:46 +00002201.. option:: -moslib=<arg>
2202
Richard Smith081ad4d2017-01-24 19:39:46 +00002203.. option:: -mpie-copy-relocations, -mno-pie-copy-relocations
2204
2205Use copy relocations support for PIE builds
2206
Craig Topper9a724aa2017-12-11 21:09:19 +00002207.. option:: -mprefer-vector-width=<arg>
2208
2209Specifies preferred vector width for auto-vectorization. Defaults to 'none' which allows target specific decisions.
2210
Richard Smith081ad4d2017-01-24 19:39:46 +00002211.. option:: -mqdsp6-compat
2212
2213Enable hexagon-qdsp6 backward compatibility
2214
Richard Smith081ad4d2017-01-24 19:39:46 +00002215.. option:: -mrecip
2216
Richard Smithb2c82a62017-01-27 01:54:42 +00002217.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00002218.. option:: -mrecip=<arg1>,<arg2>...
Richard Smithb2c82a62017-01-27 01:54:42 +00002219.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00002220
Richard Smith081ad4d2017-01-24 19:39:46 +00002221.. option:: -mred-zone, -mno-red-zone
2222
Richard Smith081ad4d2017-01-24 19:39:46 +00002223.. option:: -mregparm=<arg>
2224
Richard Smith081ad4d2017-01-24 19:39:46 +00002225.. option:: -mrelax-all, -mno-relax-all
2226
2227(integrated-as) Relax all machine instructions
2228
Richard Smith081ad4d2017-01-24 19:39:46 +00002229.. option:: -mrtd, -mno-rtd
2230
2231Make StdCall calling convention the default
2232
Richard Smith081ad4d2017-01-24 19:39:46 +00002233.. option:: -msingle-float
2234
Richard Smith081ad4d2017-01-24 19:39:46 +00002235.. option:: -msoft-float, -mno-soft-float
2236
2237Use software floating point
2238
Richard Smith081ad4d2017-01-24 19:39:46 +00002239.. option:: -mstack-alignment=<arg>
2240
2241Set the stack alignment
2242
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00002243.. option:: -mstack-arg-probe, -mno-stack-arg-probe
2244
2245Enable stack probes
2246
Richard Smith081ad4d2017-01-24 19:39:46 +00002247.. option:: -mstack-probe-size=<arg>
2248
2249Set the stack probe size
2250
Richard Smith081ad4d2017-01-24 19:39:46 +00002251.. option:: -mstackrealign, -mno-stackrealign
2252
2253Force realign the stack at entry to every function
2254
Richard Smith081ad4d2017-01-24 19:39:46 +00002255.. option:: -mthread-model <arg>
2256
2257The thread model to use, e.g. posix, single (posix by default)
2258
Richard Smith081ad4d2017-01-24 19:39:46 +00002259.. option:: -mthreads<arg>
2260
Richard Smith081ad4d2017-01-24 19:39:46 +00002261.. option:: -mthumb, -mno-thumb
2262
Richard Smith081ad4d2017-01-24 19:39:46 +00002263.. option:: -mtune=<arg>
2264
Richard Smith78e23fd2017-04-13 22:39:49 +00002265.. option:: -mtvos-version-min=<arg>, -mappletvos-version-min=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00002266
Richard Smith081ad4d2017-01-24 19:39:46 +00002267.. option:: -municode<arg>
2268
Richard Smith081ad4d2017-01-24 19:39:46 +00002269.. option:: -mvx, -mno-vx
2270
Richard Smith081ad4d2017-01-24 19:39:46 +00002271.. option:: -mwarn-nonportable-cfstrings, -mno-warn-nonportable-cfstrings
2272
Richard Smith78e23fd2017-04-13 22:39:49 +00002273.. option:: -mwatchos-version-min=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00002274
Richard Smith081ad4d2017-01-24 19:39:46 +00002275.. option:: -mwindows<arg>
2276
Richard Smith081ad4d2017-01-24 19:39:46 +00002277.. option:: -mx32
2278
Richard Smith081ad4d2017-01-24 19:39:46 +00002279.. option:: -mxgot, -mno-xgot
2280
2281AARCH64
2282-------
Richard Smith081ad4d2017-01-24 19:39:46 +00002283.. option:: -ffixed-x18
2284
2285Reserve the x18 register (AArch64 only)
2286
Richard Smith081ad4d2017-01-24 19:39:46 +00002287.. option:: -mfix-cortex-a53-835769, -mno-fix-cortex-a53-835769
2288
2289Workaround Cortex-A53 erratum 835769 (AArch64 only)
2290
Richard Smith081ad4d2017-01-24 19:39:46 +00002291.. option:: -mgeneral-regs-only
2292
2293Generate code which only uses the general purpose registers (AArch64 only)
2294
2295AMDGPU
2296------
Craig Topper16418662017-11-20 18:07:43 +00002297.. option:: -mxnack, -mno-xnack
2298
2299Enable XNACK (AMDGPU only)
2300
Richard Smith081ad4d2017-01-24 19:39:46 +00002301ARM
2302---
Richard Smith081ad4d2017-01-24 19:39:46 +00002303.. option:: -ffixed-r9
2304
2305Reserve the r9 register (ARM only)
2306
Richard Smith081ad4d2017-01-24 19:39:46 +00002307.. option:: -mcrc
2308
2309Allow use of CRC instructions (ARM only)
2310
Richard Smith081ad4d2017-01-24 19:39:46 +00002311.. option:: -mexecute-only, -mno-execute-only, -mpure-code
2312
2313Disallow generation of data access to code sections (ARM only)
2314
Richard Smith081ad4d2017-01-24 19:39:46 +00002315.. option:: -mno-movt
2316
2317Disallow use of movt/movw pairs (ARM only)
2318
Richard Smith78e23fd2017-04-13 22:39:49 +00002319.. option:: -mno-neg-immediates
2320
2321Disallow converting instructions with negative immediates to their negation or inversion.
2322
Richard Smith081ad4d2017-01-24 19:39:46 +00002323.. option:: -mnocrc
2324
2325Disallow use of CRC instructions (ARM only)
2326
Richard Smith081ad4d2017-01-24 19:39:46 +00002327.. option:: -mrestrict-it, -mno-restrict-it
2328
2329Disallow generation of deprecated IT blocks for ARMv8. It is on by default for ARMv8 Thumb mode.
2330
Craig Topper16418662017-11-20 18:07:43 +00002331.. option:: -mtp=<arg>
2332
2333Read thread pointer from coprocessor register (ARM only)
2334
Richard Smith081ad4d2017-01-24 19:39:46 +00002335.. option:: -munaligned-access, -mno-unaligned-access
2336
2337Allow memory accesses to be unaligned (AArch32/AArch64 only)
2338
2339Hexagon
2340-------
Craig Topper16418662017-11-20 18:07:43 +00002341.. option:: -mieee-rnd-near
2342
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00002343.. option:: -mpackets, -mno-packets
2344
2345Enable generation of instruction packets
2346
Craig Topper16418662017-11-20 18:07:43 +00002347Hexagon
2348-------
Richard Smith081ad4d2017-01-24 19:39:46 +00002349.. option:: -mhvx, -mno-hvx
2350
2351Enable Hexagon Vector eXtensions
2352
Craig Topper16418662017-11-20 18:07:43 +00002353.. option:: -mhvx-length=<arg>
2354
2355Set Hexagon Vector Length
2356
2357.. program:: clang1
2358.. option:: -mhvx=<arg>
2359.. program:: clang
2360
2361Enable Hexagon Vector eXtensions
Richard Smith081ad4d2017-01-24 19:39:46 +00002362
2363PowerPC
2364-------
Richard Smith78e23fd2017-04-13 22:39:49 +00002365.. option:: -maltivec, -mno-altivec
2366
Richard Smith081ad4d2017-01-24 19:39:46 +00002367.. option:: -mcmpb, -mno-cmpb
2368
Richard Smith081ad4d2017-01-24 19:39:46 +00002369.. option:: -mcrbits, -mno-crbits
2370
Richard Smith081ad4d2017-01-24 19:39:46 +00002371.. option:: -mcrypto, -mno-crypto
2372
Richard Smith081ad4d2017-01-24 19:39:46 +00002373.. option:: -mdirect-move, -mno-direct-move
2374
Richard Smith081ad4d2017-01-24 19:39:46 +00002375.. option:: -mfloat128, -mno-float128
2376
Richard Smith081ad4d2017-01-24 19:39:46 +00002377.. option:: -mfprnd, -mno-fprnd
2378
Richard Smith081ad4d2017-01-24 19:39:46 +00002379.. option:: -mhtm, -mno-htm
2380
Richard Smith081ad4d2017-01-24 19:39:46 +00002381.. option:: -minvariant-function-descriptors, -mno-invariant-function-descriptors
2382
Richard Smith081ad4d2017-01-24 19:39:46 +00002383.. option:: -misel, -mno-isel
2384
Richard Smith081ad4d2017-01-24 19:39:46 +00002385.. option:: -mlongcall, -mno-longcall
2386
Richard Smith081ad4d2017-01-24 19:39:46 +00002387.. option:: -mmfocrf, -mmfcrf, -mno-mfocrf
2388
Richard Smith081ad4d2017-01-24 19:39:46 +00002389.. option:: -mpopcntd, -mno-popcntd
2390
Richard Smith081ad4d2017-01-24 19:39:46 +00002391.. option:: -mpower8-vector, -mno-power8-vector
2392
Richard Smith081ad4d2017-01-24 19:39:46 +00002393.. option:: -mpower9-vector, -mno-power9-vector
2394
Richard Smith081ad4d2017-01-24 19:39:46 +00002395.. option:: -mqpx, -mno-qpx
2396
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00002397.. option:: -msecure-plt
2398
Richard Smith081ad4d2017-01-24 19:39:46 +00002399.. option:: -mvsx, -mno-vsx
2400
2401WebAssembly
2402-----------
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00002403.. option:: -mexception-handling, -mno-exception-handling
2404
Craig Topper188252d2017-12-11 21:09:16 +00002405.. option:: -mnontrapping-fptoint, -mno-nontrapping-fptoint
2406
Dan Gohmand0c4e1e2018-01-19 17:16:32 +00002407.. option:: -msign-ext, -mno-sign-ext
2408
Richard Smith081ad4d2017-01-24 19:39:46 +00002409.. option:: -msimd128, -mno-simd128
2410
2411X86
2412---
Richard Smith081ad4d2017-01-24 19:39:46 +00002413.. option:: -m3dnow, -mno-3dnow
2414
Richard Smith081ad4d2017-01-24 19:39:46 +00002415.. option:: -m3dnowa, -mno-3dnowa
2416
Richard Smith081ad4d2017-01-24 19:39:46 +00002417.. option:: -madx, -mno-adx
2418
Richard Smith081ad4d2017-01-24 19:39:46 +00002419.. option:: -maes, -mno-aes
2420
Richard Smith081ad4d2017-01-24 19:39:46 +00002421.. option:: -mavx, -mno-avx
2422
Richard Smith081ad4d2017-01-24 19:39:46 +00002423.. option:: -mavx2, -mno-avx2
2424
Craig Topper287c8012018-01-03 18:29:12 +00002425.. option:: -mavx512bitalg, -mno-avx512bitalg
2426
Richard Smith081ad4d2017-01-24 19:39:46 +00002427.. option:: -mavx512bw, -mno-avx512bw
2428
Richard Smith081ad4d2017-01-24 19:39:46 +00002429.. option:: -mavx512cd, -mno-avx512cd
2430
Richard Smith081ad4d2017-01-24 19:39:46 +00002431.. option:: -mavx512dq, -mno-avx512dq
2432
Richard Smith081ad4d2017-01-24 19:39:46 +00002433.. option:: -mavx512er, -mno-avx512er
2434
Richard Smith081ad4d2017-01-24 19:39:46 +00002435.. option:: -mavx512f, -mno-avx512f
2436
Richard Smith081ad4d2017-01-24 19:39:46 +00002437.. option:: -mavx512ifma, -mno-avx512ifma
2438
Richard Smith081ad4d2017-01-24 19:39:46 +00002439.. option:: -mavx512pf, -mno-avx512pf
2440
Richard Smith081ad4d2017-01-24 19:39:46 +00002441.. option:: -mavx512vbmi, -mno-avx512vbmi
2442
Craig Topper287c8012018-01-03 18:29:12 +00002443.. option:: -mavx512vbmi2, -mno-avx512vbmi2
2444
Richard Smith081ad4d2017-01-24 19:39:46 +00002445.. option:: -mavx512vl, -mno-avx512vl
2446
Craig Topper287c8012018-01-03 18:29:12 +00002447.. option:: -mavx512vnni, -mno-avx512vnni
2448
Craig Topperd23254a2017-07-20 17:52:48 +00002449.. option:: -mavx512vpopcntdq, -mno-avx512vpopcntdq
2450
Richard Smith081ad4d2017-01-24 19:39:46 +00002451.. option:: -mbmi, -mno-bmi
2452
Richard Smith081ad4d2017-01-24 19:39:46 +00002453.. option:: -mbmi2, -mno-bmi2
2454
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00002455.. option:: -mcldemote, -mno-cldemote
2456
Craig Topper78b47872017-02-08 06:48:58 +00002457.. option:: -mclflushopt, -mno-clflushopt
2458
Craig Topper177a57c2017-02-08 07:57:01 +00002459.. option:: -mclwb, -mno-clwb
2460
Richard Smith78e23fd2017-04-13 22:39:49 +00002461.. option:: -mclzero, -mno-clzero
2462
Richard Smith081ad4d2017-01-24 19:39:46 +00002463.. option:: -mcx16, -mno-cx16
2464
Richard Smith081ad4d2017-01-24 19:39:46 +00002465.. option:: -mf16c, -mno-f16c
2466
Richard Smith081ad4d2017-01-24 19:39:46 +00002467.. option:: -mfma, -mno-fma
2468
Richard Smith081ad4d2017-01-24 19:39:46 +00002469.. option:: -mfma4, -mno-fma4
2470
Richard Smith081ad4d2017-01-24 19:39:46 +00002471.. option:: -mfsgsbase, -mno-fsgsbase
2472
Richard Smith081ad4d2017-01-24 19:39:46 +00002473.. option:: -mfxsr, -mno-fxsr
2474
Craig Topper287c8012018-01-03 18:29:12 +00002475.. option:: -mgfni, -mno-gfni
2476
Craig Topper188252d2017-12-11 21:09:16 +00002477.. option:: -mibt, -mno-ibt
2478
Craig Topperd23254a2017-07-20 17:52:48 +00002479.. option:: -mlwp, -mno-lwp
2480
Richard Smith081ad4d2017-01-24 19:39:46 +00002481.. option:: -mlzcnt, -mno-lzcnt
2482
Richard Smith081ad4d2017-01-24 19:39:46 +00002483.. option:: -mmmx, -mno-mmx
2484
Craig Topper177a57c2017-02-08 07:57:01 +00002485.. option:: -mmovbe, -mno-movbe
2486
Craig Topperb16cb822017-02-08 07:56:42 +00002487.. option:: -mmpx, -mno-mpx
2488
Richard Smith081ad4d2017-01-24 19:39:46 +00002489.. option:: -mmwaitx, -mno-mwaitx
2490
Richard Smith081ad4d2017-01-24 19:39:46 +00002491.. option:: -mpclmul, -mno-pclmul
2492
Richard Smith081ad4d2017-01-24 19:39:46 +00002493.. option:: -mpku, -mno-pku
2494
Richard Smith081ad4d2017-01-24 19:39:46 +00002495.. option:: -mpopcnt, -mno-popcnt
2496
Craig Topperd2bf7b02017-02-08 08:23:40 +00002497.. option:: -mprefetchwt1, -mno-prefetchwt1
2498
Richard Smith081ad4d2017-01-24 19:39:46 +00002499.. option:: -mprfchw, -mno-prfchw
2500
Craig Topper596527b2018-01-23 18:40:15 +00002501.. option:: -mrdpid, -mno-rdpid
2502
Richard Smith081ad4d2017-01-24 19:39:46 +00002503.. option:: -mrdrnd, -mno-rdrnd
2504
Richard Smith081ad4d2017-01-24 19:39:46 +00002505.. option:: -mrdseed, -mno-rdseed
2506
Craig Topper596527b2018-01-23 18:40:15 +00002507.. option:: -mretpoline, -mno-retpoline
2508
2509.. option:: -mretpoline-external-thunk, -mno-retpoline-external-thunk
2510
Richard Smith081ad4d2017-01-24 19:39:46 +00002511.. option:: -mrtm, -mno-rtm
2512
Jonas Hahnfelda180fc42018-02-22 17:10:28 +00002513.. option:: -msahf, -mno-sahf
2514
Craig Topper204ecff2017-02-08 08:23:17 +00002515.. option:: -msgx, -mno-sgx
2516
Richard Smith081ad4d2017-01-24 19:39:46 +00002517.. option:: -msha, -mno-sha
2518
Craig Topper188252d2017-12-11 21:09:16 +00002519.. option:: -mshstk, -mno-shstk
2520
Richard Smith081ad4d2017-01-24 19:39:46 +00002521.. option:: -msse, -mno-sse
2522
Richard Smith081ad4d2017-01-24 19:39:46 +00002523.. option:: -msse2, -mno-sse2
2524
Richard Smith081ad4d2017-01-24 19:39:46 +00002525.. option:: -msse3, -mno-sse3
2526
Richard Smith081ad4d2017-01-24 19:39:46 +00002527.. option:: -msse4.1, -mno-sse4.1
2528
Richard Smithb2c82a62017-01-27 01:54:42 +00002529.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00002530.. option:: -msse4.2, -mno-sse4.2, -msse4
Richard Smithb2c82a62017-01-27 01:54:42 +00002531.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00002532
Richard Smith081ad4d2017-01-24 19:39:46 +00002533.. option:: -msse4a, -mno-sse4a
2534
Richard Smith081ad4d2017-01-24 19:39:46 +00002535.. option:: -mssse3, -mno-ssse3
2536
Richard Smith081ad4d2017-01-24 19:39:46 +00002537.. option:: -mtbm, -mno-tbm
2538
Craig Topper287c8012018-01-03 18:29:12 +00002539.. option:: -mvaes, -mno-vaes
2540
2541.. option:: -mvpclmulqdq, -mno-vpclmulqdq
2542
Gabor Buellaa0520162018-04-11 20:09:09 +00002543.. option:: -mwbnoinvd, -mno-wbnoinvd
2544
Richard Smith081ad4d2017-01-24 19:39:46 +00002545.. option:: -mx87, -m80387, -mno-x87
2546
Richard Smith081ad4d2017-01-24 19:39:46 +00002547.. option:: -mxop, -mno-xop
2548
Richard Smith081ad4d2017-01-24 19:39:46 +00002549.. option:: -mxsave, -mno-xsave
2550
Richard Smith081ad4d2017-01-24 19:39:46 +00002551.. option:: -mxsavec, -mno-xsavec
2552
Richard Smith081ad4d2017-01-24 19:39:46 +00002553.. option:: -mxsaveopt, -mno-xsaveopt
2554
Richard Smith081ad4d2017-01-24 19:39:46 +00002555.. option:: -mxsaves, -mno-xsaves
2556
2557Optimization level
2558~~~~~~~~~~~~~~~~~~
2559
2560Flags controlling how much optimization should be performed.
2561
Richard Smith081ad4d2017-01-24 19:39:46 +00002562.. option:: -O<arg>, -O (equivalent to -O2), --optimize, --optimize=<arg>
2563
Richard Smith081ad4d2017-01-24 19:39:46 +00002564.. option:: -Ofast<arg>
2565
2566Debug information generation
2567~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2568
2569Flags controlling how much and what kind of debug information should be
2570generated.
2571
2572Kind and level of debug information
2573-----------------------------------
Richard Smith081ad4d2017-01-24 19:39:46 +00002574.. option:: -g, --debug, --debug=<arg>
2575
2576Generate source-level debug information
2577
Richard Smith081ad4d2017-01-24 19:39:46 +00002578.. option:: -gdwarf-2
2579
2580Generate source-level debug information with dwarf version 2
2581
Richard Smith081ad4d2017-01-24 19:39:46 +00002582.. option:: -gdwarf-3
2583
2584Generate source-level debug information with dwarf version 3
2585
Richard Smith081ad4d2017-01-24 19:39:46 +00002586.. option:: -gdwarf-4, -gdwarf
2587
2588Generate source-level debug information with dwarf version 4
2589
Richard Smith081ad4d2017-01-24 19:39:46 +00002590.. option:: -gdwarf-5
2591
2592Generate source-level debug information with dwarf version 5
2593
Richard Smith081ad4d2017-01-24 19:39:46 +00002594.. option:: -gfull
2595
Richard Smith081ad4d2017-01-24 19:39:46 +00002596.. option:: -gused
2597
2598Debug level
2599___________
Richard Smith081ad4d2017-01-24 19:39:46 +00002600.. option:: -g0
2601
Richard Smith081ad4d2017-01-24 19:39:46 +00002602.. option:: -g2
2603
Richard Smith081ad4d2017-01-24 19:39:46 +00002604.. option:: -g3
2605
Richard Smith081ad4d2017-01-24 19:39:46 +00002606.. option:: -ggdb0
2607
Richard Smith081ad4d2017-01-24 19:39:46 +00002608.. option:: -ggdb1
2609
Richard Smith081ad4d2017-01-24 19:39:46 +00002610.. option:: -ggdb2
2611
Richard Smith081ad4d2017-01-24 19:39:46 +00002612.. option:: -ggdb3
2613
Richard Smith081ad4d2017-01-24 19:39:46 +00002614.. option:: -gline-tables-only, -g1, -gmlt
2615
2616Emit debug line number tables only
2617
Richard Smith081ad4d2017-01-24 19:39:46 +00002618.. option:: -gmodules
2619
2620Generate debug info with external references to clang modules or precompiled headers
2621
2622Debugger to tune debug information for
2623______________________________________
Richard Smith081ad4d2017-01-24 19:39:46 +00002624.. option:: -ggdb
2625
Richard Smith081ad4d2017-01-24 19:39:46 +00002626.. option:: -glldb
2627
Richard Smith081ad4d2017-01-24 19:39:46 +00002628.. option:: -gsce
2629
2630Debug information flags
2631-----------------------
Richard Smith081ad4d2017-01-24 19:39:46 +00002632.. option:: -gcolumn-info, -gno-column-info
2633
Richard Smith081ad4d2017-01-24 19:39:46 +00002634.. option:: -gdwarf-aranges
2635
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00002636.. option:: -gembed-source, -gno-embed-source
Scott Lindera2fbcef2018-02-26 17:32:31 +00002637
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00002638Embed source text in DWARF debug sections
Scott Lindera2fbcef2018-02-26 17:32:31 +00002639
Richard Smith081ad4d2017-01-24 19:39:46 +00002640.. option:: -ggnu-pubnames
2641
Richard Smith081ad4d2017-01-24 19:39:46 +00002642.. option:: -grecord-gcc-switches, -gno-record-gcc-switches
2643
Richard Smith081ad4d2017-01-24 19:39:46 +00002644.. option:: -gsplit-dwarf
2645
Richard Smith081ad4d2017-01-24 19:39:46 +00002646.. option:: -gstrict-dwarf, -gno-strict-dwarf
2647
Craig Topperd23254a2017-07-20 17:52:48 +00002648.. option:: -gz
2649
2650DWARF debug sections compression type
2651
2652.. program:: clang1
2653.. option:: -gz=<arg>
2654.. program:: clang
2655
2656DWARF debug sections compression type
2657
Richard Smithc5b2e002017-01-27 02:08:37 +00002658Static analyzer flags
2659=====================
Richard Smith081ad4d2017-01-24 19:39:46 +00002660
Richard Smithc5b2e002017-01-27 02:08:37 +00002661Flags controlling the behavior of the Clang Static Analyzer.
Richard Smith081ad4d2017-01-24 19:39:46 +00002662
Richard Smithc5b2e002017-01-27 02:08:37 +00002663.. option:: -Xanalyzer <arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00002664
Richard Smithc5b2e002017-01-27 02:08:37 +00002665Pass <arg> to the static analyzer
Richard Smith081ad4d2017-01-24 19:39:46 +00002666
2667Fortran compilation flags
2668=========================
2669
2670Flags that will be passed onto the ``gfortran`` compiler when Clang is given
2671a Fortran input.
2672
Richard Smithc5b2e002017-01-27 02:08:37 +00002673.. option:: -A<arg>, --assert <arg>, --assert=<arg>
2674
Richard Smith081ad4d2017-01-24 19:39:46 +00002675.. option:: -A-<arg>
2676
Richard Smith081ad4d2017-01-24 19:39:46 +00002677.. option:: -J<arg>
2678
Richard Smith081ad4d2017-01-24 19:39:46 +00002679.. option:: -cpp
2680
Richard Smith081ad4d2017-01-24 19:39:46 +00002681.. option:: -faggressive-function-elimination, -fno-aggressive-function-elimination
2682
Richard Smith081ad4d2017-01-24 19:39:46 +00002683.. option:: -falign-commons, -fno-align-commons
2684
Richard Smith081ad4d2017-01-24 19:39:46 +00002685.. option:: -fall-intrinsics, -fno-all-intrinsics
2686
Richard Smith081ad4d2017-01-24 19:39:46 +00002687.. option:: -fautomatic, -fno-automatic
2688
Richard Smith081ad4d2017-01-24 19:39:46 +00002689.. option:: -fbackslash, -fno-backslash
2690
Richard Smith081ad4d2017-01-24 19:39:46 +00002691.. option:: -fbacktrace, -fno-backtrace
2692
Richard Smith081ad4d2017-01-24 19:39:46 +00002693.. option:: -fblas-matmul-limit=<arg>
2694
Richard Smith081ad4d2017-01-24 19:39:46 +00002695.. option:: -fbounds-check, -fno-bounds-check
2696
Richard Smith081ad4d2017-01-24 19:39:46 +00002697.. option:: -fcheck-array-temporaries, -fno-check-array-temporaries
2698
Richard Smith081ad4d2017-01-24 19:39:46 +00002699.. option:: -fcheck=<arg>
2700
Richard Smith081ad4d2017-01-24 19:39:46 +00002701.. option:: -fcoarray=<arg>
2702
Richard Smith081ad4d2017-01-24 19:39:46 +00002703.. option:: -fconvert=<arg>
2704
Richard Smith081ad4d2017-01-24 19:39:46 +00002705.. option:: -fcray-pointer, -fno-cray-pointer
2706
Richard Smith081ad4d2017-01-24 19:39:46 +00002707.. option:: -fd-lines-as-code, -fno-d-lines-as-code
2708
Richard Smith081ad4d2017-01-24 19:39:46 +00002709.. option:: -fd-lines-as-comments, -fno-d-lines-as-comments
2710
Richard Smith081ad4d2017-01-24 19:39:46 +00002711.. option:: -fdefault-double-8, -fno-default-double-8
2712
Richard Smith081ad4d2017-01-24 19:39:46 +00002713.. option:: -fdefault-integer-8, -fno-default-integer-8
2714
Richard Smith081ad4d2017-01-24 19:39:46 +00002715.. option:: -fdefault-real-8, -fno-default-real-8
2716
Richard Smith081ad4d2017-01-24 19:39:46 +00002717.. option:: -fdollar-ok, -fno-dollar-ok
2718
Richard Smith081ad4d2017-01-24 19:39:46 +00002719.. option:: -fdump-fortran-optimized, -fno-dump-fortran-optimized
2720
Richard Smith081ad4d2017-01-24 19:39:46 +00002721.. option:: -fdump-fortran-original, -fno-dump-fortran-original
2722
Richard Smith081ad4d2017-01-24 19:39:46 +00002723.. option:: -fdump-parse-tree, -fno-dump-parse-tree
2724
Richard Smith081ad4d2017-01-24 19:39:46 +00002725.. option:: -fexternal-blas, -fno-external-blas
2726
Richard Smith081ad4d2017-01-24 19:39:46 +00002727.. option:: -ff2c, -fno-f2c
2728
Richard Smith081ad4d2017-01-24 19:39:46 +00002729.. option:: -ffixed-form, -fno-fixed-form
2730
Richard Smith081ad4d2017-01-24 19:39:46 +00002731.. option:: -ffixed-line-length-<arg>
2732
Richard Smith081ad4d2017-01-24 19:39:46 +00002733.. option:: -ffpe-trap=<arg>
2734
Richard Smith081ad4d2017-01-24 19:39:46 +00002735.. option:: -ffree-form, -fno-free-form
2736
Richard Smith081ad4d2017-01-24 19:39:46 +00002737.. option:: -ffree-line-length-<arg>
2738
Richard Smith081ad4d2017-01-24 19:39:46 +00002739.. option:: -ffrontend-optimize, -fno-frontend-optimize
2740
Richard Smith081ad4d2017-01-24 19:39:46 +00002741.. option:: -fimplicit-none, -fno-implicit-none
2742
Richard Smith081ad4d2017-01-24 19:39:46 +00002743.. option:: -finit-character=<arg>
2744
Richard Smith081ad4d2017-01-24 19:39:46 +00002745.. option:: -finit-integer=<arg>
2746
Richard Smith081ad4d2017-01-24 19:39:46 +00002747.. option:: -finit-local-zero, -fno-init-local-zero
2748
Richard Smith081ad4d2017-01-24 19:39:46 +00002749.. option:: -finit-logical=<arg>
2750
Richard Smith081ad4d2017-01-24 19:39:46 +00002751.. option:: -finit-real=<arg>
2752
Richard Smith081ad4d2017-01-24 19:39:46 +00002753.. option:: -finteger-4-integer-8, -fno-integer-4-integer-8
2754
Richard Smith081ad4d2017-01-24 19:39:46 +00002755.. option:: -fintrinsic-modules-path, -fno-intrinsic-modules-path
2756
Richard Smith081ad4d2017-01-24 19:39:46 +00002757.. option:: -fmax-array-constructor=<arg>
2758
Richard Smith081ad4d2017-01-24 19:39:46 +00002759.. option:: -fmax-errors=<arg>
2760
Richard Smith081ad4d2017-01-24 19:39:46 +00002761.. option:: -fmax-identifier-length, -fno-max-identifier-length
2762
Richard Smith081ad4d2017-01-24 19:39:46 +00002763.. option:: -fmax-stack-var-size=<arg>
2764
Richard Smith081ad4d2017-01-24 19:39:46 +00002765.. option:: -fmax-subrecord-length=<arg>
2766
Richard Smith081ad4d2017-01-24 19:39:46 +00002767.. option:: -fmodule-private, -fno-module-private
2768
Richard Smith081ad4d2017-01-24 19:39:46 +00002769.. option:: -fpack-derived, -fno-pack-derived
2770
Richard Smith081ad4d2017-01-24 19:39:46 +00002771.. option:: -fprotect-parens, -fno-protect-parens
2772
Richard Smith081ad4d2017-01-24 19:39:46 +00002773.. option:: -frange-check, -fno-range-check
2774
Richard Smith081ad4d2017-01-24 19:39:46 +00002775.. option:: -freal-4-real-10, -fno-real-4-real-10
2776
Richard Smith081ad4d2017-01-24 19:39:46 +00002777.. option:: -freal-4-real-16, -fno-real-4-real-16
2778
Richard Smith081ad4d2017-01-24 19:39:46 +00002779.. option:: -freal-4-real-8, -fno-real-4-real-8
2780
Richard Smith081ad4d2017-01-24 19:39:46 +00002781.. option:: -freal-8-real-10, -fno-real-8-real-10
2782
Richard Smith081ad4d2017-01-24 19:39:46 +00002783.. option:: -freal-8-real-16, -fno-real-8-real-16
2784
Richard Smith081ad4d2017-01-24 19:39:46 +00002785.. option:: -freal-8-real-4, -fno-real-8-real-4
2786
Richard Smith081ad4d2017-01-24 19:39:46 +00002787.. option:: -frealloc-lhs, -fno-realloc-lhs
2788
Richard Smith081ad4d2017-01-24 19:39:46 +00002789.. option:: -frecord-marker=<arg>
2790
Richard Smith081ad4d2017-01-24 19:39:46 +00002791.. option:: -frecursive, -fno-recursive
2792
Richard Smith081ad4d2017-01-24 19:39:46 +00002793.. option:: -frepack-arrays, -fno-repack-arrays
2794
Richard Smith081ad4d2017-01-24 19:39:46 +00002795.. option:: -fsecond-underscore, -fno-second-underscore
2796
Richard Smith081ad4d2017-01-24 19:39:46 +00002797.. option:: -fsign-zero, -fno-sign-zero
2798
Richard Smith081ad4d2017-01-24 19:39:46 +00002799.. option:: -fstack-arrays, -fno-stack-arrays
2800
Richard Smith081ad4d2017-01-24 19:39:46 +00002801.. option:: -funderscoring, -fno-underscoring
2802
Richard Smith081ad4d2017-01-24 19:39:46 +00002803.. option:: -fwhole-file, -fno-whole-file
2804
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00002805.. option:: -imultilib <arg>
2806
Richard Smith081ad4d2017-01-24 19:39:46 +00002807.. option:: -nocpp
2808
Richard Smith081ad4d2017-01-24 19:39:46 +00002809.. option:: -static-libgfortran
2810
Richard Smithc5b2e002017-01-27 02:08:37 +00002811Linker flags
2812============
2813Flags that are passed on to the linker
2814
2815.. option:: -L<dir>, --library-directory <arg>, --library-directory=<arg>
2816
2817Add directory to library search path
2818
2819.. option:: -Mach
2820
2821.. option:: -T<script>
2822
2823Specify <script> as linker script
2824
Richard Smith78e23fd2017-04-13 22:39:49 +00002825.. option:: -Tbss<addr>
Richard Smithc5b2e002017-01-27 02:08:37 +00002826
2827Set starting address of BSS to <addr>
2828
Richard Smith78e23fd2017-04-13 22:39:49 +00002829.. option:: -Tdata<addr>
Richard Smithc5b2e002017-01-27 02:08:37 +00002830
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00002831Set starting address of DATA to <addr>
Richard Smithc5b2e002017-01-27 02:08:37 +00002832
Richard Smith78e23fd2017-04-13 22:39:49 +00002833.. option:: -Ttext<addr>
Richard Smithc5b2e002017-01-27 02:08:37 +00002834
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00002835Set starting address of TEXT to <addr>
Richard Smithc5b2e002017-01-27 02:08:37 +00002836
2837.. option:: -Wl,<arg>,<arg2>...
2838
2839Pass the comma separated arguments in <arg> to the linker
2840
2841.. option:: -X
2842
2843.. option:: -Xlinker <arg>, --for-linker <arg>, --for-linker=<arg>
2844
2845Pass <arg> to the linker
2846
2847.. program:: clang1
2848.. option:: -Z
2849.. program:: clang
2850
2851.. option:: -e<arg>, --entry
2852
2853.. option:: -filelist <arg>
2854
2855.. option:: -l<arg>
2856
2857.. option:: -r
2858
2859.. option:: -rpath <arg>
2860
2861.. option:: -s
2862
2863.. option:: -t
2864
2865.. option:: -u<arg>, --force-link <arg>, --force-link=<arg>
2866
2867.. option:: -undef
2868
2869undef all system defines
2870
2871.. option:: -undefined<arg>, --no-undefined
2872
2873.. option:: -z <arg>
2874
2875Pass -z <arg> to the linker
2876