blob: 1cbb3b8dc695902f7dc67fb0eca28ebd0d32f780 [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
64.. option:: -Xopenmp-target=<arg> <arg2>
65.. program:: clang
66
67Pass <arg> to the specified target offloading toolchain. The triple that identifies the toolchain must be provided after the equals sign.
68
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
Richard Smith081ad4d2017-01-24 19:39:46 +0000119.. option:: -client\_name<arg>
120
Richard Smith081ad4d2017-01-24 19:39:46 +0000121.. option:: -compatibility\_version<arg>
122
Craig Topper287c8012018-01-03 18:29:12 +0000123.. option:: --config <arg>
124
125Specifies configuration file
126
Richard Smith081ad4d2017-01-24 19:39:46 +0000127.. option:: --constant-cfstrings
128
Richard Smith081ad4d2017-01-24 19:39:46 +0000129.. option:: -coverage, --coverage
130
Richard Smith081ad4d2017-01-24 19:39:46 +0000131.. option:: --cuda-compile-host-device
132
133Compile CUDA code for both host and device (default). Has no effect on non-CUDA compilations.
134
Richard Smith081ad4d2017-01-24 19:39:46 +0000135.. option:: --cuda-device-only
136
137Compile CUDA code for device only
138
Richard Smith081ad4d2017-01-24 19:39:46 +0000139.. option:: --cuda-gpu-arch=<arg>, --no-cuda-gpu-arch=<arg>
140
141CUDA GPU architecture (e.g. sm\_35). May be specified more than once.
142
Richard Smith081ad4d2017-01-24 19:39:46 +0000143.. option:: --cuda-host-only
144
145Compile CUDA code for host only. Has no effect on non-CUDA compilations.
146
Richard Smith081ad4d2017-01-24 19:39:46 +0000147.. option:: --cuda-noopt-device-debug, --no-cuda-noopt-device-debug
148
149Enable device-side debug info generation. Disables ptxas optimizations.
150
Richard Smith081ad4d2017-01-24 19:39:46 +0000151.. option:: -current\_version<arg>
152
Richard Smith081ad4d2017-01-24 19:39:46 +0000153.. option:: -dead\_strip
154
Richard Smith081ad4d2017-01-24 19:39:46 +0000155.. option:: -dependency-dot <arg>
156
157Filename to write DOT-formatted header dependencies to
158
Richard Smith081ad4d2017-01-24 19:39:46 +0000159.. option:: -dependency-file <arg>
160
161Filename (or -) to write dependency output to
162
Richard Smith081ad4d2017-01-24 19:39:46 +0000163.. option:: -dumpmachine
164
Richard Smith081ad4d2017-01-24 19:39:46 +0000165.. option:: -dumpversion
166
Richard Smith081ad4d2017-01-24 19:39:46 +0000167.. option:: --dyld-prefix=<arg>, --dyld-prefix <arg>
168
Richard Smith081ad4d2017-01-24 19:39:46 +0000169.. option:: -dylib\_file <arg>
170
Richard Smith081ad4d2017-01-24 19:39:46 +0000171.. option:: -dylinker
172
Richard Smithb2c82a62017-01-27 01:54:42 +0000173.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000174.. option:: -dylinker\_install\_name<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000175.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000176
Richard Smith081ad4d2017-01-24 19:39:46 +0000177.. option:: -dynamic
178
Richard Smith081ad4d2017-01-24 19:39:46 +0000179.. option:: -dynamiclib
180
Richard Smith081ad4d2017-01-24 19:39:46 +0000181.. option:: -emit-ast
182
183Emit Clang AST files for source inputs
184
Richard Smith081ad4d2017-01-24 19:39:46 +0000185.. option:: -exported\_symbols\_list <arg>
186
Richard Smith081ad4d2017-01-24 19:39:46 +0000187.. option:: -faligned-new=<arg>
188
Richard Smith081ad4d2017-01-24 19:39:46 +0000189.. option:: -fcuda-approx-transcendentals, -fno-cuda-approx-transcendentals
190
191Use approximate transcendental functions
192
Richard Smith081ad4d2017-01-24 19:39:46 +0000193.. option:: -fcuda-flush-denormals-to-zero, -fno-cuda-flush-denormals-to-zero
194
195Flush denormal floating point values to zero in CUDA device mode.
196
Richard Smith081ad4d2017-01-24 19:39:46 +0000197.. option:: -fheinous-gnu-extensions
198
Richard Smith081ad4d2017-01-24 19:39:46 +0000199.. option:: -flat\_namespace
200
Richard Smith081ad4d2017-01-24 19:39:46 +0000201.. option:: -fopenmp-targets=<arg1>,<arg2>...
202
203Specify comma-separated list of triples OpenMP offloading targets to be supported
204
Richard Smith081ad4d2017-01-24 19:39:46 +0000205.. option:: -force\_cpusubtype\_ALL
206
Richard Smithb2c82a62017-01-27 01:54:42 +0000207.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000208.. option:: -force\_flat\_namespace
Richard Smithb2c82a62017-01-27 01:54:42 +0000209.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000210
Richard Smithb2c82a62017-01-27 01:54:42 +0000211.. program:: clang2
Richard Smith081ad4d2017-01-24 19:39:46 +0000212.. option:: -force\_load <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000213.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000214
Richard Smith081ad4d2017-01-24 19:39:46 +0000215.. option:: -framework <arg>
216
Richard Smith78e23fd2017-04-13 22:39:49 +0000217.. option:: -frtlib-add-rpath, -fno-rtlib-add-rpath
218
219Add -rpath with architecture-specific resource directory to the linker flags
220
Richard Smith081ad4d2017-01-24 19:39:46 +0000221.. option:: --gcc-toolchain=<arg>, -gcc-toolchain <arg>
222
223Use the gcc toolchain at the given directory
224
Richard Smith081ad4d2017-01-24 19:39:46 +0000225.. option:: -gcodeview
226
227Generate CodeView debug information
228
Richard Smith081ad4d2017-01-24 19:39:46 +0000229.. option:: -headerpad\_max\_install\_names<arg>
230
Richard Smith081ad4d2017-01-24 19:39:46 +0000231.. option:: -help, --help
232
233Display available options
234
Richard Smith081ad4d2017-01-24 19:39:46 +0000235.. option:: --help-hidden
236
Richard Smith081ad4d2017-01-24 19:39:46 +0000237.. option:: -image\_base <arg>
238
Richard Smith081ad4d2017-01-24 19:39:46 +0000239.. option:: -index-header-map
240
241Make the next included directory (-I or -F) an indexer header map
242
Richard Smith081ad4d2017-01-24 19:39:46 +0000243.. option:: -init <arg>
244
Richard Smith081ad4d2017-01-24 19:39:46 +0000245.. option:: -install\_name <arg>
246
Richard Smith081ad4d2017-01-24 19:39:46 +0000247.. option:: -keep\_private\_externs
248
Richard Smith081ad4d2017-01-24 19:39:46 +0000249.. option:: -lazy\_framework <arg>
250
Richard Smithb2c82a62017-01-27 01:54:42 +0000251.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000252.. option:: -lazy\_library <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000253.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000254
Richard Smith081ad4d2017-01-24 19:39:46 +0000255.. option:: -mbig-endian, -EB
256
Richard Smith081ad4d2017-01-24 19:39:46 +0000257.. option:: --migrate
258
259Run the migrator
260
Richard Smith78e23fd2017-04-13 22:39:49 +0000261.. option:: -mios-simulator-version-min=<arg>, -miphonesimulator-version-min=<arg>
262
Richard Smith081ad4d2017-01-24 19:39:46 +0000263.. option:: -mlinker-version=<arg>
264
Richard Smith081ad4d2017-01-24 19:39:46 +0000265.. option:: -mlittle-endian, -EL
266
Richard Smith081ad4d2017-01-24 19:39:46 +0000267.. option:: -mllvm <arg>
268
269Additional arguments to forward to LLVM's option processing
270
Richard Smith081ad4d2017-01-24 19:39:46 +0000271.. option:: -module-dependency-dir <arg>
272
273Directory to dump module dependencies to
274
Richard Smith78e23fd2017-04-13 22:39:49 +0000275.. option:: -mtvos-simulator-version-min=<arg>, -mappletvsimulator-version-min=<arg>
276
Richard Smith081ad4d2017-01-24 19:39:46 +0000277.. option:: -multi\_module
278
Richard Smith081ad4d2017-01-24 19:39:46 +0000279.. option:: -multiply\_defined <arg>
280
Richard Smithb2c82a62017-01-27 01:54:42 +0000281.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000282.. option:: -multiply\_defined\_unused <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000283.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000284
Richard Smith78e23fd2017-04-13 22:39:49 +0000285.. option:: -mwatchos-simulator-version-min=<arg>, -mwatchsimulator-version-min=<arg>
286
Richard Smith081ad4d2017-01-24 19:39:46 +0000287.. option:: --no-cuda-version-check
288
289Don't error out if the detected version of the CUDA install is too low for the requested CUDA gpu architecture.
290
Richard Smith081ad4d2017-01-24 19:39:46 +0000291.. option:: -no-integrated-cpp, --no-integrated-cpp
292
Richard Smith081ad4d2017-01-24 19:39:46 +0000293.. option:: -no\_dead\_strip\_inits\_and\_terms
294
Richard Smith081ad4d2017-01-24 19:39:46 +0000295.. option:: -nobuiltininc
296
297Disable builtin #include directories
298
Richard Smith081ad4d2017-01-24 19:39:46 +0000299.. option:: -nocudainc
300
Richard Smith081ad4d2017-01-24 19:39:46 +0000301.. option:: -nocudalib
302
Richard Smith081ad4d2017-01-24 19:39:46 +0000303.. option:: -nodefaultlibs
304
Richard Smith081ad4d2017-01-24 19:39:46 +0000305.. option:: -nofixprebinding
306
Richard Smith081ad4d2017-01-24 19:39:46 +0000307.. option:: -nolibc
308
Richard Smith081ad4d2017-01-24 19:39:46 +0000309.. option:: -nomultidefs
310
Craig Topperd23254a2017-07-20 17:52:48 +0000311.. option:: -nopie, -no-pie
Richard Smith081ad4d2017-01-24 19:39:46 +0000312
Richard Smith081ad4d2017-01-24 19:39:46 +0000313.. option:: -noprebind
314
Richard Smith081ad4d2017-01-24 19:39:46 +0000315.. option:: -noseglinkedit
316
Richard Smith081ad4d2017-01-24 19:39:46 +0000317.. option:: -nostartfiles
318
Richard Smith081ad4d2017-01-24 19:39:46 +0000319.. option:: -nostdinc, --no-standard-includes
320
Richard Smithb2c82a62017-01-27 01:54:42 +0000321.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000322.. option:: -nostdinc++
Richard Smithb2c82a62017-01-27 01:54:42 +0000323.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000324
325Disable standard #include directories for the C++ standard library
326
Richard Smith081ad4d2017-01-24 19:39:46 +0000327.. option:: -nostdlib, --no-standard-libraries
328
Boris Kolpackovb150d242017-08-30 09:15:53 +0000329.. program:: clang1
330.. option:: -nostdlib++
331.. program:: clang
332
Richard Smith081ad4d2017-01-24 19:39:46 +0000333.. option:: -nostdlibinc
334
Richard Smith081ad4d2017-01-24 19:39:46 +0000335.. option:: -o<file>, --output <arg>, --output=<arg>
336
337Write output to <file>
338
Richard Smith081ad4d2017-01-24 19:39:46 +0000339.. option:: -objcmt-atomic-property
340
341Make migration to 'atomic' properties
342
Richard Smith081ad4d2017-01-24 19:39:46 +0000343.. option:: -objcmt-migrate-all
344
345Enable migration to modern ObjC
346
Richard Smith081ad4d2017-01-24 19:39:46 +0000347.. option:: -objcmt-migrate-annotation
348
349Enable migration to property and method annotations
350
Richard Smith081ad4d2017-01-24 19:39:46 +0000351.. option:: -objcmt-migrate-designated-init
352
353Enable migration to infer NS\_DESIGNATED\_INITIALIZER for initializer methods
354
Richard Smith081ad4d2017-01-24 19:39:46 +0000355.. option:: -objcmt-migrate-instancetype
356
357Enable migration to infer instancetype for method result type
358
Richard Smith081ad4d2017-01-24 19:39:46 +0000359.. option:: -objcmt-migrate-literals
360
361Enable migration to modern ObjC literals
362
Richard Smith081ad4d2017-01-24 19:39:46 +0000363.. option:: -objcmt-migrate-ns-macros
364
365Enable migration to NS\_ENUM/NS\_OPTIONS macros
366
Richard Smith081ad4d2017-01-24 19:39:46 +0000367.. option:: -objcmt-migrate-property
368
369Enable migration to modern ObjC property
370
Richard Smith081ad4d2017-01-24 19:39:46 +0000371.. option:: -objcmt-migrate-property-dot-syntax
372
373Enable migration of setter/getter messages to property-dot syntax
374
Richard Smith081ad4d2017-01-24 19:39:46 +0000375.. option:: -objcmt-migrate-protocol-conformance
376
377Enable migration to add protocol conformance on classes
378
Richard Smith081ad4d2017-01-24 19:39:46 +0000379.. option:: -objcmt-migrate-readonly-property
380
381Enable migration to modern ObjC readonly property
382
Richard Smith081ad4d2017-01-24 19:39:46 +0000383.. option:: -objcmt-migrate-readwrite-property
384
385Enable migration to modern ObjC readwrite property
386
Richard Smith081ad4d2017-01-24 19:39:46 +0000387.. option:: -objcmt-migrate-subscripting
388
389Enable migration to modern ObjC subscripting
390
Richard Smith081ad4d2017-01-24 19:39:46 +0000391.. option:: -objcmt-ns-nonatomic-iosonly
392
393Enable migration to use NS\_NONATOMIC\_IOSONLY macro for setting property's 'atomic' attribute
394
Richard Smith081ad4d2017-01-24 19:39:46 +0000395.. option:: -objcmt-returns-innerpointer-property
396
397Enable migration to annotate property with NS\_RETURNS\_INNER\_POINTER
398
Richard Smith081ad4d2017-01-24 19:39:46 +0000399.. option:: -objcmt-whitelist-dir-path=<arg>, -objcmt-white-list-dir-path=<arg>
400
401Only modify files with a filename contained in the provided directory path
402
Richard Smith081ad4d2017-01-24 19:39:46 +0000403.. option:: -object
404
Richard Smith081ad4d2017-01-24 19:39:46 +0000405.. option:: -p, --profile
406
Richard Smith081ad4d2017-01-24 19:39:46 +0000407.. option:: -pagezero\_size<arg>
408
Richard Smith081ad4d2017-01-24 19:39:46 +0000409.. option:: -pg
410
411Enable mcount instrumentation
412
Richard Smith081ad4d2017-01-24 19:39:46 +0000413.. option:: -pie
414
Richard Smith081ad4d2017-01-24 19:39:46 +0000415.. option:: -pipe, --pipe
416
417Use pipes between commands, when possible
418
Richard Smith081ad4d2017-01-24 19:39:46 +0000419.. option:: -prebind
420
Richard Smithb2c82a62017-01-27 01:54:42 +0000421.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000422.. option:: -prebind\_all\_twolevel\_modules
Richard Smithb2c82a62017-01-27 01:54:42 +0000423.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000424
Richard Smith081ad4d2017-01-24 19:39:46 +0000425.. option:: -preload
426
Richard Smith081ad4d2017-01-24 19:39:46 +0000427.. option:: --print-diagnostic-categories
428
Richard Smith081ad4d2017-01-24 19:39:46 +0000429.. option:: -print-file-name=<file>, --print-file-name=<file>, --print-file-name <arg>
430
431Print the full library path of <file>
432
Richard Smith081ad4d2017-01-24 19:39:46 +0000433.. option:: -print-ivar-layout
434
435Enable Objective-C Ivar layout bitmap print trace
436
Richard Smith081ad4d2017-01-24 19:39:46 +0000437.. option:: -print-libgcc-file-name, --print-libgcc-file-name
438
439Print the library path for the currently used compiler runtime library ("libgcc.a" or "libclang\_rt.builtins.\*.a")
440
Richard Smith081ad4d2017-01-24 19:39:46 +0000441.. option:: -print-multi-directory, --print-multi-directory
442
Richard Smith081ad4d2017-01-24 19:39:46 +0000443.. option:: -print-multi-lib, --print-multi-lib
444
Richard Smith081ad4d2017-01-24 19:39:46 +0000445.. option:: -print-prog-name=<name>, --print-prog-name=<name>, --print-prog-name <arg>
446
447Print the full program path of <name>
448
Richard Smith78e23fd2017-04-13 22:39:49 +0000449.. option:: -print-resource-dir, --print-resource-dir
450
451Print the resource directory pathname
452
Richard Smith081ad4d2017-01-24 19:39:46 +0000453.. option:: -print-search-dirs, --print-search-dirs
454
455Print the paths used for finding libraries and programs
456
Richard Smith081ad4d2017-01-24 19:39:46 +0000457.. option:: -private\_bundle
458
Richard Smith081ad4d2017-01-24 19:39:46 +0000459.. option:: -pthread, -no-pthread
460
461Support POSIX threads in generated code
462
Richard Smith081ad4d2017-01-24 19:39:46 +0000463.. option:: -pthreads
464
Richard Smith081ad4d2017-01-24 19:39:46 +0000465.. option:: -rdynamic
466
Richard Smith081ad4d2017-01-24 19:39:46 +0000467.. option:: -read\_only\_relocs <arg>
468
Richard Smith081ad4d2017-01-24 19:39:46 +0000469.. option:: -relocatable-pch, --relocatable-pch
470
471Whether to build a relocatable precompiled header
472
Richard Smith081ad4d2017-01-24 19:39:46 +0000473.. option:: -remap
474
Richard Smith081ad4d2017-01-24 19:39:46 +0000475.. option:: -rewrite-legacy-objc
476
477Rewrite Legacy Objective-C source to C++
478
Richard Smith081ad4d2017-01-24 19:39:46 +0000479.. option:: -rtlib=<arg>, --rtlib=<arg>, --rtlib <arg>
480
481Compiler runtime library to use
482
Richard Smith081ad4d2017-01-24 19:39:46 +0000483.. option:: -save-stats=<arg>, --save-stats=<arg>, -save-stats (equivalent to -save-stats=cwd), --save-stats (equivalent to -save-stats=cwd)
484
485Save llvm statistics.
486
Richard Smith081ad4d2017-01-24 19:39:46 +0000487.. option:: -save-temps=<arg>, --save-temps=<arg>, -save-temps (equivalent to -save-temps=cwd), --save-temps (equivalent to -save-temps=cwd)
488
489Save intermediate compilation results.
490
Richard Smith081ad4d2017-01-24 19:39:46 +0000491.. option:: -sectalign <arg1> <arg2> <arg3>
492
Richard Smith081ad4d2017-01-24 19:39:46 +0000493.. option:: -sectcreate <arg1> <arg2> <arg3>
494
Richard Smith081ad4d2017-01-24 19:39:46 +0000495.. option:: -sectobjectsymbols <arg1> <arg2>
496
Richard Smith081ad4d2017-01-24 19:39:46 +0000497.. option:: -sectorder <arg1> <arg2> <arg3>
498
Richard Smith081ad4d2017-01-24 19:39:46 +0000499.. option:: -seg1addr<arg>
500
Richard Smith081ad4d2017-01-24 19:39:46 +0000501.. option:: -seg\_addr\_table <arg>
502
Richard Smithb2c82a62017-01-27 01:54:42 +0000503.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000504.. option:: -seg\_addr\_table\_filename <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000505.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000506
Richard Smith081ad4d2017-01-24 19:39:46 +0000507.. option:: -segaddr <arg1> <arg2>
508
Richard Smith081ad4d2017-01-24 19:39:46 +0000509.. option:: -segcreate <arg1> <arg2> <arg3>
510
Richard Smith081ad4d2017-01-24 19:39:46 +0000511.. option:: -seglinkedit
512
Richard Smith081ad4d2017-01-24 19:39:46 +0000513.. option:: -segprot <arg1> <arg2> <arg3>
514
Richard Smith081ad4d2017-01-24 19:39:46 +0000515.. option:: -segs\_read\_<arg>
516
Richard Smithb2c82a62017-01-27 01:54:42 +0000517.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000518.. option:: -segs\_read\_only\_addr <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000519.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000520
Richard Smithb2c82a62017-01-27 01:54:42 +0000521.. program:: clang2
Richard Smith081ad4d2017-01-24 19:39:46 +0000522.. option:: -segs\_read\_write\_addr <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000523.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000524
Richard Smith081ad4d2017-01-24 19:39:46 +0000525.. option:: -serialize-diagnostics <arg>, --serialize-diagnostics <arg>
526
527Serialize compiler diagnostics to a file
528
Richard Smith081ad4d2017-01-24 19:39:46 +0000529.. option:: -shared, --shared
530
Richard Smith081ad4d2017-01-24 19:39:46 +0000531.. option:: -shared-libgcc
532
Craig Topper16418662017-11-20 18:07:43 +0000533.. option:: -shared-libsan, -shared-libasan
534
Richard Smith081ad4d2017-01-24 19:39:46 +0000535.. option:: -single\_module
536
Richard Smith081ad4d2017-01-24 19:39:46 +0000537.. option:: -specs=<arg>, --specs=<arg>
538
Richard Smith081ad4d2017-01-24 19:39:46 +0000539.. option:: -static, --static
540
Richard Smith081ad4d2017-01-24 19:39:46 +0000541.. option:: -static-libgcc
542
Craig Topper16418662017-11-20 18:07:43 +0000543.. option:: -static-libsan
544
Richard Smith081ad4d2017-01-24 19:39:46 +0000545.. option:: -static-libstdc++
546
Richard Smith081ad4d2017-01-24 19:39:46 +0000547.. option:: -std-default=<arg>
548
Richard Smith081ad4d2017-01-24 19:39:46 +0000549.. option:: -stdlib=<arg>, --stdlib=<arg>, --stdlib <arg>
550
551C++ standard library to use
552
Richard Smith081ad4d2017-01-24 19:39:46 +0000553.. option:: -sub\_library<arg>
554
Richard Smithb2c82a62017-01-27 01:54:42 +0000555.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000556.. option:: -sub\_umbrella<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000557.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000558
Richard Smith081ad4d2017-01-24 19:39:46 +0000559.. option:: --sysroot=<arg>, --sysroot <arg>
560
Richard Smith081ad4d2017-01-24 19:39:46 +0000561.. option:: --target-help
562
Richard Smith081ad4d2017-01-24 19:39:46 +0000563.. option:: --target=<arg>, -target <arg>
564
565Generate code for the given target
566
Richard Smith081ad4d2017-01-24 19:39:46 +0000567.. option:: -time
568
569Time individual commands
570
Richard Smith081ad4d2017-01-24 19:39:46 +0000571.. option:: -traditional, --traditional
572
Richard Smith081ad4d2017-01-24 19:39:46 +0000573.. option:: -traditional-cpp, --traditional-cpp
574
575Enable some traditional CPP emulation
576
Richard Smith081ad4d2017-01-24 19:39:46 +0000577.. option:: -twolevel\_namespace
578
Richard Smithb2c82a62017-01-27 01:54:42 +0000579.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000580.. option:: -twolevel\_namespace\_hints
Richard Smithb2c82a62017-01-27 01:54:42 +0000581.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000582
Richard Smith081ad4d2017-01-24 19:39:46 +0000583.. option:: -umbrella <arg>
584
Richard Smith081ad4d2017-01-24 19:39:46 +0000585.. option:: -unexported\_symbols\_list <arg>
586
Richard Smith081ad4d2017-01-24 19:39:46 +0000587.. option:: -v, --verbose
588
589Show commands to run and use verbose output
590
Richard Smith081ad4d2017-01-24 19:39:46 +0000591.. option:: --verify-debug-info
592
593Verify the binary representation of debug output
594
Richard Smith081ad4d2017-01-24 19:39:46 +0000595.. option:: --version
596
Craig Topper16418662017-11-20 18:07:43 +0000597Print version information
598
Richard Smith081ad4d2017-01-24 19:39:46 +0000599.. option:: -w, --no-warnings
600
601Suppress all warnings
602
Richard Smith081ad4d2017-01-24 19:39:46 +0000603.. option:: -weak-l<arg>
604
Richard Smith081ad4d2017-01-24 19:39:46 +0000605.. option:: -weak\_framework <arg>
606
Richard Smithb2c82a62017-01-27 01:54:42 +0000607.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000608.. option:: -weak\_library <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000609.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000610
Richard Smithb2c82a62017-01-27 01:54:42 +0000611.. program:: clang2
Richard Smith081ad4d2017-01-24 19:39:46 +0000612.. option:: -weak\_reference\_mismatches <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000613.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000614
Richard Smith081ad4d2017-01-24 19:39:46 +0000615.. option:: -whatsloaded
616
Richard Smith081ad4d2017-01-24 19:39:46 +0000617.. option:: -whyload
618
Richard Smith081ad4d2017-01-24 19:39:46 +0000619.. option:: -working-directory<arg>, -working-directory=<arg>
620
621Resolve file paths relative to the specified directory
622
Richard Smith081ad4d2017-01-24 19:39:46 +0000623.. option:: -x<language>, --language <arg>, --language=<arg>
624
625Treat subsequent input files as having type <language>
626
Richard Smith081ad4d2017-01-24 19:39:46 +0000627.. option:: -y<arg>
628
629Actions
630=======
631The action to perform on the input.
632
Richard Smith081ad4d2017-01-24 19:39:46 +0000633.. option:: -E, --preprocess
634
635Only run the preprocessor
636
Richard Smith081ad4d2017-01-24 19:39:46 +0000637.. option:: -S, --assemble
638
639Only run preprocess and compilation steps
640
Richard Smithc5b2e002017-01-27 02:08:37 +0000641.. option:: -c, --compile
642
643Only run preprocess, compile, and assemble steps
644
Richard Smith081ad4d2017-01-24 19:39:46 +0000645.. option:: -emit-llvm
646
647Use the LLVM representation for assembler and object files
648
Richard Smith081ad4d2017-01-24 19:39:46 +0000649.. option:: -fsyntax-only
650
Richard Smith081ad4d2017-01-24 19:39:46 +0000651.. option:: -module-file-info
652
653Provide information about a particular module file
654
Richard Smith081ad4d2017-01-24 19:39:46 +0000655.. option:: --precompile
656
657Only precompile the input
658
Richard Smith081ad4d2017-01-24 19:39:46 +0000659.. option:: -rewrite-objc
660
661Rewrite Objective-C source to C++
662
Richard Smith081ad4d2017-01-24 19:39:46 +0000663.. option:: -verify-pch
664
665Load and verify that a pre-compiled header file is not stale
666
667Compilation flags
668=================
669
670Flags controlling the behavior of Clang during compilation. These flags have
671no effect during actions that do not perform compilation.
672
Richard Smithc5b2e002017-01-27 02:08:37 +0000673.. option:: -Xassembler <arg>
Richard Smith081ad4d2017-01-24 19:39:46 +0000674
Richard Smithc5b2e002017-01-27 02:08:37 +0000675Pass <arg> to the assembler
Richard Smith081ad4d2017-01-24 19:39:46 +0000676
Richard Smith081ad4d2017-01-24 19:39:46 +0000677.. option:: -Xclang <arg>
678
679Pass <arg> to the clang compiler
680
Boris Kolpackovb150d242017-08-30 09:15:53 +0000681.. option:: -fclang-abi-compat=<version>
682
683Attempt to match the ABI of Clang <version>
684
Richard Smith081ad4d2017-01-24 19:39:46 +0000685.. option:: -fcomment-block-commands=<arg>,<arg2>...
686
687Treat each comma separated argument in <arg> as a documentation comment block command
688
Richard Smith081ad4d2017-01-24 19:39:46 +0000689.. option:: -fdeclspec, -fno-declspec
690
691Allow \_\_declspec as a keyword
692
Richard Smith081ad4d2017-01-24 19:39:46 +0000693.. option:: -fdepfile-entry=<arg>
694
Richard Smith081ad4d2017-01-24 19:39:46 +0000695.. option:: -fdiagnostics-fixit-info, -fno-diagnostics-fixit-info
696
Richard Smith081ad4d2017-01-24 19:39:46 +0000697.. option:: -fdiagnostics-format=<arg>
698
Richard Smith081ad4d2017-01-24 19:39:46 +0000699.. option:: -fdiagnostics-parseable-fixits
700
701Print fix-its in machine parseable form
702
Richard Smith081ad4d2017-01-24 19:39:46 +0000703.. option:: -fdiagnostics-print-source-range-info
704
705Print source range spans in numeric form
706
Richard Smith081ad4d2017-01-24 19:39:46 +0000707.. option:: -fdiagnostics-show-category=<arg>
708
Richard Smith081ad4d2017-01-24 19:39:46 +0000709.. option:: -fexperimental-new-pass-manager, -fno-experimental-new-pass-manager
710
711Enables an experimental new pass manager in LLVM.
712
Craig Topper16418662017-11-20 18:07:43 +0000713.. option:: -ffine-grained-bitfield-accesses, -fno-fine-grained-bitfield-accesses
714
715Use separate accesses for bitfields with legal widths and alignments.
716
Richard Smith081ad4d2017-01-24 19:39:46 +0000717.. option:: -finline-functions, -fno-inline-functions
718
719Inline suitable functions
720
Richard Smith081ad4d2017-01-24 19:39:46 +0000721.. option:: -finline-hint-functions
722
723Inline functions which are (explicitly or implicitly) marked inline
724
Richard Smith081ad4d2017-01-24 19:39:46 +0000725.. option:: -fno-crash-diagnostics
726
Richard Smith78e23fd2017-04-13 22:39:49 +0000727Disable auto-generation of preprocessed source files and a script for reproduction during a clang crash
728
Richard Smith081ad4d2017-01-24 19:39:46 +0000729.. option:: -fno-sanitize-blacklist
730
731Don't use blacklist file for sanitizers
732
Richard Smith081ad4d2017-01-24 19:39:46 +0000733.. option:: -fparse-all-comments
734
Richard Smith081ad4d2017-01-24 19:39:46 +0000735.. option:: -fsanitize-address-field-padding=<arg>
736
737Level of field padding for AddressSanitizer
738
Craig Topperd23254a2017-07-20 17:52:48 +0000739.. option:: -fsanitize-address-globals-dead-stripping
740
741Enable linker dead stripping of globals in AddressSanitizer
742
Richard Smith081ad4d2017-01-24 19:39:46 +0000743.. option:: -fsanitize-address-use-after-scope, -fno-sanitize-address-use-after-scope
744
745Enable use-after-scope detection in AddressSanitizer
746
Richard Smith081ad4d2017-01-24 19:39:46 +0000747.. option:: -fsanitize-blacklist=<arg>
748
749Path to blacklist file for sanitizers
750
Richard Smith081ad4d2017-01-24 19:39:46 +0000751.. option:: -fsanitize-cfi-cross-dso, -fno-sanitize-cfi-cross-dso
752
753Enable control flow integrity (CFI) checks for cross-DSO calls.
754
Vlad Tsyrklevich634c6012017-10-31 22:39:44 +0000755.. option:: -fsanitize-cfi-icall-generalize-pointers
756
Craig Topper16418662017-11-20 18:07:43 +0000757Generalize pointers in CFI indirect call type signature checks
Vlad Tsyrklevich634c6012017-10-31 22:39:44 +0000758
Richard Smith081ad4d2017-01-24 19:39:46 +0000759.. option:: -fsanitize-coverage=<arg1>,<arg2>..., -fno-sanitize-coverage=<arg1>,<arg2>...
760
761Specify the type of coverage instrumentation for Sanitizers
762
Richard Smith081ad4d2017-01-24 19:39:46 +0000763.. option:: -fsanitize-link-c++-runtime
764
Richard Smith081ad4d2017-01-24 19:39:46 +0000765.. option:: -fsanitize-memory-track-origins, -fno-sanitize-memory-track-origins
766
767Enable origins tracking in MemorySanitizer
768
Richard Smithb2c82a62017-01-27 01:54:42 +0000769.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000770.. option:: -fsanitize-memory-track-origins=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000771.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000772
773Enable origins tracking in MemorySanitizer
774
Craig Topper16418662017-11-20 18:07:43 +0000775.. option:: -fsanitize-memory-use-after-dtor, -fno-sanitize-memory-use-after-dtor
Richard Smith081ad4d2017-01-24 19:39:46 +0000776
777Enable use-after-destroy detection in MemorySanitizer
778
Boris Kolpackovb150d242017-08-30 09:15:53 +0000779.. option:: -fsanitize-minimal-runtime, -fno-sanitize-minimal-runtime
780
Richard Smith081ad4d2017-01-24 19:39:46 +0000781.. option:: -fsanitize-recover, -fno-sanitize-recover
782
Richard Smithb2c82a62017-01-27 01:54:42 +0000783.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000784.. option:: -fsanitize-recover=<arg1>,<arg2>..., -fno-sanitize-recover=<arg1>,<arg2>...
Richard Smithb2c82a62017-01-27 01:54:42 +0000785.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000786
787Enable recovery for specified sanitizers
788
Richard Smith081ad4d2017-01-24 19:39:46 +0000789.. option:: -fsanitize-stats, -fno-sanitize-stats
790
791Enable sanitizer statistics gathering.
792
Richard Smith081ad4d2017-01-24 19:39:46 +0000793.. option:: -fsanitize-thread-atomics, -fno-sanitize-thread-atomics
794
795Enable atomic operations instrumentation in ThreadSanitizer (default)
796
Richard Smith081ad4d2017-01-24 19:39:46 +0000797.. option:: -fsanitize-thread-func-entry-exit, -fno-sanitize-thread-func-entry-exit
798
799Enable function entry/exit instrumentation in ThreadSanitizer (default)
800
Richard Smith081ad4d2017-01-24 19:39:46 +0000801.. option:: -fsanitize-thread-memory-access, -fno-sanitize-thread-memory-access
802
803Enable memory access instrumentation in ThreadSanitizer (default)
804
Richard Smith081ad4d2017-01-24 19:39:46 +0000805.. option:: -fsanitize-trap=<arg1>,<arg2>..., -fno-sanitize-trap=<arg1>,<arg2>...
806
807Enable trapping for specified sanitizers
808
Richard Smith081ad4d2017-01-24 19:39:46 +0000809.. option:: -fsanitize-undefined-strip-path-components=<number>
810
811Strip (or keep only, if negative) a given number of path components when emitting check metadata.
812
Richard Smith081ad4d2017-01-24 19:39:46 +0000813.. option:: -fsanitize-undefined-trap-on-error, -fno-sanitize-undefined-trap-on-error
814
Richard Smith081ad4d2017-01-24 19:39:46 +0000815.. option:: -fsanitize=<check>,<arg2>..., -fno-sanitize=<arg1>,<arg2>...
816
817Turn on runtime checks for various forms of undefined or suspicious behavior. See user manual for available checks
818
Richard Smith081ad4d2017-01-24 19:39:46 +0000819.. option:: --param <arg>, --param=<arg>
820
Richard Smith081ad4d2017-01-24 19:39:46 +0000821.. option:: -std=<arg>, --std=<arg>, --std <arg>
822
823Language standard to compile for
824
Richard Smithc5b2e002017-01-27 02:08:37 +0000825Preprocessor flags
826~~~~~~~~~~~~~~~~~~
827
828Flags controlling the behavior of the Clang preprocessor.
829
830.. option:: -C, --comments
831
832Include comments in preprocessed output
833
834.. option:: -CC, --comments-in-macros
835
836Include comments from within macros in preprocessed output
837
838.. option:: -D<macro>=<value>, --define-macro <arg>, --define-macro=<arg>
839
840Define <macro> to <value> (or 1 if <value> omitted)
841
842.. option:: -H, --trace-includes
843
844Show header includes and nesting depth
845
846.. option:: -P, --no-line-commands
847
848Disable linemarker output in -E mode
849
850.. option:: -U<macro>, --undefine-macro <arg>, --undefine-macro=<arg>
851
852Undefine macro <macro>
853
854.. option:: -Wp,<arg>,<arg2>...
855
856Pass the comma separated arguments in <arg> to the preprocessor
857
858.. option:: -Xpreprocessor <arg>
859
860Pass <arg> to the preprocessor
861
Richard Smith081ad4d2017-01-24 19:39:46 +0000862Include path management
Richard Smithc5b2e002017-01-27 02:08:37 +0000863-----------------------
Richard Smith081ad4d2017-01-24 19:39:46 +0000864
865Flags controlling how ``#include``\s are resolved to files.
866
Richard Smithc5b2e002017-01-27 02:08:37 +0000867.. option:: -I<dir>, --include-directory <arg>, --include-directory=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +0000868
869Add directory to include search path
870
Richard Smith081ad4d2017-01-24 19:39:46 +0000871.. option:: -I-, --include-barrier
872
Richard Smithc5b2e002017-01-27 02:08:37 +0000873Restrict all prior -I flags to double-quoted inclusion and remove current directory from include path
874
Richard Smith081ad4d2017-01-24 19:39:46 +0000875.. option:: --cuda-path=<arg>
876
877CUDA installation path
878
Richard Smith081ad4d2017-01-24 19:39:46 +0000879.. option:: -cxx-isystem<directory>
880
881Add directory to the C++ SYSTEM include search path
882
Richard Smith081ad4d2017-01-24 19:39:46 +0000883.. option:: -fbuild-session-file=<file>
884
885Use the last modification time of <file> as the build session timestamp
886
Richard Smith081ad4d2017-01-24 19:39:46 +0000887.. option:: -fbuild-session-timestamp=<time since Epoch in seconds>
888
889Time when the current build session started
890
Boris Kolpackovb150d242017-08-30 09:15:53 +0000891.. option:: -fmodule-file=\[<name>=\]<file>
892
893Specify the mapping of module name to precompiled module file, or load a module file if name is omitted.
894
Richard Smith081ad4d2017-01-24 19:39:46 +0000895.. option:: -fmodules-cache-path=<directory>
896
897Specify the module cache path
898
Richard Smith081ad4d2017-01-24 19:39:46 +0000899.. option:: -fmodules-disable-diagnostic-validation
900
901Disable validation of the diagnostic options when loading the module
902
Richard Smith081ad4d2017-01-24 19:39:46 +0000903.. option:: -fmodules-prune-after=<seconds>
904
905Specify the interval (in seconds) after which a module file will be considered unused
906
Richard Smith081ad4d2017-01-24 19:39:46 +0000907.. option:: -fmodules-prune-interval=<seconds>
908
909Specify the interval (in seconds) between attempts to prune the module cache
910
Richard Smith081ad4d2017-01-24 19:39:46 +0000911.. option:: -fmodules-user-build-path <directory>
912
913Specify the module user build path
914
Richard Smith081ad4d2017-01-24 19:39:46 +0000915.. option:: -fmodules-validate-once-per-build-session
916
917Don't verify input files for the modules if the module has been successfully validated or loaded during this build session
918
Richard Smith081ad4d2017-01-24 19:39:46 +0000919.. option:: -fmodules-validate-system-headers
920
921Validate the system headers that a module depends on when loading the module
922
Richard Smith081ad4d2017-01-24 19:39:46 +0000923.. option:: -fprebuilt-module-path=<directory>
924
925Specify the prebuilt module path
926
Richard Smith081ad4d2017-01-24 19:39:46 +0000927.. option:: -i<arg>
928
Richard Smith081ad4d2017-01-24 19:39:46 +0000929.. option:: -idirafter<arg>, --include-directory-after <arg>, --include-directory-after=<arg>
930
931Add directory to AFTER include search path
932
Richard Smith081ad4d2017-01-24 19:39:46 +0000933.. option:: -iframework<arg>
934
935Add directory to SYSTEM framework search path
936
Richard Smith78e23fd2017-04-13 22:39:49 +0000937.. option:: -iframeworkwithsysroot<directory>
938
939Add directory to SYSTEM framework search path, absolute paths are relative to -isysroot
940
Richard Smith081ad4d2017-01-24 19:39:46 +0000941.. option:: -imacros<file>, --imacros<file>, --imacros=<arg>
942
943Include macros from file before parsing
944
Richard Smith081ad4d2017-01-24 19:39:46 +0000945.. option:: -include<file>, --include<file>, --include=<arg>
946
947Include file before parsing
948
Richard Smith081ad4d2017-01-24 19:39:46 +0000949.. option:: -include-pch <file>
950
951Include precompiled header file
952
Richard Smith081ad4d2017-01-24 19:39:46 +0000953.. option:: -iprefix<dir>, --include-prefix <arg>, --include-prefix=<arg>
954
955Set the -iwithprefix/-iwithprefixbefore prefix
956
Richard Smith081ad4d2017-01-24 19:39:46 +0000957.. option:: -iquote<directory>
958
959Add directory to QUOTE include search path
960
Richard Smith081ad4d2017-01-24 19:39:46 +0000961.. option:: -isysroot<dir>
962
963Set the system root directory (usually /)
964
Richard Smith081ad4d2017-01-24 19:39:46 +0000965.. option:: -isystem<directory>
966
967Add directory to SYSTEM include search path
968
Richard Smith081ad4d2017-01-24 19:39:46 +0000969.. option:: -isystem-after<directory>
970
971Add directory to end of the SYSTEM include search path
972
Richard Smith081ad4d2017-01-24 19:39:46 +0000973.. option:: -ivfsoverlay<arg>
974
975Overlay the virtual filesystem described by file over the real file system
976
Richard Smith081ad4d2017-01-24 19:39:46 +0000977.. option:: -iwithprefix<dir>, --include-with-prefix <arg>, --include-with-prefix-after <arg>, --include-with-prefix-after=<arg>, --include-with-prefix=<arg>
978
979Set directory to SYSTEM include search path with prefix
980
Richard Smith081ad4d2017-01-24 19:39:46 +0000981.. option:: -iwithprefixbefore<dir>, --include-with-prefix-before <arg>, --include-with-prefix-before=<arg>
982
983Set directory to include search path with prefix
984
Richard Smith081ad4d2017-01-24 19:39:46 +0000985.. option:: -iwithsysroot<directory>
986
987Add directory to SYSTEM include search path, absolute paths are relative to -isysroot
988
Richard Smith081ad4d2017-01-24 19:39:46 +0000989.. option:: --ptxas-path=<arg>
990
991Path to ptxas (used for compiling CUDA code)
992
Richard Smith081ad4d2017-01-24 19:39:46 +0000993.. option:: --system-header-prefix=<prefix>, --no-system-header-prefix=<prefix>, --system-header-prefix <arg>
994
995Treat all #include paths starting with <prefix> as including a system header.
996
997Dependency file generation
Richard Smithc5b2e002017-01-27 02:08:37 +0000998--------------------------
Richard Smith081ad4d2017-01-24 19:39:46 +0000999
1000Flags controlling generation of a dependency file for ``make``-like build
1001systems.
1002
Richard Smith081ad4d2017-01-24 19:39:46 +00001003.. option:: -M, --dependencies
1004
1005Like -MD, but also implies -E and writes to stdout by default
1006
Richard Smith081ad4d2017-01-24 19:39:46 +00001007.. option:: -MD, --write-dependencies
1008
1009Write a depfile containing user and system headers
1010
Richard Smith081ad4d2017-01-24 19:39:46 +00001011.. option:: -MF<file>
1012
1013Write depfile output from -MMD, -MD, -MM, or -M to <file>
1014
Richard Smith081ad4d2017-01-24 19:39:46 +00001015.. option:: -MG, --print-missing-file-dependencies
1016
1017Add missing headers to depfile
1018
Richard Smith081ad4d2017-01-24 19:39:46 +00001019.. option:: -MJ<arg>
1020
1021Write a compilation database entry per input
1022
Richard Smith081ad4d2017-01-24 19:39:46 +00001023.. option:: -MM, --user-dependencies
1024
1025Like -MMD, but also implies -E and writes to stdout by default
1026
Richard Smith081ad4d2017-01-24 19:39:46 +00001027.. option:: -MMD, --write-user-dependencies
1028
1029Write a depfile containing user headers
1030
Richard Smith081ad4d2017-01-24 19:39:46 +00001031.. option:: -MP
1032
1033Create phony target for each dependency (other than main file)
1034
Richard Smith081ad4d2017-01-24 19:39:46 +00001035.. option:: -MQ<arg>
1036
1037Specify name of main file output to quote in depfile
1038
Richard Smith081ad4d2017-01-24 19:39:46 +00001039.. option:: -MT<arg>
1040
1041Specify name of main file output in depfile
1042
Richard Smith081ad4d2017-01-24 19:39:46 +00001043.. option:: -MV
1044
1045Use NMake/Jom format for the depfile
1046
1047Dumping preprocessor state
Richard Smithc5b2e002017-01-27 02:08:37 +00001048--------------------------
Richard Smith081ad4d2017-01-24 19:39:46 +00001049
1050Flags allowing the state of the preprocessor to be dumped in various ways.
1051
Richard Smith081ad4d2017-01-24 19:39:46 +00001052.. option:: -d
1053
Richard Smithb2c82a62017-01-27 01:54:42 +00001054.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001055.. option:: -d<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001056.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001057
Richard Smith081ad4d2017-01-24 19:39:46 +00001058.. option:: -dA
1059
Richard Smith081ad4d2017-01-24 19:39:46 +00001060.. option:: -dD
1061
1062Print macro definitions in -E mode in addition to normal output
1063
Richard Smith081ad4d2017-01-24 19:39:46 +00001064.. option:: -dI
1065
1066Print include directives in -E mode in addition to normal output
1067
Richard Smith081ad4d2017-01-24 19:39:46 +00001068.. option:: -dM
1069
1070Print macro definitions in -E mode instead of normal output
1071
1072Diagnostic flags
1073~~~~~~~~~~~~~~~~
1074
1075Flags controlling which warnings, errors, and remarks Clang will generate.
1076See the :doc:`full list of warning and remark flags <DiagnosticsReference>`.
1077
Richard Smith081ad4d2017-01-24 19:39:46 +00001078.. option:: -R<remark>
1079
1080Enable the specified remark
1081
Richard Smith081ad4d2017-01-24 19:39:46 +00001082.. option:: -Rpass-analysis=<arg>
1083
1084Report transformation analysis from optimization passes whose name matches the given POSIX regular expression
1085
Richard Smith081ad4d2017-01-24 19:39:46 +00001086.. option:: -Rpass-missed=<arg>
1087
1088Report missed transformations by optimization passes whose name matches the given POSIX regular expression
1089
Richard Smith081ad4d2017-01-24 19:39:46 +00001090.. option:: -Rpass=<arg>
1091
1092Report transformations performed by optimization passes whose name matches the given POSIX regular expression
1093
Richard Smith081ad4d2017-01-24 19:39:46 +00001094.. option:: -W<warning>, --extra-warnings, --warn-<arg>, --warn-=<arg>
1095
1096Enable the specified warning
1097
Richard Smith081ad4d2017-01-24 19:39:46 +00001098.. option:: -Wdeprecated, -Wno-deprecated
1099
Richard Smithc5b2e002017-01-27 02:08:37 +00001100Enable warnings for deprecated constructs and define \_\_DEPRECATED
Richard Smith081ad4d2017-01-24 19:39:46 +00001101
Richard Smith081ad4d2017-01-24 19:39:46 +00001102.. option:: -Wnonportable-cfstrings<arg>, -Wno-nonportable-cfstrings<arg>
1103
Richard Smith081ad4d2017-01-24 19:39:46 +00001104Target-independent compilation options
1105~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Richard Smith081ad4d2017-01-24 19:39:46 +00001106.. option:: -Wframe-larger-than=<arg>
1107
Richard Smith081ad4d2017-01-24 19:39:46 +00001108.. option:: -fPIC, -fno-PIC
1109
Richard Smith081ad4d2017-01-24 19:39:46 +00001110.. option:: -fPIE, -fno-PIE
1111
Richard Smith081ad4d2017-01-24 19:39:46 +00001112.. option:: -faccess-control, -fno-access-control
1113
Richard Smithb2c82a62017-01-27 01:54:42 +00001114.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001115.. option:: -faligned-allocation, -faligned-new, -fno-aligned-allocation
Richard Smithb2c82a62017-01-27 01:54:42 +00001116.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001117
1118Enable C++17 aligned allocation functions
1119
Craig Topperd23254a2017-07-20 17:52:48 +00001120.. option:: -fallow-editor-placeholders, -fno-allow-editor-placeholders
1121
1122Treat editor placeholders as valid source code
1123
Richard Smith081ad4d2017-01-24 19:39:46 +00001124.. option:: -fallow-unsupported
1125
Richard Smith78e23fd2017-04-13 22:39:49 +00001126.. option:: -faltivec, -fno-altivec
Richard Smith081ad4d2017-01-24 19:39:46 +00001127
Richard Smith081ad4d2017-01-24 19:39:46 +00001128.. option:: -fansi-escape-codes
1129
1130Use ANSI escape codes for diagnostics
1131
Richard Smith081ad4d2017-01-24 19:39:46 +00001132.. option:: -fapple-kext, -findirect-virtual-calls, -fterminated-vtables
1133
1134Use Apple's kernel extensions ABI
1135
Richard Smith081ad4d2017-01-24 19:39:46 +00001136.. option:: -fapple-pragma-pack, -fno-apple-pragma-pack
1137
1138Enable Apple gcc-compatible #pragma pack handling
1139
Richard Smith081ad4d2017-01-24 19:39:46 +00001140.. option:: -fapplication-extension, -fno-application-extension
1141
1142Restrict code to those available for App Extensions
1143
Richard Smith081ad4d2017-01-24 19:39:46 +00001144.. option:: -fasm, -fno-asm
1145
Richard Smith081ad4d2017-01-24 19:39:46 +00001146.. option:: -fasm-blocks, -fno-asm-blocks
1147
Richard Smith081ad4d2017-01-24 19:39:46 +00001148.. option:: -fassociative-math, -fno-associative-math
1149
Richard Smith081ad4d2017-01-24 19:39:46 +00001150.. option:: -fassume-sane-operator-new, -fno-assume-sane-operator-new
1151
Richard Smith081ad4d2017-01-24 19:39:46 +00001152.. option:: -fast
1153
Richard Smith081ad4d2017-01-24 19:39:46 +00001154.. option:: -fastcp
1155
Richard Smith081ad4d2017-01-24 19:39:46 +00001156.. option:: -fastf
1157
Richard Smith081ad4d2017-01-24 19:39:46 +00001158.. option:: -fasynchronous-unwind-tables, -fno-asynchronous-unwind-tables
1159
Richard Smith081ad4d2017-01-24 19:39:46 +00001160.. option:: -fautolink, -fno-autolink
1161
Richard Smith081ad4d2017-01-24 19:39:46 +00001162.. option:: -fblocks, -fno-blocks
1163
1164Enable the 'blocks' language feature
1165
Richard Smith081ad4d2017-01-24 19:39:46 +00001166.. option:: -fbootclasspath=<arg>, --bootclasspath <arg>, --bootclasspath=<arg>
1167
Richard Smith081ad4d2017-01-24 19:39:46 +00001168.. option:: -fborland-extensions, -fno-borland-extensions
1169
1170Accept non-standard constructs supported by the Borland compiler
1171
Richard Smith081ad4d2017-01-24 19:39:46 +00001172.. option:: -fbracket-depth=<arg>
1173
Richard Smith081ad4d2017-01-24 19:39:46 +00001174.. option:: -fbuiltin, -fno-builtin
1175
Richard Smith081ad4d2017-01-24 19:39:46 +00001176.. option:: -fbuiltin-module-map
1177
1178Load the clang builtins module map file.
1179
Richard Smith081ad4d2017-01-24 19:39:46 +00001180.. option:: -fcaret-diagnostics, -fno-caret-diagnostics
1181
Richard Smith081ad4d2017-01-24 19:39:46 +00001182.. option:: -fclasspath=<arg>, --CLASSPATH <arg>, --CLASSPATH=<arg>, --classpath <arg>, --classpath=<arg>
1183
Richard Smith081ad4d2017-01-24 19:39:46 +00001184.. option:: -fcolor-diagnostics, -fno-color-diagnostics
1185
1186Use colors in diagnostics
1187
Richard Smith081ad4d2017-01-24 19:39:46 +00001188.. option:: -fcommon, -fno-common
1189
Richard Smith081ad4d2017-01-24 19:39:46 +00001190.. option:: -fcompile-resource=<arg>, --resource <arg>, --resource=<arg>
1191
Richard Smith081ad4d2017-01-24 19:39:46 +00001192.. option:: -fconstant-cfstrings, -fno-constant-cfstrings
1193
Richard Smith081ad4d2017-01-24 19:39:46 +00001194.. option:: -fconstant-string-class=<arg>
1195
Richard Smith081ad4d2017-01-24 19:39:46 +00001196.. option:: -fconstexpr-backtrace-limit=<arg>
1197
Richard Smith081ad4d2017-01-24 19:39:46 +00001198.. option:: -fconstexpr-depth=<arg>
1199
Richard Smith081ad4d2017-01-24 19:39:46 +00001200.. option:: -fconstexpr-steps=<arg>
1201
Richard Smith081ad4d2017-01-24 19:39:46 +00001202.. option:: -fcoroutines-ts, -fno-coroutines-ts
1203
1204Enable support for the C++ Coroutines TS
1205
Richard Smith081ad4d2017-01-24 19:39:46 +00001206.. option:: -fcoverage-mapping, -fno-coverage-mapping
1207
1208Generate coverage mapping to enable code coverage analysis
1209
Richard Smith081ad4d2017-01-24 19:39:46 +00001210.. option:: -fcreate-profile
1211
Richard Smith081ad4d2017-01-24 19:39:46 +00001212.. option:: -fcxx-exceptions, -fno-cxx-exceptions
1213
1214Enable C++ exceptions
1215
Richard Smith081ad4d2017-01-24 19:39:46 +00001216.. option:: -fcxx-modules, -fno-cxx-modules
1217
Richard Smith081ad4d2017-01-24 19:39:46 +00001218.. option:: -fdata-sections, -fno-data-sections
1219
1220Place each data in its own section (ELF Only)
1221
Richard Smith081ad4d2017-01-24 19:39:46 +00001222.. option:: -fdebug-info-for-profiling, -fno-debug-info-for-profiling
1223
1224Emit extra debug info to make sample profile more accurate.
1225
Richard Smith78e23fd2017-04-13 22:39:49 +00001226.. option:: -fdebug-macro, -fno-debug-macro
1227
1228Emit macro debug information
1229
Richard Smith081ad4d2017-01-24 19:39:46 +00001230.. option:: -fdebug-pass-arguments
1231
Richard Smith081ad4d2017-01-24 19:39:46 +00001232.. option:: -fdebug-pass-structure
1233
Richard Smith081ad4d2017-01-24 19:39:46 +00001234.. option:: -fdebug-prefix-map=<arg>
1235
1236remap file source paths in debug info
1237
Richard Smith081ad4d2017-01-24 19:39:46 +00001238.. option:: -fdebug-types-section, -fno-debug-types-section
1239
1240Place debug types in their own section (ELF Only)
1241
Richard Smith081ad4d2017-01-24 19:39:46 +00001242.. option:: -fdelayed-template-parsing, -fno-delayed-template-parsing
1243
1244Parse templated function definitions at the end of the translation unit
1245
Richard Smith081ad4d2017-01-24 19:39:46 +00001246.. option:: -fdenormal-fp-math=<arg>
1247
Richard Smith081ad4d2017-01-24 19:39:46 +00001248.. option:: -fdiagnostics-absolute-paths
1249
1250Print absolute paths in diagnostics
1251
Richard Smith081ad4d2017-01-24 19:39:46 +00001252.. option:: -fdiagnostics-color, -fno-diagnostics-color
1253
Richard Smithb2c82a62017-01-27 01:54:42 +00001254.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001255.. option:: -fdiagnostics-color=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001256.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001257
Craig Topperd23254a2017-07-20 17:52:48 +00001258.. option:: -fdiagnostics-hotness-threshold=<number>
1259
1260Prevent optimization remarks from being output if they do not have at least this profile count
1261
Richard Smith081ad4d2017-01-24 19:39:46 +00001262.. option:: -fdiagnostics-show-hotness, -fno-diagnostics-show-hotness
1263
1264Enable profile hotness information in diagnostic line
1265
Richard Smith081ad4d2017-01-24 19:39:46 +00001266.. option:: -fdiagnostics-show-note-include-stack, -fno-diagnostics-show-note-include-stack
1267
1268Display include stacks for diagnostic notes
1269
Richard Smith081ad4d2017-01-24 19:39:46 +00001270.. option:: -fdiagnostics-show-option, -fno-diagnostics-show-option
1271
1272Print option name with mappable diagnostics
1273
Richard Smith081ad4d2017-01-24 19:39:46 +00001274.. option:: -fdiagnostics-show-template-tree
1275
1276Print a template comparison tree for differing templates
1277
Richard Smith081ad4d2017-01-24 19:39:46 +00001278.. option:: -fdollars-in-identifiers, -fno-dollars-in-identifiers
1279
1280Allow '$' in identifiers
1281
Craig Topper16418662017-11-20 18:07:43 +00001282.. option:: -fdouble-square-bracket-attributes, -fno-double-square-bracket-attributes
1283
1284Enable '\[\[\]\]' attributes in all C and C++ language modes
1285
Richard Smith081ad4d2017-01-24 19:39:46 +00001286.. option:: -fdwarf-directory-asm, -fno-dwarf-directory-asm
1287
Craig Topper188252d2017-12-11 21:09:16 +00001288.. option:: -fdwarf-exceptions
1289
1290Use DWARF style exceptions
1291
Richard Smith081ad4d2017-01-24 19:39:46 +00001292.. option:: -felide-constructors, -fno-elide-constructors
1293
Richard Smith081ad4d2017-01-24 19:39:46 +00001294.. option:: -feliminate-unused-debug-symbols, -fno-eliminate-unused-debug-symbols
1295
Richard Smith081ad4d2017-01-24 19:39:46 +00001296.. option:: -fembed-bitcode=<option>, -fembed-bitcode (equivalent to -fembed-bitcode=all), -fembed-bitcode-marker (equivalent to -fembed-bitcode=marker)
1297
1298Embed LLVM bitcode (option: off, all, bitcode, marker)
1299
Richard Smith081ad4d2017-01-24 19:39:46 +00001300.. option:: -femit-all-decls
1301
1302Emit all declarations, even if unused
1303
Richard Smith081ad4d2017-01-24 19:39:46 +00001304.. option:: -femulated-tls, -fno-emulated-tls
1305
1306Use emutls functions to access thread\_local variables
1307
Richard Smith081ad4d2017-01-24 19:39:46 +00001308.. option:: -fencoding=<arg>, --encoding <arg>, --encoding=<arg>
1309
Richard Smith081ad4d2017-01-24 19:39:46 +00001310.. option:: -ferror-limit=<arg>
1311
Richard Smith081ad4d2017-01-24 19:39:46 +00001312.. option:: -fexceptions, -fno-exceptions
1313
1314Enable support for exception handling
1315
Richard Smith081ad4d2017-01-24 19:39:46 +00001316.. option:: -fexec-charset=<arg>
1317
Richard Smith081ad4d2017-01-24 19:39:46 +00001318.. option:: -fextdirs=<arg>, --extdirs <arg>, --extdirs=<arg>
1319
Richard Smith081ad4d2017-01-24 19:39:46 +00001320.. option:: -ffast-math, -fno-fast-math
1321
1322Allow aggressive, lossy floating-point optimizations
1323
Richard Smith081ad4d2017-01-24 19:39:46 +00001324.. option:: -ffinite-math-only, -fno-finite-math-only
1325
Richard Smith081ad4d2017-01-24 19:39:46 +00001326.. option:: -ffor-scope, -fno-for-scope
1327
Richard Smith081ad4d2017-01-24 19:39:46 +00001328.. option:: -ffp-contract=<arg>
1329
1330Form fused FP ops (e.g. FMAs): fast (everywhere) \| on (according to FP\_CONTRACT pragma, default) \| off (never fuse)
1331
Richard Smith081ad4d2017-01-24 19:39:46 +00001332.. option:: -ffreestanding
1333
1334Assert that the compilation takes place in a freestanding environment
1335
Richard Smith081ad4d2017-01-24 19:39:46 +00001336.. option:: -ffunction-sections, -fno-function-sections
1337
1338Place each function in its own section (ELF Only)
1339
Richard Smith081ad4d2017-01-24 19:39:46 +00001340.. option:: -fgnu-inline-asm, -fno-gnu-inline-asm
1341
Richard Smith081ad4d2017-01-24 19:39:46 +00001342.. option:: -fgnu-keywords, -fno-gnu-keywords
1343
1344Allow GNU-extension keywords regardless of language standard
1345
Richard Smith081ad4d2017-01-24 19:39:46 +00001346.. option:: -fgnu-runtime
1347
1348Generate output compatible with the standard GNU Objective-C runtime
1349
Richard Smith081ad4d2017-01-24 19:39:46 +00001350.. option:: -fgnu89-inline, -fno-gnu89-inline
1351
1352Use the gnu89 inline semantics
1353
Richard Smith081ad4d2017-01-24 19:39:46 +00001354.. option:: -fhonor-infinities, -fhonor-infinites, -fno-honor-infinities
1355
Richard Smith081ad4d2017-01-24 19:39:46 +00001356.. option:: -fhonor-nans, -fno-honor-nans
1357
Richard Smith081ad4d2017-01-24 19:39:46 +00001358.. option:: -fhosted
1359
Richard Smith081ad4d2017-01-24 19:39:46 +00001360.. option:: -fimplicit-module-maps, -fmodule-maps, -fno-implicit-module-maps
1361
1362Implicitly search the file system for module map files.
1363
Richard Smith081ad4d2017-01-24 19:39:46 +00001364.. option:: -fimplicit-modules, -fno-implicit-modules
1365
Richard Smith081ad4d2017-01-24 19:39:46 +00001366.. option:: -finput-charset=<arg>
1367
Craig Topper188252d2017-12-11 21:09:16 +00001368.. option:: -finstrument-function-entry-bare
1369
1370Instrument function entry only, after inlining, without arguments to the instrumentation call
1371
Richard Smith081ad4d2017-01-24 19:39:46 +00001372.. option:: -finstrument-functions
1373
1374Generate calls to instrument function entry and exit
1375
Craig Topper16418662017-11-20 18:07:43 +00001376.. option:: -finstrument-functions-after-inlining
1377
1378Like -finstrument-functions, but insert the calls after inlining
1379
Richard Smith081ad4d2017-01-24 19:39:46 +00001380.. option:: -fintegrated-as, -fno-integrated-as, -integrated-as
1381
1382Enable the integrated assembler
1383
Richard Smith081ad4d2017-01-24 19:39:46 +00001384.. option:: -fjump-tables, -fno-jump-tables
1385
Richard Smith081ad4d2017-01-24 19:39:46 +00001386.. option:: -flax-vector-conversions, -fno-lax-vector-conversions
1387
Richard Smith081ad4d2017-01-24 19:39:46 +00001388.. option:: -flimited-precision=<arg>
1389
Richard Smith081ad4d2017-01-24 19:39:46 +00001390.. option:: -flto, -fno-lto
1391
1392Enable LTO in 'full' mode
1393
Richard Smith081ad4d2017-01-24 19:39:46 +00001394.. option:: -flto-jobs=<arg>
1395
1396Controls the backend parallelism of -flto=thin (default of 0 means the number of threads will be derived from the number of CPUs detected)
1397
Richard Smithb2c82a62017-01-27 01:54:42 +00001398.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001399.. option:: -flto=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001400.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001401
1402Set LTO mode to either 'full' or 'thin'
1403
Richard Smith081ad4d2017-01-24 19:39:46 +00001404.. option:: -fmacro-backtrace-limit=<arg>
1405
Richard Smith081ad4d2017-01-24 19:39:46 +00001406.. option:: -fmath-errno, -fno-math-errno
1407
1408Require math functions to indicate errors by setting errno
1409
Richard Smith081ad4d2017-01-24 19:39:46 +00001410.. option:: -fmax-type-align=<arg>
1411
1412Specify the maximum alignment to enforce on pointers lacking an explicit alignment
1413
Richard Smith081ad4d2017-01-24 19:39:46 +00001414.. option:: -fmerge-all-constants, -fno-merge-all-constants
1415
Richard Smith081ad4d2017-01-24 19:39:46 +00001416.. option:: -fmessage-length=<arg>
1417
Richard Smith081ad4d2017-01-24 19:39:46 +00001418.. option:: -fmodule-file-deps, -fno-module-file-deps
1419
Richard Smith081ad4d2017-01-24 19:39:46 +00001420.. option:: -fmodule-map-file=<file>
1421
1422Load this module map file
1423
Richard Smith081ad4d2017-01-24 19:39:46 +00001424.. option:: -fmodule-name=<name>, -fmodule-implementation-of <arg>, -fmodule-name <arg>
1425
1426Specify the name of the module to build
1427
Richard Smith081ad4d2017-01-24 19:39:46 +00001428.. option:: -fmodules, -fno-modules
1429
1430Enable the 'modules' language feature
1431
Richard Smith081ad4d2017-01-24 19:39:46 +00001432.. option:: -fmodules-decluse, -fno-modules-decluse
1433
1434Require declaration of modules used within a module
1435
Richard Smith081ad4d2017-01-24 19:39:46 +00001436.. option:: -fmodules-ignore-macro=<arg>
1437
1438Ignore the definition of the given macro when building and loading modules
1439
Richard Smith081ad4d2017-01-24 19:39:46 +00001440.. option:: -fmodules-search-all, -fno-modules-search-all
1441
1442Search even non-imported modules to resolve references
1443
Richard Smith081ad4d2017-01-24 19:39:46 +00001444.. option:: -fmodules-strict-decluse
1445
1446Like -fmodules-decluse but requires all headers to be in modules
1447
Richard Smith081ad4d2017-01-24 19:39:46 +00001448.. option:: -fmodules-ts
1449
1450Enable support for the C++ Modules TS
1451
Richard Smith081ad4d2017-01-24 19:39:46 +00001452.. option:: -fms-compatibility, -fno-ms-compatibility
1453
1454Enable full Microsoft Visual C++ compatibility
1455
Richard Smith081ad4d2017-01-24 19:39:46 +00001456.. option:: -fms-compatibility-version=<arg>
1457
1458Dot-separated value representing the Microsoft compiler version number to report in \_MSC\_VER (0 = don't define it (default))
1459
Richard Smith081ad4d2017-01-24 19:39:46 +00001460.. option:: -fms-extensions, -fno-ms-extensions
1461
1462Accept some non-standard constructs supported by the Microsoft compiler
1463
Richard Smith081ad4d2017-01-24 19:39:46 +00001464.. option:: -fms-memptr-rep=<arg>
1465
Richard Smith081ad4d2017-01-24 19:39:46 +00001466.. option:: -fms-volatile<arg>
1467
Richard Smith081ad4d2017-01-24 19:39:46 +00001468.. option:: -fmsc-version=<arg>
1469
1470Microsoft compiler version number to report in \_MSC\_VER (0 = don't define it (default))
1471
Richard Smith081ad4d2017-01-24 19:39:46 +00001472.. option:: -fmudflap
1473
Richard Smith081ad4d2017-01-24 19:39:46 +00001474.. option:: -fmudflapth
1475
Richard Smith081ad4d2017-01-24 19:39:46 +00001476.. option:: -fnested-functions
1477
Richard Smith081ad4d2017-01-24 19:39:46 +00001478.. option:: -fnew-alignment=<align>, -fnew-alignment <arg>
1479
1480Specifies the largest alignment guaranteed by '::operator new(size\_t)'
1481
Richard Smith081ad4d2017-01-24 19:39:46 +00001482.. option:: -fnext-runtime
1483
Richard Smith081ad4d2017-01-24 19:39:46 +00001484.. option:: -fno-builtin-<arg>
1485
1486Disable implicit builtin knowledge of a specific function
1487
Richard Smith081ad4d2017-01-24 19:39:46 +00001488.. option:: -fno-elide-type
1489
1490Do not elide types when printing diagnostics
1491
Richard Smith081ad4d2017-01-24 19:39:46 +00001492.. option:: -fno-max-type-align
1493
Richard Smith081ad4d2017-01-24 19:39:46 +00001494.. option:: -fno-operator-names
1495
1496Do not treat C++ operator name keywords as synonyms for operators
1497
Richard Smith081ad4d2017-01-24 19:39:46 +00001498.. option:: -fno-strict-modules-decluse
1499
Richard Smith081ad4d2017-01-24 19:39:46 +00001500.. option:: -fno-working-directory
1501
Boris Kolpackovb150d242017-08-30 09:15:53 +00001502.. option:: -fnoopenmp-relocatable-target
1503
1504Do not compile OpenMP target code as relocatable.
1505
Richard Smith081ad4d2017-01-24 19:39:46 +00001506.. option:: -fnoopenmp-use-tls
1507
Richard Smith081ad4d2017-01-24 19:39:46 +00001508.. option:: -fobjc-abi-version=<arg>
1509
Richard Smith081ad4d2017-01-24 19:39:46 +00001510.. option:: -fobjc-arc, -fno-objc-arc
1511
1512Synthesize retain and release calls for Objective-C pointers
1513
Richard Smith081ad4d2017-01-24 19:39:46 +00001514.. option:: -fobjc-arc-exceptions, -fno-objc-arc-exceptions
1515
1516Use EH-safe code when synthesizing retains and releases in -fobjc-arc
1517
Richard Smith081ad4d2017-01-24 19:39:46 +00001518.. option:: -fobjc-exceptions, -fno-objc-exceptions
1519
1520Enable Objective-C exceptions
1521
Richard Smith081ad4d2017-01-24 19:39:46 +00001522.. option:: -fobjc-infer-related-result-type, -fno-objc-infer-related-result-type
1523
Richard Smith081ad4d2017-01-24 19:39:46 +00001524.. option:: -fobjc-legacy-dispatch, -fno-objc-legacy-dispatch
1525
Richard Smith081ad4d2017-01-24 19:39:46 +00001526.. option:: -fobjc-link-runtime
1527
Richard Smith081ad4d2017-01-24 19:39:46 +00001528.. option:: -fobjc-nonfragile-abi, -fno-objc-nonfragile-abi
1529
Richard Smith081ad4d2017-01-24 19:39:46 +00001530.. option:: -fobjc-nonfragile-abi-version=<arg>
1531
Richard Smith081ad4d2017-01-24 19:39:46 +00001532.. option:: -fobjc-runtime=<arg>
1533
1534Specify the target Objective-C runtime kind and version
1535
Richard Smith081ad4d2017-01-24 19:39:46 +00001536.. option:: -fobjc-sender-dependent-dispatch
1537
Richard Smith081ad4d2017-01-24 19:39:46 +00001538.. option:: -fobjc-weak, -fno-objc-weak
1539
1540Enable ARC-style weak references in Objective-C
1541
Richard Smith081ad4d2017-01-24 19:39:46 +00001542.. option:: -fomit-frame-pointer, -fno-omit-frame-pointer
1543
Richard Smith081ad4d2017-01-24 19:39:46 +00001544.. option:: -fopenmp, -fno-openmp
1545
Richard Smith081ad4d2017-01-24 19:39:46 +00001546.. option:: -fopenmp-dump-offload-linker-script
1547
Boris Kolpackovb150d242017-08-30 09:15:53 +00001548.. option:: -fopenmp-relocatable-target
1549
1550OpenMP target code is compiled as relocatable using the -c flag. For OpenMP targets the code is relocatable by default.
1551
Craig Topper287c8012018-01-03 18:29:12 +00001552.. option:: -fopenmp-simd, -fno-openmp-simd
1553
1554Emit OpenMP code only for SIMD-based constructs.
1555
Richard Smith081ad4d2017-01-24 19:39:46 +00001556.. option:: -fopenmp-use-tls
1557
Richard Smith081ad4d2017-01-24 19:39:46 +00001558.. option:: -fopenmp-version=<arg>
1559
Richard Smithb2c82a62017-01-27 01:54:42 +00001560.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001561.. option:: -fopenmp=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001562.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001563
Richard Smith081ad4d2017-01-24 19:39:46 +00001564.. option:: -foperator-arrow-depth=<arg>
1565
Richard Smith081ad4d2017-01-24 19:39:46 +00001566.. option:: -foptimization-record-file=<arg>
1567
1568Specify the file name of any generated YAML optimization record
1569
Richard Smith081ad4d2017-01-24 19:39:46 +00001570.. option:: -foptimize-sibling-calls, -fno-optimize-sibling-calls
1571
Richard Smith081ad4d2017-01-24 19:39:46 +00001572.. option:: -foutput-class-dir=<arg>, --output-class-directory <arg>, --output-class-directory=<arg>
1573
Richard Smith081ad4d2017-01-24 19:39:46 +00001574.. option:: -fpack-struct, -fno-pack-struct
1575
Richard Smithb2c82a62017-01-27 01:54:42 +00001576.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001577.. option:: -fpack-struct=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001578.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001579
1580Specify the default maximum struct packing alignment
1581
Richard Smith081ad4d2017-01-24 19:39:46 +00001582.. option:: -fpascal-strings, -fno-pascal-strings, -mpascal-strings
1583
1584Recognize and construct Pascal-style string literals
1585
Richard Smith081ad4d2017-01-24 19:39:46 +00001586.. option:: -fpcc-struct-return
1587
1588Override the default ABI to return all structs on the stack
1589
Richard Smith081ad4d2017-01-24 19:39:46 +00001590.. option:: -fpch-preprocess
1591
Richard Smith081ad4d2017-01-24 19:39:46 +00001592.. option:: -fpic, -fno-pic
1593
Richard Smith081ad4d2017-01-24 19:39:46 +00001594.. option:: -fpie, -fno-pie
1595
Craig Topper16418662017-11-20 18:07:43 +00001596.. option:: -fplt, -fno-plt
1597
1598Use the PLT to make function calls
1599
Richard Smith081ad4d2017-01-24 19:39:46 +00001600.. option:: -fplugin=<dsopath>
1601
1602Load the named plugin (dynamic shared object)
1603
Richard Smith081ad4d2017-01-24 19:39:46 +00001604.. option:: -fpreserve-as-comments, -fno-preserve-as-comments
1605
Richard Smith081ad4d2017-01-24 19:39:46 +00001606.. option:: -fprofile-arcs, -fno-profile-arcs
1607
Richard Smith081ad4d2017-01-24 19:39:46 +00001608.. option:: -fprofile-dir=<arg>
1609
Richard Smith081ad4d2017-01-24 19:39:46 +00001610.. option:: -fprofile-generate, -fno-profile-generate
1611
1612Generate instrumented code to collect execution counts into default.profraw (overridden by LLVM\_PROFILE\_FILE env var)
1613
Richard Smithb2c82a62017-01-27 01:54:42 +00001614.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001615.. option:: -fprofile-generate=<directory>
Richard Smithb2c82a62017-01-27 01:54:42 +00001616.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001617
1618Generate instrumented code to collect execution counts into <directory>/default.profraw (overridden by LLVM\_PROFILE\_FILE env var)
1619
Richard Smith081ad4d2017-01-24 19:39:46 +00001620.. option:: -fprofile-instr-generate, -fno-profile-instr-generate
1621
1622Generate instrumented code to collect execution counts into default.profraw file (overridden by '=' form of option or LLVM\_PROFILE\_FILE env var)
1623
Richard Smithb2c82a62017-01-27 01:54:42 +00001624.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001625.. option:: -fprofile-instr-generate=<file>
Richard Smithb2c82a62017-01-27 01:54:42 +00001626.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001627
1628Generate instrumented code to collect execution counts into <file> (overridden by LLVM\_PROFILE\_FILE env var)
1629
Richard Smith081ad4d2017-01-24 19:39:46 +00001630.. option:: -fprofile-instr-use, -fno-profile-instr-use, -fprofile-use
1631
Richard Smithb2c82a62017-01-27 01:54:42 +00001632.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001633.. option:: -fprofile-instr-use=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001634.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001635
1636Use instrumentation data for profile-guided optimization
1637
Boris Kolpackovb150d242017-08-30 09:15:53 +00001638.. option:: -fprofile-sample-accurate, -fauto-profile-accurate, -fno-profile-sample-accurate
1639
1640Specifies that the sample profile is accurate. If the sample
1641 profile is accurate, callsites without profile samples are marked
1642 as cold. Otherwise, treat callsites without profile samples as if
1643 we have no profile
1644
Richard Smith78e23fd2017-04-13 22:39:49 +00001645.. option:: -fprofile-sample-use, -fauto-profile, -fno-profile-sample-use
1646
1647.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001648.. option:: -fprofile-sample-use=<arg>, -fauto-profile=<arg>
Richard Smith78e23fd2017-04-13 22:39:49 +00001649.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001650
1651Enable sample-based profile guided optimizations
1652
Richard Smithb2c82a62017-01-27 01:54:42 +00001653.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001654.. option:: -fprofile-use=<pathname>
Richard Smithb2c82a62017-01-27 01:54:42 +00001655.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001656
1657Use instrumentation data for profile-guided optimization. If pathname is a directory, it reads from <pathname>/default.profdata. Otherwise, it reads from file <pathname>.
1658
Richard Smith081ad4d2017-01-24 19:39:46 +00001659.. option:: -freciprocal-math, -fno-reciprocal-math
1660
1661Allow division operations to be reassociated
1662
Richard Smith081ad4d2017-01-24 19:39:46 +00001663.. option:: -freg-struct-return
1664
1665Override the default ABI to return small structs in registers
1666
Richard Smith081ad4d2017-01-24 19:39:46 +00001667.. option:: -frelaxed-template-template-args, -fno-relaxed-template-template-args
1668
1669Enable C++17 relaxed template template argument matching
1670
Richard Smith081ad4d2017-01-24 19:39:46 +00001671.. option:: -freroll-loops, -fno-reroll-loops
1672
1673Turn on loop reroller
1674
Richard Smith081ad4d2017-01-24 19:39:46 +00001675.. option:: -fretain-comments-from-system-headers
1676
Craig Topperd23254a2017-07-20 17:52:48 +00001677.. option:: -frewrite-imports, -fno-rewrite-imports
1678
Richard Smith081ad4d2017-01-24 19:39:46 +00001679.. option:: -frewrite-includes, -fno-rewrite-includes
1680
Richard Smith081ad4d2017-01-24 19:39:46 +00001681.. option:: -frewrite-map-file <arg>
1682
Richard Smithb2c82a62017-01-27 01:54:42 +00001683.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001684.. option:: -frewrite-map-file=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001685.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001686
Richard Smith081ad4d2017-01-24 19:39:46 +00001687.. option:: -fropi, -fno-ropi
1688
Richard Smith081ad4d2017-01-24 19:39:46 +00001689.. option:: -frtti, -fno-rtti
1690
Richard Smith081ad4d2017-01-24 19:39:46 +00001691.. option:: -frwpi, -fno-rwpi
1692
Richard Smith081ad4d2017-01-24 19:39:46 +00001693.. option:: -fsave-optimization-record, -fno-save-optimization-record
1694
1695Generate a YAML optimization record file
1696
Craig Topper188252d2017-12-11 21:09:16 +00001697.. option:: -fseh-exceptions
1698
1699Use SEH style exceptions
1700
Richard Smith081ad4d2017-01-24 19:39:46 +00001701.. option:: -fshort-enums, -fno-short-enums
1702
1703Allocate to an enum type only as many bytes as it needs for the declared range of possible values
1704
Richard Smith081ad4d2017-01-24 19:39:46 +00001705.. option:: -fshort-wchar, -fno-short-wchar
1706
1707Force wchar\_t to be a short unsigned int
1708
Richard Smith081ad4d2017-01-24 19:39:46 +00001709.. option:: -fshow-column, -fno-show-column
1710
Richard Smith081ad4d2017-01-24 19:39:46 +00001711.. option:: -fshow-overloads=<arg>
1712
1713Which overload candidates to show when overload resolution fails: best\|all; defaults to all
1714
Richard Smith081ad4d2017-01-24 19:39:46 +00001715.. option:: -fshow-source-location, -fno-show-source-location
1716
Richard Smith081ad4d2017-01-24 19:39:46 +00001717.. option:: -fsignaling-math, -fno-signaling-math
1718
Richard Smith081ad4d2017-01-24 19:39:46 +00001719.. option:: -fsigned-bitfields
1720
Richard Smith081ad4d2017-01-24 19:39:46 +00001721.. option:: -fsigned-char, -fno-signed-char, --signed-char
1722
Richard Smith081ad4d2017-01-24 19:39:46 +00001723.. option:: -fsigned-zeros, -fno-signed-zeros
1724
Richard Smith081ad4d2017-01-24 19:39:46 +00001725.. option:: -fsized-deallocation, -fno-sized-deallocation
1726
1727Enable C++14 sized global deallocation functions
1728
Richard Smith081ad4d2017-01-24 19:39:46 +00001729.. option:: -fsjlj-exceptions
1730
1731Use SjLj style exceptions
1732
Richard Smith081ad4d2017-01-24 19:39:46 +00001733.. option:: -fslp-vectorize, -fno-slp-vectorize, -ftree-slp-vectorize
1734
1735Enable the superword-level parallelism vectorization passes
1736
Richard Smith081ad4d2017-01-24 19:39:46 +00001737.. option:: -fspell-checking, -fno-spell-checking
1738
Richard Smith081ad4d2017-01-24 19:39:46 +00001739.. option:: -fspell-checking-limit=<arg>
1740
Richard Smith081ad4d2017-01-24 19:39:46 +00001741.. option:: -fsplit-dwarf-inlining, -fno-split-dwarf-inlining
1742
1743Place debug types in their own section (ELF Only)
1744
Richard Smith081ad4d2017-01-24 19:39:46 +00001745.. option:: -fsplit-stack
1746
Richard Smith081ad4d2017-01-24 19:39:46 +00001747.. option:: -fstack-protector, -fno-stack-protector
1748
1749Enable stack protectors for functions potentially vulnerable to stack smashing
1750
Richard Smith081ad4d2017-01-24 19:39:46 +00001751.. option:: -fstack-protector-all
1752
1753Force the usage of stack protectors for all functions
1754
Richard Smith081ad4d2017-01-24 19:39:46 +00001755.. option:: -fstack-protector-strong
1756
1757Use a strong heuristic to apply stack protectors to functions
1758
Richard Smith081ad4d2017-01-24 19:39:46 +00001759.. option:: -fstandalone-debug, -fno-limit-debug-info, -fno-standalone-debug
1760
1761Emit full debug info for all types used by the program
1762
Richard Smith081ad4d2017-01-24 19:39:46 +00001763.. option:: -fstrict-aliasing, -fno-strict-aliasing
1764
Richard Smith081ad4d2017-01-24 19:39:46 +00001765.. option:: -fstrict-enums, -fno-strict-enums
1766
1767Enable optimizations based on the strict definition of an enum's value range
1768
Richard Smith081ad4d2017-01-24 19:39:46 +00001769.. option:: -fstrict-overflow, -fno-strict-overflow
1770
Richard Smith081ad4d2017-01-24 19:39:46 +00001771.. option:: -fstrict-return, -fno-strict-return
1772
Richard Smith78e23fd2017-04-13 22:39:49 +00001773Always treat control flow paths that fall off the end of a non-void function as unreachable
Richard Smith081ad4d2017-01-24 19:39:46 +00001774
Richard Smith081ad4d2017-01-24 19:39:46 +00001775.. option:: -fstrict-vtable-pointers, -fno-strict-vtable-pointers
1776
1777Enable optimizations based on the strict rules for overwriting polymorphic C++ objects
1778
Richard Smith081ad4d2017-01-24 19:39:46 +00001779.. option:: -fstruct-path-tbaa, -fno-struct-path-tbaa
1780
Richard Smith081ad4d2017-01-24 19:39:46 +00001781.. option:: -ftabstop=<arg>
1782
Richard Smith081ad4d2017-01-24 19:39:46 +00001783.. option:: -ftemplate-backtrace-limit=<arg>
1784
Richard Smith081ad4d2017-01-24 19:39:46 +00001785.. option:: -ftemplate-depth-<arg>
1786
Richard Smith081ad4d2017-01-24 19:39:46 +00001787.. option:: -ftemplate-depth=<arg>
1788
Richard Smith081ad4d2017-01-24 19:39:46 +00001789.. option:: -ftest-coverage
1790
Richard Smith081ad4d2017-01-24 19:39:46 +00001791.. option:: -fthinlto-index=<arg>
1792
1793Perform ThinLTO importing using provided function summary index
1794
Richard Smith081ad4d2017-01-24 19:39:46 +00001795.. option:: -fthreadsafe-statics, -fno-threadsafe-statics
1796
Richard Smith081ad4d2017-01-24 19:39:46 +00001797.. option:: -ftime-report
1798
Richard Smith081ad4d2017-01-24 19:39:46 +00001799.. option:: -ftls-model=<arg>
1800
Richard Smith081ad4d2017-01-24 19:39:46 +00001801.. option:: -ftrap-function=<arg>
1802
1803Issue call to specified function rather than a trap instruction
1804
Richard Smith081ad4d2017-01-24 19:39:46 +00001805.. option:: -ftrapping-math, -fno-trapping-math
1806
Richard Smith081ad4d2017-01-24 19:39:46 +00001807.. option:: -ftrapv
1808
1809Trap on integer overflow
1810
Richard Smith081ad4d2017-01-24 19:39:46 +00001811.. option:: -ftrapv-handler <arg>
1812
Richard Smithb2c82a62017-01-27 01:54:42 +00001813.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001814.. option:: -ftrapv-handler=<function name>
Richard Smithb2c82a62017-01-27 01:54:42 +00001815.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001816
1817Specify the function to be called on overflow
1818
Richard Smith081ad4d2017-01-24 19:39:46 +00001819.. option:: -ftrigraphs, -fno-trigraphs, -trigraphs, --trigraphs
1820
1821Process trigraph sequences
1822
Richard Smith081ad4d2017-01-24 19:39:46 +00001823.. option:: -funique-section-names, -fno-unique-section-names
1824
1825Use unique names for text and data sections (ELF Only)
1826
Richard Smith081ad4d2017-01-24 19:39:46 +00001827.. option:: -funit-at-a-time, -fno-unit-at-a-time
1828
Richard Smith081ad4d2017-01-24 19:39:46 +00001829.. option:: -funroll-loops, -fno-unroll-loops
1830
1831Turn on loop unroller
1832
Richard Smith081ad4d2017-01-24 19:39:46 +00001833.. option:: -funsafe-math-optimizations, -fno-unsafe-math-optimizations
1834
Richard Smith081ad4d2017-01-24 19:39:46 +00001835.. option:: -funsigned-bitfields
1836
Richard Smith081ad4d2017-01-24 19:39:46 +00001837.. option:: -funsigned-char, -fno-unsigned-char, --unsigned-char
1838
Richard Smith081ad4d2017-01-24 19:39:46 +00001839.. option:: -funwind-tables, -fno-unwind-tables
1840
Richard Smith081ad4d2017-01-24 19:39:46 +00001841.. option:: -fuse-cxa-atexit, -fno-use-cxa-atexit
1842
Richard Smith081ad4d2017-01-24 19:39:46 +00001843.. option:: -fuse-init-array, -fno-use-init-array
1844
1845Use .init\_array instead of .ctors
1846
Richard Smith081ad4d2017-01-24 19:39:46 +00001847.. option:: -fuse-ld=<arg>
1848
Richard Smith081ad4d2017-01-24 19:39:46 +00001849.. option:: -fuse-line-directives, -fno-use-line-directives
1850
Richard Smith081ad4d2017-01-24 19:39:46 +00001851.. option:: -fveclib=<arg>
1852
1853Use the given vector functions library
1854
Richard Smith081ad4d2017-01-24 19:39:46 +00001855.. option:: -fvectorize, -fno-vectorize, -ftree-vectorize
1856
1857Enable the loop vectorization passes
1858
Richard Smith081ad4d2017-01-24 19:39:46 +00001859.. option:: -fverbose-asm, -fno-verbose-asm
1860
Richard Smith081ad4d2017-01-24 19:39:46 +00001861.. option:: -fvisibility-inlines-hidden
1862
1863Give inline C++ member functions default visibility by default
1864
Richard Smith081ad4d2017-01-24 19:39:46 +00001865.. option:: -fvisibility-ms-compat
1866
1867Give global types 'default' visibility and global functions and variables 'hidden' visibility by default
1868
Richard Smith081ad4d2017-01-24 19:39:46 +00001869.. option:: -fvisibility=<arg>
1870
1871Set the default symbol visibility for all global declarations
1872
Richard Smith081ad4d2017-01-24 19:39:46 +00001873.. option:: -fwhole-program-vtables, -fno-whole-program-vtables
1874
1875Enables whole-program vtable optimization. Requires -flto
1876
Richard Smith081ad4d2017-01-24 19:39:46 +00001877.. option:: -fwrapv, -fno-wrapv
1878
1879Treat signed integer overflow as two's complement
1880
Richard Smith081ad4d2017-01-24 19:39:46 +00001881.. option:: -fwritable-strings
1882
1883Store string literals as writable data
1884
Craig Topper188252d2017-12-11 21:09:16 +00001885.. option:: -fxray-always-emit-customevents, -fno-xray-always-emit-customevents
1886
1887Determine whether to always emit \_\_xray\_customevent(...) calls even if the function it appears in is not always instrumented.
1888
Richard Smith78e23fd2017-04-13 22:39:49 +00001889.. option:: -fxray-always-instrument=<arg>
1890
1891Filename defining the whitelist for imbuing the 'always instrument' XRay attribute.
1892
Richard Smith081ad4d2017-01-24 19:39:46 +00001893.. option:: -fxray-instruction-threshold<arg>
1894
Richard Smithb2c82a62017-01-27 01:54:42 +00001895.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001896.. option:: -fxray-instruction-threshold=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001897.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001898
1899Sets the minimum function size to instrument with XRay
1900
Richard Smith081ad4d2017-01-24 19:39:46 +00001901.. option:: -fxray-instrument, -fno-xray-instrument
1902
1903Generate XRay instrumentation sleds on function entry and exit
1904
Richard Smith78e23fd2017-04-13 22:39:49 +00001905.. option:: -fxray-never-instrument=<arg>
1906
1907Filename defining the whitelist for imbuing the 'never instrument' XRay attribute.
1908
Richard Smith081ad4d2017-01-24 19:39:46 +00001909.. option:: -fzero-initialized-in-bss, -fno-zero-initialized-in-bss
1910
Richard Smith081ad4d2017-01-24 19:39:46 +00001911.. option:: -fzvector, -fno-zvector, -mzvector
1912
1913Enable System z vector language extension
1914
Richard Smith081ad4d2017-01-24 19:39:46 +00001915.. option:: -pedantic, --pedantic, -no-pedantic, --no-pedantic
1916
Richard Smith081ad4d2017-01-24 19:39:46 +00001917.. option:: -pedantic-errors, --pedantic-errors
1918
1919OpenCL flags
1920------------
Richard Smith081ad4d2017-01-24 19:39:46 +00001921.. option:: -cl-denorms-are-zero
1922
1923OpenCL only. Allow denormals to be flushed to zero.
1924
Richard Smith081ad4d2017-01-24 19:39:46 +00001925.. option:: -cl-fast-relaxed-math
1926
1927OpenCL only. Sets -cl-finite-math-only and -cl-unsafe-math-optimizations, and defines \_\_FAST\_RELAXED\_MATH\_\_.
1928
Richard Smith081ad4d2017-01-24 19:39:46 +00001929.. option:: -cl-finite-math-only
1930
1931OpenCL only. Allow floating-point optimizations that assume arguments and results are not NaNs or +-Inf.
1932
Richard Smith081ad4d2017-01-24 19:39:46 +00001933.. option:: -cl-fp32-correctly-rounded-divide-sqrt
1934
1935OpenCL only. Specify that single precision floating-point divide and sqrt used in the program source are correctly rounded.
1936
Richard Smith081ad4d2017-01-24 19:39:46 +00001937.. option:: -cl-kernel-arg-info
1938
1939OpenCL only. Generate kernel argument metadata.
1940
Richard Smith081ad4d2017-01-24 19:39:46 +00001941.. option:: -cl-mad-enable
1942
1943OpenCL only. Allow use of less precise MAD computations in the generated binary.
1944
Richard Smith081ad4d2017-01-24 19:39:46 +00001945.. option:: -cl-no-signed-zeros
1946
1947OpenCL only. Allow use of less precise no signed zeros computations in the generated binary.
1948
Richard Smith081ad4d2017-01-24 19:39:46 +00001949.. option:: -cl-opt-disable
1950
1951OpenCL only. This option disables all optimizations. By default optimizations are enabled.
1952
Richard Smith081ad4d2017-01-24 19:39:46 +00001953.. option:: -cl-single-precision-constant
1954
1955OpenCL only. Treat double precision floating-point constant as single precision constant.
1956
Richard Smith081ad4d2017-01-24 19:39:46 +00001957.. option:: -cl-std=<arg>
1958
1959OpenCL language standard to compile for.
1960
Richard Smith081ad4d2017-01-24 19:39:46 +00001961.. option:: -cl-strict-aliasing
1962
1963OpenCL only. This option is added for compatibility with OpenCL 1.0.
1964
Richard Smith081ad4d2017-01-24 19:39:46 +00001965.. option:: -cl-unsafe-math-optimizations
1966
1967OpenCL only. Allow unsafe floating-point optimizations. Also implies -cl-no-signed-zeros and -cl-mad-enable.
1968
1969Target-dependent compilation options
1970~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Richard Smithc5b2e002017-01-27 02:08:37 +00001971.. option:: -G<size>, -G=<arg>, -msmall-data-threshold=<arg>
1972
1973Put objects of at most <size> bytes into small data section (MIPS / Hexagon)
1974
Richard Smith081ad4d2017-01-24 19:39:46 +00001975.. option:: -m16
1976
Richard Smith081ad4d2017-01-24 19:39:46 +00001977.. option:: -m32
1978
Richard Smith081ad4d2017-01-24 19:39:46 +00001979.. option:: -m64
1980
Richard Smith081ad4d2017-01-24 19:39:46 +00001981.. option:: -mabi=<arg>
1982
Richard Smith081ad4d2017-01-24 19:39:46 +00001983.. option:: -mabicalls, -mno-abicalls
1984
1985Enable SVR4-style position-independent code (Mips only)
1986
Boris Kolpackovb150d242017-08-30 09:15:53 +00001987.. option:: -mabs=<arg>
1988
Richard Smith081ad4d2017-01-24 19:39:46 +00001989.. option:: -malign-double
1990
1991Align doubles to two words in structs (x86 only)
1992
Richard Smith081ad4d2017-01-24 19:39:46 +00001993.. option:: -march=<arg>
1994
Richard Smith081ad4d2017-01-24 19:39:46 +00001995.. option:: -masm=<arg>
1996
Richard Smith081ad4d2017-01-24 19:39:46 +00001997.. option:: -mbackchain, -mno-backchain
1998
1999Link stack frames through backchain on System Z
2000
Richard Smith081ad4d2017-01-24 19:39:46 +00002001.. option:: -mcheck-zero-division, -mno-check-zero-division
2002
Richard Smith081ad4d2017-01-24 19:39:46 +00002003.. option:: -mcmodel=<arg>
2004
Richard Smith081ad4d2017-01-24 19:39:46 +00002005.. option:: -mcompact-branches=<arg>
2006
Richard Smith081ad4d2017-01-24 19:39:46 +00002007.. option:: -mconsole<arg>
2008
Craig Topper287c8012018-01-03 18:29:12 +00002009.. 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 +00002010
Craig Topperd23254a2017-07-20 17:52:48 +00002011.. option:: -mdefault-build-attributes<arg>, -mno-default-build-attributes<arg>
2012
Richard Smith081ad4d2017-01-24 19:39:46 +00002013.. option:: -mdll<arg>
2014
Richard Smith081ad4d2017-01-24 19:39:46 +00002015.. option:: -mdouble-float
2016
Richard Smith081ad4d2017-01-24 19:39:46 +00002017.. option:: -mdsp, -mno-dsp
2018
Richard Smith081ad4d2017-01-24 19:39:46 +00002019.. option:: -mdspr2, -mno-dspr2
2020
Richard Smith081ad4d2017-01-24 19:39:46 +00002021.. option:: -mdynamic-no-pic<arg>
2022
Richard Smith081ad4d2017-01-24 19:39:46 +00002023.. option:: -meabi <arg>
2024
2025Set EABI type, e.g. 4, 5 or gnu (default depends on triple)
2026
Boris Kolpackovb150d242017-08-30 09:15:53 +00002027.. option:: -membedded-data, -mno-embedded-data
2028
2029Place constants in the .rodata section instead of the .sdata section even if they meet the -G <size> threshold (MIPS)
2030
2031.. option:: -mextern-sdata, -mno-extern-sdata
2032
2033Assume that externally defined data is in the small data if it meets the -G <size> threshold (MIPS)
2034
Richard Smith78e23fd2017-04-13 22:39:49 +00002035.. option:: -mfentry
2036
2037Insert calls to fentry at function entry (x86 only)
2038
Richard Smith081ad4d2017-01-24 19:39:46 +00002039.. option:: -mfloat-abi=<arg>
2040
Richard Smith081ad4d2017-01-24 19:39:46 +00002041.. option:: -mfp32
2042
2043Use 32-bit floating point registers (MIPS only)
2044
Richard Smith081ad4d2017-01-24 19:39:46 +00002045.. option:: -mfp64
2046
2047Use 64-bit floating point registers (MIPS only)
2048
Richard Smith081ad4d2017-01-24 19:39:46 +00002049.. option:: -mfpmath=<arg>
2050
Richard Smith081ad4d2017-01-24 19:39:46 +00002051.. option:: -mfpu=<arg>
2052
Richard Smith081ad4d2017-01-24 19:39:46 +00002053.. option:: -mglobal-merge, -mno-global-merge
2054
2055Enable merging of globals
2056
Craig Topperd23254a2017-07-20 17:52:48 +00002057.. option:: -mgpopt, -mno-gpopt
2058
2059Use GP relative accesses for symbols known to be in a small data section (MIPS)
2060
Richard Smith081ad4d2017-01-24 19:39:46 +00002061.. option:: -mhard-float
2062
Richard Smith081ad4d2017-01-24 19:39:46 +00002063.. option:: -mhwdiv=<arg>, --mhwdiv <arg>, --mhwdiv=<arg>
2064
Richard Smith081ad4d2017-01-24 19:39:46 +00002065.. option:: -miamcu, -mno-iamcu
2066
2067Use Intel MCU ABI
2068
Richard Smith081ad4d2017-01-24 19:39:46 +00002069.. option:: -mimplicit-float, -mno-implicit-float
2070
Richard Smith081ad4d2017-01-24 19:39:46 +00002071.. option:: -mimplicit-it=<arg>
2072
Richard Smith081ad4d2017-01-24 19:39:46 +00002073.. option:: -mincremental-linker-compatible, -mno-incremental-linker-compatible
2074
2075(integrated-as) Emit an object file which can be used with an incremental linker
2076
Richard Smith78e23fd2017-04-13 22:39:49 +00002077.. option:: -miphoneos-version-min=<arg>, -mios-version-min=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00002078
Richard Smith081ad4d2017-01-24 19:39:46 +00002079.. option:: -mips16
2080
Richard Smith081ad4d2017-01-24 19:39:46 +00002081.. option:: -mkernel
2082
Richard Smith081ad4d2017-01-24 19:39:46 +00002083.. option:: -mldc1-sdc1, -mno-ldc1-sdc1
2084
Boris Kolpackovb150d242017-08-30 09:15:53 +00002085.. option:: -mlocal-sdata, -mno-local-sdata
2086
2087Extend the -G behaviour to object local data (MIPS)
2088
Richard Smith081ad4d2017-01-24 19:39:46 +00002089.. option:: -mlong-calls, -mno-long-calls
2090
2091Generate branches with extended addressability, usually via indirect jumps.
2092
Craig Topperd23254a2017-07-20 17:52:48 +00002093.. option:: -mmacosx-version-min=<arg>, -mmacos-version-min=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00002094
2095Set Mac OS X deployment target
2096
Craig Topperd23254a2017-07-20 17:52:48 +00002097.. option:: -mmadd4, -mno-madd4
2098
2099Enable the generation of 4-operand madd.s, madd.d and related instructions.
2100
2101.. option:: -mmcu=<arg>
2102
Richard Smith081ad4d2017-01-24 19:39:46 +00002103.. option:: -mmicromips, -mno-micromips
2104
Richard Smith081ad4d2017-01-24 19:39:46 +00002105.. option:: -mms-bitfields, -mno-ms-bitfields
2106
2107Set the default structure layout to be compatible with the Microsoft compiler standard
2108
Richard Smith081ad4d2017-01-24 19:39:46 +00002109.. option:: -mmsa, -mno-msa
2110
2111Enable MSA ASE (MIPS only)
2112
Craig Topperd23254a2017-07-20 17:52:48 +00002113.. option:: -mmt, -mno-mt
2114
2115Enable MT ASE (MIPS only)
2116
Richard Smith081ad4d2017-01-24 19:39:46 +00002117.. option:: -mnan=<arg>
2118
Richard Smith081ad4d2017-01-24 19:39:46 +00002119.. option:: -mno-mips16
2120
Richard Smith081ad4d2017-01-24 19:39:46 +00002121.. option:: -momit-leaf-frame-pointer, -mno-omit-leaf-frame-pointer
2122
2123Omit frame pointer setup for leaf functions
2124
Richard Smith081ad4d2017-01-24 19:39:46 +00002125.. option:: -moslib=<arg>
2126
Richard Smith081ad4d2017-01-24 19:39:46 +00002127.. option:: -mpie-copy-relocations, -mno-pie-copy-relocations
2128
2129Use copy relocations support for PIE builds
2130
Craig Topper9a724aa2017-12-11 21:09:19 +00002131.. option:: -mprefer-vector-width=<arg>
2132
2133Specifies preferred vector width for auto-vectorization. Defaults to 'none' which allows target specific decisions.
2134
Richard Smith081ad4d2017-01-24 19:39:46 +00002135.. option:: -mqdsp6-compat
2136
2137Enable hexagon-qdsp6 backward compatibility
2138
Richard Smith081ad4d2017-01-24 19:39:46 +00002139.. option:: -mrecip
2140
Richard Smithb2c82a62017-01-27 01:54:42 +00002141.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00002142.. option:: -mrecip=<arg1>,<arg2>...
Richard Smithb2c82a62017-01-27 01:54:42 +00002143.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00002144
Richard Smith081ad4d2017-01-24 19:39:46 +00002145.. option:: -mred-zone, -mno-red-zone
2146
Richard Smith081ad4d2017-01-24 19:39:46 +00002147.. option:: -mregparm=<arg>
2148
Richard Smith081ad4d2017-01-24 19:39:46 +00002149.. option:: -mrelax-all, -mno-relax-all
2150
2151(integrated-as) Relax all machine instructions
2152
Richard Smith081ad4d2017-01-24 19:39:46 +00002153.. option:: -mrtd, -mno-rtd
2154
2155Make StdCall calling convention the default
2156
Richard Smith081ad4d2017-01-24 19:39:46 +00002157.. option:: -msingle-float
2158
Richard Smith081ad4d2017-01-24 19:39:46 +00002159.. option:: -msoft-float, -mno-soft-float
2160
2161Use software floating point
2162
Richard Smith081ad4d2017-01-24 19:39:46 +00002163.. option:: -mstack-alignment=<arg>
2164
2165Set the stack alignment
2166
Richard Smith081ad4d2017-01-24 19:39:46 +00002167.. option:: -mstack-probe-size=<arg>
2168
2169Set the stack probe size
2170
Richard Smith081ad4d2017-01-24 19:39:46 +00002171.. option:: -mstackrealign, -mno-stackrealign
2172
2173Force realign the stack at entry to every function
2174
Richard Smith081ad4d2017-01-24 19:39:46 +00002175.. option:: -mthread-model <arg>
2176
2177The thread model to use, e.g. posix, single (posix by default)
2178
Richard Smith081ad4d2017-01-24 19:39:46 +00002179.. option:: -mthreads<arg>
2180
Richard Smith081ad4d2017-01-24 19:39:46 +00002181.. option:: -mthumb, -mno-thumb
2182
Richard Smith081ad4d2017-01-24 19:39:46 +00002183.. option:: -mtune=<arg>
2184
Richard Smith78e23fd2017-04-13 22:39:49 +00002185.. option:: -mtvos-version-min=<arg>, -mappletvos-version-min=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00002186
Richard Smith081ad4d2017-01-24 19:39:46 +00002187.. option:: -municode<arg>
2188
Richard Smith081ad4d2017-01-24 19:39:46 +00002189.. option:: -mvx, -mno-vx
2190
Richard Smith081ad4d2017-01-24 19:39:46 +00002191.. option:: -mwarn-nonportable-cfstrings, -mno-warn-nonportable-cfstrings
2192
Richard Smith78e23fd2017-04-13 22:39:49 +00002193.. option:: -mwatchos-version-min=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00002194
Richard Smith081ad4d2017-01-24 19:39:46 +00002195.. option:: -mwindows<arg>
2196
Richard Smith081ad4d2017-01-24 19:39:46 +00002197.. option:: -mx32
2198
Richard Smith081ad4d2017-01-24 19:39:46 +00002199.. option:: -mxgot, -mno-xgot
2200
2201AARCH64
2202-------
Richard Smith081ad4d2017-01-24 19:39:46 +00002203.. option:: -ffixed-x18
2204
2205Reserve the x18 register (AArch64 only)
2206
Richard Smith081ad4d2017-01-24 19:39:46 +00002207.. option:: -mfix-cortex-a53-835769, -mno-fix-cortex-a53-835769
2208
2209Workaround Cortex-A53 erratum 835769 (AArch64 only)
2210
Richard Smith081ad4d2017-01-24 19:39:46 +00002211.. option:: -mgeneral-regs-only
2212
2213Generate code which only uses the general purpose registers (AArch64 only)
2214
2215AMDGPU
2216------
Craig Topper16418662017-11-20 18:07:43 +00002217.. option:: -mxnack, -mno-xnack
2218
2219Enable XNACK (AMDGPU only)
2220
Richard Smith081ad4d2017-01-24 19:39:46 +00002221ARM
2222---
Richard Smith081ad4d2017-01-24 19:39:46 +00002223.. option:: -ffixed-r9
2224
2225Reserve the r9 register (ARM only)
2226
Richard Smith081ad4d2017-01-24 19:39:46 +00002227.. option:: -mcrc
2228
2229Allow use of CRC instructions (ARM only)
2230
Richard Smith081ad4d2017-01-24 19:39:46 +00002231.. option:: -mexecute-only, -mno-execute-only, -mpure-code
2232
2233Disallow generation of data access to code sections (ARM only)
2234
Richard Smith081ad4d2017-01-24 19:39:46 +00002235.. option:: -mno-movt
2236
2237Disallow use of movt/movw pairs (ARM only)
2238
Richard Smith78e23fd2017-04-13 22:39:49 +00002239.. option:: -mno-neg-immediates
2240
2241Disallow converting instructions with negative immediates to their negation or inversion.
2242
Richard Smith081ad4d2017-01-24 19:39:46 +00002243.. option:: -mnocrc
2244
2245Disallow use of CRC instructions (ARM only)
2246
Richard Smith081ad4d2017-01-24 19:39:46 +00002247.. option:: -mrestrict-it, -mno-restrict-it
2248
2249Disallow generation of deprecated IT blocks for ARMv8. It is on by default for ARMv8 Thumb mode.
2250
Craig Topper16418662017-11-20 18:07:43 +00002251.. option:: -mtp=<arg>
2252
2253Read thread pointer from coprocessor register (ARM only)
2254
Richard Smith081ad4d2017-01-24 19:39:46 +00002255.. option:: -munaligned-access, -mno-unaligned-access
2256
2257Allow memory accesses to be unaligned (AArch32/AArch64 only)
2258
2259Hexagon
2260-------
Craig Topper16418662017-11-20 18:07:43 +00002261.. option:: -mieee-rnd-near
2262
2263Hexagon
2264-------
Richard Smith081ad4d2017-01-24 19:39:46 +00002265.. option:: -mhvx, -mno-hvx
2266
2267Enable Hexagon Vector eXtensions
2268
Richard Smith081ad4d2017-01-24 19:39:46 +00002269.. option:: -mhvx-double, -mno-hvx-double
2270
2271Enable Hexagon Double Vector eXtensions
2272
Craig Topper16418662017-11-20 18:07:43 +00002273.. option:: -mhvx-length=<arg>
2274
2275Set Hexagon Vector Length
2276
2277.. program:: clang1
2278.. option:: -mhvx=<arg>
2279.. program:: clang
2280
2281Enable Hexagon Vector eXtensions
Richard Smith081ad4d2017-01-24 19:39:46 +00002282
2283PowerPC
2284-------
Richard Smith78e23fd2017-04-13 22:39:49 +00002285.. option:: -maltivec, -mno-altivec
2286
Richard Smith081ad4d2017-01-24 19:39:46 +00002287.. option:: -mcmpb, -mno-cmpb
2288
Richard Smith081ad4d2017-01-24 19:39:46 +00002289.. option:: -mcrbits, -mno-crbits
2290
Richard Smith081ad4d2017-01-24 19:39:46 +00002291.. option:: -mcrypto, -mno-crypto
2292
Richard Smith081ad4d2017-01-24 19:39:46 +00002293.. option:: -mdirect-move, -mno-direct-move
2294
Richard Smith081ad4d2017-01-24 19:39:46 +00002295.. option:: -mfloat128, -mno-float128
2296
Richard Smith081ad4d2017-01-24 19:39:46 +00002297.. option:: -mfprnd, -mno-fprnd
2298
Richard Smith081ad4d2017-01-24 19:39:46 +00002299.. option:: -mhtm, -mno-htm
2300
Richard Smith081ad4d2017-01-24 19:39:46 +00002301.. option:: -minvariant-function-descriptors, -mno-invariant-function-descriptors
2302
Richard Smith081ad4d2017-01-24 19:39:46 +00002303.. option:: -misel, -mno-isel
2304
Richard Smith081ad4d2017-01-24 19:39:46 +00002305.. option:: -mlongcall, -mno-longcall
2306
Richard Smith081ad4d2017-01-24 19:39:46 +00002307.. option:: -mmfocrf, -mmfcrf, -mno-mfocrf
2308
Richard Smith081ad4d2017-01-24 19:39:46 +00002309.. option:: -mpopcntd, -mno-popcntd
2310
Richard Smith081ad4d2017-01-24 19:39:46 +00002311.. option:: -mpower8-vector, -mno-power8-vector
2312
Richard Smith081ad4d2017-01-24 19:39:46 +00002313.. option:: -mpower9-vector, -mno-power9-vector
2314
Richard Smith081ad4d2017-01-24 19:39:46 +00002315.. option:: -mqpx, -mno-qpx
2316
Richard Smith081ad4d2017-01-24 19:39:46 +00002317.. option:: -mvsx, -mno-vsx
2318
2319WebAssembly
2320-----------
Craig Topper188252d2017-12-11 21:09:16 +00002321.. option:: -mnontrapping-fptoint, -mno-nontrapping-fptoint
2322
Dan Gohmand0c4e1e2018-01-19 17:16:32 +00002323.. option:: -msign-ext, -mno-sign-ext
2324
Richard Smith081ad4d2017-01-24 19:39:46 +00002325.. option:: -msimd128, -mno-simd128
2326
2327X86
2328---
Richard Smith081ad4d2017-01-24 19:39:46 +00002329.. option:: -m3dnow, -mno-3dnow
2330
Richard Smith081ad4d2017-01-24 19:39:46 +00002331.. option:: -m3dnowa, -mno-3dnowa
2332
Richard Smith081ad4d2017-01-24 19:39:46 +00002333.. option:: -madx, -mno-adx
2334
Richard Smith081ad4d2017-01-24 19:39:46 +00002335.. option:: -maes, -mno-aes
2336
Richard Smith081ad4d2017-01-24 19:39:46 +00002337.. option:: -mavx, -mno-avx
2338
Richard Smith081ad4d2017-01-24 19:39:46 +00002339.. option:: -mavx2, -mno-avx2
2340
Craig Topper287c8012018-01-03 18:29:12 +00002341.. option:: -mavx512bitalg, -mno-avx512bitalg
2342
Richard Smith081ad4d2017-01-24 19:39:46 +00002343.. option:: -mavx512bw, -mno-avx512bw
2344
Richard Smith081ad4d2017-01-24 19:39:46 +00002345.. option:: -mavx512cd, -mno-avx512cd
2346
Richard Smith081ad4d2017-01-24 19:39:46 +00002347.. option:: -mavx512dq, -mno-avx512dq
2348
Richard Smith081ad4d2017-01-24 19:39:46 +00002349.. option:: -mavx512er, -mno-avx512er
2350
Richard Smith081ad4d2017-01-24 19:39:46 +00002351.. option:: -mavx512f, -mno-avx512f
2352
Richard Smith081ad4d2017-01-24 19:39:46 +00002353.. option:: -mavx512ifma, -mno-avx512ifma
2354
Richard Smith081ad4d2017-01-24 19:39:46 +00002355.. option:: -mavx512pf, -mno-avx512pf
2356
Richard Smith081ad4d2017-01-24 19:39:46 +00002357.. option:: -mavx512vbmi, -mno-avx512vbmi
2358
Craig Topper287c8012018-01-03 18:29:12 +00002359.. option:: -mavx512vbmi2, -mno-avx512vbmi2
2360
Richard Smith081ad4d2017-01-24 19:39:46 +00002361.. option:: -mavx512vl, -mno-avx512vl
2362
Craig Topper287c8012018-01-03 18:29:12 +00002363.. option:: -mavx512vnni, -mno-avx512vnni
2364
Craig Topperd23254a2017-07-20 17:52:48 +00002365.. option:: -mavx512vpopcntdq, -mno-avx512vpopcntdq
2366
Richard Smith081ad4d2017-01-24 19:39:46 +00002367.. option:: -mbmi, -mno-bmi
2368
Richard Smith081ad4d2017-01-24 19:39:46 +00002369.. option:: -mbmi2, -mno-bmi2
2370
Craig Topper78b47872017-02-08 06:48:58 +00002371.. option:: -mclflushopt, -mno-clflushopt
2372
Craig Topper177a57c2017-02-08 07:57:01 +00002373.. option:: -mclwb, -mno-clwb
2374
Richard Smith78e23fd2017-04-13 22:39:49 +00002375.. option:: -mclzero, -mno-clzero
2376
Richard Smith081ad4d2017-01-24 19:39:46 +00002377.. option:: -mcx16, -mno-cx16
2378
Richard Smith081ad4d2017-01-24 19:39:46 +00002379.. option:: -mf16c, -mno-f16c
2380
Richard Smith081ad4d2017-01-24 19:39:46 +00002381.. option:: -mfma, -mno-fma
2382
Richard Smith081ad4d2017-01-24 19:39:46 +00002383.. option:: -mfma4, -mno-fma4
2384
Richard Smith081ad4d2017-01-24 19:39:46 +00002385.. option:: -mfsgsbase, -mno-fsgsbase
2386
Richard Smith081ad4d2017-01-24 19:39:46 +00002387.. option:: -mfxsr, -mno-fxsr
2388
Craig Topper287c8012018-01-03 18:29:12 +00002389.. option:: -mgfni, -mno-gfni
2390
Craig Topper188252d2017-12-11 21:09:16 +00002391.. option:: -mibt, -mno-ibt
2392
Craig Topperd23254a2017-07-20 17:52:48 +00002393.. option:: -mlwp, -mno-lwp
2394
Richard Smith081ad4d2017-01-24 19:39:46 +00002395.. option:: -mlzcnt, -mno-lzcnt
2396
Richard Smith081ad4d2017-01-24 19:39:46 +00002397.. option:: -mmmx, -mno-mmx
2398
Craig Topper177a57c2017-02-08 07:57:01 +00002399.. option:: -mmovbe, -mno-movbe
2400
Craig Topperb16cb822017-02-08 07:56:42 +00002401.. option:: -mmpx, -mno-mpx
2402
Richard Smith081ad4d2017-01-24 19:39:46 +00002403.. option:: -mmwaitx, -mno-mwaitx
2404
Richard Smith081ad4d2017-01-24 19:39:46 +00002405.. option:: -mpclmul, -mno-pclmul
2406
Richard Smith081ad4d2017-01-24 19:39:46 +00002407.. option:: -mpku, -mno-pku
2408
Richard Smith081ad4d2017-01-24 19:39:46 +00002409.. option:: -mpopcnt, -mno-popcnt
2410
Craig Topperd2bf7b02017-02-08 08:23:40 +00002411.. option:: -mprefetchwt1, -mno-prefetchwt1
2412
Richard Smith081ad4d2017-01-24 19:39:46 +00002413.. option:: -mprfchw, -mno-prfchw
2414
Richard Smith081ad4d2017-01-24 19:39:46 +00002415.. option:: -mrdrnd, -mno-rdrnd
2416
Richard Smith081ad4d2017-01-24 19:39:46 +00002417.. option:: -mrdseed, -mno-rdseed
2418
Richard Smith081ad4d2017-01-24 19:39:46 +00002419.. option:: -mrtm, -mno-rtm
2420
Craig Topper204ecff2017-02-08 08:23:17 +00002421.. option:: -msgx, -mno-sgx
2422
Richard Smith081ad4d2017-01-24 19:39:46 +00002423.. option:: -msha, -mno-sha
2424
Craig Topper188252d2017-12-11 21:09:16 +00002425.. option:: -mshstk, -mno-shstk
2426
Richard Smith081ad4d2017-01-24 19:39:46 +00002427.. option:: -msse, -mno-sse
2428
Richard Smith081ad4d2017-01-24 19:39:46 +00002429.. option:: -msse2, -mno-sse2
2430
Richard Smith081ad4d2017-01-24 19:39:46 +00002431.. option:: -msse3, -mno-sse3
2432
Richard Smith081ad4d2017-01-24 19:39:46 +00002433.. option:: -msse4.1, -mno-sse4.1
2434
Richard Smithb2c82a62017-01-27 01:54:42 +00002435.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00002436.. option:: -msse4.2, -mno-sse4.2, -msse4
Richard Smithb2c82a62017-01-27 01:54:42 +00002437.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00002438
Richard Smith081ad4d2017-01-24 19:39:46 +00002439.. option:: -msse4a, -mno-sse4a
2440
Richard Smith081ad4d2017-01-24 19:39:46 +00002441.. option:: -mssse3, -mno-ssse3
2442
Richard Smith081ad4d2017-01-24 19:39:46 +00002443.. option:: -mtbm, -mno-tbm
2444
Craig Topper287c8012018-01-03 18:29:12 +00002445.. option:: -mvaes, -mno-vaes
2446
2447.. option:: -mvpclmulqdq, -mno-vpclmulqdq
2448
Richard Smith081ad4d2017-01-24 19:39:46 +00002449.. option:: -mx87, -m80387, -mno-x87
2450
Richard Smith081ad4d2017-01-24 19:39:46 +00002451.. option:: -mxop, -mno-xop
2452
Richard Smith081ad4d2017-01-24 19:39:46 +00002453.. option:: -mxsave, -mno-xsave
2454
Richard Smith081ad4d2017-01-24 19:39:46 +00002455.. option:: -mxsavec, -mno-xsavec
2456
Richard Smith081ad4d2017-01-24 19:39:46 +00002457.. option:: -mxsaveopt, -mno-xsaveopt
2458
Richard Smith081ad4d2017-01-24 19:39:46 +00002459.. option:: -mxsaves, -mno-xsaves
2460
2461Optimization level
2462~~~~~~~~~~~~~~~~~~
2463
2464Flags controlling how much optimization should be performed.
2465
Richard Smith081ad4d2017-01-24 19:39:46 +00002466.. option:: -O<arg>, -O (equivalent to -O2), --optimize, --optimize=<arg>
2467
Richard Smith081ad4d2017-01-24 19:39:46 +00002468.. option:: -Ofast<arg>
2469
2470Debug information generation
2471~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2472
2473Flags controlling how much and what kind of debug information should be
2474generated.
2475
2476Kind and level of debug information
2477-----------------------------------
Richard Smith081ad4d2017-01-24 19:39:46 +00002478.. option:: -g, --debug, --debug=<arg>
2479
2480Generate source-level debug information
2481
Richard Smith081ad4d2017-01-24 19:39:46 +00002482.. option:: -gdwarf-2
2483
2484Generate source-level debug information with dwarf version 2
2485
Richard Smith081ad4d2017-01-24 19:39:46 +00002486.. option:: -gdwarf-3
2487
2488Generate source-level debug information with dwarf version 3
2489
Richard Smith081ad4d2017-01-24 19:39:46 +00002490.. option:: -gdwarf-4, -gdwarf
2491
2492Generate source-level debug information with dwarf version 4
2493
Richard Smith081ad4d2017-01-24 19:39:46 +00002494.. option:: -gdwarf-5
2495
2496Generate source-level debug information with dwarf version 5
2497
Richard Smith081ad4d2017-01-24 19:39:46 +00002498.. option:: -gfull
2499
Richard Smith081ad4d2017-01-24 19:39:46 +00002500.. option:: -gused
2501
2502Debug level
2503___________
Richard Smith081ad4d2017-01-24 19:39:46 +00002504.. option:: -g0
2505
Richard Smith081ad4d2017-01-24 19:39:46 +00002506.. option:: -g2
2507
Richard Smith081ad4d2017-01-24 19:39:46 +00002508.. option:: -g3
2509
Richard Smith081ad4d2017-01-24 19:39:46 +00002510.. option:: -ggdb0
2511
Richard Smith081ad4d2017-01-24 19:39:46 +00002512.. option:: -ggdb1
2513
Richard Smith081ad4d2017-01-24 19:39:46 +00002514.. option:: -ggdb2
2515
Richard Smith081ad4d2017-01-24 19:39:46 +00002516.. option:: -ggdb3
2517
Richard Smith081ad4d2017-01-24 19:39:46 +00002518.. option:: -gline-tables-only, -g1, -gmlt
2519
2520Emit debug line number tables only
2521
Richard Smith081ad4d2017-01-24 19:39:46 +00002522.. option:: -gmodules
2523
2524Generate debug info with external references to clang modules or precompiled headers
2525
2526Debugger to tune debug information for
2527______________________________________
Richard Smith081ad4d2017-01-24 19:39:46 +00002528.. option:: -ggdb
2529
Richard Smith081ad4d2017-01-24 19:39:46 +00002530.. option:: -glldb
2531
Richard Smith081ad4d2017-01-24 19:39:46 +00002532.. option:: -gsce
2533
2534Debug information flags
2535-----------------------
Richard Smith081ad4d2017-01-24 19:39:46 +00002536.. option:: -gcolumn-info, -gno-column-info
2537
Richard Smith081ad4d2017-01-24 19:39:46 +00002538.. option:: -gdwarf-aranges
2539
Richard Smith081ad4d2017-01-24 19:39:46 +00002540.. option:: -ggnu-pubnames
2541
Richard Smith081ad4d2017-01-24 19:39:46 +00002542.. option:: -grecord-gcc-switches, -gno-record-gcc-switches
2543
Richard Smith081ad4d2017-01-24 19:39:46 +00002544.. option:: -gsplit-dwarf
2545
Richard Smith081ad4d2017-01-24 19:39:46 +00002546.. option:: -gstrict-dwarf, -gno-strict-dwarf
2547
Craig Topperd23254a2017-07-20 17:52:48 +00002548.. option:: -gz
2549
2550DWARF debug sections compression type
2551
2552.. program:: clang1
2553.. option:: -gz=<arg>
2554.. program:: clang
2555
2556DWARF debug sections compression type
2557
Richard Smithc5b2e002017-01-27 02:08:37 +00002558Static analyzer flags
2559=====================
Richard Smith081ad4d2017-01-24 19:39:46 +00002560
Richard Smithc5b2e002017-01-27 02:08:37 +00002561Flags controlling the behavior of the Clang Static Analyzer.
Richard Smith081ad4d2017-01-24 19:39:46 +00002562
Richard Smithc5b2e002017-01-27 02:08:37 +00002563.. option:: -Xanalyzer <arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00002564
Richard Smithc5b2e002017-01-27 02:08:37 +00002565Pass <arg> to the static analyzer
Richard Smith081ad4d2017-01-24 19:39:46 +00002566
2567Fortran compilation flags
2568=========================
2569
2570Flags that will be passed onto the ``gfortran`` compiler when Clang is given
2571a Fortran input.
2572
Richard Smithc5b2e002017-01-27 02:08:37 +00002573.. option:: -A<arg>, --assert <arg>, --assert=<arg>
2574
Richard Smith081ad4d2017-01-24 19:39:46 +00002575.. option:: -A-<arg>
2576
Richard Smith081ad4d2017-01-24 19:39:46 +00002577.. option:: -J<arg>
2578
Richard Smith081ad4d2017-01-24 19:39:46 +00002579.. option:: -cpp
2580
Richard Smith081ad4d2017-01-24 19:39:46 +00002581.. option:: -faggressive-function-elimination, -fno-aggressive-function-elimination
2582
Richard Smith081ad4d2017-01-24 19:39:46 +00002583.. option:: -falign-commons, -fno-align-commons
2584
Richard Smith081ad4d2017-01-24 19:39:46 +00002585.. option:: -fall-intrinsics, -fno-all-intrinsics
2586
Richard Smith081ad4d2017-01-24 19:39:46 +00002587.. option:: -fautomatic, -fno-automatic
2588
Richard Smith081ad4d2017-01-24 19:39:46 +00002589.. option:: -fbackslash, -fno-backslash
2590
Richard Smith081ad4d2017-01-24 19:39:46 +00002591.. option:: -fbacktrace, -fno-backtrace
2592
Richard Smith081ad4d2017-01-24 19:39:46 +00002593.. option:: -fblas-matmul-limit=<arg>
2594
Richard Smith081ad4d2017-01-24 19:39:46 +00002595.. option:: -fbounds-check, -fno-bounds-check
2596
Richard Smith081ad4d2017-01-24 19:39:46 +00002597.. option:: -fcheck-array-temporaries, -fno-check-array-temporaries
2598
Richard Smith081ad4d2017-01-24 19:39:46 +00002599.. option:: -fcheck=<arg>
2600
Richard Smith081ad4d2017-01-24 19:39:46 +00002601.. option:: -fcoarray=<arg>
2602
Richard Smith081ad4d2017-01-24 19:39:46 +00002603.. option:: -fconvert=<arg>
2604
Richard Smith081ad4d2017-01-24 19:39:46 +00002605.. option:: -fcray-pointer, -fno-cray-pointer
2606
Richard Smith081ad4d2017-01-24 19:39:46 +00002607.. option:: -fd-lines-as-code, -fno-d-lines-as-code
2608
Richard Smith081ad4d2017-01-24 19:39:46 +00002609.. option:: -fd-lines-as-comments, -fno-d-lines-as-comments
2610
Richard Smith081ad4d2017-01-24 19:39:46 +00002611.. option:: -fdefault-double-8, -fno-default-double-8
2612
Richard Smith081ad4d2017-01-24 19:39:46 +00002613.. option:: -fdefault-integer-8, -fno-default-integer-8
2614
Richard Smith081ad4d2017-01-24 19:39:46 +00002615.. option:: -fdefault-real-8, -fno-default-real-8
2616
Richard Smith081ad4d2017-01-24 19:39:46 +00002617.. option:: -fdollar-ok, -fno-dollar-ok
2618
Richard Smith081ad4d2017-01-24 19:39:46 +00002619.. option:: -fdump-fortran-optimized, -fno-dump-fortran-optimized
2620
Richard Smith081ad4d2017-01-24 19:39:46 +00002621.. option:: -fdump-fortran-original, -fno-dump-fortran-original
2622
Richard Smith081ad4d2017-01-24 19:39:46 +00002623.. option:: -fdump-parse-tree, -fno-dump-parse-tree
2624
Richard Smith081ad4d2017-01-24 19:39:46 +00002625.. option:: -fexternal-blas, -fno-external-blas
2626
Richard Smith081ad4d2017-01-24 19:39:46 +00002627.. option:: -ff2c, -fno-f2c
2628
Richard Smith081ad4d2017-01-24 19:39:46 +00002629.. option:: -ffixed-form, -fno-fixed-form
2630
Richard Smith081ad4d2017-01-24 19:39:46 +00002631.. option:: -ffixed-line-length-<arg>
2632
Richard Smith081ad4d2017-01-24 19:39:46 +00002633.. option:: -ffpe-trap=<arg>
2634
Richard Smith081ad4d2017-01-24 19:39:46 +00002635.. option:: -ffree-form, -fno-free-form
2636
Richard Smith081ad4d2017-01-24 19:39:46 +00002637.. option:: -ffree-line-length-<arg>
2638
Richard Smith081ad4d2017-01-24 19:39:46 +00002639.. option:: -ffrontend-optimize, -fno-frontend-optimize
2640
Richard Smith081ad4d2017-01-24 19:39:46 +00002641.. option:: -fimplicit-none, -fno-implicit-none
2642
Richard Smith081ad4d2017-01-24 19:39:46 +00002643.. option:: -finit-character=<arg>
2644
Richard Smith081ad4d2017-01-24 19:39:46 +00002645.. option:: -finit-integer=<arg>
2646
Richard Smith081ad4d2017-01-24 19:39:46 +00002647.. option:: -finit-local-zero, -fno-init-local-zero
2648
Richard Smith081ad4d2017-01-24 19:39:46 +00002649.. option:: -finit-logical=<arg>
2650
Richard Smith081ad4d2017-01-24 19:39:46 +00002651.. option:: -finit-real=<arg>
2652
Richard Smith081ad4d2017-01-24 19:39:46 +00002653.. option:: -finteger-4-integer-8, -fno-integer-4-integer-8
2654
Richard Smith081ad4d2017-01-24 19:39:46 +00002655.. option:: -fintrinsic-modules-path, -fno-intrinsic-modules-path
2656
Richard Smith081ad4d2017-01-24 19:39:46 +00002657.. option:: -fmax-array-constructor=<arg>
2658
Richard Smith081ad4d2017-01-24 19:39:46 +00002659.. option:: -fmax-errors=<arg>
2660
Richard Smith081ad4d2017-01-24 19:39:46 +00002661.. option:: -fmax-identifier-length, -fno-max-identifier-length
2662
Richard Smith081ad4d2017-01-24 19:39:46 +00002663.. option:: -fmax-stack-var-size=<arg>
2664
Richard Smith081ad4d2017-01-24 19:39:46 +00002665.. option:: -fmax-subrecord-length=<arg>
2666
Richard Smith081ad4d2017-01-24 19:39:46 +00002667.. option:: -fmodule-private, -fno-module-private
2668
Richard Smith081ad4d2017-01-24 19:39:46 +00002669.. option:: -fpack-derived, -fno-pack-derived
2670
Richard Smith081ad4d2017-01-24 19:39:46 +00002671.. option:: -fprotect-parens, -fno-protect-parens
2672
Richard Smith081ad4d2017-01-24 19:39:46 +00002673.. option:: -frange-check, -fno-range-check
2674
Richard Smith081ad4d2017-01-24 19:39:46 +00002675.. option:: -freal-4-real-10, -fno-real-4-real-10
2676
Richard Smith081ad4d2017-01-24 19:39:46 +00002677.. option:: -freal-4-real-16, -fno-real-4-real-16
2678
Richard Smith081ad4d2017-01-24 19:39:46 +00002679.. option:: -freal-4-real-8, -fno-real-4-real-8
2680
Richard Smith081ad4d2017-01-24 19:39:46 +00002681.. option:: -freal-8-real-10, -fno-real-8-real-10
2682
Richard Smith081ad4d2017-01-24 19:39:46 +00002683.. option:: -freal-8-real-16, -fno-real-8-real-16
2684
Richard Smith081ad4d2017-01-24 19:39:46 +00002685.. option:: -freal-8-real-4, -fno-real-8-real-4
2686
Richard Smith081ad4d2017-01-24 19:39:46 +00002687.. option:: -frealloc-lhs, -fno-realloc-lhs
2688
Richard Smith081ad4d2017-01-24 19:39:46 +00002689.. option:: -frecord-marker=<arg>
2690
Richard Smith081ad4d2017-01-24 19:39:46 +00002691.. option:: -frecursive, -fno-recursive
2692
Richard Smith081ad4d2017-01-24 19:39:46 +00002693.. option:: -frepack-arrays, -fno-repack-arrays
2694
Richard Smith081ad4d2017-01-24 19:39:46 +00002695.. option:: -fsecond-underscore, -fno-second-underscore
2696
Richard Smith081ad4d2017-01-24 19:39:46 +00002697.. option:: -fsign-zero, -fno-sign-zero
2698
Richard Smith081ad4d2017-01-24 19:39:46 +00002699.. option:: -fstack-arrays, -fno-stack-arrays
2700
Richard Smith081ad4d2017-01-24 19:39:46 +00002701.. option:: -funderscoring, -fno-underscoring
2702
Richard Smith081ad4d2017-01-24 19:39:46 +00002703.. option:: -fwhole-file, -fno-whole-file
2704
Richard Smith081ad4d2017-01-24 19:39:46 +00002705.. option:: -nocpp
2706
Richard Smith081ad4d2017-01-24 19:39:46 +00002707.. option:: -static-libgfortran
2708
Richard Smithc5b2e002017-01-27 02:08:37 +00002709Linker flags
2710============
2711Flags that are passed on to the linker
2712
2713.. option:: -L<dir>, --library-directory <arg>, --library-directory=<arg>
2714
2715Add directory to library search path
2716
2717.. option:: -Mach
2718
2719.. option:: -T<script>
2720
2721Specify <script> as linker script
2722
Richard Smith78e23fd2017-04-13 22:39:49 +00002723.. option:: -Tbss<addr>
Richard Smithc5b2e002017-01-27 02:08:37 +00002724
2725Set starting address of BSS to <addr>
2726
Richard Smith78e23fd2017-04-13 22:39:49 +00002727.. option:: -Tdata<addr>
Richard Smithc5b2e002017-01-27 02:08:37 +00002728
2729Set starting address of BSS to <addr>
2730
Richard Smith78e23fd2017-04-13 22:39:49 +00002731.. option:: -Ttext<addr>
Richard Smithc5b2e002017-01-27 02:08:37 +00002732
2733Set starting address of BSS to <addr>
2734
2735.. option:: -Wl,<arg>,<arg2>...
2736
2737Pass the comma separated arguments in <arg> to the linker
2738
2739.. option:: -X
2740
2741.. option:: -Xlinker <arg>, --for-linker <arg>, --for-linker=<arg>
2742
2743Pass <arg> to the linker
2744
2745.. program:: clang1
2746.. option:: -Z
2747.. program:: clang
2748
2749.. option:: -e<arg>, --entry
2750
2751.. option:: -filelist <arg>
2752
2753.. option:: -l<arg>
2754
2755.. option:: -r
2756
2757.. option:: -rpath <arg>
2758
2759.. option:: -s
2760
2761.. option:: -t
2762
2763.. option:: -u<arg>, --force-link <arg>, --force-link=<arg>
2764
2765.. option:: -undef
2766
2767undef all system defines
2768
2769.. option:: -undefined<arg>, --no-undefined
2770
2771.. option:: -z <arg>
2772
2773Pass -z <arg> to the linker
2774