blob: add168829e1ba336fc1b9082a838da6b8c530e34 [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
Richard Smith081ad4d2017-01-24 19:39:46 +000059.. option:: -Z<arg>
60
Richard Smith081ad4d2017-01-24 19:39:46 +000061.. option:: -a<arg>, --profile-blocks
62
Richard Smith081ad4d2017-01-24 19:39:46 +000063.. option:: -all\_load
64
Richard Smith081ad4d2017-01-24 19:39:46 +000065.. option:: -allowable\_client <arg>
66
Richard Smith081ad4d2017-01-24 19:39:46 +000067.. option:: --analyze
68
69Run the static analyzer
70
Richard Smith081ad4d2017-01-24 19:39:46 +000071.. option:: --analyze-auto
72
Richard Smith081ad4d2017-01-24 19:39:46 +000073.. option:: --analyzer-no-default-checks
74
Richard Smith081ad4d2017-01-24 19:39:46 +000075.. option:: --analyzer-output<arg>
76
77Static analyzer report output format (html\|plist\|plist-multi-file\|plist-html\|text).
78
Richard Smith081ad4d2017-01-24 19:39:46 +000079.. option:: -ansi, --ansi
80
Richard Smith081ad4d2017-01-24 19:39:46 +000081.. option:: -arch <arg>
82
Richard Smithb2c82a62017-01-27 01:54:42 +000083.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +000084.. option:: -arch\_errors\_fatal
Richard Smithb2c82a62017-01-27 01:54:42 +000085.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +000086
Richard Smithb2c82a62017-01-27 01:54:42 +000087.. program:: clang2
Richard Smith081ad4d2017-01-24 19:39:46 +000088.. option:: -arch\_only <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +000089.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +000090
Richard Smith081ad4d2017-01-24 19:39:46 +000091.. option:: -arcmt-migrate-emit-errors
92
93Emit ARC errors even if the migrator can fix them
94
Richard Smith081ad4d2017-01-24 19:39:46 +000095.. option:: -arcmt-migrate-report-output <arg>
96
97Output path for the plist report
98
Richard Smith081ad4d2017-01-24 19:39:46 +000099.. option:: -bind\_at\_load
100
Richard Smith081ad4d2017-01-24 19:39:46 +0000101.. option:: -bundle
102
Richard Smithb2c82a62017-01-27 01:54:42 +0000103.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000104.. option:: -bundle\_loader <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000105.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000106
Richard Smith081ad4d2017-01-24 19:39:46 +0000107.. option:: -client\_name<arg>
108
Richard Smith081ad4d2017-01-24 19:39:46 +0000109.. option:: -compatibility\_version<arg>
110
Richard Smith081ad4d2017-01-24 19:39:46 +0000111.. option:: --constant-cfstrings
112
Richard Smith081ad4d2017-01-24 19:39:46 +0000113.. option:: -coverage, --coverage
114
Richard Smith081ad4d2017-01-24 19:39:46 +0000115.. option:: --cuda-compile-host-device
116
117Compile CUDA code for both host and device (default). Has no effect on non-CUDA compilations.
118
Richard Smith081ad4d2017-01-24 19:39:46 +0000119.. option:: --cuda-device-only
120
121Compile CUDA code for device only
122
Richard Smith081ad4d2017-01-24 19:39:46 +0000123.. option:: --cuda-gpu-arch=<arg>, --no-cuda-gpu-arch=<arg>
124
125CUDA GPU architecture (e.g. sm\_35). May be specified more than once.
126
Richard Smith081ad4d2017-01-24 19:39:46 +0000127.. option:: --cuda-host-only
128
129Compile CUDA code for host only. Has no effect on non-CUDA compilations.
130
Richard Smith081ad4d2017-01-24 19:39:46 +0000131.. option:: --cuda-noopt-device-debug, --no-cuda-noopt-device-debug
132
133Enable device-side debug info generation. Disables ptxas optimizations.
134
Richard Smith081ad4d2017-01-24 19:39:46 +0000135.. option:: -current\_version<arg>
136
Richard Smith081ad4d2017-01-24 19:39:46 +0000137.. option:: -dead\_strip
138
Richard Smith081ad4d2017-01-24 19:39:46 +0000139.. option:: -dependency-dot <arg>
140
141Filename to write DOT-formatted header dependencies to
142
Richard Smith081ad4d2017-01-24 19:39:46 +0000143.. option:: -dependency-file <arg>
144
145Filename (or -) to write dependency output to
146
Richard Smith081ad4d2017-01-24 19:39:46 +0000147.. option:: -dumpmachine
148
Richard Smith081ad4d2017-01-24 19:39:46 +0000149.. option:: -dumpversion
150
Richard Smith081ad4d2017-01-24 19:39:46 +0000151.. option:: --dyld-prefix=<arg>, --dyld-prefix <arg>
152
Richard Smith081ad4d2017-01-24 19:39:46 +0000153.. option:: -dylib\_file <arg>
154
Richard Smith081ad4d2017-01-24 19:39:46 +0000155.. option:: -dylinker
156
Richard Smithb2c82a62017-01-27 01:54:42 +0000157.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000158.. option:: -dylinker\_install\_name<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000159.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000160
Richard Smith081ad4d2017-01-24 19:39:46 +0000161.. option:: -dynamic
162
Richard Smith081ad4d2017-01-24 19:39:46 +0000163.. option:: -dynamiclib
164
Richard Smith081ad4d2017-01-24 19:39:46 +0000165.. option:: -emit-ast
166
167Emit Clang AST files for source inputs
168
Richard Smith081ad4d2017-01-24 19:39:46 +0000169.. option:: -exported\_symbols\_list <arg>
170
Richard Smith081ad4d2017-01-24 19:39:46 +0000171.. option:: -faligned-new=<arg>
172
Richard Smith081ad4d2017-01-24 19:39:46 +0000173.. option:: -fcuda-approx-transcendentals, -fno-cuda-approx-transcendentals
174
175Use approximate transcendental functions
176
Richard Smith081ad4d2017-01-24 19:39:46 +0000177.. option:: -fcuda-flush-denormals-to-zero, -fno-cuda-flush-denormals-to-zero
178
179Flush denormal floating point values to zero in CUDA device mode.
180
Richard Smith081ad4d2017-01-24 19:39:46 +0000181.. option:: -fheinous-gnu-extensions
182
Richard Smith081ad4d2017-01-24 19:39:46 +0000183.. option:: -flat\_namespace
184
Richard Smith081ad4d2017-01-24 19:39:46 +0000185.. option:: -fopenmp-targets=<arg1>,<arg2>...
186
187Specify comma-separated list of triples OpenMP offloading targets to be supported
188
Richard Smith081ad4d2017-01-24 19:39:46 +0000189.. option:: -force\_cpusubtype\_ALL
190
Richard Smithb2c82a62017-01-27 01:54:42 +0000191.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000192.. option:: -force\_flat\_namespace
Richard Smithb2c82a62017-01-27 01:54:42 +0000193.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000194
Richard Smithb2c82a62017-01-27 01:54:42 +0000195.. program:: clang2
Richard Smith081ad4d2017-01-24 19:39:46 +0000196.. option:: -force\_load <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000197.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000198
Richard Smith081ad4d2017-01-24 19:39:46 +0000199.. option:: -framework <arg>
200
Richard Smith78e23fd2017-04-13 22:39:49 +0000201.. option:: -frtlib-add-rpath, -fno-rtlib-add-rpath
202
203Add -rpath with architecture-specific resource directory to the linker flags
204
Richard Smith081ad4d2017-01-24 19:39:46 +0000205.. option:: --gcc-toolchain=<arg>, -gcc-toolchain <arg>
206
207Use the gcc toolchain at the given directory
208
Richard Smith081ad4d2017-01-24 19:39:46 +0000209.. option:: -gcodeview
210
211Generate CodeView debug information
212
Richard Smith081ad4d2017-01-24 19:39:46 +0000213.. option:: -headerpad\_max\_install\_names<arg>
214
Richard Smith081ad4d2017-01-24 19:39:46 +0000215.. option:: -help, --help
216
217Display available options
218
Richard Smith081ad4d2017-01-24 19:39:46 +0000219.. option:: --help-hidden
220
Richard Smith081ad4d2017-01-24 19:39:46 +0000221.. option:: -image\_base <arg>
222
Richard Smith081ad4d2017-01-24 19:39:46 +0000223.. option:: -index-header-map
224
225Make the next included directory (-I or -F) an indexer header map
226
Richard Smith081ad4d2017-01-24 19:39:46 +0000227.. option:: -init <arg>
228
Richard Smith081ad4d2017-01-24 19:39:46 +0000229.. option:: -install\_name <arg>
230
Richard Smith081ad4d2017-01-24 19:39:46 +0000231.. option:: -keep\_private\_externs
232
Richard Smith081ad4d2017-01-24 19:39:46 +0000233.. option:: -lazy\_framework <arg>
234
Richard Smithb2c82a62017-01-27 01:54:42 +0000235.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000236.. option:: -lazy\_library <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000237.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000238
Richard Smith081ad4d2017-01-24 19:39:46 +0000239.. option:: -mbig-endian, -EB
240
Richard Smith081ad4d2017-01-24 19:39:46 +0000241.. option:: --migrate
242
243Run the migrator
244
Richard Smith78e23fd2017-04-13 22:39:49 +0000245.. option:: -mios-simulator-version-min=<arg>, -miphonesimulator-version-min=<arg>
246
Richard Smith081ad4d2017-01-24 19:39:46 +0000247.. option:: -mlinker-version=<arg>
248
Richard Smith081ad4d2017-01-24 19:39:46 +0000249.. option:: -mlittle-endian, -EL
250
Richard Smith081ad4d2017-01-24 19:39:46 +0000251.. option:: -mllvm <arg>
252
253Additional arguments to forward to LLVM's option processing
254
Richard Smith081ad4d2017-01-24 19:39:46 +0000255.. option:: -module-dependency-dir <arg>
256
257Directory to dump module dependencies to
258
Richard Smith78e23fd2017-04-13 22:39:49 +0000259.. option:: -mtvos-simulator-version-min=<arg>, -mappletvsimulator-version-min=<arg>
260
Richard Smith081ad4d2017-01-24 19:39:46 +0000261.. option:: -multi\_module
262
Richard Smith081ad4d2017-01-24 19:39:46 +0000263.. option:: -multiply\_defined <arg>
264
Richard Smithb2c82a62017-01-27 01:54:42 +0000265.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000266.. option:: -multiply\_defined\_unused <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000267.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000268
Richard Smith78e23fd2017-04-13 22:39:49 +0000269.. option:: -mwatchos-simulator-version-min=<arg>, -mwatchsimulator-version-min=<arg>
270
Richard Smith081ad4d2017-01-24 19:39:46 +0000271.. option:: --no-cuda-version-check
272
273Don't error out if the detected version of the CUDA install is too low for the requested CUDA gpu architecture.
274
Richard Smith081ad4d2017-01-24 19:39:46 +0000275.. option:: -no-integrated-cpp, --no-integrated-cpp
276
Richard Smith081ad4d2017-01-24 19:39:46 +0000277.. option:: -no\_dead\_strip\_inits\_and\_terms
278
Richard Smith081ad4d2017-01-24 19:39:46 +0000279.. option:: -nobuiltininc
280
281Disable builtin #include directories
282
Richard Smith081ad4d2017-01-24 19:39:46 +0000283.. option:: -nocudainc
284
Richard Smith081ad4d2017-01-24 19:39:46 +0000285.. option:: -nocudalib
286
Richard Smith081ad4d2017-01-24 19:39:46 +0000287.. option:: -nodefaultlibs
288
Richard Smith081ad4d2017-01-24 19:39:46 +0000289.. option:: -nofixprebinding
290
Richard Smith081ad4d2017-01-24 19:39:46 +0000291.. option:: -nolibc
292
Richard Smith081ad4d2017-01-24 19:39:46 +0000293.. option:: -nomultidefs
294
Richard Smith081ad4d2017-01-24 19:39:46 +0000295.. option:: -nopie
296
Richard Smith081ad4d2017-01-24 19:39:46 +0000297.. option:: -noprebind
298
Richard Smith081ad4d2017-01-24 19:39:46 +0000299.. option:: -noseglinkedit
300
Richard Smith081ad4d2017-01-24 19:39:46 +0000301.. option:: -nostartfiles
302
Richard Smith081ad4d2017-01-24 19:39:46 +0000303.. option:: -nostdinc, --no-standard-includes
304
Richard Smithb2c82a62017-01-27 01:54:42 +0000305.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000306.. option:: -nostdinc++
Richard Smithb2c82a62017-01-27 01:54:42 +0000307.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000308
309Disable standard #include directories for the C++ standard library
310
Richard Smith081ad4d2017-01-24 19:39:46 +0000311.. option:: -nostdlib, --no-standard-libraries
312
Richard Smith081ad4d2017-01-24 19:39:46 +0000313.. option:: -nostdlibinc
314
Richard Smith081ad4d2017-01-24 19:39:46 +0000315.. option:: -o<file>, --output <arg>, --output=<arg>
316
317Write output to <file>
318
Richard Smith081ad4d2017-01-24 19:39:46 +0000319.. option:: -objcmt-atomic-property
320
321Make migration to 'atomic' properties
322
Richard Smith081ad4d2017-01-24 19:39:46 +0000323.. option:: -objcmt-migrate-all
324
325Enable migration to modern ObjC
326
Richard Smith081ad4d2017-01-24 19:39:46 +0000327.. option:: -objcmt-migrate-annotation
328
329Enable migration to property and method annotations
330
Richard Smith081ad4d2017-01-24 19:39:46 +0000331.. option:: -objcmt-migrate-designated-init
332
333Enable migration to infer NS\_DESIGNATED\_INITIALIZER for initializer methods
334
Richard Smith081ad4d2017-01-24 19:39:46 +0000335.. option:: -objcmt-migrate-instancetype
336
337Enable migration to infer instancetype for method result type
338
Richard Smith081ad4d2017-01-24 19:39:46 +0000339.. option:: -objcmt-migrate-literals
340
341Enable migration to modern ObjC literals
342
Richard Smith081ad4d2017-01-24 19:39:46 +0000343.. option:: -objcmt-migrate-ns-macros
344
345Enable migration to NS\_ENUM/NS\_OPTIONS macros
346
Richard Smith081ad4d2017-01-24 19:39:46 +0000347.. option:: -objcmt-migrate-property
348
349Enable migration to modern ObjC property
350
Richard Smith081ad4d2017-01-24 19:39:46 +0000351.. option:: -objcmt-migrate-property-dot-syntax
352
353Enable migration of setter/getter messages to property-dot syntax
354
Richard Smith081ad4d2017-01-24 19:39:46 +0000355.. option:: -objcmt-migrate-protocol-conformance
356
357Enable migration to add protocol conformance on classes
358
Richard Smith081ad4d2017-01-24 19:39:46 +0000359.. option:: -objcmt-migrate-readonly-property
360
361Enable migration to modern ObjC readonly property
362
Richard Smith081ad4d2017-01-24 19:39:46 +0000363.. option:: -objcmt-migrate-readwrite-property
364
365Enable migration to modern ObjC readwrite property
366
Richard Smith081ad4d2017-01-24 19:39:46 +0000367.. option:: -objcmt-migrate-subscripting
368
369Enable migration to modern ObjC subscripting
370
Richard Smith081ad4d2017-01-24 19:39:46 +0000371.. option:: -objcmt-ns-nonatomic-iosonly
372
373Enable migration to use NS\_NONATOMIC\_IOSONLY macro for setting property's 'atomic' attribute
374
Richard Smith081ad4d2017-01-24 19:39:46 +0000375.. option:: -objcmt-returns-innerpointer-property
376
377Enable migration to annotate property with NS\_RETURNS\_INNER\_POINTER
378
Richard Smith081ad4d2017-01-24 19:39:46 +0000379.. option:: -objcmt-whitelist-dir-path=<arg>, -objcmt-white-list-dir-path=<arg>
380
381Only modify files with a filename contained in the provided directory path
382
Richard Smith081ad4d2017-01-24 19:39:46 +0000383.. option:: -object
384
Richard Smith081ad4d2017-01-24 19:39:46 +0000385.. option:: -p, --profile
386
Richard Smith081ad4d2017-01-24 19:39:46 +0000387.. option:: -pagezero\_size<arg>
388
Richard Smith081ad4d2017-01-24 19:39:46 +0000389.. option:: -pg
390
391Enable mcount instrumentation
392
Richard Smith081ad4d2017-01-24 19:39:46 +0000393.. option:: -pie
394
Richard Smith081ad4d2017-01-24 19:39:46 +0000395.. option:: -pipe, --pipe
396
397Use pipes between commands, when possible
398
Richard Smith081ad4d2017-01-24 19:39:46 +0000399.. option:: -prebind
400
Richard Smithb2c82a62017-01-27 01:54:42 +0000401.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000402.. option:: -prebind\_all\_twolevel\_modules
Richard Smithb2c82a62017-01-27 01:54:42 +0000403.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000404
Richard Smith081ad4d2017-01-24 19:39:46 +0000405.. option:: -preload
406
Richard Smith081ad4d2017-01-24 19:39:46 +0000407.. option:: --print-diagnostic-categories
408
Richard Smith081ad4d2017-01-24 19:39:46 +0000409.. option:: -print-file-name=<file>, --print-file-name=<file>, --print-file-name <arg>
410
411Print the full library path of <file>
412
Richard Smith081ad4d2017-01-24 19:39:46 +0000413.. option:: -print-ivar-layout
414
415Enable Objective-C Ivar layout bitmap print trace
416
Richard Smith081ad4d2017-01-24 19:39:46 +0000417.. option:: -print-libgcc-file-name, --print-libgcc-file-name
418
419Print the library path for the currently used compiler runtime library ("libgcc.a" or "libclang\_rt.builtins.\*.a")
420
Richard Smith081ad4d2017-01-24 19:39:46 +0000421.. option:: -print-multi-directory, --print-multi-directory
422
Richard Smith081ad4d2017-01-24 19:39:46 +0000423.. option:: -print-multi-lib, --print-multi-lib
424
Richard Smith081ad4d2017-01-24 19:39:46 +0000425.. option:: -print-prog-name=<name>, --print-prog-name=<name>, --print-prog-name <arg>
426
427Print the full program path of <name>
428
Richard Smith78e23fd2017-04-13 22:39:49 +0000429.. option:: -print-resource-dir, --print-resource-dir
430
431Print the resource directory pathname
432
Richard Smith081ad4d2017-01-24 19:39:46 +0000433.. option:: -print-search-dirs, --print-search-dirs
434
435Print the paths used for finding libraries and programs
436
Richard Smith081ad4d2017-01-24 19:39:46 +0000437.. option:: -private\_bundle
438
Richard Smith081ad4d2017-01-24 19:39:46 +0000439.. option:: -pthread, -no-pthread
440
441Support POSIX threads in generated code
442
Richard Smith081ad4d2017-01-24 19:39:46 +0000443.. option:: -pthreads
444
Richard Smith081ad4d2017-01-24 19:39:46 +0000445.. option:: -rdynamic
446
Richard Smith081ad4d2017-01-24 19:39:46 +0000447.. option:: -read\_only\_relocs <arg>
448
Richard Smith081ad4d2017-01-24 19:39:46 +0000449.. option:: -relocatable-pch, --relocatable-pch
450
451Whether to build a relocatable precompiled header
452
Richard Smith081ad4d2017-01-24 19:39:46 +0000453.. option:: -remap
454
Richard Smith081ad4d2017-01-24 19:39:46 +0000455.. option:: -rewrite-legacy-objc
456
457Rewrite Legacy Objective-C source to C++
458
Richard Smith081ad4d2017-01-24 19:39:46 +0000459.. option:: -rtlib=<arg>, --rtlib=<arg>, --rtlib <arg>
460
461Compiler runtime library to use
462
Richard Smith081ad4d2017-01-24 19:39:46 +0000463.. option:: -save-stats=<arg>, --save-stats=<arg>, -save-stats (equivalent to -save-stats=cwd), --save-stats (equivalent to -save-stats=cwd)
464
465Save llvm statistics.
466
Richard Smith081ad4d2017-01-24 19:39:46 +0000467.. option:: -save-temps=<arg>, --save-temps=<arg>, -save-temps (equivalent to -save-temps=cwd), --save-temps (equivalent to -save-temps=cwd)
468
469Save intermediate compilation results.
470
Richard Smith081ad4d2017-01-24 19:39:46 +0000471.. option:: -sectalign <arg1> <arg2> <arg3>
472
Richard Smith081ad4d2017-01-24 19:39:46 +0000473.. option:: -sectcreate <arg1> <arg2> <arg3>
474
Richard Smith081ad4d2017-01-24 19:39:46 +0000475.. option:: -sectobjectsymbols <arg1> <arg2>
476
Richard Smith081ad4d2017-01-24 19:39:46 +0000477.. option:: -sectorder <arg1> <arg2> <arg3>
478
Richard Smith081ad4d2017-01-24 19:39:46 +0000479.. option:: -seg1addr<arg>
480
Richard Smith081ad4d2017-01-24 19:39:46 +0000481.. option:: -seg\_addr\_table <arg>
482
Richard Smithb2c82a62017-01-27 01:54:42 +0000483.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000484.. option:: -seg\_addr\_table\_filename <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000485.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000486
Richard Smith081ad4d2017-01-24 19:39:46 +0000487.. option:: -segaddr <arg1> <arg2>
488
Richard Smith081ad4d2017-01-24 19:39:46 +0000489.. option:: -segcreate <arg1> <arg2> <arg3>
490
Richard Smith081ad4d2017-01-24 19:39:46 +0000491.. option:: -seglinkedit
492
Richard Smith081ad4d2017-01-24 19:39:46 +0000493.. option:: -segprot <arg1> <arg2> <arg3>
494
Richard Smith081ad4d2017-01-24 19:39:46 +0000495.. option:: -segs\_read\_<arg>
496
Richard Smithb2c82a62017-01-27 01:54:42 +0000497.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000498.. option:: -segs\_read\_only\_addr <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000499.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000500
Richard Smithb2c82a62017-01-27 01:54:42 +0000501.. program:: clang2
Richard Smith081ad4d2017-01-24 19:39:46 +0000502.. option:: -segs\_read\_write\_addr <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000503.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000504
Richard Smith081ad4d2017-01-24 19:39:46 +0000505.. option:: -serialize-diagnostics <arg>, --serialize-diagnostics <arg>
506
507Serialize compiler diagnostics to a file
508
Richard Smith081ad4d2017-01-24 19:39:46 +0000509.. option:: -shared, --shared
510
Richard Smith081ad4d2017-01-24 19:39:46 +0000511.. option:: -shared-libasan
512
Richard Smith081ad4d2017-01-24 19:39:46 +0000513.. option:: -shared-libgcc
514
Richard Smith081ad4d2017-01-24 19:39:46 +0000515.. option:: -single\_module
516
Richard Smith081ad4d2017-01-24 19:39:46 +0000517.. option:: -specs=<arg>, --specs=<arg>
518
Richard Smith081ad4d2017-01-24 19:39:46 +0000519.. option:: -static, --static
520
Richard Smith081ad4d2017-01-24 19:39:46 +0000521.. option:: -static-libgcc
522
Richard Smith081ad4d2017-01-24 19:39:46 +0000523.. option:: -static-libstdc++
524
Richard Smith081ad4d2017-01-24 19:39:46 +0000525.. option:: -std-default=<arg>
526
Richard Smith081ad4d2017-01-24 19:39:46 +0000527.. option:: -stdlib=<arg>, --stdlib=<arg>, --stdlib <arg>
528
529C++ standard library to use
530
Richard Smith081ad4d2017-01-24 19:39:46 +0000531.. option:: -sub\_library<arg>
532
Richard Smithb2c82a62017-01-27 01:54:42 +0000533.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000534.. option:: -sub\_umbrella<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000535.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000536
Richard Smith081ad4d2017-01-24 19:39:46 +0000537.. option:: --sysroot=<arg>, --sysroot <arg>
538
Richard Smith081ad4d2017-01-24 19:39:46 +0000539.. option:: --target-help
540
Richard Smith081ad4d2017-01-24 19:39:46 +0000541.. option:: --target=<arg>, -target <arg>
542
543Generate code for the given target
544
Richard Smith081ad4d2017-01-24 19:39:46 +0000545.. option:: -time
546
547Time individual commands
548
Richard Smith081ad4d2017-01-24 19:39:46 +0000549.. option:: -traditional, --traditional
550
Richard Smith081ad4d2017-01-24 19:39:46 +0000551.. option:: -traditional-cpp, --traditional-cpp
552
553Enable some traditional CPP emulation
554
Richard Smith081ad4d2017-01-24 19:39:46 +0000555.. option:: -twolevel\_namespace
556
Richard Smithb2c82a62017-01-27 01:54:42 +0000557.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000558.. option:: -twolevel\_namespace\_hints
Richard Smithb2c82a62017-01-27 01:54:42 +0000559.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000560
Richard Smith081ad4d2017-01-24 19:39:46 +0000561.. option:: -umbrella <arg>
562
Richard Smith081ad4d2017-01-24 19:39:46 +0000563.. option:: -unexported\_symbols\_list <arg>
564
Richard Smith081ad4d2017-01-24 19:39:46 +0000565.. option:: -v, --verbose
566
567Show commands to run and use verbose output
568
Richard Smith081ad4d2017-01-24 19:39:46 +0000569.. option:: --verify-debug-info
570
571Verify the binary representation of debug output
572
Richard Smith081ad4d2017-01-24 19:39:46 +0000573.. option:: --version
574
Richard Smith081ad4d2017-01-24 19:39:46 +0000575.. option:: -w, --no-warnings
576
577Suppress all warnings
578
Richard Smith081ad4d2017-01-24 19:39:46 +0000579.. option:: -weak-l<arg>
580
Richard Smith081ad4d2017-01-24 19:39:46 +0000581.. option:: -weak\_framework <arg>
582
Richard Smithb2c82a62017-01-27 01:54:42 +0000583.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000584.. option:: -weak\_library <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000585.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000586
Richard Smithb2c82a62017-01-27 01:54:42 +0000587.. program:: clang2
Richard Smith081ad4d2017-01-24 19:39:46 +0000588.. option:: -weak\_reference\_mismatches <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000589.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000590
Richard Smith081ad4d2017-01-24 19:39:46 +0000591.. option:: -whatsloaded
592
Richard Smith081ad4d2017-01-24 19:39:46 +0000593.. option:: -whyload
594
Richard Smith081ad4d2017-01-24 19:39:46 +0000595.. option:: -working-directory<arg>, -working-directory=<arg>
596
597Resolve file paths relative to the specified directory
598
Richard Smith081ad4d2017-01-24 19:39:46 +0000599.. option:: -x<language>, --language <arg>, --language=<arg>
600
601Treat subsequent input files as having type <language>
602
Richard Smith081ad4d2017-01-24 19:39:46 +0000603.. option:: -y<arg>
604
605Actions
606=======
607The action to perform on the input.
608
Richard Smith081ad4d2017-01-24 19:39:46 +0000609.. option:: -E, --preprocess
610
611Only run the preprocessor
612
Richard Smith081ad4d2017-01-24 19:39:46 +0000613.. option:: -S, --assemble
614
615Only run preprocess and compilation steps
616
Richard Smithc5b2e002017-01-27 02:08:37 +0000617.. option:: -c, --compile
618
619Only run preprocess, compile, and assemble steps
620
Richard Smith081ad4d2017-01-24 19:39:46 +0000621.. option:: -emit-llvm
622
623Use the LLVM representation for assembler and object files
624
Richard Smith081ad4d2017-01-24 19:39:46 +0000625.. option:: -fsyntax-only
626
Richard Smith081ad4d2017-01-24 19:39:46 +0000627.. option:: -module-file-info
628
629Provide information about a particular module file
630
Richard Smith081ad4d2017-01-24 19:39:46 +0000631.. option:: --precompile
632
633Only precompile the input
634
Richard Smith081ad4d2017-01-24 19:39:46 +0000635.. option:: -rewrite-objc
636
637Rewrite Objective-C source to C++
638
Richard Smith081ad4d2017-01-24 19:39:46 +0000639.. option:: -verify-pch
640
641Load and verify that a pre-compiled header file is not stale
642
643Compilation flags
644=================
645
646Flags controlling the behavior of Clang during compilation. These flags have
647no effect during actions that do not perform compilation.
648
Richard Smithc5b2e002017-01-27 02:08:37 +0000649.. option:: -Xassembler <arg>
Richard Smith081ad4d2017-01-24 19:39:46 +0000650
Richard Smithc5b2e002017-01-27 02:08:37 +0000651Pass <arg> to the assembler
Richard Smith081ad4d2017-01-24 19:39:46 +0000652
Richard Smith081ad4d2017-01-24 19:39:46 +0000653.. option:: -Xclang <arg>
654
655Pass <arg> to the clang compiler
656
Richard Smith081ad4d2017-01-24 19:39:46 +0000657.. option:: -fcomment-block-commands=<arg>,<arg2>...
658
659Treat each comma separated argument in <arg> as a documentation comment block command
660
Richard Smith081ad4d2017-01-24 19:39:46 +0000661.. option:: -fdeclspec, -fno-declspec
662
663Allow \_\_declspec as a keyword
664
Richard Smith081ad4d2017-01-24 19:39:46 +0000665.. option:: -fdepfile-entry=<arg>
666
Richard Smith081ad4d2017-01-24 19:39:46 +0000667.. option:: -fdiagnostics-fixit-info, -fno-diagnostics-fixit-info
668
Richard Smith081ad4d2017-01-24 19:39:46 +0000669.. option:: -fdiagnostics-format=<arg>
670
Richard Smith081ad4d2017-01-24 19:39:46 +0000671.. option:: -fdiagnostics-parseable-fixits
672
673Print fix-its in machine parseable form
674
Richard Smith081ad4d2017-01-24 19:39:46 +0000675.. option:: -fdiagnostics-print-source-range-info
676
677Print source range spans in numeric form
678
Richard Smith081ad4d2017-01-24 19:39:46 +0000679.. option:: -fdiagnostics-show-category=<arg>
680
Richard Smith081ad4d2017-01-24 19:39:46 +0000681.. option:: -fexperimental-new-pass-manager, -fno-experimental-new-pass-manager
682
683Enables an experimental new pass manager in LLVM.
684
Richard Smith081ad4d2017-01-24 19:39:46 +0000685.. option:: -finline-functions, -fno-inline-functions
686
687Inline suitable functions
688
Richard Smith081ad4d2017-01-24 19:39:46 +0000689.. option:: -finline-hint-functions
690
691Inline functions which are (explicitly or implicitly) marked inline
692
Richard Smith081ad4d2017-01-24 19:39:46 +0000693.. option:: -fno-crash-diagnostics
694
Richard Smith78e23fd2017-04-13 22:39:49 +0000695Disable auto-generation of preprocessed source files and a script for reproduction during a clang crash
696
Richard Smith081ad4d2017-01-24 19:39:46 +0000697.. option:: -fno-sanitize-blacklist
698
699Don't use blacklist file for sanitizers
700
Richard Smith081ad4d2017-01-24 19:39:46 +0000701.. option:: -fparse-all-comments
702
Richard Smith081ad4d2017-01-24 19:39:46 +0000703.. option:: -fsanitize-address-field-padding=<arg>
704
705Level of field padding for AddressSanitizer
706
Richard Smith081ad4d2017-01-24 19:39:46 +0000707.. option:: -fsanitize-address-use-after-scope, -fno-sanitize-address-use-after-scope
708
709Enable use-after-scope detection in AddressSanitizer
710
Richard Smith081ad4d2017-01-24 19:39:46 +0000711.. option:: -fsanitize-blacklist=<arg>
712
713Path to blacklist file for sanitizers
714
Richard Smith081ad4d2017-01-24 19:39:46 +0000715.. option:: -fsanitize-cfi-cross-dso, -fno-sanitize-cfi-cross-dso
716
717Enable control flow integrity (CFI) checks for cross-DSO calls.
718
Richard Smith081ad4d2017-01-24 19:39:46 +0000719.. option:: -fsanitize-coverage=<arg1>,<arg2>..., -fno-sanitize-coverage=<arg1>,<arg2>...
720
721Specify the type of coverage instrumentation for Sanitizers
722
Richard Smith081ad4d2017-01-24 19:39:46 +0000723.. option:: -fsanitize-link-c++-runtime
724
Richard Smith081ad4d2017-01-24 19:39:46 +0000725.. option:: -fsanitize-memory-track-origins, -fno-sanitize-memory-track-origins
726
727Enable origins tracking in MemorySanitizer
728
Richard Smithb2c82a62017-01-27 01:54:42 +0000729.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000730.. option:: -fsanitize-memory-track-origins=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000731.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000732
733Enable origins tracking in MemorySanitizer
734
Richard Smith081ad4d2017-01-24 19:39:46 +0000735.. option:: -fsanitize-memory-use-after-dtor
736
737Enable use-after-destroy detection in MemorySanitizer
738
Richard Smith081ad4d2017-01-24 19:39:46 +0000739.. option:: -fsanitize-recover, -fno-sanitize-recover
740
Richard Smithb2c82a62017-01-27 01:54:42 +0000741.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000742.. option:: -fsanitize-recover=<arg1>,<arg2>..., -fno-sanitize-recover=<arg1>,<arg2>...
Richard Smithb2c82a62017-01-27 01:54:42 +0000743.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000744
745Enable recovery for specified sanitizers
746
Richard Smith081ad4d2017-01-24 19:39:46 +0000747.. option:: -fsanitize-stats, -fno-sanitize-stats
748
749Enable sanitizer statistics gathering.
750
Richard Smith081ad4d2017-01-24 19:39:46 +0000751.. option:: -fsanitize-thread-atomics, -fno-sanitize-thread-atomics
752
753Enable atomic operations instrumentation in ThreadSanitizer (default)
754
Richard Smith081ad4d2017-01-24 19:39:46 +0000755.. option:: -fsanitize-thread-func-entry-exit, -fno-sanitize-thread-func-entry-exit
756
757Enable function entry/exit instrumentation in ThreadSanitizer (default)
758
Richard Smith081ad4d2017-01-24 19:39:46 +0000759.. option:: -fsanitize-thread-memory-access, -fno-sanitize-thread-memory-access
760
761Enable memory access instrumentation in ThreadSanitizer (default)
762
Richard Smith081ad4d2017-01-24 19:39:46 +0000763.. option:: -fsanitize-trap=<arg1>,<arg2>..., -fno-sanitize-trap=<arg1>,<arg2>...
764
765Enable trapping for specified sanitizers
766
Richard Smith081ad4d2017-01-24 19:39:46 +0000767.. option:: -fsanitize-undefined-strip-path-components=<number>
768
769Strip (or keep only, if negative) a given number of path components when emitting check metadata.
770
Richard Smith081ad4d2017-01-24 19:39:46 +0000771.. option:: -fsanitize-undefined-trap-on-error, -fno-sanitize-undefined-trap-on-error
772
Richard Smith081ad4d2017-01-24 19:39:46 +0000773.. option:: -fsanitize=<check>,<arg2>..., -fno-sanitize=<arg1>,<arg2>...
774
775Turn on runtime checks for various forms of undefined or suspicious behavior. See user manual for available checks
776
Richard Smith081ad4d2017-01-24 19:39:46 +0000777.. option:: --param <arg>, --param=<arg>
778
Richard Smith081ad4d2017-01-24 19:39:46 +0000779.. option:: -std=<arg>, --std=<arg>, --std <arg>
780
781Language standard to compile for
782
Richard Smithc5b2e002017-01-27 02:08:37 +0000783Preprocessor flags
784~~~~~~~~~~~~~~~~~~
785
786Flags controlling the behavior of the Clang preprocessor.
787
788.. option:: -C, --comments
789
790Include comments in preprocessed output
791
792.. option:: -CC, --comments-in-macros
793
794Include comments from within macros in preprocessed output
795
796.. option:: -D<macro>=<value>, --define-macro <arg>, --define-macro=<arg>
797
798Define <macro> to <value> (or 1 if <value> omitted)
799
800.. option:: -H, --trace-includes
801
802Show header includes and nesting depth
803
804.. option:: -P, --no-line-commands
805
806Disable linemarker output in -E mode
807
808.. option:: -U<macro>, --undefine-macro <arg>, --undefine-macro=<arg>
809
810Undefine macro <macro>
811
812.. option:: -Wp,<arg>,<arg2>...
813
814Pass the comma separated arguments in <arg> to the preprocessor
815
816.. option:: -Xpreprocessor <arg>
817
818Pass <arg> to the preprocessor
819
Richard Smith081ad4d2017-01-24 19:39:46 +0000820Include path management
Richard Smithc5b2e002017-01-27 02:08:37 +0000821-----------------------
Richard Smith081ad4d2017-01-24 19:39:46 +0000822
823Flags controlling how ``#include``\s are resolved to files.
824
Richard Smithc5b2e002017-01-27 02:08:37 +0000825.. option:: -I<dir>, --include-directory <arg>, --include-directory=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +0000826
827Add directory to include search path
828
Richard Smith081ad4d2017-01-24 19:39:46 +0000829.. option:: -I-, --include-barrier
830
Richard Smithc5b2e002017-01-27 02:08:37 +0000831Restrict all prior -I flags to double-quoted inclusion and remove current directory from include path
832
Richard Smith081ad4d2017-01-24 19:39:46 +0000833.. option:: --cuda-path=<arg>
834
835CUDA installation path
836
Richard Smith081ad4d2017-01-24 19:39:46 +0000837.. option:: -cxx-isystem<directory>
838
839Add directory to the C++ SYSTEM include search path
840
Richard Smith081ad4d2017-01-24 19:39:46 +0000841.. option:: -fbuild-session-file=<file>
842
843Use the last modification time of <file> as the build session timestamp
844
Richard Smith081ad4d2017-01-24 19:39:46 +0000845.. option:: -fbuild-session-timestamp=<time since Epoch in seconds>
846
847Time when the current build session started
848
Richard Smith081ad4d2017-01-24 19:39:46 +0000849.. option:: -fmodules-cache-path=<directory>
850
851Specify the module cache path
852
Richard Smith081ad4d2017-01-24 19:39:46 +0000853.. option:: -fmodules-disable-diagnostic-validation
854
855Disable validation of the diagnostic options when loading the module
856
Richard Smith081ad4d2017-01-24 19:39:46 +0000857.. option:: -fmodules-prune-after=<seconds>
858
859Specify the interval (in seconds) after which a module file will be considered unused
860
Richard Smith081ad4d2017-01-24 19:39:46 +0000861.. option:: -fmodules-prune-interval=<seconds>
862
863Specify the interval (in seconds) between attempts to prune the module cache
864
Richard Smith081ad4d2017-01-24 19:39:46 +0000865.. option:: -fmodules-user-build-path <directory>
866
867Specify the module user build path
868
Richard Smith081ad4d2017-01-24 19:39:46 +0000869.. option:: -fmodules-validate-once-per-build-session
870
871Don't verify input files for the modules if the module has been successfully validated or loaded during this build session
872
Richard Smith081ad4d2017-01-24 19:39:46 +0000873.. option:: -fmodules-validate-system-headers
874
875Validate the system headers that a module depends on when loading the module
876
Richard Smith081ad4d2017-01-24 19:39:46 +0000877.. option:: -fprebuilt-module-path=<directory>
878
879Specify the prebuilt module path
880
Richard Smith081ad4d2017-01-24 19:39:46 +0000881.. option:: -i<arg>
882
Richard Smith081ad4d2017-01-24 19:39:46 +0000883.. option:: -idirafter<arg>, --include-directory-after <arg>, --include-directory-after=<arg>
884
885Add directory to AFTER include search path
886
Richard Smith081ad4d2017-01-24 19:39:46 +0000887.. option:: -iframework<arg>
888
889Add directory to SYSTEM framework search path
890
Richard Smith78e23fd2017-04-13 22:39:49 +0000891.. option:: -iframeworkwithsysroot<directory>
892
893Add directory to SYSTEM framework search path, absolute paths are relative to -isysroot
894
Richard Smith081ad4d2017-01-24 19:39:46 +0000895.. option:: -imacros<file>, --imacros<file>, --imacros=<arg>
896
897Include macros from file before parsing
898
Richard Smith081ad4d2017-01-24 19:39:46 +0000899.. option:: -include<file>, --include<file>, --include=<arg>
900
901Include file before parsing
902
Richard Smith081ad4d2017-01-24 19:39:46 +0000903.. option:: -include-pch <file>
904
905Include precompiled header file
906
Richard Smith081ad4d2017-01-24 19:39:46 +0000907.. option:: -iprefix<dir>, --include-prefix <arg>, --include-prefix=<arg>
908
909Set the -iwithprefix/-iwithprefixbefore prefix
910
Richard Smith081ad4d2017-01-24 19:39:46 +0000911.. option:: -iquote<directory>
912
913Add directory to QUOTE include search path
914
Richard Smith081ad4d2017-01-24 19:39:46 +0000915.. option:: -isysroot<dir>
916
917Set the system root directory (usually /)
918
Richard Smith081ad4d2017-01-24 19:39:46 +0000919.. option:: -isystem<directory>
920
921Add directory to SYSTEM include search path
922
Richard Smith081ad4d2017-01-24 19:39:46 +0000923.. option:: -isystem-after<directory>
924
925Add directory to end of the SYSTEM include search path
926
Richard Smith081ad4d2017-01-24 19:39:46 +0000927.. option:: -ivfsoverlay<arg>
928
929Overlay the virtual filesystem described by file over the real file system
930
Richard Smith081ad4d2017-01-24 19:39:46 +0000931.. option:: -iwithprefix<dir>, --include-with-prefix <arg>, --include-with-prefix-after <arg>, --include-with-prefix-after=<arg>, --include-with-prefix=<arg>
932
933Set directory to SYSTEM include search path with prefix
934
Richard Smith081ad4d2017-01-24 19:39:46 +0000935.. option:: -iwithprefixbefore<dir>, --include-with-prefix-before <arg>, --include-with-prefix-before=<arg>
936
937Set directory to include search path with prefix
938
Richard Smith081ad4d2017-01-24 19:39:46 +0000939.. option:: -iwithsysroot<directory>
940
941Add directory to SYSTEM include search path, absolute paths are relative to -isysroot
942
Richard Smith081ad4d2017-01-24 19:39:46 +0000943.. option:: --ptxas-path=<arg>
944
945Path to ptxas (used for compiling CUDA code)
946
Richard Smith081ad4d2017-01-24 19:39:46 +0000947.. option:: --system-header-prefix=<prefix>, --no-system-header-prefix=<prefix>, --system-header-prefix <arg>
948
949Treat all #include paths starting with <prefix> as including a system header.
950
951Dependency file generation
Richard Smithc5b2e002017-01-27 02:08:37 +0000952--------------------------
Richard Smith081ad4d2017-01-24 19:39:46 +0000953
954Flags controlling generation of a dependency file for ``make``-like build
955systems.
956
Richard Smith081ad4d2017-01-24 19:39:46 +0000957.. option:: -M, --dependencies
958
959Like -MD, but also implies -E and writes to stdout by default
960
Richard Smith081ad4d2017-01-24 19:39:46 +0000961.. option:: -MD, --write-dependencies
962
963Write a depfile containing user and system headers
964
Richard Smith081ad4d2017-01-24 19:39:46 +0000965.. option:: -MF<file>
966
967Write depfile output from -MMD, -MD, -MM, or -M to <file>
968
Richard Smith081ad4d2017-01-24 19:39:46 +0000969.. option:: -MG, --print-missing-file-dependencies
970
971Add missing headers to depfile
972
Richard Smith081ad4d2017-01-24 19:39:46 +0000973.. option:: -MJ<arg>
974
975Write a compilation database entry per input
976
Richard Smith081ad4d2017-01-24 19:39:46 +0000977.. option:: -MM, --user-dependencies
978
979Like -MMD, but also implies -E and writes to stdout by default
980
Richard Smith081ad4d2017-01-24 19:39:46 +0000981.. option:: -MMD, --write-user-dependencies
982
983Write a depfile containing user headers
984
Richard Smith081ad4d2017-01-24 19:39:46 +0000985.. option:: -MP
986
987Create phony target for each dependency (other than main file)
988
Richard Smith081ad4d2017-01-24 19:39:46 +0000989.. option:: -MQ<arg>
990
991Specify name of main file output to quote in depfile
992
Richard Smith081ad4d2017-01-24 19:39:46 +0000993.. option:: -MT<arg>
994
995Specify name of main file output in depfile
996
Richard Smith081ad4d2017-01-24 19:39:46 +0000997.. option:: -MV
998
999Use NMake/Jom format for the depfile
1000
1001Dumping preprocessor state
Richard Smithc5b2e002017-01-27 02:08:37 +00001002--------------------------
Richard Smith081ad4d2017-01-24 19:39:46 +00001003
1004Flags allowing the state of the preprocessor to be dumped in various ways.
1005
Richard Smith081ad4d2017-01-24 19:39:46 +00001006.. option:: -d
1007
Richard Smithb2c82a62017-01-27 01:54:42 +00001008.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001009.. option:: -d<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001010.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001011
Richard Smith081ad4d2017-01-24 19:39:46 +00001012.. option:: -dA
1013
Richard Smith081ad4d2017-01-24 19:39:46 +00001014.. option:: -dD
1015
1016Print macro definitions in -E mode in addition to normal output
1017
Richard Smith081ad4d2017-01-24 19:39:46 +00001018.. option:: -dI
1019
1020Print include directives in -E mode in addition to normal output
1021
Richard Smith081ad4d2017-01-24 19:39:46 +00001022.. option:: -dM
1023
1024Print macro definitions in -E mode instead of normal output
1025
1026Diagnostic flags
1027~~~~~~~~~~~~~~~~
1028
1029Flags controlling which warnings, errors, and remarks Clang will generate.
1030See the :doc:`full list of warning and remark flags <DiagnosticsReference>`.
1031
Richard Smith081ad4d2017-01-24 19:39:46 +00001032.. option:: -R<remark>
1033
1034Enable the specified remark
1035
Richard Smith081ad4d2017-01-24 19:39:46 +00001036.. option:: -Rpass-analysis=<arg>
1037
1038Report transformation analysis from optimization passes whose name matches the given POSIX regular expression
1039
Richard Smith081ad4d2017-01-24 19:39:46 +00001040.. option:: -Rpass-missed=<arg>
1041
1042Report missed transformations by optimization passes whose name matches the given POSIX regular expression
1043
Richard Smith081ad4d2017-01-24 19:39:46 +00001044.. option:: -Rpass=<arg>
1045
1046Report transformations performed by optimization passes whose name matches the given POSIX regular expression
1047
Richard Smith081ad4d2017-01-24 19:39:46 +00001048.. option:: -W<warning>, --extra-warnings, --warn-<arg>, --warn-=<arg>
1049
1050Enable the specified warning
1051
Richard Smith081ad4d2017-01-24 19:39:46 +00001052.. option:: -Wdeprecated, -Wno-deprecated
1053
Richard Smithc5b2e002017-01-27 02:08:37 +00001054Enable warnings for deprecated constructs and define \_\_DEPRECATED
Richard Smith081ad4d2017-01-24 19:39:46 +00001055
Richard Smith081ad4d2017-01-24 19:39:46 +00001056.. option:: -Wnonportable-cfstrings<arg>, -Wno-nonportable-cfstrings<arg>
1057
Richard Smith081ad4d2017-01-24 19:39:46 +00001058Target-independent compilation options
1059~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Richard Smith081ad4d2017-01-24 19:39:46 +00001060.. option:: -Wframe-larger-than=<arg>
1061
Richard Smith081ad4d2017-01-24 19:39:46 +00001062.. option:: -fPIC, -fno-PIC
1063
Richard Smith081ad4d2017-01-24 19:39:46 +00001064.. option:: -fPIE, -fno-PIE
1065
Richard Smith081ad4d2017-01-24 19:39:46 +00001066.. option:: -faccess-control, -fno-access-control
1067
Richard Smithb2c82a62017-01-27 01:54:42 +00001068.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001069.. option:: -faligned-allocation, -faligned-new, -fno-aligned-allocation
Richard Smithb2c82a62017-01-27 01:54:42 +00001070.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001071
1072Enable C++17 aligned allocation functions
1073
Richard Smith081ad4d2017-01-24 19:39:46 +00001074.. option:: -fallow-unsupported
1075
Richard Smith78e23fd2017-04-13 22:39:49 +00001076.. option:: -faltivec, -fno-altivec
Richard Smith081ad4d2017-01-24 19:39:46 +00001077
Richard Smith081ad4d2017-01-24 19:39:46 +00001078.. option:: -fansi-escape-codes
1079
1080Use ANSI escape codes for diagnostics
1081
Richard Smith081ad4d2017-01-24 19:39:46 +00001082.. option:: -fapple-kext, -findirect-virtual-calls, -fterminated-vtables
1083
1084Use Apple's kernel extensions ABI
1085
Richard Smith081ad4d2017-01-24 19:39:46 +00001086.. option:: -fapple-pragma-pack, -fno-apple-pragma-pack
1087
1088Enable Apple gcc-compatible #pragma pack handling
1089
Richard Smith081ad4d2017-01-24 19:39:46 +00001090.. option:: -fapplication-extension, -fno-application-extension
1091
1092Restrict code to those available for App Extensions
1093
Richard Smith081ad4d2017-01-24 19:39:46 +00001094.. option:: -fasm, -fno-asm
1095
Richard Smith081ad4d2017-01-24 19:39:46 +00001096.. option:: -fasm-blocks, -fno-asm-blocks
1097
Richard Smith081ad4d2017-01-24 19:39:46 +00001098.. option:: -fassociative-math, -fno-associative-math
1099
Richard Smith081ad4d2017-01-24 19:39:46 +00001100.. option:: -fassume-sane-operator-new, -fno-assume-sane-operator-new
1101
Richard Smith081ad4d2017-01-24 19:39:46 +00001102.. option:: -fast
1103
Richard Smith081ad4d2017-01-24 19:39:46 +00001104.. option:: -fastcp
1105
Richard Smith081ad4d2017-01-24 19:39:46 +00001106.. option:: -fastf
1107
Richard Smith081ad4d2017-01-24 19:39:46 +00001108.. option:: -fasynchronous-unwind-tables, -fno-asynchronous-unwind-tables
1109
Richard Smith081ad4d2017-01-24 19:39:46 +00001110.. option:: -fautolink, -fno-autolink
1111
Richard Smith081ad4d2017-01-24 19:39:46 +00001112.. option:: -fblocks, -fno-blocks
1113
1114Enable the 'blocks' language feature
1115
Richard Smith081ad4d2017-01-24 19:39:46 +00001116.. option:: -fbootclasspath=<arg>, --bootclasspath <arg>, --bootclasspath=<arg>
1117
Richard Smith081ad4d2017-01-24 19:39:46 +00001118.. option:: -fborland-extensions, -fno-borland-extensions
1119
1120Accept non-standard constructs supported by the Borland compiler
1121
Richard Smith081ad4d2017-01-24 19:39:46 +00001122.. option:: -fbracket-depth=<arg>
1123
Richard Smith081ad4d2017-01-24 19:39:46 +00001124.. option:: -fbuiltin, -fno-builtin
1125
Richard Smith081ad4d2017-01-24 19:39:46 +00001126.. option:: -fbuiltin-module-map
1127
1128Load the clang builtins module map file.
1129
Richard Smith081ad4d2017-01-24 19:39:46 +00001130.. option:: -fcaret-diagnostics, -fno-caret-diagnostics
1131
Richard Smith081ad4d2017-01-24 19:39:46 +00001132.. option:: -fclasspath=<arg>, --CLASSPATH <arg>, --CLASSPATH=<arg>, --classpath <arg>, --classpath=<arg>
1133
Richard Smith081ad4d2017-01-24 19:39:46 +00001134.. option:: -fcolor-diagnostics, -fno-color-diagnostics
1135
1136Use colors in diagnostics
1137
Richard Smith081ad4d2017-01-24 19:39:46 +00001138.. option:: -fcommon, -fno-common
1139
Richard Smith081ad4d2017-01-24 19:39:46 +00001140.. option:: -fcompile-resource=<arg>, --resource <arg>, --resource=<arg>
1141
Richard Smith081ad4d2017-01-24 19:39:46 +00001142.. option:: -fconstant-cfstrings, -fno-constant-cfstrings
1143
Richard Smith081ad4d2017-01-24 19:39:46 +00001144.. option:: -fconstant-string-class=<arg>
1145
Richard Smith081ad4d2017-01-24 19:39:46 +00001146.. option:: -fconstexpr-backtrace-limit=<arg>
1147
Richard Smith081ad4d2017-01-24 19:39:46 +00001148.. option:: -fconstexpr-depth=<arg>
1149
Richard Smith081ad4d2017-01-24 19:39:46 +00001150.. option:: -fconstexpr-steps=<arg>
1151
Richard Smith081ad4d2017-01-24 19:39:46 +00001152.. option:: -fcoroutines-ts, -fno-coroutines-ts
1153
1154Enable support for the C++ Coroutines TS
1155
Richard Smith081ad4d2017-01-24 19:39:46 +00001156.. option:: -fcoverage-mapping, -fno-coverage-mapping
1157
1158Generate coverage mapping to enable code coverage analysis
1159
Richard Smith081ad4d2017-01-24 19:39:46 +00001160.. option:: -fcreate-profile
1161
Richard Smith081ad4d2017-01-24 19:39:46 +00001162.. option:: -fcxx-exceptions, -fno-cxx-exceptions
1163
1164Enable C++ exceptions
1165
Richard Smith081ad4d2017-01-24 19:39:46 +00001166.. option:: -fcxx-modules, -fno-cxx-modules
1167
Richard Smith081ad4d2017-01-24 19:39:46 +00001168.. option:: -fdata-sections, -fno-data-sections
1169
1170Place each data in its own section (ELF Only)
1171
Richard Smith081ad4d2017-01-24 19:39:46 +00001172.. option:: -fdebug-info-for-profiling, -fno-debug-info-for-profiling
1173
1174Emit extra debug info to make sample profile more accurate.
1175
Richard Smith78e23fd2017-04-13 22:39:49 +00001176.. option:: -fdebug-macro, -fno-debug-macro
1177
1178Emit macro debug information
1179
Richard Smith081ad4d2017-01-24 19:39:46 +00001180.. option:: -fdebug-pass-arguments
1181
Richard Smith081ad4d2017-01-24 19:39:46 +00001182.. option:: -fdebug-pass-structure
1183
Richard Smith081ad4d2017-01-24 19:39:46 +00001184.. option:: -fdebug-prefix-map=<arg>
1185
1186remap file source paths in debug info
1187
Richard Smith081ad4d2017-01-24 19:39:46 +00001188.. option:: -fdebug-types-section, -fno-debug-types-section
1189
1190Place debug types in their own section (ELF Only)
1191
Richard Smith081ad4d2017-01-24 19:39:46 +00001192.. option:: -fdelayed-template-parsing, -fno-delayed-template-parsing
1193
1194Parse templated function definitions at the end of the translation unit
1195
Richard Smith081ad4d2017-01-24 19:39:46 +00001196.. option:: -fdenormal-fp-math=<arg>
1197
Richard Smith081ad4d2017-01-24 19:39:46 +00001198.. option:: -fdiagnostics-absolute-paths
1199
1200Print absolute paths in diagnostics
1201
Richard Smith081ad4d2017-01-24 19:39:46 +00001202.. option:: -fdiagnostics-color, -fno-diagnostics-color
1203
Richard Smithb2c82a62017-01-27 01:54:42 +00001204.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001205.. option:: -fdiagnostics-color=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001206.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001207
Richard Smith081ad4d2017-01-24 19:39:46 +00001208.. option:: -fdiagnostics-show-hotness, -fno-diagnostics-show-hotness
1209
1210Enable profile hotness information in diagnostic line
1211
Richard Smith081ad4d2017-01-24 19:39:46 +00001212.. option:: -fdiagnostics-show-note-include-stack, -fno-diagnostics-show-note-include-stack
1213
1214Display include stacks for diagnostic notes
1215
Richard Smith081ad4d2017-01-24 19:39:46 +00001216.. option:: -fdiagnostics-show-option, -fno-diagnostics-show-option
1217
1218Print option name with mappable diagnostics
1219
Richard Smith081ad4d2017-01-24 19:39:46 +00001220.. option:: -fdiagnostics-show-template-tree
1221
1222Print a template comparison tree for differing templates
1223
Richard Smith081ad4d2017-01-24 19:39:46 +00001224.. option:: -fdollars-in-identifiers, -fno-dollars-in-identifiers
1225
1226Allow '$' in identifiers
1227
Richard Smith081ad4d2017-01-24 19:39:46 +00001228.. option:: -fdwarf-directory-asm, -fno-dwarf-directory-asm
1229
Richard Smith081ad4d2017-01-24 19:39:46 +00001230.. option:: -felide-constructors, -fno-elide-constructors
1231
Richard Smith081ad4d2017-01-24 19:39:46 +00001232.. option:: -feliminate-unused-debug-symbols, -fno-eliminate-unused-debug-symbols
1233
Richard Smith081ad4d2017-01-24 19:39:46 +00001234.. option:: -fembed-bitcode=<option>, -fembed-bitcode (equivalent to -fembed-bitcode=all), -fembed-bitcode-marker (equivalent to -fembed-bitcode=marker)
1235
1236Embed LLVM bitcode (option: off, all, bitcode, marker)
1237
Richard Smith081ad4d2017-01-24 19:39:46 +00001238.. option:: -femit-all-decls
1239
1240Emit all declarations, even if unused
1241
Richard Smith081ad4d2017-01-24 19:39:46 +00001242.. option:: -femulated-tls, -fno-emulated-tls
1243
1244Use emutls functions to access thread\_local variables
1245
Richard Smith081ad4d2017-01-24 19:39:46 +00001246.. option:: -fencoding=<arg>, --encoding <arg>, --encoding=<arg>
1247
Richard Smith081ad4d2017-01-24 19:39:46 +00001248.. option:: -ferror-limit=<arg>
1249
Richard Smith081ad4d2017-01-24 19:39:46 +00001250.. option:: -fexceptions, -fno-exceptions
1251
1252Enable support for exception handling
1253
Richard Smith081ad4d2017-01-24 19:39:46 +00001254.. option:: -fexec-charset=<arg>
1255
Richard Smith081ad4d2017-01-24 19:39:46 +00001256.. option:: -fextdirs=<arg>, --extdirs <arg>, --extdirs=<arg>
1257
Richard Smith081ad4d2017-01-24 19:39:46 +00001258.. option:: -ffast-math, -fno-fast-math
1259
1260Allow aggressive, lossy floating-point optimizations
1261
Richard Smith081ad4d2017-01-24 19:39:46 +00001262.. option:: -ffinite-math-only, -fno-finite-math-only
1263
Richard Smith081ad4d2017-01-24 19:39:46 +00001264.. option:: -ffor-scope, -fno-for-scope
1265
Richard Smith081ad4d2017-01-24 19:39:46 +00001266.. option:: -ffp-contract=<arg>
1267
1268Form fused FP ops (e.g. FMAs): fast (everywhere) \| on (according to FP\_CONTRACT pragma, default) \| off (never fuse)
1269
Richard Smith081ad4d2017-01-24 19:39:46 +00001270.. option:: -ffreestanding
1271
1272Assert that the compilation takes place in a freestanding environment
1273
Richard Smith081ad4d2017-01-24 19:39:46 +00001274.. option:: -ffunction-sections, -fno-function-sections
1275
1276Place each function in its own section (ELF Only)
1277
Richard Smith081ad4d2017-01-24 19:39:46 +00001278.. option:: -fgnu-inline-asm, -fno-gnu-inline-asm
1279
Richard Smith081ad4d2017-01-24 19:39:46 +00001280.. option:: -fgnu-keywords, -fno-gnu-keywords
1281
1282Allow GNU-extension keywords regardless of language standard
1283
Richard Smith081ad4d2017-01-24 19:39:46 +00001284.. option:: -fgnu-runtime
1285
1286Generate output compatible with the standard GNU Objective-C runtime
1287
Richard Smith081ad4d2017-01-24 19:39:46 +00001288.. option:: -fgnu89-inline, -fno-gnu89-inline
1289
1290Use the gnu89 inline semantics
1291
Richard Smith081ad4d2017-01-24 19:39:46 +00001292.. option:: -fhonor-infinities, -fhonor-infinites, -fno-honor-infinities
1293
Richard Smith081ad4d2017-01-24 19:39:46 +00001294.. option:: -fhonor-nans, -fno-honor-nans
1295
Richard Smith081ad4d2017-01-24 19:39:46 +00001296.. option:: -fhosted
1297
Richard Smith081ad4d2017-01-24 19:39:46 +00001298.. option:: -fimplicit-module-maps, -fmodule-maps, -fno-implicit-module-maps
1299
1300Implicitly search the file system for module map files.
1301
Richard Smith081ad4d2017-01-24 19:39:46 +00001302.. option:: -fimplicit-modules, -fno-implicit-modules
1303
Richard Smith081ad4d2017-01-24 19:39:46 +00001304.. option:: -finput-charset=<arg>
1305
Richard Smith081ad4d2017-01-24 19:39:46 +00001306.. option:: -finstrument-functions
1307
1308Generate calls to instrument function entry and exit
1309
Richard Smith081ad4d2017-01-24 19:39:46 +00001310.. option:: -fintegrated-as, -fno-integrated-as, -integrated-as
1311
1312Enable the integrated assembler
1313
Richard Smith081ad4d2017-01-24 19:39:46 +00001314.. option:: -fjump-tables, -fno-jump-tables
1315
Richard Smith081ad4d2017-01-24 19:39:46 +00001316.. option:: -flax-vector-conversions, -fno-lax-vector-conversions
1317
Richard Smith081ad4d2017-01-24 19:39:46 +00001318.. option:: -flimited-precision=<arg>
1319
Richard Smith081ad4d2017-01-24 19:39:46 +00001320.. option:: -flto, -fno-lto
1321
1322Enable LTO in 'full' mode
1323
Richard Smith081ad4d2017-01-24 19:39:46 +00001324.. option:: -flto-jobs=<arg>
1325
1326Controls the backend parallelism of -flto=thin (default of 0 means the number of threads will be derived from the number of CPUs detected)
1327
Richard Smithb2c82a62017-01-27 01:54:42 +00001328.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001329.. option:: -flto=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001330.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001331
1332Set LTO mode to either 'full' or 'thin'
1333
Richard Smith081ad4d2017-01-24 19:39:46 +00001334.. option:: -fmacro-backtrace-limit=<arg>
1335
Richard Smith081ad4d2017-01-24 19:39:46 +00001336.. option:: -fmath-errno, -fno-math-errno
1337
1338Require math functions to indicate errors by setting errno
1339
Richard Smith081ad4d2017-01-24 19:39:46 +00001340.. option:: -fmax-type-align=<arg>
1341
1342Specify the maximum alignment to enforce on pointers lacking an explicit alignment
1343
Richard Smith081ad4d2017-01-24 19:39:46 +00001344.. option:: -fmerge-all-constants, -fno-merge-all-constants
1345
Richard Smith081ad4d2017-01-24 19:39:46 +00001346.. option:: -fmessage-length=<arg>
1347
Richard Smith081ad4d2017-01-24 19:39:46 +00001348.. option:: -fmodule-file-deps, -fno-module-file-deps
1349
Richard Smith081ad4d2017-01-24 19:39:46 +00001350.. option:: -fmodule-file=<file>
1351
1352Load this precompiled module file
1353
Richard Smith081ad4d2017-01-24 19:39:46 +00001354.. option:: -fmodule-map-file=<file>
1355
1356Load this module map file
1357
Richard Smith081ad4d2017-01-24 19:39:46 +00001358.. option:: -fmodule-name=<name>, -fmodule-implementation-of <arg>, -fmodule-name <arg>
1359
1360Specify the name of the module to build
1361
Richard Smith081ad4d2017-01-24 19:39:46 +00001362.. option:: -fmodules, -fno-modules
1363
1364Enable the 'modules' language feature
1365
Richard Smith081ad4d2017-01-24 19:39:46 +00001366.. option:: -fmodules-decluse, -fno-modules-decluse
1367
1368Require declaration of modules used within a module
1369
Richard Smith081ad4d2017-01-24 19:39:46 +00001370.. option:: -fmodules-ignore-macro=<arg>
1371
1372Ignore the definition of the given macro when building and loading modules
1373
Richard Smith081ad4d2017-01-24 19:39:46 +00001374.. option:: -fmodules-search-all, -fno-modules-search-all
1375
1376Search even non-imported modules to resolve references
1377
Richard Smith081ad4d2017-01-24 19:39:46 +00001378.. option:: -fmodules-strict-decluse
1379
1380Like -fmodules-decluse but requires all headers to be in modules
1381
Richard Smith081ad4d2017-01-24 19:39:46 +00001382.. option:: -fmodules-ts
1383
1384Enable support for the C++ Modules TS
1385
Richard Smith081ad4d2017-01-24 19:39:46 +00001386.. option:: -fms-compatibility, -fno-ms-compatibility
1387
1388Enable full Microsoft Visual C++ compatibility
1389
Richard Smith081ad4d2017-01-24 19:39:46 +00001390.. option:: -fms-compatibility-version=<arg>
1391
1392Dot-separated value representing the Microsoft compiler version number to report in \_MSC\_VER (0 = don't define it (default))
1393
Richard Smith081ad4d2017-01-24 19:39:46 +00001394.. option:: -fms-extensions, -fno-ms-extensions
1395
1396Accept some non-standard constructs supported by the Microsoft compiler
1397
Richard Smith081ad4d2017-01-24 19:39:46 +00001398.. option:: -fms-memptr-rep=<arg>
1399
Richard Smith081ad4d2017-01-24 19:39:46 +00001400.. option:: -fms-volatile<arg>
1401
Richard Smith081ad4d2017-01-24 19:39:46 +00001402.. option:: -fmsc-version=<arg>
1403
1404Microsoft compiler version number to report in \_MSC\_VER (0 = don't define it (default))
1405
Richard Smith081ad4d2017-01-24 19:39:46 +00001406.. option:: -fmudflap
1407
Richard Smith081ad4d2017-01-24 19:39:46 +00001408.. option:: -fmudflapth
1409
Richard Smith081ad4d2017-01-24 19:39:46 +00001410.. option:: -fnested-functions
1411
Richard Smith081ad4d2017-01-24 19:39:46 +00001412.. option:: -fnew-alignment=<align>, -fnew-alignment <arg>
1413
1414Specifies the largest alignment guaranteed by '::operator new(size\_t)'
1415
Richard Smith081ad4d2017-01-24 19:39:46 +00001416.. option:: -fnext-runtime
1417
Richard Smith081ad4d2017-01-24 19:39:46 +00001418.. option:: -fno-builtin-<arg>
1419
1420Disable implicit builtin knowledge of a specific function
1421
Richard Smith081ad4d2017-01-24 19:39:46 +00001422.. option:: -fno-elide-type
1423
1424Do not elide types when printing diagnostics
1425
Richard Smith081ad4d2017-01-24 19:39:46 +00001426.. option:: -fno-max-type-align
1427
Richard Smith081ad4d2017-01-24 19:39:46 +00001428.. option:: -fno-operator-names
1429
1430Do not treat C++ operator name keywords as synonyms for operators
1431
Richard Smith081ad4d2017-01-24 19:39:46 +00001432.. option:: -fno-strict-modules-decluse
1433
Richard Smith081ad4d2017-01-24 19:39:46 +00001434.. option:: -fno-working-directory
1435
Richard Smith081ad4d2017-01-24 19:39:46 +00001436.. option:: -fnoopenmp-use-tls
1437
Richard Smith081ad4d2017-01-24 19:39:46 +00001438.. option:: -fobjc-abi-version=<arg>
1439
Richard Smith081ad4d2017-01-24 19:39:46 +00001440.. option:: -fobjc-arc, -fno-objc-arc
1441
1442Synthesize retain and release calls for Objective-C pointers
1443
Richard Smith081ad4d2017-01-24 19:39:46 +00001444.. option:: -fobjc-arc-exceptions, -fno-objc-arc-exceptions
1445
1446Use EH-safe code when synthesizing retains and releases in -fobjc-arc
1447
Richard Smith081ad4d2017-01-24 19:39:46 +00001448.. option:: -fobjc-exceptions, -fno-objc-exceptions
1449
1450Enable Objective-C exceptions
1451
Richard Smith081ad4d2017-01-24 19:39:46 +00001452.. option:: -fobjc-infer-related-result-type, -fno-objc-infer-related-result-type
1453
Richard Smith081ad4d2017-01-24 19:39:46 +00001454.. option:: -fobjc-legacy-dispatch, -fno-objc-legacy-dispatch
1455
Richard Smith081ad4d2017-01-24 19:39:46 +00001456.. option:: -fobjc-link-runtime
1457
Richard Smith081ad4d2017-01-24 19:39:46 +00001458.. option:: -fobjc-nonfragile-abi, -fno-objc-nonfragile-abi
1459
Richard Smith081ad4d2017-01-24 19:39:46 +00001460.. option:: -fobjc-nonfragile-abi-version=<arg>
1461
Richard Smith081ad4d2017-01-24 19:39:46 +00001462.. option:: -fobjc-runtime=<arg>
1463
1464Specify the target Objective-C runtime kind and version
1465
Richard Smith081ad4d2017-01-24 19:39:46 +00001466.. option:: -fobjc-sender-dependent-dispatch
1467
Richard Smith081ad4d2017-01-24 19:39:46 +00001468.. option:: -fobjc-weak, -fno-objc-weak
1469
1470Enable ARC-style weak references in Objective-C
1471
Richard Smith081ad4d2017-01-24 19:39:46 +00001472.. option:: -fomit-frame-pointer, -fno-omit-frame-pointer
1473
Richard Smith081ad4d2017-01-24 19:39:46 +00001474.. option:: -fopenmp, -fno-openmp
1475
Richard Smith081ad4d2017-01-24 19:39:46 +00001476.. option:: -fopenmp-dump-offload-linker-script
1477
Richard Smith081ad4d2017-01-24 19:39:46 +00001478.. option:: -fopenmp-use-tls
1479
Richard Smith081ad4d2017-01-24 19:39:46 +00001480.. option:: -fopenmp-version=<arg>
1481
Richard Smithb2c82a62017-01-27 01:54:42 +00001482.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001483.. option:: -fopenmp=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001484.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001485
Richard Smith081ad4d2017-01-24 19:39:46 +00001486.. option:: -foperator-arrow-depth=<arg>
1487
Richard Smith081ad4d2017-01-24 19:39:46 +00001488.. option:: -foptimization-record-file=<arg>
1489
1490Specify the file name of any generated YAML optimization record
1491
Richard Smith081ad4d2017-01-24 19:39:46 +00001492.. option:: -foptimize-sibling-calls, -fno-optimize-sibling-calls
1493
Richard Smith081ad4d2017-01-24 19:39:46 +00001494.. option:: -foutput-class-dir=<arg>, --output-class-directory <arg>, --output-class-directory=<arg>
1495
Richard Smith081ad4d2017-01-24 19:39:46 +00001496.. option:: -fpack-struct, -fno-pack-struct
1497
Richard Smithb2c82a62017-01-27 01:54:42 +00001498.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001499.. option:: -fpack-struct=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001500.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001501
1502Specify the default maximum struct packing alignment
1503
Richard Smith081ad4d2017-01-24 19:39:46 +00001504.. option:: -fpascal-strings, -fno-pascal-strings, -mpascal-strings
1505
1506Recognize and construct Pascal-style string literals
1507
Richard Smith081ad4d2017-01-24 19:39:46 +00001508.. option:: -fpcc-struct-return
1509
1510Override the default ABI to return all structs on the stack
1511
Richard Smith081ad4d2017-01-24 19:39:46 +00001512.. option:: -fpch-preprocess
1513
Richard Smith081ad4d2017-01-24 19:39:46 +00001514.. option:: -fpic, -fno-pic
1515
Richard Smith081ad4d2017-01-24 19:39:46 +00001516.. option:: -fpie, -fno-pie
1517
Richard Smith081ad4d2017-01-24 19:39:46 +00001518.. option:: -fplugin=<dsopath>
1519
1520Load the named plugin (dynamic shared object)
1521
Richard Smith081ad4d2017-01-24 19:39:46 +00001522.. option:: -fpreserve-as-comments, -fno-preserve-as-comments
1523
Richard Smith081ad4d2017-01-24 19:39:46 +00001524.. option:: -fprofile-arcs, -fno-profile-arcs
1525
Richard Smith081ad4d2017-01-24 19:39:46 +00001526.. option:: -fprofile-dir=<arg>
1527
Richard Smith081ad4d2017-01-24 19:39:46 +00001528.. option:: -fprofile-generate, -fno-profile-generate
1529
1530Generate instrumented code to collect execution counts into default.profraw (overridden by LLVM\_PROFILE\_FILE env var)
1531
Richard Smithb2c82a62017-01-27 01:54:42 +00001532.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001533.. option:: -fprofile-generate=<directory>
Richard Smithb2c82a62017-01-27 01:54:42 +00001534.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001535
1536Generate instrumented code to collect execution counts into <directory>/default.profraw (overridden by LLVM\_PROFILE\_FILE env var)
1537
Richard Smith081ad4d2017-01-24 19:39:46 +00001538.. option:: -fprofile-instr-generate, -fno-profile-instr-generate
1539
1540Generate instrumented code to collect execution counts into default.profraw file (overridden by '=' form of option or LLVM\_PROFILE\_FILE env var)
1541
Richard Smithb2c82a62017-01-27 01:54:42 +00001542.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001543.. option:: -fprofile-instr-generate=<file>
Richard Smithb2c82a62017-01-27 01:54:42 +00001544.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001545
1546Generate instrumented code to collect execution counts into <file> (overridden by LLVM\_PROFILE\_FILE env var)
1547
Richard Smith081ad4d2017-01-24 19:39:46 +00001548.. option:: -fprofile-instr-use, -fno-profile-instr-use, -fprofile-use
1549
Richard Smithb2c82a62017-01-27 01:54:42 +00001550.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001551.. option:: -fprofile-instr-use=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001552.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001553
1554Use instrumentation data for profile-guided optimization
1555
Richard Smith78e23fd2017-04-13 22:39:49 +00001556.. option:: -fprofile-sample-use, -fauto-profile, -fno-profile-sample-use
1557
1558.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001559.. option:: -fprofile-sample-use=<arg>, -fauto-profile=<arg>
Richard Smith78e23fd2017-04-13 22:39:49 +00001560.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001561
1562Enable sample-based profile guided optimizations
1563
Richard Smithb2c82a62017-01-27 01:54:42 +00001564.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001565.. option:: -fprofile-use=<pathname>
Richard Smithb2c82a62017-01-27 01:54:42 +00001566.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001567
1568Use instrumentation data for profile-guided optimization. If pathname is a directory, it reads from <pathname>/default.profdata. Otherwise, it reads from file <pathname>.
1569
Richard Smith081ad4d2017-01-24 19:39:46 +00001570.. option:: -freciprocal-math, -fno-reciprocal-math
1571
1572Allow division operations to be reassociated
1573
Richard Smith081ad4d2017-01-24 19:39:46 +00001574.. option:: -freg-struct-return
1575
1576Override the default ABI to return small structs in registers
1577
Richard Smith081ad4d2017-01-24 19:39:46 +00001578.. option:: -frelaxed-template-template-args, -fno-relaxed-template-template-args
1579
1580Enable C++17 relaxed template template argument matching
1581
Richard Smith081ad4d2017-01-24 19:39:46 +00001582.. option:: -freroll-loops, -fno-reroll-loops
1583
1584Turn on loop reroller
1585
Richard Smith081ad4d2017-01-24 19:39:46 +00001586.. option:: -fretain-comments-from-system-headers
1587
Richard Smith081ad4d2017-01-24 19:39:46 +00001588.. option:: -frewrite-includes, -fno-rewrite-includes
1589
Richard Smith081ad4d2017-01-24 19:39:46 +00001590.. option:: -frewrite-map-file <arg>
1591
Richard Smithb2c82a62017-01-27 01:54:42 +00001592.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001593.. option:: -frewrite-map-file=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001594.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001595
Richard Smith081ad4d2017-01-24 19:39:46 +00001596.. option:: -fropi, -fno-ropi
1597
Richard Smith081ad4d2017-01-24 19:39:46 +00001598.. option:: -frtti, -fno-rtti
1599
Richard Smith081ad4d2017-01-24 19:39:46 +00001600.. option:: -frwpi, -fno-rwpi
1601
Richard Smith081ad4d2017-01-24 19:39:46 +00001602.. option:: -fsave-optimization-record, -fno-save-optimization-record
1603
1604Generate a YAML optimization record file
1605
Richard Smith081ad4d2017-01-24 19:39:46 +00001606.. option:: -fshort-enums, -fno-short-enums
1607
1608Allocate to an enum type only as many bytes as it needs for the declared range of possible values
1609
Richard Smith081ad4d2017-01-24 19:39:46 +00001610.. option:: -fshort-wchar, -fno-short-wchar
1611
1612Force wchar\_t to be a short unsigned int
1613
Richard Smith081ad4d2017-01-24 19:39:46 +00001614.. option:: -fshow-column, -fno-show-column
1615
Richard Smith081ad4d2017-01-24 19:39:46 +00001616.. option:: -fshow-overloads=<arg>
1617
1618Which overload candidates to show when overload resolution fails: best\|all; defaults to all
1619
Richard Smith081ad4d2017-01-24 19:39:46 +00001620.. option:: -fshow-source-location, -fno-show-source-location
1621
Richard Smith081ad4d2017-01-24 19:39:46 +00001622.. option:: -fsignaling-math, -fno-signaling-math
1623
Richard Smith081ad4d2017-01-24 19:39:46 +00001624.. option:: -fsigned-bitfields
1625
Richard Smith081ad4d2017-01-24 19:39:46 +00001626.. option:: -fsigned-char, -fno-signed-char, --signed-char
1627
Richard Smith081ad4d2017-01-24 19:39:46 +00001628.. option:: -fsigned-zeros, -fno-signed-zeros
1629
Richard Smith081ad4d2017-01-24 19:39:46 +00001630.. option:: -fsized-deallocation, -fno-sized-deallocation
1631
1632Enable C++14 sized global deallocation functions
1633
Richard Smith081ad4d2017-01-24 19:39:46 +00001634.. option:: -fsjlj-exceptions
1635
1636Use SjLj style exceptions
1637
Richard Smith081ad4d2017-01-24 19:39:46 +00001638.. option:: -fslp-vectorize, -fno-slp-vectorize, -ftree-slp-vectorize
1639
1640Enable the superword-level parallelism vectorization passes
1641
Richard Smith081ad4d2017-01-24 19:39:46 +00001642.. option:: -fslp-vectorize-aggressive, -fno-slp-vectorize-aggressive
1643
1644Enable the BB vectorization passes
1645
Richard Smith081ad4d2017-01-24 19:39:46 +00001646.. option:: -fspell-checking, -fno-spell-checking
1647
Richard Smith081ad4d2017-01-24 19:39:46 +00001648.. option:: -fspell-checking-limit=<arg>
1649
Richard Smith081ad4d2017-01-24 19:39:46 +00001650.. option:: -fsplit-dwarf-inlining, -fno-split-dwarf-inlining
1651
1652Place debug types in their own section (ELF Only)
1653
Richard Smith081ad4d2017-01-24 19:39:46 +00001654.. option:: -fsplit-stack
1655
Richard Smith081ad4d2017-01-24 19:39:46 +00001656.. option:: -fstack-protector, -fno-stack-protector
1657
1658Enable stack protectors for functions potentially vulnerable to stack smashing
1659
Richard Smith081ad4d2017-01-24 19:39:46 +00001660.. option:: -fstack-protector-all
1661
1662Force the usage of stack protectors for all functions
1663
Richard Smith081ad4d2017-01-24 19:39:46 +00001664.. option:: -fstack-protector-strong
1665
1666Use a strong heuristic to apply stack protectors to functions
1667
Richard Smith081ad4d2017-01-24 19:39:46 +00001668.. option:: -fstandalone-debug, -fno-limit-debug-info, -fno-standalone-debug
1669
1670Emit full debug info for all types used by the program
1671
Richard Smith081ad4d2017-01-24 19:39:46 +00001672.. option:: -fstrict-aliasing, -fno-strict-aliasing
1673
Richard Smith081ad4d2017-01-24 19:39:46 +00001674.. option:: -fstrict-enums, -fno-strict-enums
1675
1676Enable optimizations based on the strict definition of an enum's value range
1677
Richard Smith081ad4d2017-01-24 19:39:46 +00001678.. option:: -fstrict-overflow, -fno-strict-overflow
1679
Richard Smith081ad4d2017-01-24 19:39:46 +00001680.. option:: -fstrict-return, -fno-strict-return
1681
Richard Smith78e23fd2017-04-13 22:39:49 +00001682Always treat control flow paths that fall off the end of a non-void function as unreachable
Richard Smith081ad4d2017-01-24 19:39:46 +00001683
Richard Smith081ad4d2017-01-24 19:39:46 +00001684.. option:: -fstrict-vtable-pointers, -fno-strict-vtable-pointers
1685
1686Enable optimizations based on the strict rules for overwriting polymorphic C++ objects
1687
Richard Smith081ad4d2017-01-24 19:39:46 +00001688.. option:: -fstruct-path-tbaa, -fno-struct-path-tbaa
1689
Richard Smith081ad4d2017-01-24 19:39:46 +00001690.. option:: -ftabstop=<arg>
1691
Richard Smith081ad4d2017-01-24 19:39:46 +00001692.. option:: -ftemplate-backtrace-limit=<arg>
1693
Richard Smith081ad4d2017-01-24 19:39:46 +00001694.. option:: -ftemplate-depth-<arg>
1695
Richard Smith081ad4d2017-01-24 19:39:46 +00001696.. option:: -ftemplate-depth=<arg>
1697
Richard Smith081ad4d2017-01-24 19:39:46 +00001698.. option:: -ftest-coverage
1699
Richard Smith081ad4d2017-01-24 19:39:46 +00001700.. option:: -fthinlto-index=<arg>
1701
1702Perform ThinLTO importing using provided function summary index
1703
Richard Smith081ad4d2017-01-24 19:39:46 +00001704.. option:: -fthreadsafe-statics, -fno-threadsafe-statics
1705
Richard Smith081ad4d2017-01-24 19:39:46 +00001706.. option:: -ftime-report
1707
Richard Smith081ad4d2017-01-24 19:39:46 +00001708.. option:: -ftls-model=<arg>
1709
Richard Smith081ad4d2017-01-24 19:39:46 +00001710.. option:: -ftrap-function=<arg>
1711
1712Issue call to specified function rather than a trap instruction
1713
Richard Smith081ad4d2017-01-24 19:39:46 +00001714.. option:: -ftrapping-math, -fno-trapping-math
1715
Richard Smith081ad4d2017-01-24 19:39:46 +00001716.. option:: -ftrapv
1717
1718Trap on integer overflow
1719
Richard Smith081ad4d2017-01-24 19:39:46 +00001720.. option:: -ftrapv-handler <arg>
1721
Richard Smithb2c82a62017-01-27 01:54:42 +00001722.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001723.. option:: -ftrapv-handler=<function name>
Richard Smithb2c82a62017-01-27 01:54:42 +00001724.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001725
1726Specify the function to be called on overflow
1727
Richard Smith081ad4d2017-01-24 19:39:46 +00001728.. option:: -ftrigraphs, -fno-trigraphs, -trigraphs, --trigraphs
1729
1730Process trigraph sequences
1731
Richard Smith081ad4d2017-01-24 19:39:46 +00001732.. option:: -funique-section-names, -fno-unique-section-names
1733
1734Use unique names for text and data sections (ELF Only)
1735
Richard Smith081ad4d2017-01-24 19:39:46 +00001736.. option:: -funit-at-a-time, -fno-unit-at-a-time
1737
Richard Smith081ad4d2017-01-24 19:39:46 +00001738.. option:: -funroll-loops, -fno-unroll-loops
1739
1740Turn on loop unroller
1741
Richard Smith081ad4d2017-01-24 19:39:46 +00001742.. option:: -funsafe-math-optimizations, -fno-unsafe-math-optimizations
1743
Richard Smith081ad4d2017-01-24 19:39:46 +00001744.. option:: -funsigned-bitfields
1745
Richard Smith081ad4d2017-01-24 19:39:46 +00001746.. option:: -funsigned-char, -fno-unsigned-char, --unsigned-char
1747
Richard Smith081ad4d2017-01-24 19:39:46 +00001748.. option:: -funwind-tables, -fno-unwind-tables
1749
Richard Smith081ad4d2017-01-24 19:39:46 +00001750.. option:: -fuse-cxa-atexit, -fno-use-cxa-atexit
1751
Richard Smith081ad4d2017-01-24 19:39:46 +00001752.. option:: -fuse-init-array, -fno-use-init-array
1753
1754Use .init\_array instead of .ctors
1755
Richard Smith081ad4d2017-01-24 19:39:46 +00001756.. option:: -fuse-ld=<arg>
1757
Richard Smith081ad4d2017-01-24 19:39:46 +00001758.. option:: -fuse-line-directives, -fno-use-line-directives
1759
Richard Smith081ad4d2017-01-24 19:39:46 +00001760.. option:: -fveclib=<arg>
1761
1762Use the given vector functions library
1763
Richard Smith081ad4d2017-01-24 19:39:46 +00001764.. option:: -fvectorize, -fno-vectorize, -ftree-vectorize
1765
1766Enable the loop vectorization passes
1767
Richard Smith081ad4d2017-01-24 19:39:46 +00001768.. option:: -fverbose-asm, -fno-verbose-asm
1769
Richard Smith081ad4d2017-01-24 19:39:46 +00001770.. option:: -fvisibility-inlines-hidden
1771
1772Give inline C++ member functions default visibility by default
1773
Richard Smith081ad4d2017-01-24 19:39:46 +00001774.. option:: -fvisibility-ms-compat
1775
1776Give global types 'default' visibility and global functions and variables 'hidden' visibility by default
1777
Richard Smith081ad4d2017-01-24 19:39:46 +00001778.. option:: -fvisibility=<arg>
1779
1780Set the default symbol visibility for all global declarations
1781
Richard Smith081ad4d2017-01-24 19:39:46 +00001782.. option:: -fwhole-program-vtables, -fno-whole-program-vtables
1783
1784Enables whole-program vtable optimization. Requires -flto
1785
Richard Smith081ad4d2017-01-24 19:39:46 +00001786.. option:: -fwrapv, -fno-wrapv
1787
1788Treat signed integer overflow as two's complement
1789
Richard Smith081ad4d2017-01-24 19:39:46 +00001790.. option:: -fwritable-strings
1791
1792Store string literals as writable data
1793
Richard Smith78e23fd2017-04-13 22:39:49 +00001794.. option:: -fxray-always-instrument=<arg>
1795
1796Filename defining the whitelist for imbuing the 'always instrument' XRay attribute.
1797
Richard Smith081ad4d2017-01-24 19:39:46 +00001798.. option:: -fxray-instruction-threshold<arg>
1799
Richard Smithb2c82a62017-01-27 01:54:42 +00001800.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001801.. option:: -fxray-instruction-threshold=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001802.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001803
1804Sets the minimum function size to instrument with XRay
1805
Richard Smith081ad4d2017-01-24 19:39:46 +00001806.. option:: -fxray-instrument, -fno-xray-instrument
1807
1808Generate XRay instrumentation sleds on function entry and exit
1809
Richard Smith78e23fd2017-04-13 22:39:49 +00001810.. option:: -fxray-never-instrument=<arg>
1811
1812Filename defining the whitelist for imbuing the 'never instrument' XRay attribute.
1813
Richard Smith081ad4d2017-01-24 19:39:46 +00001814.. option:: -fzero-initialized-in-bss, -fno-zero-initialized-in-bss
1815
Richard Smith081ad4d2017-01-24 19:39:46 +00001816.. option:: -fzvector, -fno-zvector, -mzvector
1817
1818Enable System z vector language extension
1819
Richard Smith081ad4d2017-01-24 19:39:46 +00001820.. option:: -pedantic, --pedantic, -no-pedantic, --no-pedantic
1821
Richard Smith081ad4d2017-01-24 19:39:46 +00001822.. option:: -pedantic-errors, --pedantic-errors
1823
1824OpenCL flags
1825------------
Richard Smith081ad4d2017-01-24 19:39:46 +00001826.. option:: -cl-denorms-are-zero
1827
1828OpenCL only. Allow denormals to be flushed to zero.
1829
Richard Smith081ad4d2017-01-24 19:39:46 +00001830.. option:: -cl-fast-relaxed-math
1831
1832OpenCL only. Sets -cl-finite-math-only and -cl-unsafe-math-optimizations, and defines \_\_FAST\_RELAXED\_MATH\_\_.
1833
Richard Smith081ad4d2017-01-24 19:39:46 +00001834.. option:: -cl-finite-math-only
1835
1836OpenCL only. Allow floating-point optimizations that assume arguments and results are not NaNs or +-Inf.
1837
Richard Smith081ad4d2017-01-24 19:39:46 +00001838.. option:: -cl-fp32-correctly-rounded-divide-sqrt
1839
1840OpenCL only. Specify that single precision floating-point divide and sqrt used in the program source are correctly rounded.
1841
Richard Smith081ad4d2017-01-24 19:39:46 +00001842.. option:: -cl-kernel-arg-info
1843
1844OpenCL only. Generate kernel argument metadata.
1845
Richard Smith081ad4d2017-01-24 19:39:46 +00001846.. option:: -cl-mad-enable
1847
1848OpenCL only. Allow use of less precise MAD computations in the generated binary.
1849
Richard Smith081ad4d2017-01-24 19:39:46 +00001850.. option:: -cl-no-signed-zeros
1851
1852OpenCL only. Allow use of less precise no signed zeros computations in the generated binary.
1853
Richard Smith081ad4d2017-01-24 19:39:46 +00001854.. option:: -cl-opt-disable
1855
1856OpenCL only. This option disables all optimizations. By default optimizations are enabled.
1857
Richard Smith081ad4d2017-01-24 19:39:46 +00001858.. option:: -cl-single-precision-constant
1859
1860OpenCL only. Treat double precision floating-point constant as single precision constant.
1861
Richard Smith081ad4d2017-01-24 19:39:46 +00001862.. option:: -cl-std=<arg>
1863
1864OpenCL language standard to compile for.
1865
Richard Smith081ad4d2017-01-24 19:39:46 +00001866.. option:: -cl-strict-aliasing
1867
1868OpenCL only. This option is added for compatibility with OpenCL 1.0.
1869
Richard Smith081ad4d2017-01-24 19:39:46 +00001870.. option:: -cl-unsafe-math-optimizations
1871
1872OpenCL only. Allow unsafe floating-point optimizations. Also implies -cl-no-signed-zeros and -cl-mad-enable.
1873
1874Target-dependent compilation options
1875~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Richard Smithc5b2e002017-01-27 02:08:37 +00001876.. option:: -G<size>, -G=<arg>, -msmall-data-threshold=<arg>
1877
1878Put objects of at most <size> bytes into small data section (MIPS / Hexagon)
1879
Richard Smith081ad4d2017-01-24 19:39:46 +00001880.. option:: -m16
1881
Richard Smith081ad4d2017-01-24 19:39:46 +00001882.. option:: -m32
1883
Richard Smith081ad4d2017-01-24 19:39:46 +00001884.. option:: -m64
1885
Richard Smith081ad4d2017-01-24 19:39:46 +00001886.. option:: -mabi=<arg>
1887
Richard Smith081ad4d2017-01-24 19:39:46 +00001888.. option:: -mabicalls, -mno-abicalls
1889
1890Enable SVR4-style position-independent code (Mips only)
1891
Richard Smith081ad4d2017-01-24 19:39:46 +00001892.. option:: -malign-double
1893
1894Align doubles to two words in structs (x86 only)
1895
Richard Smith081ad4d2017-01-24 19:39:46 +00001896.. option:: -march=<arg>
1897
Richard Smith081ad4d2017-01-24 19:39:46 +00001898.. option:: -masm=<arg>
1899
Richard Smith081ad4d2017-01-24 19:39:46 +00001900.. option:: -mbackchain, -mno-backchain
1901
1902Link stack frames through backchain on System Z
1903
Richard Smith081ad4d2017-01-24 19:39:46 +00001904.. option:: -mcheck-zero-division, -mno-check-zero-division
1905
Richard Smith081ad4d2017-01-24 19:39:46 +00001906.. option:: -mcmodel=<arg>
1907
Richard Smith081ad4d2017-01-24 19:39:46 +00001908.. option:: -mcompact-branches=<arg>
1909
Richard Smith081ad4d2017-01-24 19:39:46 +00001910.. option:: -mconsole<arg>
1911
Richard Smith78e23fd2017-04-13 22:39:49 +00001912.. 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)
Richard Smith081ad4d2017-01-24 19:39:46 +00001913
Richard Smith081ad4d2017-01-24 19:39:46 +00001914.. option:: -mdll<arg>
1915
Richard Smith081ad4d2017-01-24 19:39:46 +00001916.. option:: -mdouble-float
1917
Richard Smith081ad4d2017-01-24 19:39:46 +00001918.. option:: -mdsp, -mno-dsp
1919
Richard Smith081ad4d2017-01-24 19:39:46 +00001920.. option:: -mdspr2, -mno-dspr2
1921
Richard Smith081ad4d2017-01-24 19:39:46 +00001922.. option:: -mdynamic-no-pic<arg>
1923
Richard Smith081ad4d2017-01-24 19:39:46 +00001924.. option:: -meabi <arg>
1925
1926Set EABI type, e.g. 4, 5 or gnu (default depends on triple)
1927
Richard Smith78e23fd2017-04-13 22:39:49 +00001928.. option:: -mfentry
1929
1930Insert calls to fentry at function entry (x86 only)
1931
Richard Smith081ad4d2017-01-24 19:39:46 +00001932.. option:: -mfloat-abi=<arg>
1933
Richard Smith081ad4d2017-01-24 19:39:46 +00001934.. option:: -mfp32
1935
1936Use 32-bit floating point registers (MIPS only)
1937
Richard Smith081ad4d2017-01-24 19:39:46 +00001938.. option:: -mfp64
1939
1940Use 64-bit floating point registers (MIPS only)
1941
Richard Smith081ad4d2017-01-24 19:39:46 +00001942.. option:: -mfpmath=<arg>
1943
Richard Smith081ad4d2017-01-24 19:39:46 +00001944.. option:: -mfpu=<arg>
1945
Richard Smith081ad4d2017-01-24 19:39:46 +00001946.. option:: -mglobal-merge, -mno-global-merge
1947
1948Enable merging of globals
1949
Richard Smith081ad4d2017-01-24 19:39:46 +00001950.. option:: -mhard-float
1951
Richard Smith081ad4d2017-01-24 19:39:46 +00001952.. option:: -mhwdiv=<arg>, --mhwdiv <arg>, --mhwdiv=<arg>
1953
Richard Smith081ad4d2017-01-24 19:39:46 +00001954.. option:: -miamcu, -mno-iamcu
1955
1956Use Intel MCU ABI
1957
Richard Smith081ad4d2017-01-24 19:39:46 +00001958.. option:: -mimplicit-float, -mno-implicit-float
1959
Richard Smith081ad4d2017-01-24 19:39:46 +00001960.. option:: -mimplicit-it=<arg>
1961
Richard Smith081ad4d2017-01-24 19:39:46 +00001962.. option:: -mincremental-linker-compatible, -mno-incremental-linker-compatible
1963
1964(integrated-as) Emit an object file which can be used with an incremental linker
1965
Richard Smith78e23fd2017-04-13 22:39:49 +00001966.. option:: -miphoneos-version-min=<arg>, -mios-version-min=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00001967
Richard Smith081ad4d2017-01-24 19:39:46 +00001968.. option:: -mips16
1969
Richard Smith081ad4d2017-01-24 19:39:46 +00001970.. option:: -mkernel
1971
Richard Smith081ad4d2017-01-24 19:39:46 +00001972.. option:: -mldc1-sdc1, -mno-ldc1-sdc1
1973
Richard Smith081ad4d2017-01-24 19:39:46 +00001974.. option:: -mlong-calls, -mno-long-calls
1975
1976Generate branches with extended addressability, usually via indirect jumps.
1977
Richard Smith081ad4d2017-01-24 19:39:46 +00001978.. option:: -mmacosx-version-min=<arg>
1979
1980Set Mac OS X deployment target
1981
Richard Smith081ad4d2017-01-24 19:39:46 +00001982.. option:: -mmicromips, -mno-micromips
1983
Richard Smith081ad4d2017-01-24 19:39:46 +00001984.. option:: -mms-bitfields, -mno-ms-bitfields
1985
1986Set the default structure layout to be compatible with the Microsoft compiler standard
1987
Richard Smith081ad4d2017-01-24 19:39:46 +00001988.. option:: -mmsa, -mno-msa
1989
1990Enable MSA ASE (MIPS only)
1991
Richard Smith081ad4d2017-01-24 19:39:46 +00001992.. option:: -mnan=<arg>
1993
Richard Smith081ad4d2017-01-24 19:39:46 +00001994.. option:: -mno-mips16
1995
Richard Smith081ad4d2017-01-24 19:39:46 +00001996.. option:: -momit-leaf-frame-pointer, -mno-omit-leaf-frame-pointer
1997
1998Omit frame pointer setup for leaf functions
1999
Richard Smith081ad4d2017-01-24 19:39:46 +00002000.. option:: -moslib=<arg>
2001
Richard Smith081ad4d2017-01-24 19:39:46 +00002002.. option:: -mpie-copy-relocations, -mno-pie-copy-relocations
2003
2004Use copy relocations support for PIE builds
2005
Richard Smith081ad4d2017-01-24 19:39:46 +00002006.. option:: -mqdsp6-compat
2007
2008Enable hexagon-qdsp6 backward compatibility
2009
Richard Smith081ad4d2017-01-24 19:39:46 +00002010.. option:: -mrecip
2011
Richard Smithb2c82a62017-01-27 01:54:42 +00002012.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00002013.. option:: -mrecip=<arg1>,<arg2>...
Richard Smithb2c82a62017-01-27 01:54:42 +00002014.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00002015
Richard Smith081ad4d2017-01-24 19:39:46 +00002016.. option:: -mred-zone, -mno-red-zone
2017
Richard Smith081ad4d2017-01-24 19:39:46 +00002018.. option:: -mregparm=<arg>
2019
Richard Smith081ad4d2017-01-24 19:39:46 +00002020.. option:: -mrelax-all, -mno-relax-all
2021
2022(integrated-as) Relax all machine instructions
2023
Richard Smith081ad4d2017-01-24 19:39:46 +00002024.. option:: -mrtd, -mno-rtd
2025
2026Make StdCall calling convention the default
2027
Richard Smith081ad4d2017-01-24 19:39:46 +00002028.. option:: -msingle-float
2029
Richard Smith081ad4d2017-01-24 19:39:46 +00002030.. option:: -msoft-float, -mno-soft-float
2031
2032Use software floating point
2033
Richard Smith081ad4d2017-01-24 19:39:46 +00002034.. option:: -mstack-alignment=<arg>
2035
2036Set the stack alignment
2037
Richard Smith081ad4d2017-01-24 19:39:46 +00002038.. option:: -mstack-probe-size=<arg>
2039
2040Set the stack probe size
2041
Richard Smith081ad4d2017-01-24 19:39:46 +00002042.. option:: -mstackrealign, -mno-stackrealign
2043
2044Force realign the stack at entry to every function
2045
Richard Smith081ad4d2017-01-24 19:39:46 +00002046.. option:: -mthread-model <arg>
2047
2048The thread model to use, e.g. posix, single (posix by default)
2049
Richard Smith081ad4d2017-01-24 19:39:46 +00002050.. option:: -mthreads<arg>
2051
Richard Smith081ad4d2017-01-24 19:39:46 +00002052.. option:: -mthumb, -mno-thumb
2053
Richard Smith081ad4d2017-01-24 19:39:46 +00002054.. option:: -mtune=<arg>
2055
Richard Smith78e23fd2017-04-13 22:39:49 +00002056.. option:: -mtvos-version-min=<arg>, -mappletvos-version-min=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00002057
Richard Smith081ad4d2017-01-24 19:39:46 +00002058.. option:: -municode<arg>
2059
Richard Smith081ad4d2017-01-24 19:39:46 +00002060.. option:: -mvx, -mno-vx
2061
Richard Smith081ad4d2017-01-24 19:39:46 +00002062.. option:: -mwarn-nonportable-cfstrings, -mno-warn-nonportable-cfstrings
2063
Richard Smith78e23fd2017-04-13 22:39:49 +00002064.. option:: -mwatchos-version-min=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00002065
Richard Smith081ad4d2017-01-24 19:39:46 +00002066.. option:: -mwindows<arg>
2067
Richard Smith081ad4d2017-01-24 19:39:46 +00002068.. option:: -mx32
2069
Richard Smith081ad4d2017-01-24 19:39:46 +00002070.. option:: -mxgot, -mno-xgot
2071
2072AARCH64
2073-------
Richard Smith081ad4d2017-01-24 19:39:46 +00002074.. option:: -ffixed-x18
2075
2076Reserve the x18 register (AArch64 only)
2077
Richard Smith081ad4d2017-01-24 19:39:46 +00002078.. option:: -mfix-cortex-a53-835769, -mno-fix-cortex-a53-835769
2079
2080Workaround Cortex-A53 erratum 835769 (AArch64 only)
2081
Richard Smith081ad4d2017-01-24 19:39:46 +00002082.. option:: -mgeneral-regs-only
2083
2084Generate code which only uses the general purpose registers (AArch64 only)
2085
2086AMDGPU
2087------
2088ARM
2089---
Richard Smith081ad4d2017-01-24 19:39:46 +00002090.. option:: -ffixed-r9
2091
2092Reserve the r9 register (ARM only)
2093
Richard Smith081ad4d2017-01-24 19:39:46 +00002094.. option:: -mcrc
2095
2096Allow use of CRC instructions (ARM only)
2097
Richard Smith081ad4d2017-01-24 19:39:46 +00002098.. option:: -mexecute-only, -mno-execute-only, -mpure-code
2099
2100Disallow generation of data access to code sections (ARM only)
2101
Richard Smith081ad4d2017-01-24 19:39:46 +00002102.. option:: -mno-movt
2103
2104Disallow use of movt/movw pairs (ARM only)
2105
Richard Smith78e23fd2017-04-13 22:39:49 +00002106.. option:: -mno-neg-immediates
2107
2108Disallow converting instructions with negative immediates to their negation or inversion.
2109
Richard Smith081ad4d2017-01-24 19:39:46 +00002110.. option:: -mnocrc
2111
2112Disallow use of CRC instructions (ARM only)
2113
Richard Smith081ad4d2017-01-24 19:39:46 +00002114.. option:: -mrestrict-it, -mno-restrict-it
2115
2116Disallow generation of deprecated IT blocks for ARMv8. It is on by default for ARMv8 Thumb mode.
2117
Richard Smith081ad4d2017-01-24 19:39:46 +00002118.. option:: -munaligned-access, -mno-unaligned-access
2119
2120Allow memory accesses to be unaligned (AArch32/AArch64 only)
2121
2122Hexagon
2123-------
Richard Smith081ad4d2017-01-24 19:39:46 +00002124.. option:: -mhvx, -mno-hvx
2125
2126Enable Hexagon Vector eXtensions
2127
Richard Smith081ad4d2017-01-24 19:39:46 +00002128.. option:: -mhvx-double, -mno-hvx-double
2129
2130Enable Hexagon Double Vector eXtensions
2131
Richard Smith081ad4d2017-01-24 19:39:46 +00002132.. option:: -mieee-rnd-near
2133
2134PowerPC
2135-------
Richard Smith78e23fd2017-04-13 22:39:49 +00002136.. option:: -maltivec, -mno-altivec
2137
Richard Smith081ad4d2017-01-24 19:39:46 +00002138.. option:: -mcmpb, -mno-cmpb
2139
Richard Smith081ad4d2017-01-24 19:39:46 +00002140.. option:: -mcrbits, -mno-crbits
2141
Richard Smith081ad4d2017-01-24 19:39:46 +00002142.. option:: -mcrypto, -mno-crypto
2143
Richard Smith081ad4d2017-01-24 19:39:46 +00002144.. option:: -mdirect-move, -mno-direct-move
2145
Richard Smith081ad4d2017-01-24 19:39:46 +00002146.. option:: -mfloat128, -mno-float128
2147
Richard Smith081ad4d2017-01-24 19:39:46 +00002148.. option:: -mfprnd, -mno-fprnd
2149
Richard Smith081ad4d2017-01-24 19:39:46 +00002150.. option:: -mhtm, -mno-htm
2151
Richard Smith081ad4d2017-01-24 19:39:46 +00002152.. option:: -minvariant-function-descriptors, -mno-invariant-function-descriptors
2153
Richard Smith081ad4d2017-01-24 19:39:46 +00002154.. option:: -misel, -mno-isel
2155
Richard Smith081ad4d2017-01-24 19:39:46 +00002156.. option:: -mlongcall, -mno-longcall
2157
Richard Smith081ad4d2017-01-24 19:39:46 +00002158.. option:: -mmfocrf, -mmfcrf, -mno-mfocrf
2159
Richard Smith081ad4d2017-01-24 19:39:46 +00002160.. option:: -mpopcntd, -mno-popcntd
2161
Richard Smith081ad4d2017-01-24 19:39:46 +00002162.. option:: -mpower8-vector, -mno-power8-vector
2163
Richard Smith081ad4d2017-01-24 19:39:46 +00002164.. option:: -mpower9-vector, -mno-power9-vector
2165
Richard Smith081ad4d2017-01-24 19:39:46 +00002166.. option:: -mqpx, -mno-qpx
2167
Richard Smith081ad4d2017-01-24 19:39:46 +00002168.. option:: -mvsx, -mno-vsx
2169
2170WebAssembly
2171-----------
Richard Smith081ad4d2017-01-24 19:39:46 +00002172.. option:: -msimd128, -mno-simd128
2173
2174X86
2175---
Richard Smith081ad4d2017-01-24 19:39:46 +00002176.. option:: -m3dnow, -mno-3dnow
2177
Richard Smith081ad4d2017-01-24 19:39:46 +00002178.. option:: -m3dnowa, -mno-3dnowa
2179
Richard Smith081ad4d2017-01-24 19:39:46 +00002180.. option:: -madx, -mno-adx
2181
Richard Smith081ad4d2017-01-24 19:39:46 +00002182.. option:: -maes, -mno-aes
2183
Richard Smith081ad4d2017-01-24 19:39:46 +00002184.. option:: -mavx, -mno-avx
2185
Richard Smith081ad4d2017-01-24 19:39:46 +00002186.. option:: -mavx2, -mno-avx2
2187
Richard Smith081ad4d2017-01-24 19:39:46 +00002188.. option:: -mavx512bw, -mno-avx512bw
2189
Richard Smith081ad4d2017-01-24 19:39:46 +00002190.. option:: -mavx512cd, -mno-avx512cd
2191
Richard Smith081ad4d2017-01-24 19:39:46 +00002192.. option:: -mavx512dq, -mno-avx512dq
2193
Richard Smith081ad4d2017-01-24 19:39:46 +00002194.. option:: -mavx512er, -mno-avx512er
2195
Richard Smith081ad4d2017-01-24 19:39:46 +00002196.. option:: -mavx512f, -mno-avx512f
2197
Richard Smith081ad4d2017-01-24 19:39:46 +00002198.. option:: -mavx512ifma, -mno-avx512ifma
2199
Richard Smith081ad4d2017-01-24 19:39:46 +00002200.. option:: -mavx512pf, -mno-avx512pf
2201
Richard Smith081ad4d2017-01-24 19:39:46 +00002202.. option:: -mavx512vbmi, -mno-avx512vbmi
2203
Richard Smith081ad4d2017-01-24 19:39:46 +00002204.. option:: -mavx512vl, -mno-avx512vl
2205
Richard Smith081ad4d2017-01-24 19:39:46 +00002206.. option:: -mbmi, -mno-bmi
2207
Richard Smith081ad4d2017-01-24 19:39:46 +00002208.. option:: -mbmi2, -mno-bmi2
2209
Craig Topper78b47872017-02-08 06:48:58 +00002210.. option:: -mclflushopt, -mno-clflushopt
2211
Craig Topper177a57c2017-02-08 07:57:01 +00002212.. option:: -mclwb, -mno-clwb
2213
Richard Smith78e23fd2017-04-13 22:39:49 +00002214.. option:: -mclzero, -mno-clzero
2215
Richard Smith081ad4d2017-01-24 19:39:46 +00002216.. option:: -mcx16, -mno-cx16
2217
Richard Smith081ad4d2017-01-24 19:39:46 +00002218.. option:: -mf16c, -mno-f16c
2219
Richard Smith081ad4d2017-01-24 19:39:46 +00002220.. option:: -mfma, -mno-fma
2221
Richard Smith081ad4d2017-01-24 19:39:46 +00002222.. option:: -mfma4, -mno-fma4
2223
Richard Smith081ad4d2017-01-24 19:39:46 +00002224.. option:: -mfsgsbase, -mno-fsgsbase
2225
Richard Smith081ad4d2017-01-24 19:39:46 +00002226.. option:: -mfxsr, -mno-fxsr
2227
Richard Smith081ad4d2017-01-24 19:39:46 +00002228.. option:: -mlzcnt, -mno-lzcnt
2229
Richard Smith081ad4d2017-01-24 19:39:46 +00002230.. option:: -mmmx, -mno-mmx
2231
Craig Topper177a57c2017-02-08 07:57:01 +00002232.. option:: -mmovbe, -mno-movbe
2233
Craig Topperb16cb822017-02-08 07:56:42 +00002234.. option:: -mmpx, -mno-mpx
2235
Richard Smith081ad4d2017-01-24 19:39:46 +00002236.. option:: -mmwaitx, -mno-mwaitx
2237
Richard Smith081ad4d2017-01-24 19:39:46 +00002238.. option:: -mpclmul, -mno-pclmul
2239
Richard Smith081ad4d2017-01-24 19:39:46 +00002240.. option:: -mpku, -mno-pku
2241
Richard Smith081ad4d2017-01-24 19:39:46 +00002242.. option:: -mpopcnt, -mno-popcnt
2243
Craig Topperd2bf7b02017-02-08 08:23:40 +00002244.. option:: -mprefetchwt1, -mno-prefetchwt1
2245
Richard Smith081ad4d2017-01-24 19:39:46 +00002246.. option:: -mprfchw, -mno-prfchw
2247
Richard Smith081ad4d2017-01-24 19:39:46 +00002248.. option:: -mrdrnd, -mno-rdrnd
2249
Richard Smith081ad4d2017-01-24 19:39:46 +00002250.. option:: -mrdseed, -mno-rdseed
2251
Richard Smith081ad4d2017-01-24 19:39:46 +00002252.. option:: -mrtm, -mno-rtm
2253
Craig Topper204ecff2017-02-08 08:23:17 +00002254.. option:: -msgx, -mno-sgx
2255
Richard Smith081ad4d2017-01-24 19:39:46 +00002256.. option:: -msha, -mno-sha
2257
Richard Smith081ad4d2017-01-24 19:39:46 +00002258.. option:: -msse, -mno-sse
2259
Richard Smith081ad4d2017-01-24 19:39:46 +00002260.. option:: -msse2, -mno-sse2
2261
Richard Smith081ad4d2017-01-24 19:39:46 +00002262.. option:: -msse3, -mno-sse3
2263
Richard Smith081ad4d2017-01-24 19:39:46 +00002264.. option:: -msse4.1, -mno-sse4.1
2265
Richard Smithb2c82a62017-01-27 01:54:42 +00002266.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00002267.. option:: -msse4.2, -mno-sse4.2, -msse4
Richard Smithb2c82a62017-01-27 01:54:42 +00002268.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00002269
Richard Smith081ad4d2017-01-24 19:39:46 +00002270.. option:: -msse4a, -mno-sse4a
2271
Richard Smith081ad4d2017-01-24 19:39:46 +00002272.. option:: -mssse3, -mno-ssse3
2273
Richard Smith081ad4d2017-01-24 19:39:46 +00002274.. option:: -mtbm, -mno-tbm
2275
Richard Smith081ad4d2017-01-24 19:39:46 +00002276.. option:: -mx87, -m80387, -mno-x87
2277
Richard Smith081ad4d2017-01-24 19:39:46 +00002278.. option:: -mxop, -mno-xop
2279
Richard Smith081ad4d2017-01-24 19:39:46 +00002280.. option:: -mxsave, -mno-xsave
2281
Richard Smith081ad4d2017-01-24 19:39:46 +00002282.. option:: -mxsavec, -mno-xsavec
2283
Richard Smith081ad4d2017-01-24 19:39:46 +00002284.. option:: -mxsaveopt, -mno-xsaveopt
2285
Richard Smith081ad4d2017-01-24 19:39:46 +00002286.. option:: -mxsaves, -mno-xsaves
2287
2288Optimization level
2289~~~~~~~~~~~~~~~~~~
2290
2291Flags controlling how much optimization should be performed.
2292
Richard Smith081ad4d2017-01-24 19:39:46 +00002293.. option:: -O<arg>, -O (equivalent to -O2), --optimize, --optimize=<arg>
2294
Richard Smith081ad4d2017-01-24 19:39:46 +00002295.. option:: -Ofast<arg>
2296
2297Debug information generation
2298~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2299
2300Flags controlling how much and what kind of debug information should be
2301generated.
2302
2303Kind and level of debug information
2304-----------------------------------
Richard Smith081ad4d2017-01-24 19:39:46 +00002305.. option:: -g, --debug, --debug=<arg>
2306
2307Generate source-level debug information
2308
Richard Smith081ad4d2017-01-24 19:39:46 +00002309.. option:: -gdwarf-2
2310
2311Generate source-level debug information with dwarf version 2
2312
Richard Smith081ad4d2017-01-24 19:39:46 +00002313.. option:: -gdwarf-3
2314
2315Generate source-level debug information with dwarf version 3
2316
Richard Smith081ad4d2017-01-24 19:39:46 +00002317.. option:: -gdwarf-4, -gdwarf
2318
2319Generate source-level debug information with dwarf version 4
2320
Richard Smith081ad4d2017-01-24 19:39:46 +00002321.. option:: -gdwarf-5
2322
2323Generate source-level debug information with dwarf version 5
2324
Richard Smith081ad4d2017-01-24 19:39:46 +00002325.. option:: -gfull
2326
Richard Smith081ad4d2017-01-24 19:39:46 +00002327.. option:: -gused
2328
2329Debug level
2330___________
Richard Smith081ad4d2017-01-24 19:39:46 +00002331.. option:: -g0
2332
Richard Smith081ad4d2017-01-24 19:39:46 +00002333.. option:: -g2
2334
Richard Smith081ad4d2017-01-24 19:39:46 +00002335.. option:: -g3
2336
Richard Smith081ad4d2017-01-24 19:39:46 +00002337.. option:: -ggdb0
2338
Richard Smith081ad4d2017-01-24 19:39:46 +00002339.. option:: -ggdb1
2340
Richard Smith081ad4d2017-01-24 19:39:46 +00002341.. option:: -ggdb2
2342
Richard Smith081ad4d2017-01-24 19:39:46 +00002343.. option:: -ggdb3
2344
Richard Smith081ad4d2017-01-24 19:39:46 +00002345.. option:: -gline-tables-only, -g1, -gmlt
2346
2347Emit debug line number tables only
2348
Richard Smith081ad4d2017-01-24 19:39:46 +00002349.. option:: -gmodules
2350
2351Generate debug info with external references to clang modules or precompiled headers
2352
2353Debugger to tune debug information for
2354______________________________________
Richard Smith081ad4d2017-01-24 19:39:46 +00002355.. option:: -ggdb
2356
Richard Smith081ad4d2017-01-24 19:39:46 +00002357.. option:: -glldb
2358
Richard Smith081ad4d2017-01-24 19:39:46 +00002359.. option:: -gsce
2360
2361Debug information flags
2362-----------------------
Richard Smith081ad4d2017-01-24 19:39:46 +00002363.. option:: -gcolumn-info, -gno-column-info
2364
Richard Smith081ad4d2017-01-24 19:39:46 +00002365.. option:: -gdwarf-aranges
2366
Richard Smith081ad4d2017-01-24 19:39:46 +00002367.. option:: -ggnu-pubnames
2368
Richard Smith081ad4d2017-01-24 19:39:46 +00002369.. option:: -grecord-gcc-switches, -gno-record-gcc-switches
2370
Richard Smith081ad4d2017-01-24 19:39:46 +00002371.. option:: -gsplit-dwarf
2372
Richard Smith081ad4d2017-01-24 19:39:46 +00002373.. option:: -gstrict-dwarf, -gno-strict-dwarf
2374
Richard Smithc5b2e002017-01-27 02:08:37 +00002375Static analyzer flags
2376=====================
Richard Smith081ad4d2017-01-24 19:39:46 +00002377
Richard Smithc5b2e002017-01-27 02:08:37 +00002378Flags controlling the behavior of the Clang Static Analyzer.
Richard Smith081ad4d2017-01-24 19:39:46 +00002379
Richard Smithc5b2e002017-01-27 02:08:37 +00002380.. option:: -Xanalyzer <arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00002381
Richard Smithc5b2e002017-01-27 02:08:37 +00002382Pass <arg> to the static analyzer
Richard Smith081ad4d2017-01-24 19:39:46 +00002383
2384Fortran compilation flags
2385=========================
2386
2387Flags that will be passed onto the ``gfortran`` compiler when Clang is given
2388a Fortran input.
2389
Richard Smithc5b2e002017-01-27 02:08:37 +00002390.. option:: -A<arg>, --assert <arg>, --assert=<arg>
2391
Richard Smith081ad4d2017-01-24 19:39:46 +00002392.. option:: -A-<arg>
2393
Richard Smith081ad4d2017-01-24 19:39:46 +00002394.. option:: -J<arg>
2395
Richard Smith081ad4d2017-01-24 19:39:46 +00002396.. option:: -cpp
2397
Richard Smith081ad4d2017-01-24 19:39:46 +00002398.. option:: -faggressive-function-elimination, -fno-aggressive-function-elimination
2399
Richard Smith081ad4d2017-01-24 19:39:46 +00002400.. option:: -falign-commons, -fno-align-commons
2401
Richard Smith081ad4d2017-01-24 19:39:46 +00002402.. option:: -fall-intrinsics, -fno-all-intrinsics
2403
Richard Smith081ad4d2017-01-24 19:39:46 +00002404.. option:: -fautomatic, -fno-automatic
2405
Richard Smith081ad4d2017-01-24 19:39:46 +00002406.. option:: -fbackslash, -fno-backslash
2407
Richard Smith081ad4d2017-01-24 19:39:46 +00002408.. option:: -fbacktrace, -fno-backtrace
2409
Richard Smith081ad4d2017-01-24 19:39:46 +00002410.. option:: -fblas-matmul-limit=<arg>
2411
Richard Smith081ad4d2017-01-24 19:39:46 +00002412.. option:: -fbounds-check, -fno-bounds-check
2413
Richard Smith081ad4d2017-01-24 19:39:46 +00002414.. option:: -fcheck-array-temporaries, -fno-check-array-temporaries
2415
Richard Smith081ad4d2017-01-24 19:39:46 +00002416.. option:: -fcheck=<arg>
2417
Richard Smith081ad4d2017-01-24 19:39:46 +00002418.. option:: -fcoarray=<arg>
2419
Richard Smith081ad4d2017-01-24 19:39:46 +00002420.. option:: -fconvert=<arg>
2421
Richard Smith081ad4d2017-01-24 19:39:46 +00002422.. option:: -fcray-pointer, -fno-cray-pointer
2423
Richard Smith081ad4d2017-01-24 19:39:46 +00002424.. option:: -fd-lines-as-code, -fno-d-lines-as-code
2425
Richard Smith081ad4d2017-01-24 19:39:46 +00002426.. option:: -fd-lines-as-comments, -fno-d-lines-as-comments
2427
Richard Smith081ad4d2017-01-24 19:39:46 +00002428.. option:: -fdefault-double-8, -fno-default-double-8
2429
Richard Smith081ad4d2017-01-24 19:39:46 +00002430.. option:: -fdefault-integer-8, -fno-default-integer-8
2431
Richard Smith081ad4d2017-01-24 19:39:46 +00002432.. option:: -fdefault-real-8, -fno-default-real-8
2433
Richard Smith081ad4d2017-01-24 19:39:46 +00002434.. option:: -fdollar-ok, -fno-dollar-ok
2435
Richard Smith081ad4d2017-01-24 19:39:46 +00002436.. option:: -fdump-fortran-optimized, -fno-dump-fortran-optimized
2437
Richard Smith081ad4d2017-01-24 19:39:46 +00002438.. option:: -fdump-fortran-original, -fno-dump-fortran-original
2439
Richard Smith081ad4d2017-01-24 19:39:46 +00002440.. option:: -fdump-parse-tree, -fno-dump-parse-tree
2441
Richard Smith081ad4d2017-01-24 19:39:46 +00002442.. option:: -fexternal-blas, -fno-external-blas
2443
Richard Smith081ad4d2017-01-24 19:39:46 +00002444.. option:: -ff2c, -fno-f2c
2445
Richard Smith081ad4d2017-01-24 19:39:46 +00002446.. option:: -ffixed-form, -fno-fixed-form
2447
Richard Smith081ad4d2017-01-24 19:39:46 +00002448.. option:: -ffixed-line-length-<arg>
2449
Richard Smith081ad4d2017-01-24 19:39:46 +00002450.. option:: -ffpe-trap=<arg>
2451
Richard Smith081ad4d2017-01-24 19:39:46 +00002452.. option:: -ffree-form, -fno-free-form
2453
Richard Smith081ad4d2017-01-24 19:39:46 +00002454.. option:: -ffree-line-length-<arg>
2455
Richard Smith081ad4d2017-01-24 19:39:46 +00002456.. option:: -ffrontend-optimize, -fno-frontend-optimize
2457
Richard Smith081ad4d2017-01-24 19:39:46 +00002458.. option:: -fimplicit-none, -fno-implicit-none
2459
Richard Smith081ad4d2017-01-24 19:39:46 +00002460.. option:: -finit-character=<arg>
2461
Richard Smith081ad4d2017-01-24 19:39:46 +00002462.. option:: -finit-integer=<arg>
2463
Richard Smith081ad4d2017-01-24 19:39:46 +00002464.. option:: -finit-local-zero, -fno-init-local-zero
2465
Richard Smith081ad4d2017-01-24 19:39:46 +00002466.. option:: -finit-logical=<arg>
2467
Richard Smith081ad4d2017-01-24 19:39:46 +00002468.. option:: -finit-real=<arg>
2469
Richard Smith081ad4d2017-01-24 19:39:46 +00002470.. option:: -finteger-4-integer-8, -fno-integer-4-integer-8
2471
Richard Smith081ad4d2017-01-24 19:39:46 +00002472.. option:: -fintrinsic-modules-path, -fno-intrinsic-modules-path
2473
Richard Smith081ad4d2017-01-24 19:39:46 +00002474.. option:: -fmax-array-constructor=<arg>
2475
Richard Smith081ad4d2017-01-24 19:39:46 +00002476.. option:: -fmax-errors=<arg>
2477
Richard Smith081ad4d2017-01-24 19:39:46 +00002478.. option:: -fmax-identifier-length, -fno-max-identifier-length
2479
Richard Smith081ad4d2017-01-24 19:39:46 +00002480.. option:: -fmax-stack-var-size=<arg>
2481
Richard Smith081ad4d2017-01-24 19:39:46 +00002482.. option:: -fmax-subrecord-length=<arg>
2483
Richard Smith081ad4d2017-01-24 19:39:46 +00002484.. option:: -fmodule-private, -fno-module-private
2485
Richard Smith081ad4d2017-01-24 19:39:46 +00002486.. option:: -fpack-derived, -fno-pack-derived
2487
Richard Smith081ad4d2017-01-24 19:39:46 +00002488.. option:: -fprotect-parens, -fno-protect-parens
2489
Richard Smith081ad4d2017-01-24 19:39:46 +00002490.. option:: -frange-check, -fno-range-check
2491
Richard Smith081ad4d2017-01-24 19:39:46 +00002492.. option:: -freal-4-real-10, -fno-real-4-real-10
2493
Richard Smith081ad4d2017-01-24 19:39:46 +00002494.. option:: -freal-4-real-16, -fno-real-4-real-16
2495
Richard Smith081ad4d2017-01-24 19:39:46 +00002496.. option:: -freal-4-real-8, -fno-real-4-real-8
2497
Richard Smith081ad4d2017-01-24 19:39:46 +00002498.. option:: -freal-8-real-10, -fno-real-8-real-10
2499
Richard Smith081ad4d2017-01-24 19:39:46 +00002500.. option:: -freal-8-real-16, -fno-real-8-real-16
2501
Richard Smith081ad4d2017-01-24 19:39:46 +00002502.. option:: -freal-8-real-4, -fno-real-8-real-4
2503
Richard Smith081ad4d2017-01-24 19:39:46 +00002504.. option:: -frealloc-lhs, -fno-realloc-lhs
2505
Richard Smith081ad4d2017-01-24 19:39:46 +00002506.. option:: -frecord-marker=<arg>
2507
Richard Smith081ad4d2017-01-24 19:39:46 +00002508.. option:: -frecursive, -fno-recursive
2509
Richard Smith081ad4d2017-01-24 19:39:46 +00002510.. option:: -frepack-arrays, -fno-repack-arrays
2511
Richard Smith081ad4d2017-01-24 19:39:46 +00002512.. option:: -fsecond-underscore, -fno-second-underscore
2513
Richard Smith081ad4d2017-01-24 19:39:46 +00002514.. option:: -fsign-zero, -fno-sign-zero
2515
Richard Smith081ad4d2017-01-24 19:39:46 +00002516.. option:: -fstack-arrays, -fno-stack-arrays
2517
Richard Smith081ad4d2017-01-24 19:39:46 +00002518.. option:: -funderscoring, -fno-underscoring
2519
Richard Smith081ad4d2017-01-24 19:39:46 +00002520.. option:: -fwhole-file, -fno-whole-file
2521
Richard Smith081ad4d2017-01-24 19:39:46 +00002522.. option:: -nocpp
2523
Richard Smith081ad4d2017-01-24 19:39:46 +00002524.. option:: -static-libgfortran
2525
Richard Smithc5b2e002017-01-27 02:08:37 +00002526Linker flags
2527============
2528Flags that are passed on to the linker
2529
2530.. option:: -L<dir>, --library-directory <arg>, --library-directory=<arg>
2531
2532Add directory to library search path
2533
2534.. option:: -Mach
2535
2536.. option:: -T<script>
2537
2538Specify <script> as linker script
2539
Richard Smith78e23fd2017-04-13 22:39:49 +00002540.. option:: -Tbss<addr>
Richard Smithc5b2e002017-01-27 02:08:37 +00002541
2542Set starting address of BSS to <addr>
2543
Richard Smith78e23fd2017-04-13 22:39:49 +00002544.. option:: -Tdata<addr>
Richard Smithc5b2e002017-01-27 02:08:37 +00002545
2546Set starting address of BSS to <addr>
2547
Richard Smith78e23fd2017-04-13 22:39:49 +00002548.. option:: -Ttext<addr>
Richard Smithc5b2e002017-01-27 02:08:37 +00002549
2550Set starting address of BSS to <addr>
2551
2552.. option:: -Wl,<arg>,<arg2>...
2553
2554Pass the comma separated arguments in <arg> to the linker
2555
2556.. option:: -X
2557
2558.. option:: -Xlinker <arg>, --for-linker <arg>, --for-linker=<arg>
2559
2560Pass <arg> to the linker
2561
2562.. program:: clang1
2563.. option:: -Z
2564.. program:: clang
2565
2566.. option:: -e<arg>, --entry
2567
2568.. option:: -filelist <arg>
2569
2570.. option:: -l<arg>
2571
2572.. option:: -r
2573
2574.. option:: -rpath <arg>
2575
2576.. option:: -s
2577
2578.. option:: -t
2579
2580.. option:: -u<arg>, --force-link <arg>, --force-link=<arg>
2581
2582.. option:: -undef
2583
2584undef all system defines
2585
2586.. option:: -undefined<arg>, --no-undefined
2587
2588.. option:: -z <arg>
2589
2590Pass -z <arg> to the linker
2591