blob: 0e055c16802a52d4aee69713de3960cd3ae24eb4 [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 Smith081ad4d2017-01-24 19:39:46 +0000201.. option:: --gcc-toolchain=<arg>, -gcc-toolchain <arg>
202
203Use the gcc toolchain at the given directory
204
Richard Smith081ad4d2017-01-24 19:39:46 +0000205.. option:: -gcodeview
206
207Generate CodeView debug information
208
Richard Smith081ad4d2017-01-24 19:39:46 +0000209.. option:: -headerpad\_max\_install\_names<arg>
210
Richard Smith081ad4d2017-01-24 19:39:46 +0000211.. option:: -help, --help
212
213Display available options
214
Richard Smith081ad4d2017-01-24 19:39:46 +0000215.. option:: --help-hidden
216
Richard Smith081ad4d2017-01-24 19:39:46 +0000217.. option:: -image\_base <arg>
218
Richard Smith081ad4d2017-01-24 19:39:46 +0000219.. option:: -index-header-map
220
221Make the next included directory (-I or -F) an indexer header map
222
Richard Smith081ad4d2017-01-24 19:39:46 +0000223.. option:: -init <arg>
224
Richard Smith081ad4d2017-01-24 19:39:46 +0000225.. option:: -install\_name <arg>
226
Richard Smith081ad4d2017-01-24 19:39:46 +0000227.. option:: -keep\_private\_externs
228
Richard Smith081ad4d2017-01-24 19:39:46 +0000229.. option:: -lazy\_framework <arg>
230
Richard Smithb2c82a62017-01-27 01:54:42 +0000231.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000232.. option:: -lazy\_library <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000233.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000234
Richard Smith081ad4d2017-01-24 19:39:46 +0000235.. option:: -mbig-endian, -EB
236
Richard Smith081ad4d2017-01-24 19:39:46 +0000237.. option:: --migrate
238
239Run the migrator
240
Richard Smith081ad4d2017-01-24 19:39:46 +0000241.. option:: -mlinker-version=<arg>
242
Richard Smith081ad4d2017-01-24 19:39:46 +0000243.. option:: -mlittle-endian, -EL
244
Richard Smith081ad4d2017-01-24 19:39:46 +0000245.. option:: -mllvm <arg>
246
247Additional arguments to forward to LLVM's option processing
248
Richard Smith081ad4d2017-01-24 19:39:46 +0000249.. option:: -module-dependency-dir <arg>
250
251Directory to dump module dependencies to
252
Richard Smith081ad4d2017-01-24 19:39:46 +0000253.. option:: -multi\_module
254
Richard Smith081ad4d2017-01-24 19:39:46 +0000255.. option:: -multiply\_defined <arg>
256
Richard Smithb2c82a62017-01-27 01:54:42 +0000257.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000258.. option:: -multiply\_defined\_unused <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000259.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000260
Richard Smith081ad4d2017-01-24 19:39:46 +0000261.. option:: --no-cuda-version-check
262
263Don't error out if the detected version of the CUDA install is too low for the requested CUDA gpu architecture.
264
Richard Smith081ad4d2017-01-24 19:39:46 +0000265.. option:: -no-integrated-cpp, --no-integrated-cpp
266
Richard Smith081ad4d2017-01-24 19:39:46 +0000267.. option:: -no\_dead\_strip\_inits\_and\_terms
268
Richard Smith081ad4d2017-01-24 19:39:46 +0000269.. option:: -nobuiltininc
270
271Disable builtin #include directories
272
Richard Smith081ad4d2017-01-24 19:39:46 +0000273.. option:: -nocudainc
274
Richard Smith081ad4d2017-01-24 19:39:46 +0000275.. option:: -nocudalib
276
Richard Smith081ad4d2017-01-24 19:39:46 +0000277.. option:: -nodefaultlibs
278
Richard Smith081ad4d2017-01-24 19:39:46 +0000279.. option:: -nofixprebinding
280
Richard Smith081ad4d2017-01-24 19:39:46 +0000281.. option:: -nolibc
282
Richard Smith081ad4d2017-01-24 19:39:46 +0000283.. option:: -nomultidefs
284
Richard Smith081ad4d2017-01-24 19:39:46 +0000285.. option:: -nopie
286
Richard Smith081ad4d2017-01-24 19:39:46 +0000287.. option:: -noprebind
288
Richard Smith081ad4d2017-01-24 19:39:46 +0000289.. option:: -noseglinkedit
290
Richard Smith081ad4d2017-01-24 19:39:46 +0000291.. option:: -nostartfiles
292
Richard Smith081ad4d2017-01-24 19:39:46 +0000293.. option:: -nostdinc, --no-standard-includes
294
Richard Smithb2c82a62017-01-27 01:54:42 +0000295.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000296.. option:: -nostdinc++
Richard Smithb2c82a62017-01-27 01:54:42 +0000297.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000298
299Disable standard #include directories for the C++ standard library
300
Richard Smith081ad4d2017-01-24 19:39:46 +0000301.. option:: -nostdlib, --no-standard-libraries
302
Richard Smith081ad4d2017-01-24 19:39:46 +0000303.. option:: -nostdlibinc
304
Richard Smith081ad4d2017-01-24 19:39:46 +0000305.. option:: -o<file>, --output <arg>, --output=<arg>
306
307Write output to <file>
308
Richard Smith081ad4d2017-01-24 19:39:46 +0000309.. option:: -objcmt-atomic-property
310
311Make migration to 'atomic' properties
312
Richard Smith081ad4d2017-01-24 19:39:46 +0000313.. option:: -objcmt-migrate-all
314
315Enable migration to modern ObjC
316
Richard Smith081ad4d2017-01-24 19:39:46 +0000317.. option:: -objcmt-migrate-annotation
318
319Enable migration to property and method annotations
320
Richard Smith081ad4d2017-01-24 19:39:46 +0000321.. option:: -objcmt-migrate-designated-init
322
323Enable migration to infer NS\_DESIGNATED\_INITIALIZER for initializer methods
324
Richard Smith081ad4d2017-01-24 19:39:46 +0000325.. option:: -objcmt-migrate-instancetype
326
327Enable migration to infer instancetype for method result type
328
Richard Smith081ad4d2017-01-24 19:39:46 +0000329.. option:: -objcmt-migrate-literals
330
331Enable migration to modern ObjC literals
332
Richard Smith081ad4d2017-01-24 19:39:46 +0000333.. option:: -objcmt-migrate-ns-macros
334
335Enable migration to NS\_ENUM/NS\_OPTIONS macros
336
Richard Smith081ad4d2017-01-24 19:39:46 +0000337.. option:: -objcmt-migrate-property
338
339Enable migration to modern ObjC property
340
Richard Smith081ad4d2017-01-24 19:39:46 +0000341.. option:: -objcmt-migrate-property-dot-syntax
342
343Enable migration of setter/getter messages to property-dot syntax
344
Richard Smith081ad4d2017-01-24 19:39:46 +0000345.. option:: -objcmt-migrate-protocol-conformance
346
347Enable migration to add protocol conformance on classes
348
Richard Smith081ad4d2017-01-24 19:39:46 +0000349.. option:: -objcmt-migrate-readonly-property
350
351Enable migration to modern ObjC readonly property
352
Richard Smith081ad4d2017-01-24 19:39:46 +0000353.. option:: -objcmt-migrate-readwrite-property
354
355Enable migration to modern ObjC readwrite property
356
Richard Smith081ad4d2017-01-24 19:39:46 +0000357.. option:: -objcmt-migrate-subscripting
358
359Enable migration to modern ObjC subscripting
360
Richard Smith081ad4d2017-01-24 19:39:46 +0000361.. option:: -objcmt-ns-nonatomic-iosonly
362
363Enable migration to use NS\_NONATOMIC\_IOSONLY macro for setting property's 'atomic' attribute
364
Richard Smith081ad4d2017-01-24 19:39:46 +0000365.. option:: -objcmt-returns-innerpointer-property
366
367Enable migration to annotate property with NS\_RETURNS\_INNER\_POINTER
368
Richard Smith081ad4d2017-01-24 19:39:46 +0000369.. option:: -objcmt-whitelist-dir-path=<arg>, -objcmt-white-list-dir-path=<arg>
370
371Only modify files with a filename contained in the provided directory path
372
Richard Smith081ad4d2017-01-24 19:39:46 +0000373.. option:: -object
374
Richard Smith081ad4d2017-01-24 19:39:46 +0000375.. option:: -p, --profile
376
Richard Smith081ad4d2017-01-24 19:39:46 +0000377.. option:: -pagezero\_size<arg>
378
Richard Smith081ad4d2017-01-24 19:39:46 +0000379.. option:: -pg
380
381Enable mcount instrumentation
382
Richard Smith081ad4d2017-01-24 19:39:46 +0000383.. option:: -pie
384
Richard Smith081ad4d2017-01-24 19:39:46 +0000385.. option:: -pipe, --pipe
386
387Use pipes between commands, when possible
388
Richard Smith081ad4d2017-01-24 19:39:46 +0000389.. option:: -prebind
390
Richard Smithb2c82a62017-01-27 01:54:42 +0000391.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000392.. option:: -prebind\_all\_twolevel\_modules
Richard Smithb2c82a62017-01-27 01:54:42 +0000393.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000394
Richard Smith081ad4d2017-01-24 19:39:46 +0000395.. option:: -preload
396
Richard Smith081ad4d2017-01-24 19:39:46 +0000397.. option:: --print-diagnostic-categories
398
Richard Smith081ad4d2017-01-24 19:39:46 +0000399.. option:: -print-file-name=<file>, --print-file-name=<file>, --print-file-name <arg>
400
401Print the full library path of <file>
402
Richard Smith081ad4d2017-01-24 19:39:46 +0000403.. option:: -print-ivar-layout
404
405Enable Objective-C Ivar layout bitmap print trace
406
Richard Smith081ad4d2017-01-24 19:39:46 +0000407.. option:: -print-libgcc-file-name, --print-libgcc-file-name
408
409Print the library path for the currently used compiler runtime library ("libgcc.a" or "libclang\_rt.builtins.\*.a")
410
Richard Smith081ad4d2017-01-24 19:39:46 +0000411.. option:: -print-multi-directory, --print-multi-directory
412
Richard Smith081ad4d2017-01-24 19:39:46 +0000413.. option:: -print-multi-lib, --print-multi-lib
414
Richard Smith081ad4d2017-01-24 19:39:46 +0000415.. option:: -print-prog-name=<name>, --print-prog-name=<name>, --print-prog-name <arg>
416
417Print the full program path of <name>
418
Richard Smith081ad4d2017-01-24 19:39:46 +0000419.. option:: -print-search-dirs, --print-search-dirs
420
421Print the paths used for finding libraries and programs
422
Richard Smith081ad4d2017-01-24 19:39:46 +0000423.. option:: -private\_bundle
424
Richard Smith081ad4d2017-01-24 19:39:46 +0000425.. option:: -pthread, -no-pthread
426
427Support POSIX threads in generated code
428
Richard Smith081ad4d2017-01-24 19:39:46 +0000429.. option:: -pthreads
430
Richard Smith081ad4d2017-01-24 19:39:46 +0000431.. option:: -rdynamic
432
Richard Smith081ad4d2017-01-24 19:39:46 +0000433.. option:: -read\_only\_relocs <arg>
434
Richard Smith081ad4d2017-01-24 19:39:46 +0000435.. option:: -relocatable-pch, --relocatable-pch
436
437Whether to build a relocatable precompiled header
438
Richard Smith081ad4d2017-01-24 19:39:46 +0000439.. option:: -remap
440
Richard Smith081ad4d2017-01-24 19:39:46 +0000441.. option:: -rewrite-legacy-objc
442
443Rewrite Legacy Objective-C source to C++
444
Richard Smith081ad4d2017-01-24 19:39:46 +0000445.. option:: -rtlib=<arg>, --rtlib=<arg>, --rtlib <arg>
446
447Compiler runtime library to use
448
Richard Smith081ad4d2017-01-24 19:39:46 +0000449.. option:: -save-stats=<arg>, --save-stats=<arg>, -save-stats (equivalent to -save-stats=cwd), --save-stats (equivalent to -save-stats=cwd)
450
451Save llvm statistics.
452
Richard Smith081ad4d2017-01-24 19:39:46 +0000453.. option:: -save-temps=<arg>, --save-temps=<arg>, -save-temps (equivalent to -save-temps=cwd), --save-temps (equivalent to -save-temps=cwd)
454
455Save intermediate compilation results.
456
Richard Smith081ad4d2017-01-24 19:39:46 +0000457.. option:: -sectalign <arg1> <arg2> <arg3>
458
Richard Smith081ad4d2017-01-24 19:39:46 +0000459.. option:: -sectcreate <arg1> <arg2> <arg3>
460
Richard Smith081ad4d2017-01-24 19:39:46 +0000461.. option:: -sectobjectsymbols <arg1> <arg2>
462
Richard Smith081ad4d2017-01-24 19:39:46 +0000463.. option:: -sectorder <arg1> <arg2> <arg3>
464
Richard Smith081ad4d2017-01-24 19:39:46 +0000465.. option:: -seg1addr<arg>
466
Richard Smith081ad4d2017-01-24 19:39:46 +0000467.. option:: -seg\_addr\_table <arg>
468
Richard Smithb2c82a62017-01-27 01:54:42 +0000469.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000470.. option:: -seg\_addr\_table\_filename <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000471.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000472
Richard Smith081ad4d2017-01-24 19:39:46 +0000473.. option:: -segaddr <arg1> <arg2>
474
Richard Smith081ad4d2017-01-24 19:39:46 +0000475.. option:: -segcreate <arg1> <arg2> <arg3>
476
Richard Smith081ad4d2017-01-24 19:39:46 +0000477.. option:: -seglinkedit
478
Richard Smith081ad4d2017-01-24 19:39:46 +0000479.. option:: -segprot <arg1> <arg2> <arg3>
480
Richard Smith081ad4d2017-01-24 19:39:46 +0000481.. option:: -segs\_read\_<arg>
482
Richard Smithb2c82a62017-01-27 01:54:42 +0000483.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000484.. option:: -segs\_read\_only\_addr <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000485.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000486
Richard Smithb2c82a62017-01-27 01:54:42 +0000487.. program:: clang2
Richard Smith081ad4d2017-01-24 19:39:46 +0000488.. option:: -segs\_read\_write\_addr <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000489.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000490
Richard Smith081ad4d2017-01-24 19:39:46 +0000491.. option:: -serialize-diagnostics <arg>, --serialize-diagnostics <arg>
492
493Serialize compiler diagnostics to a file
494
Richard Smith081ad4d2017-01-24 19:39:46 +0000495.. option:: -shared, --shared
496
Richard Smith081ad4d2017-01-24 19:39:46 +0000497.. option:: -shared-libasan
498
Richard Smith081ad4d2017-01-24 19:39:46 +0000499.. option:: -shared-libgcc
500
Richard Smith081ad4d2017-01-24 19:39:46 +0000501.. option:: -single\_module
502
Richard Smith081ad4d2017-01-24 19:39:46 +0000503.. option:: -specs=<arg>, --specs=<arg>
504
Richard Smith081ad4d2017-01-24 19:39:46 +0000505.. option:: -static, --static
506
Richard Smith081ad4d2017-01-24 19:39:46 +0000507.. option:: -static-libgcc
508
Richard Smith081ad4d2017-01-24 19:39:46 +0000509.. option:: -static-libstdc++
510
Richard Smith081ad4d2017-01-24 19:39:46 +0000511.. option:: -std-default=<arg>
512
Richard Smith081ad4d2017-01-24 19:39:46 +0000513.. option:: -stdlib=<arg>, --stdlib=<arg>, --stdlib <arg>
514
515C++ standard library to use
516
Richard Smith081ad4d2017-01-24 19:39:46 +0000517.. option:: -sub\_library<arg>
518
Richard Smithb2c82a62017-01-27 01:54:42 +0000519.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000520.. option:: -sub\_umbrella<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000521.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000522
Richard Smith081ad4d2017-01-24 19:39:46 +0000523.. option:: --sysroot=<arg>, --sysroot <arg>
524
Richard Smith081ad4d2017-01-24 19:39:46 +0000525.. option:: --target-help
526
Richard Smith081ad4d2017-01-24 19:39:46 +0000527.. option:: --target=<arg>, -target <arg>
528
529Generate code for the given target
530
Richard Smith081ad4d2017-01-24 19:39:46 +0000531.. option:: -time
532
533Time individual commands
534
Richard Smith081ad4d2017-01-24 19:39:46 +0000535.. option:: -traditional, --traditional
536
Richard Smith081ad4d2017-01-24 19:39:46 +0000537.. option:: -traditional-cpp, --traditional-cpp
538
539Enable some traditional CPP emulation
540
Richard Smith081ad4d2017-01-24 19:39:46 +0000541.. option:: -twolevel\_namespace
542
Richard Smithb2c82a62017-01-27 01:54:42 +0000543.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000544.. option:: -twolevel\_namespace\_hints
Richard Smithb2c82a62017-01-27 01:54:42 +0000545.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000546
Richard Smith081ad4d2017-01-24 19:39:46 +0000547.. option:: -umbrella <arg>
548
Richard Smith081ad4d2017-01-24 19:39:46 +0000549.. option:: -unexported\_symbols\_list <arg>
550
Richard Smith081ad4d2017-01-24 19:39:46 +0000551.. option:: -v, --verbose
552
553Show commands to run and use verbose output
554
Richard Smith081ad4d2017-01-24 19:39:46 +0000555.. option:: --verify-debug-info
556
557Verify the binary representation of debug output
558
Richard Smith081ad4d2017-01-24 19:39:46 +0000559.. option:: --version
560
Richard Smith081ad4d2017-01-24 19:39:46 +0000561.. option:: -w, --no-warnings
562
563Suppress all warnings
564
Richard Smith081ad4d2017-01-24 19:39:46 +0000565.. option:: -weak-l<arg>
566
Richard Smith081ad4d2017-01-24 19:39:46 +0000567.. option:: -weak\_framework <arg>
568
Richard Smithb2c82a62017-01-27 01:54:42 +0000569.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000570.. option:: -weak\_library <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000571.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000572
Richard Smithb2c82a62017-01-27 01:54:42 +0000573.. program:: clang2
Richard Smith081ad4d2017-01-24 19:39:46 +0000574.. option:: -weak\_reference\_mismatches <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000575.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000576
Richard Smith081ad4d2017-01-24 19:39:46 +0000577.. option:: -whatsloaded
578
Richard Smith081ad4d2017-01-24 19:39:46 +0000579.. option:: -whyload
580
Richard Smith081ad4d2017-01-24 19:39:46 +0000581.. option:: -working-directory<arg>, -working-directory=<arg>
582
583Resolve file paths relative to the specified directory
584
Richard Smith081ad4d2017-01-24 19:39:46 +0000585.. option:: -x<language>, --language <arg>, --language=<arg>
586
587Treat subsequent input files as having type <language>
588
Richard Smith081ad4d2017-01-24 19:39:46 +0000589.. option:: -y<arg>
590
591Actions
592=======
593The action to perform on the input.
594
Richard Smith081ad4d2017-01-24 19:39:46 +0000595.. option:: -E, --preprocess
596
597Only run the preprocessor
598
Richard Smith081ad4d2017-01-24 19:39:46 +0000599.. option:: -S, --assemble
600
601Only run preprocess and compilation steps
602
Richard Smithc5b2e002017-01-27 02:08:37 +0000603.. option:: -c, --compile
604
605Only run preprocess, compile, and assemble steps
606
Richard Smith081ad4d2017-01-24 19:39:46 +0000607.. option:: -emit-llvm
608
609Use the LLVM representation for assembler and object files
610
Richard Smith081ad4d2017-01-24 19:39:46 +0000611.. option:: -fsyntax-only
612
Richard Smith081ad4d2017-01-24 19:39:46 +0000613.. option:: -module-file-info
614
615Provide information about a particular module file
616
Richard Smith081ad4d2017-01-24 19:39:46 +0000617.. option:: --precompile
618
619Only precompile the input
620
Richard Smith081ad4d2017-01-24 19:39:46 +0000621.. option:: -rewrite-objc
622
623Rewrite Objective-C source to C++
624
Richard Smith081ad4d2017-01-24 19:39:46 +0000625.. option:: -verify-pch
626
627Load and verify that a pre-compiled header file is not stale
628
629Compilation flags
630=================
631
632Flags controlling the behavior of Clang during compilation. These flags have
633no effect during actions that do not perform compilation.
634
Richard Smithc5b2e002017-01-27 02:08:37 +0000635.. option:: -Xassembler <arg>
Richard Smith081ad4d2017-01-24 19:39:46 +0000636
Richard Smithc5b2e002017-01-27 02:08:37 +0000637Pass <arg> to the assembler
Richard Smith081ad4d2017-01-24 19:39:46 +0000638
Richard Smith081ad4d2017-01-24 19:39:46 +0000639.. option:: -Xclang <arg>
640
641Pass <arg> to the clang compiler
642
Richard Smith081ad4d2017-01-24 19:39:46 +0000643.. option:: -fcomment-block-commands=<arg>,<arg2>...
644
645Treat each comma separated argument in <arg> as a documentation comment block command
646
Richard Smith081ad4d2017-01-24 19:39:46 +0000647.. option:: -fdeclspec, -fno-declspec
648
649Allow \_\_declspec as a keyword
650
Richard Smith081ad4d2017-01-24 19:39:46 +0000651.. option:: -fdepfile-entry=<arg>
652
Richard Smith081ad4d2017-01-24 19:39:46 +0000653.. option:: -fdiagnostics-fixit-info, -fno-diagnostics-fixit-info
654
Richard Smith081ad4d2017-01-24 19:39:46 +0000655.. option:: -fdiagnostics-format=<arg>
656
Richard Smith081ad4d2017-01-24 19:39:46 +0000657.. option:: -fdiagnostics-parseable-fixits
658
659Print fix-its in machine parseable form
660
Richard Smith081ad4d2017-01-24 19:39:46 +0000661.. option:: -fdiagnostics-print-source-range-info
662
663Print source range spans in numeric form
664
Richard Smith081ad4d2017-01-24 19:39:46 +0000665.. option:: -fdiagnostics-show-category=<arg>
666
Richard Smith081ad4d2017-01-24 19:39:46 +0000667.. option:: -fexperimental-new-pass-manager, -fno-experimental-new-pass-manager
668
669Enables an experimental new pass manager in LLVM.
670
Richard Smith081ad4d2017-01-24 19:39:46 +0000671.. option:: -finline-functions, -fno-inline-functions
672
673Inline suitable functions
674
Richard Smith081ad4d2017-01-24 19:39:46 +0000675.. option:: -finline-hint-functions
676
677Inline functions which are (explicitly or implicitly) marked inline
678
Richard Smith081ad4d2017-01-24 19:39:46 +0000679.. option:: -fno-crash-diagnostics
680
Richard Smith081ad4d2017-01-24 19:39:46 +0000681.. option:: -fno-sanitize-blacklist
682
683Don't use blacklist file for sanitizers
684
Richard Smith081ad4d2017-01-24 19:39:46 +0000685.. option:: -fparse-all-comments
686
Richard Smith081ad4d2017-01-24 19:39:46 +0000687.. option:: -fsanitize-address-field-padding=<arg>
688
689Level of field padding for AddressSanitizer
690
Richard Smith081ad4d2017-01-24 19:39:46 +0000691.. option:: -fsanitize-address-use-after-scope, -fno-sanitize-address-use-after-scope
692
693Enable use-after-scope detection in AddressSanitizer
694
Richard Smith081ad4d2017-01-24 19:39:46 +0000695.. option:: -fsanitize-blacklist=<arg>
696
697Path to blacklist file for sanitizers
698
Richard Smith081ad4d2017-01-24 19:39:46 +0000699.. option:: -fsanitize-cfi-cross-dso, -fno-sanitize-cfi-cross-dso
700
701Enable control flow integrity (CFI) checks for cross-DSO calls.
702
Richard Smith081ad4d2017-01-24 19:39:46 +0000703.. option:: -fsanitize-coverage=<arg1>,<arg2>..., -fno-sanitize-coverage=<arg1>,<arg2>...
704
705Specify the type of coverage instrumentation for Sanitizers
706
Richard Smith081ad4d2017-01-24 19:39:46 +0000707.. option:: -fsanitize-link-c++-runtime
708
Richard Smith081ad4d2017-01-24 19:39:46 +0000709.. option:: -fsanitize-memory-track-origins, -fno-sanitize-memory-track-origins
710
711Enable origins tracking in MemorySanitizer
712
Richard Smithb2c82a62017-01-27 01:54:42 +0000713.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000714.. option:: -fsanitize-memory-track-origins=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000715.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000716
717Enable origins tracking in MemorySanitizer
718
Richard Smith081ad4d2017-01-24 19:39:46 +0000719.. option:: -fsanitize-memory-use-after-dtor
720
721Enable use-after-destroy detection in MemorySanitizer
722
Richard Smith081ad4d2017-01-24 19:39:46 +0000723.. option:: -fsanitize-recover, -fno-sanitize-recover
724
Richard Smithb2c82a62017-01-27 01:54:42 +0000725.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000726.. option:: -fsanitize-recover=<arg1>,<arg2>..., -fno-sanitize-recover=<arg1>,<arg2>...
Richard Smithb2c82a62017-01-27 01:54:42 +0000727.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000728
729Enable recovery for specified sanitizers
730
Richard Smith081ad4d2017-01-24 19:39:46 +0000731.. option:: -fsanitize-stats, -fno-sanitize-stats
732
733Enable sanitizer statistics gathering.
734
Richard Smith081ad4d2017-01-24 19:39:46 +0000735.. option:: -fsanitize-thread-atomics, -fno-sanitize-thread-atomics
736
737Enable atomic operations instrumentation in ThreadSanitizer (default)
738
Richard Smith081ad4d2017-01-24 19:39:46 +0000739.. option:: -fsanitize-thread-func-entry-exit, -fno-sanitize-thread-func-entry-exit
740
741Enable function entry/exit instrumentation in ThreadSanitizer (default)
742
Richard Smith081ad4d2017-01-24 19:39:46 +0000743.. option:: -fsanitize-thread-memory-access, -fno-sanitize-thread-memory-access
744
745Enable memory access instrumentation in ThreadSanitizer (default)
746
Richard Smith081ad4d2017-01-24 19:39:46 +0000747.. option:: -fsanitize-trap=<arg1>,<arg2>..., -fno-sanitize-trap=<arg1>,<arg2>...
748
749Enable trapping for specified sanitizers
750
Richard Smith081ad4d2017-01-24 19:39:46 +0000751.. option:: -fsanitize-undefined-strip-path-components=<number>
752
753Strip (or keep only, if negative) a given number of path components when emitting check metadata.
754
Richard Smith081ad4d2017-01-24 19:39:46 +0000755.. option:: -fsanitize-undefined-trap-on-error, -fno-sanitize-undefined-trap-on-error
756
Richard Smith081ad4d2017-01-24 19:39:46 +0000757.. option:: -fsanitize=<check>,<arg2>..., -fno-sanitize=<arg1>,<arg2>...
758
759Turn on runtime checks for various forms of undefined or suspicious behavior. See user manual for available checks
760
Richard Smith081ad4d2017-01-24 19:39:46 +0000761.. option:: --param <arg>, --param=<arg>
762
Richard Smith081ad4d2017-01-24 19:39:46 +0000763.. option:: -std=<arg>, --std=<arg>, --std <arg>
764
765Language standard to compile for
766
Richard Smithc5b2e002017-01-27 02:08:37 +0000767Preprocessor flags
768~~~~~~~~~~~~~~~~~~
769
770Flags controlling the behavior of the Clang preprocessor.
771
772.. option:: -C, --comments
773
774Include comments in preprocessed output
775
776.. option:: -CC, --comments-in-macros
777
778Include comments from within macros in preprocessed output
779
780.. option:: -D<macro>=<value>, --define-macro <arg>, --define-macro=<arg>
781
782Define <macro> to <value> (or 1 if <value> omitted)
783
784.. option:: -H, --trace-includes
785
786Show header includes and nesting depth
787
788.. option:: -P, --no-line-commands
789
790Disable linemarker output in -E mode
791
792.. option:: -U<macro>, --undefine-macro <arg>, --undefine-macro=<arg>
793
794Undefine macro <macro>
795
796.. option:: -Wp,<arg>,<arg2>...
797
798Pass the comma separated arguments in <arg> to the preprocessor
799
800.. option:: -Xpreprocessor <arg>
801
802Pass <arg> to the preprocessor
803
Richard Smith081ad4d2017-01-24 19:39:46 +0000804Include path management
Richard Smithc5b2e002017-01-27 02:08:37 +0000805-----------------------
Richard Smith081ad4d2017-01-24 19:39:46 +0000806
807Flags controlling how ``#include``\s are resolved to files.
808
Richard Smithc5b2e002017-01-27 02:08:37 +0000809.. option:: -I<dir>, --include-directory <arg>, --include-directory=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +0000810
811Add directory to include search path
812
Richard Smith081ad4d2017-01-24 19:39:46 +0000813.. option:: -I-, --include-barrier
814
Richard Smithc5b2e002017-01-27 02:08:37 +0000815Restrict all prior -I flags to double-quoted inclusion and remove current directory from include path
816
Richard Smith081ad4d2017-01-24 19:39:46 +0000817.. option:: --cuda-path=<arg>
818
819CUDA installation path
820
Richard Smith081ad4d2017-01-24 19:39:46 +0000821.. option:: -cxx-isystem<directory>
822
823Add directory to the C++ SYSTEM include search path
824
Richard Smith081ad4d2017-01-24 19:39:46 +0000825.. option:: -fbuild-session-file=<file>
826
827Use the last modification time of <file> as the build session timestamp
828
Richard Smith081ad4d2017-01-24 19:39:46 +0000829.. option:: -fbuild-session-timestamp=<time since Epoch in seconds>
830
831Time when the current build session started
832
Richard Smith081ad4d2017-01-24 19:39:46 +0000833.. option:: -fmodules-cache-path=<directory>
834
835Specify the module cache path
836
Richard Smith081ad4d2017-01-24 19:39:46 +0000837.. option:: -fmodules-disable-diagnostic-validation
838
839Disable validation of the diagnostic options when loading the module
840
Richard Smith081ad4d2017-01-24 19:39:46 +0000841.. option:: -fmodules-prune-after=<seconds>
842
843Specify the interval (in seconds) after which a module file will be considered unused
844
Richard Smith081ad4d2017-01-24 19:39:46 +0000845.. option:: -fmodules-prune-interval=<seconds>
846
847Specify the interval (in seconds) between attempts to prune the module cache
848
Richard Smith081ad4d2017-01-24 19:39:46 +0000849.. option:: -fmodules-user-build-path <directory>
850
851Specify the module user build path
852
Richard Smith081ad4d2017-01-24 19:39:46 +0000853.. option:: -fmodules-validate-once-per-build-session
854
855Don't verify input files for the modules if the module has been successfully validated or loaded during this build session
856
Richard Smith081ad4d2017-01-24 19:39:46 +0000857.. option:: -fmodules-validate-system-headers
858
859Validate the system headers that a module depends on when loading the module
860
Richard Smith081ad4d2017-01-24 19:39:46 +0000861.. option:: -fprebuilt-module-path=<directory>
862
863Specify the prebuilt module path
864
Richard Smith081ad4d2017-01-24 19:39:46 +0000865.. option:: -i<arg>
866
Richard Smith081ad4d2017-01-24 19:39:46 +0000867.. option:: -idirafter<arg>, --include-directory-after <arg>, --include-directory-after=<arg>
868
869Add directory to AFTER include search path
870
Richard Smith081ad4d2017-01-24 19:39:46 +0000871.. option:: -iframework<arg>
872
873Add directory to SYSTEM framework search path
874
Richard Smith081ad4d2017-01-24 19:39:46 +0000875.. option:: -imacros<file>, --imacros<file>, --imacros=<arg>
876
877Include macros from file before parsing
878
Richard Smith081ad4d2017-01-24 19:39:46 +0000879.. option:: -include<file>, --include<file>, --include=<arg>
880
881Include file before parsing
882
Richard Smith081ad4d2017-01-24 19:39:46 +0000883.. option:: -include-pch <file>
884
885Include precompiled header file
886
Richard Smith081ad4d2017-01-24 19:39:46 +0000887.. option:: -iprefix<dir>, --include-prefix <arg>, --include-prefix=<arg>
888
889Set the -iwithprefix/-iwithprefixbefore prefix
890
Richard Smith081ad4d2017-01-24 19:39:46 +0000891.. option:: -iquote<directory>
892
893Add directory to QUOTE include search path
894
Richard Smith081ad4d2017-01-24 19:39:46 +0000895.. option:: -isysroot<dir>
896
897Set the system root directory (usually /)
898
Richard Smith081ad4d2017-01-24 19:39:46 +0000899.. option:: -isystem<directory>
900
901Add directory to SYSTEM include search path
902
Richard Smith081ad4d2017-01-24 19:39:46 +0000903.. option:: -isystem-after<directory>
904
905Add directory to end of the SYSTEM include search path
906
Richard Smith081ad4d2017-01-24 19:39:46 +0000907.. option:: -ivfsoverlay<arg>
908
909Overlay the virtual filesystem described by file over the real file system
910
Richard Smith081ad4d2017-01-24 19:39:46 +0000911.. option:: -iwithprefix<dir>, --include-with-prefix <arg>, --include-with-prefix-after <arg>, --include-with-prefix-after=<arg>, --include-with-prefix=<arg>
912
913Set directory to SYSTEM include search path with prefix
914
Richard Smith081ad4d2017-01-24 19:39:46 +0000915.. option:: -iwithprefixbefore<dir>, --include-with-prefix-before <arg>, --include-with-prefix-before=<arg>
916
917Set directory to include search path with prefix
918
Richard Smith081ad4d2017-01-24 19:39:46 +0000919.. option:: -iwithsysroot<directory>
920
921Add directory to SYSTEM include search path, absolute paths are relative to -isysroot
922
Richard Smith081ad4d2017-01-24 19:39:46 +0000923.. option:: --ptxas-path=<arg>
924
925Path to ptxas (used for compiling CUDA code)
926
Richard Smith081ad4d2017-01-24 19:39:46 +0000927.. option:: --system-header-prefix=<prefix>, --no-system-header-prefix=<prefix>, --system-header-prefix <arg>
928
929Treat all #include paths starting with <prefix> as including a system header.
930
931Dependency file generation
Richard Smithc5b2e002017-01-27 02:08:37 +0000932--------------------------
Richard Smith081ad4d2017-01-24 19:39:46 +0000933
934Flags controlling generation of a dependency file for ``make``-like build
935systems.
936
Richard Smith081ad4d2017-01-24 19:39:46 +0000937.. option:: -M, --dependencies
938
939Like -MD, but also implies -E and writes to stdout by default
940
Richard Smith081ad4d2017-01-24 19:39:46 +0000941.. option:: -MD, --write-dependencies
942
943Write a depfile containing user and system headers
944
Richard Smith081ad4d2017-01-24 19:39:46 +0000945.. option:: -MF<file>
946
947Write depfile output from -MMD, -MD, -MM, or -M to <file>
948
Richard Smith081ad4d2017-01-24 19:39:46 +0000949.. option:: -MG, --print-missing-file-dependencies
950
951Add missing headers to depfile
952
Richard Smith081ad4d2017-01-24 19:39:46 +0000953.. option:: -MJ<arg>
954
955Write a compilation database entry per input
956
Richard Smith081ad4d2017-01-24 19:39:46 +0000957.. option:: -MM, --user-dependencies
958
959Like -MMD, but also implies -E and writes to stdout by default
960
Richard Smith081ad4d2017-01-24 19:39:46 +0000961.. option:: -MMD, --write-user-dependencies
962
963Write a depfile containing user headers
964
Richard Smith081ad4d2017-01-24 19:39:46 +0000965.. option:: -MP
966
967Create phony target for each dependency (other than main file)
968
Richard Smith081ad4d2017-01-24 19:39:46 +0000969.. option:: -MQ<arg>
970
971Specify name of main file output to quote in depfile
972
Richard Smith081ad4d2017-01-24 19:39:46 +0000973.. option:: -MT<arg>
974
975Specify name of main file output in depfile
976
Richard Smith081ad4d2017-01-24 19:39:46 +0000977.. option:: -MV
978
979Use NMake/Jom format for the depfile
980
981Dumping preprocessor state
Richard Smithc5b2e002017-01-27 02:08:37 +0000982--------------------------
Richard Smith081ad4d2017-01-24 19:39:46 +0000983
984Flags allowing the state of the preprocessor to be dumped in various ways.
985
Richard Smith081ad4d2017-01-24 19:39:46 +0000986.. option:: -d
987
Richard Smithb2c82a62017-01-27 01:54:42 +0000988.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000989.. option:: -d<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000990.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000991
Richard Smith081ad4d2017-01-24 19:39:46 +0000992.. option:: -dA
993
Richard Smith081ad4d2017-01-24 19:39:46 +0000994.. option:: -dD
995
996Print macro definitions in -E mode in addition to normal output
997
Richard Smith081ad4d2017-01-24 19:39:46 +0000998.. option:: -dI
999
1000Print include directives in -E mode in addition to normal output
1001
Richard Smith081ad4d2017-01-24 19:39:46 +00001002.. option:: -dM
1003
1004Print macro definitions in -E mode instead of normal output
1005
1006Diagnostic flags
1007~~~~~~~~~~~~~~~~
1008
1009Flags controlling which warnings, errors, and remarks Clang will generate.
1010See the :doc:`full list of warning and remark flags <DiagnosticsReference>`.
1011
Richard Smith081ad4d2017-01-24 19:39:46 +00001012.. option:: -R<remark>
1013
1014Enable the specified remark
1015
Richard Smith081ad4d2017-01-24 19:39:46 +00001016.. option:: -Rpass-analysis=<arg>
1017
1018Report transformation analysis from optimization passes whose name matches the given POSIX regular expression
1019
Richard Smith081ad4d2017-01-24 19:39:46 +00001020.. option:: -Rpass-missed=<arg>
1021
1022Report missed transformations by optimization passes whose name matches the given POSIX regular expression
1023
Richard Smith081ad4d2017-01-24 19:39:46 +00001024.. option:: -Rpass=<arg>
1025
1026Report transformations performed by optimization passes whose name matches the given POSIX regular expression
1027
Richard Smith081ad4d2017-01-24 19:39:46 +00001028.. option:: -W<warning>, --extra-warnings, --warn-<arg>, --warn-=<arg>
1029
1030Enable the specified warning
1031
Richard Smith081ad4d2017-01-24 19:39:46 +00001032.. option:: -Wdeprecated, -Wno-deprecated
1033
Richard Smithc5b2e002017-01-27 02:08:37 +00001034Enable warnings for deprecated constructs and define \_\_DEPRECATED
Richard Smith081ad4d2017-01-24 19:39:46 +00001035
Richard Smith081ad4d2017-01-24 19:39:46 +00001036.. option:: -Wnonportable-cfstrings<arg>, -Wno-nonportable-cfstrings<arg>
1037
Richard Smith081ad4d2017-01-24 19:39:46 +00001038Target-independent compilation options
1039~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Richard Smith081ad4d2017-01-24 19:39:46 +00001040.. option:: -Wframe-larger-than=<arg>
1041
Richard Smith081ad4d2017-01-24 19:39:46 +00001042.. option:: -fPIC, -fno-PIC
1043
Richard Smith081ad4d2017-01-24 19:39:46 +00001044.. option:: -fPIE, -fno-PIE
1045
Richard Smith081ad4d2017-01-24 19:39:46 +00001046.. option:: -faccess-control, -fno-access-control
1047
Richard Smithb2c82a62017-01-27 01:54:42 +00001048.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001049.. option:: -faligned-allocation, -faligned-new, -fno-aligned-allocation
Richard Smithb2c82a62017-01-27 01:54:42 +00001050.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001051
1052Enable C++17 aligned allocation functions
1053
Richard Smith081ad4d2017-01-24 19:39:46 +00001054.. option:: -fallow-unsupported
1055
Richard Smith081ad4d2017-01-24 19:39:46 +00001056.. option:: -faltivec, -fno-altivec, -maltivec
1057
1058Enable AltiVec vector initializer syntax
1059
Richard Smith081ad4d2017-01-24 19:39:46 +00001060.. option:: -fansi-escape-codes
1061
1062Use ANSI escape codes for diagnostics
1063
Richard Smith081ad4d2017-01-24 19:39:46 +00001064.. option:: -fapple-kext, -findirect-virtual-calls, -fterminated-vtables
1065
1066Use Apple's kernel extensions ABI
1067
Richard Smith081ad4d2017-01-24 19:39:46 +00001068.. option:: -fapple-pragma-pack, -fno-apple-pragma-pack
1069
1070Enable Apple gcc-compatible #pragma pack handling
1071
Richard Smith081ad4d2017-01-24 19:39:46 +00001072.. option:: -fapplication-extension, -fno-application-extension
1073
1074Restrict code to those available for App Extensions
1075
Richard Smith081ad4d2017-01-24 19:39:46 +00001076.. option:: -fasm, -fno-asm
1077
Richard Smith081ad4d2017-01-24 19:39:46 +00001078.. option:: -fasm-blocks, -fno-asm-blocks
1079
Richard Smith081ad4d2017-01-24 19:39:46 +00001080.. option:: -fassociative-math, -fno-associative-math
1081
Richard Smith081ad4d2017-01-24 19:39:46 +00001082.. option:: -fassume-sane-operator-new, -fno-assume-sane-operator-new
1083
Richard Smith081ad4d2017-01-24 19:39:46 +00001084.. option:: -fast
1085
Richard Smith081ad4d2017-01-24 19:39:46 +00001086.. option:: -fastcp
1087
Richard Smith081ad4d2017-01-24 19:39:46 +00001088.. option:: -fastf
1089
Richard Smith081ad4d2017-01-24 19:39:46 +00001090.. option:: -fasynchronous-unwind-tables, -fno-asynchronous-unwind-tables
1091
Richard Smith081ad4d2017-01-24 19:39:46 +00001092.. option:: -fautolink, -fno-autolink
1093
Richard Smith081ad4d2017-01-24 19:39:46 +00001094.. option:: -fblocks, -fno-blocks
1095
1096Enable the 'blocks' language feature
1097
Richard Smith081ad4d2017-01-24 19:39:46 +00001098.. option:: -fbootclasspath=<arg>, --bootclasspath <arg>, --bootclasspath=<arg>
1099
Richard Smith081ad4d2017-01-24 19:39:46 +00001100.. option:: -fborland-extensions, -fno-borland-extensions
1101
1102Accept non-standard constructs supported by the Borland compiler
1103
Richard Smith081ad4d2017-01-24 19:39:46 +00001104.. option:: -fbracket-depth=<arg>
1105
Richard Smith081ad4d2017-01-24 19:39:46 +00001106.. option:: -fbuiltin, -fno-builtin
1107
Richard Smith081ad4d2017-01-24 19:39:46 +00001108.. option:: -fbuiltin-module-map
1109
1110Load the clang builtins module map file.
1111
Richard Smith081ad4d2017-01-24 19:39:46 +00001112.. option:: -fcaret-diagnostics, -fno-caret-diagnostics
1113
Richard Smith081ad4d2017-01-24 19:39:46 +00001114.. option:: -fclasspath=<arg>, --CLASSPATH <arg>, --CLASSPATH=<arg>, --classpath <arg>, --classpath=<arg>
1115
Richard Smith081ad4d2017-01-24 19:39:46 +00001116.. option:: -fcolor-diagnostics, -fno-color-diagnostics
1117
1118Use colors in diagnostics
1119
Richard Smith081ad4d2017-01-24 19:39:46 +00001120.. option:: -fcommon, -fno-common
1121
Richard Smith081ad4d2017-01-24 19:39:46 +00001122.. option:: -fcompile-resource=<arg>, --resource <arg>, --resource=<arg>
1123
Richard Smith081ad4d2017-01-24 19:39:46 +00001124.. option:: -fconstant-cfstrings, -fno-constant-cfstrings
1125
Richard Smith081ad4d2017-01-24 19:39:46 +00001126.. option:: -fconstant-string-class=<arg>
1127
Richard Smith081ad4d2017-01-24 19:39:46 +00001128.. option:: -fconstexpr-backtrace-limit=<arg>
1129
Richard Smith081ad4d2017-01-24 19:39:46 +00001130.. option:: -fconstexpr-depth=<arg>
1131
Richard Smith081ad4d2017-01-24 19:39:46 +00001132.. option:: -fconstexpr-steps=<arg>
1133
Richard Smith081ad4d2017-01-24 19:39:46 +00001134.. option:: -fcoroutines-ts, -fno-coroutines-ts
1135
1136Enable support for the C++ Coroutines TS
1137
Richard Smith081ad4d2017-01-24 19:39:46 +00001138.. option:: -fcoverage-mapping, -fno-coverage-mapping
1139
1140Generate coverage mapping to enable code coverage analysis
1141
Richard Smith081ad4d2017-01-24 19:39:46 +00001142.. option:: -fcreate-profile
1143
Richard Smith081ad4d2017-01-24 19:39:46 +00001144.. option:: -fcxx-exceptions, -fno-cxx-exceptions
1145
1146Enable C++ exceptions
1147
Richard Smith081ad4d2017-01-24 19:39:46 +00001148.. option:: -fcxx-modules, -fno-cxx-modules
1149
Richard Smith081ad4d2017-01-24 19:39:46 +00001150.. option:: -fdata-sections, -fno-data-sections
1151
1152Place each data in its own section (ELF Only)
1153
Richard Smith081ad4d2017-01-24 19:39:46 +00001154.. option:: -fdebug-info-for-profiling, -fno-debug-info-for-profiling
1155
1156Emit extra debug info to make sample profile more accurate.
1157
Richard Smith081ad4d2017-01-24 19:39:46 +00001158.. option:: -fdebug-pass-arguments
1159
Richard Smith081ad4d2017-01-24 19:39:46 +00001160.. option:: -fdebug-pass-structure
1161
Richard Smith081ad4d2017-01-24 19:39:46 +00001162.. option:: -fdebug-prefix-map=<arg>
1163
1164remap file source paths in debug info
1165
Richard Smith081ad4d2017-01-24 19:39:46 +00001166.. option:: -fdebug-types-section, -fno-debug-types-section
1167
1168Place debug types in their own section (ELF Only)
1169
Richard Smith081ad4d2017-01-24 19:39:46 +00001170.. option:: -fdelayed-template-parsing, -fno-delayed-template-parsing
1171
1172Parse templated function definitions at the end of the translation unit
1173
Richard Smith081ad4d2017-01-24 19:39:46 +00001174.. option:: -fdenormal-fp-math=<arg>
1175
Richard Smith081ad4d2017-01-24 19:39:46 +00001176.. option:: -fdiagnostics-absolute-paths
1177
1178Print absolute paths in diagnostics
1179
Richard Smith081ad4d2017-01-24 19:39:46 +00001180.. option:: -fdiagnostics-color, -fno-diagnostics-color
1181
Richard Smithb2c82a62017-01-27 01:54:42 +00001182.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001183.. option:: -fdiagnostics-color=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001184.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001185
Richard Smith081ad4d2017-01-24 19:39:46 +00001186.. option:: -fdiagnostics-show-hotness, -fno-diagnostics-show-hotness
1187
1188Enable profile hotness information in diagnostic line
1189
Richard Smith081ad4d2017-01-24 19:39:46 +00001190.. option:: -fdiagnostics-show-note-include-stack, -fno-diagnostics-show-note-include-stack
1191
1192Display include stacks for diagnostic notes
1193
Richard Smith081ad4d2017-01-24 19:39:46 +00001194.. option:: -fdiagnostics-show-option, -fno-diagnostics-show-option
1195
1196Print option name with mappable diagnostics
1197
Richard Smith081ad4d2017-01-24 19:39:46 +00001198.. option:: -fdiagnostics-show-template-tree
1199
1200Print a template comparison tree for differing templates
1201
Richard Smith081ad4d2017-01-24 19:39:46 +00001202.. option:: -fdollars-in-identifiers, -fno-dollars-in-identifiers
1203
1204Allow '$' in identifiers
1205
Richard Smith081ad4d2017-01-24 19:39:46 +00001206.. option:: -fdwarf-directory-asm, -fno-dwarf-directory-asm
1207
Richard Smith081ad4d2017-01-24 19:39:46 +00001208.. option:: -felide-constructors, -fno-elide-constructors
1209
Richard Smith081ad4d2017-01-24 19:39:46 +00001210.. option:: -feliminate-unused-debug-symbols, -fno-eliminate-unused-debug-symbols
1211
Richard Smith081ad4d2017-01-24 19:39:46 +00001212.. option:: -fembed-bitcode=<option>, -fembed-bitcode (equivalent to -fembed-bitcode=all), -fembed-bitcode-marker (equivalent to -fembed-bitcode=marker)
1213
1214Embed LLVM bitcode (option: off, all, bitcode, marker)
1215
Richard Smith081ad4d2017-01-24 19:39:46 +00001216.. option:: -femit-all-decls
1217
1218Emit all declarations, even if unused
1219
Richard Smith081ad4d2017-01-24 19:39:46 +00001220.. option:: -femulated-tls, -fno-emulated-tls
1221
1222Use emutls functions to access thread\_local variables
1223
Richard Smith081ad4d2017-01-24 19:39:46 +00001224.. option:: -fencoding=<arg>, --encoding <arg>, --encoding=<arg>
1225
Richard Smith081ad4d2017-01-24 19:39:46 +00001226.. option:: -ferror-limit=<arg>
1227
Richard Smith081ad4d2017-01-24 19:39:46 +00001228.. option:: -fexceptions, -fno-exceptions
1229
1230Enable support for exception handling
1231
Richard Smith081ad4d2017-01-24 19:39:46 +00001232.. option:: -fexec-charset=<arg>
1233
Richard Smith081ad4d2017-01-24 19:39:46 +00001234.. option:: -fextdirs=<arg>, --extdirs <arg>, --extdirs=<arg>
1235
Richard Smith081ad4d2017-01-24 19:39:46 +00001236.. option:: -ffast-math, -fno-fast-math
1237
1238Allow aggressive, lossy floating-point optimizations
1239
Richard Smith081ad4d2017-01-24 19:39:46 +00001240.. option:: -ffinite-math-only, -fno-finite-math-only
1241
Richard Smith081ad4d2017-01-24 19:39:46 +00001242.. option:: -ffor-scope, -fno-for-scope
1243
Richard Smith081ad4d2017-01-24 19:39:46 +00001244.. option:: -ffp-contract=<arg>
1245
1246Form fused FP ops (e.g. FMAs): fast (everywhere) \| on (according to FP\_CONTRACT pragma, default) \| off (never fuse)
1247
Richard Smith081ad4d2017-01-24 19:39:46 +00001248.. option:: -ffreestanding
1249
1250Assert that the compilation takes place in a freestanding environment
1251
Richard Smith081ad4d2017-01-24 19:39:46 +00001252.. option:: -ffunction-sections, -fno-function-sections
1253
1254Place each function in its own section (ELF Only)
1255
Richard Smith081ad4d2017-01-24 19:39:46 +00001256.. option:: -fgnu-inline-asm, -fno-gnu-inline-asm
1257
Richard Smith081ad4d2017-01-24 19:39:46 +00001258.. option:: -fgnu-keywords, -fno-gnu-keywords
1259
1260Allow GNU-extension keywords regardless of language standard
1261
Richard Smith081ad4d2017-01-24 19:39:46 +00001262.. option:: -fgnu-runtime
1263
1264Generate output compatible with the standard GNU Objective-C runtime
1265
Richard Smith081ad4d2017-01-24 19:39:46 +00001266.. option:: -fgnu89-inline, -fno-gnu89-inline
1267
1268Use the gnu89 inline semantics
1269
Richard Smith081ad4d2017-01-24 19:39:46 +00001270.. option:: -fhonor-infinities, -fhonor-infinites, -fno-honor-infinities
1271
Richard Smith081ad4d2017-01-24 19:39:46 +00001272.. option:: -fhonor-nans, -fno-honor-nans
1273
Richard Smith081ad4d2017-01-24 19:39:46 +00001274.. option:: -fhosted
1275
Richard Smith081ad4d2017-01-24 19:39:46 +00001276.. option:: -fimplicit-module-maps, -fmodule-maps, -fno-implicit-module-maps
1277
1278Implicitly search the file system for module map files.
1279
Richard Smith081ad4d2017-01-24 19:39:46 +00001280.. option:: -fimplicit-modules, -fno-implicit-modules
1281
Richard Smith081ad4d2017-01-24 19:39:46 +00001282.. option:: -finput-charset=<arg>
1283
Richard Smith081ad4d2017-01-24 19:39:46 +00001284.. option:: -finstrument-functions
1285
1286Generate calls to instrument function entry and exit
1287
Richard Smith081ad4d2017-01-24 19:39:46 +00001288.. option:: -fintegrated-as, -fno-integrated-as, -integrated-as
1289
1290Enable the integrated assembler
1291
Richard Smith081ad4d2017-01-24 19:39:46 +00001292.. option:: -fjump-tables, -fno-jump-tables
1293
Richard Smith081ad4d2017-01-24 19:39:46 +00001294.. option:: -flax-vector-conversions, -fno-lax-vector-conversions
1295
Richard Smith081ad4d2017-01-24 19:39:46 +00001296.. option:: -flimited-precision=<arg>
1297
Richard Smith081ad4d2017-01-24 19:39:46 +00001298.. option:: -flto, -fno-lto
1299
1300Enable LTO in 'full' mode
1301
Richard Smith081ad4d2017-01-24 19:39:46 +00001302.. option:: -flto-jobs=<arg>
1303
1304Controls the backend parallelism of -flto=thin (default of 0 means the number of threads will be derived from the number of CPUs detected)
1305
Richard Smithb2c82a62017-01-27 01:54:42 +00001306.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001307.. option:: -flto=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001308.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001309
1310Set LTO mode to either 'full' or 'thin'
1311
Richard Smith081ad4d2017-01-24 19:39:46 +00001312.. option:: -fmacro-backtrace-limit=<arg>
1313
Richard Smith081ad4d2017-01-24 19:39:46 +00001314.. option:: -fmath-errno, -fno-math-errno
1315
1316Require math functions to indicate errors by setting errno
1317
Richard Smith081ad4d2017-01-24 19:39:46 +00001318.. option:: -fmax-type-align=<arg>
1319
1320Specify the maximum alignment to enforce on pointers lacking an explicit alignment
1321
Richard Smith081ad4d2017-01-24 19:39:46 +00001322.. option:: -fmerge-all-constants, -fno-merge-all-constants
1323
Richard Smith081ad4d2017-01-24 19:39:46 +00001324.. option:: -fmessage-length=<arg>
1325
Richard Smith081ad4d2017-01-24 19:39:46 +00001326.. option:: -fmodule-file-deps, -fno-module-file-deps
1327
Richard Smith081ad4d2017-01-24 19:39:46 +00001328.. option:: -fmodule-file=<file>
1329
1330Load this precompiled module file
1331
Richard Smith081ad4d2017-01-24 19:39:46 +00001332.. option:: -fmodule-map-file=<file>
1333
1334Load this module map file
1335
Richard Smith081ad4d2017-01-24 19:39:46 +00001336.. option:: -fmodule-name=<name>, -fmodule-implementation-of <arg>, -fmodule-name <arg>
1337
1338Specify the name of the module to build
1339
Richard Smith081ad4d2017-01-24 19:39:46 +00001340.. option:: -fmodules, -fno-modules
1341
1342Enable the 'modules' language feature
1343
Richard Smith081ad4d2017-01-24 19:39:46 +00001344.. option:: -fmodules-decluse, -fno-modules-decluse
1345
1346Require declaration of modules used within a module
1347
Richard Smith081ad4d2017-01-24 19:39:46 +00001348.. option:: -fmodules-ignore-macro=<arg>
1349
1350Ignore the definition of the given macro when building and loading modules
1351
Richard Smith081ad4d2017-01-24 19:39:46 +00001352.. option:: -fmodules-search-all, -fno-modules-search-all
1353
1354Search even non-imported modules to resolve references
1355
Richard Smith081ad4d2017-01-24 19:39:46 +00001356.. option:: -fmodules-strict-decluse
1357
1358Like -fmodules-decluse but requires all headers to be in modules
1359
Richard Smith081ad4d2017-01-24 19:39:46 +00001360.. option:: -fmodules-ts
1361
1362Enable support for the C++ Modules TS
1363
Richard Smith081ad4d2017-01-24 19:39:46 +00001364.. option:: -fms-compatibility, -fno-ms-compatibility
1365
1366Enable full Microsoft Visual C++ compatibility
1367
Richard Smith081ad4d2017-01-24 19:39:46 +00001368.. option:: -fms-compatibility-version=<arg>
1369
1370Dot-separated value representing the Microsoft compiler version number to report in \_MSC\_VER (0 = don't define it (default))
1371
Richard Smith081ad4d2017-01-24 19:39:46 +00001372.. option:: -fms-extensions, -fno-ms-extensions
1373
1374Accept some non-standard constructs supported by the Microsoft compiler
1375
Richard Smith081ad4d2017-01-24 19:39:46 +00001376.. option:: -fms-memptr-rep=<arg>
1377
Richard Smith081ad4d2017-01-24 19:39:46 +00001378.. option:: -fms-volatile<arg>
1379
Richard Smith081ad4d2017-01-24 19:39:46 +00001380.. option:: -fmsc-version=<arg>
1381
1382Microsoft compiler version number to report in \_MSC\_VER (0 = don't define it (default))
1383
Richard Smith081ad4d2017-01-24 19:39:46 +00001384.. option:: -fmudflap
1385
Richard Smith081ad4d2017-01-24 19:39:46 +00001386.. option:: -fmudflapth
1387
Richard Smith081ad4d2017-01-24 19:39:46 +00001388.. option:: -fnested-functions
1389
Richard Smith081ad4d2017-01-24 19:39:46 +00001390.. option:: -fnew-alignment=<align>, -fnew-alignment <arg>
1391
1392Specifies the largest alignment guaranteed by '::operator new(size\_t)'
1393
Richard Smith081ad4d2017-01-24 19:39:46 +00001394.. option:: -fnext-runtime
1395
Richard Smith081ad4d2017-01-24 19:39:46 +00001396.. option:: -fno-builtin-<arg>
1397
1398Disable implicit builtin knowledge of a specific function
1399
Richard Smith081ad4d2017-01-24 19:39:46 +00001400.. option:: -fno-elide-type
1401
1402Do not elide types when printing diagnostics
1403
Richard Smith081ad4d2017-01-24 19:39:46 +00001404.. option:: -fno-max-type-align
1405
Richard Smith081ad4d2017-01-24 19:39:46 +00001406.. option:: -fno-operator-names
1407
1408Do not treat C++ operator name keywords as synonyms for operators
1409
Richard Smith081ad4d2017-01-24 19:39:46 +00001410.. option:: -fno-strict-modules-decluse
1411
Richard Smith081ad4d2017-01-24 19:39:46 +00001412.. option:: -fno-working-directory
1413
Richard Smith081ad4d2017-01-24 19:39:46 +00001414.. option:: -fnoopenmp-use-tls
1415
Richard Smith081ad4d2017-01-24 19:39:46 +00001416.. option:: -fobjc-abi-version=<arg>
1417
Richard Smith081ad4d2017-01-24 19:39:46 +00001418.. option:: -fobjc-arc, -fno-objc-arc
1419
1420Synthesize retain and release calls for Objective-C pointers
1421
Richard Smith081ad4d2017-01-24 19:39:46 +00001422.. option:: -fobjc-arc-exceptions, -fno-objc-arc-exceptions
1423
1424Use EH-safe code when synthesizing retains and releases in -fobjc-arc
1425
Richard Smith081ad4d2017-01-24 19:39:46 +00001426.. option:: -fobjc-exceptions, -fno-objc-exceptions
1427
1428Enable Objective-C exceptions
1429
Richard Smith081ad4d2017-01-24 19:39:46 +00001430.. option:: -fobjc-infer-related-result-type, -fno-objc-infer-related-result-type
1431
Richard Smith081ad4d2017-01-24 19:39:46 +00001432.. option:: -fobjc-legacy-dispatch, -fno-objc-legacy-dispatch
1433
Richard Smith081ad4d2017-01-24 19:39:46 +00001434.. option:: -fobjc-link-runtime
1435
Richard Smith081ad4d2017-01-24 19:39:46 +00001436.. option:: -fobjc-nonfragile-abi, -fno-objc-nonfragile-abi
1437
Richard Smith081ad4d2017-01-24 19:39:46 +00001438.. option:: -fobjc-nonfragile-abi-version=<arg>
1439
Richard Smith081ad4d2017-01-24 19:39:46 +00001440.. option:: -fobjc-runtime=<arg>
1441
1442Specify the target Objective-C runtime kind and version
1443
Richard Smith081ad4d2017-01-24 19:39:46 +00001444.. option:: -fobjc-sender-dependent-dispatch
1445
Richard Smith081ad4d2017-01-24 19:39:46 +00001446.. option:: -fobjc-weak, -fno-objc-weak
1447
1448Enable ARC-style weak references in Objective-C
1449
Richard Smith081ad4d2017-01-24 19:39:46 +00001450.. option:: -fomit-frame-pointer, -fno-omit-frame-pointer
1451
Richard Smith081ad4d2017-01-24 19:39:46 +00001452.. option:: -fopenmp, -fno-openmp
1453
Richard Smith081ad4d2017-01-24 19:39:46 +00001454.. option:: -fopenmp-dump-offload-linker-script
1455
Richard Smith081ad4d2017-01-24 19:39:46 +00001456.. option:: -fopenmp-use-tls
1457
Richard Smith081ad4d2017-01-24 19:39:46 +00001458.. option:: -fopenmp-version=<arg>
1459
Richard Smithb2c82a62017-01-27 01:54:42 +00001460.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001461.. option:: -fopenmp=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001462.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001463
Richard Smith081ad4d2017-01-24 19:39:46 +00001464.. option:: -foperator-arrow-depth=<arg>
1465
Richard Smith081ad4d2017-01-24 19:39:46 +00001466.. option:: -foptimization-record-file=<arg>
1467
1468Specify the file name of any generated YAML optimization record
1469
Richard Smith081ad4d2017-01-24 19:39:46 +00001470.. option:: -foptimize-sibling-calls, -fno-optimize-sibling-calls
1471
Richard Smith081ad4d2017-01-24 19:39:46 +00001472.. option:: -foutput-class-dir=<arg>, --output-class-directory <arg>, --output-class-directory=<arg>
1473
Richard Smith081ad4d2017-01-24 19:39:46 +00001474.. option:: -fpack-struct, -fno-pack-struct
1475
Richard Smithb2c82a62017-01-27 01:54:42 +00001476.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001477.. option:: -fpack-struct=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001478.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001479
1480Specify the default maximum struct packing alignment
1481
Richard Smith081ad4d2017-01-24 19:39:46 +00001482.. option:: -fpascal-strings, -fno-pascal-strings, -mpascal-strings
1483
1484Recognize and construct Pascal-style string literals
1485
Richard Smith081ad4d2017-01-24 19:39:46 +00001486.. option:: -fpcc-struct-return
1487
1488Override the default ABI to return all structs on the stack
1489
Richard Smith081ad4d2017-01-24 19:39:46 +00001490.. option:: -fpch-preprocess
1491
Richard Smith081ad4d2017-01-24 19:39:46 +00001492.. option:: -fpic, -fno-pic
1493
Richard Smith081ad4d2017-01-24 19:39:46 +00001494.. option:: -fpie, -fno-pie
1495
Richard Smith081ad4d2017-01-24 19:39:46 +00001496.. option:: -fplugin=<dsopath>
1497
1498Load the named plugin (dynamic shared object)
1499
Richard Smith081ad4d2017-01-24 19:39:46 +00001500.. option:: -fpreserve-as-comments, -fno-preserve-as-comments
1501
Richard Smith081ad4d2017-01-24 19:39:46 +00001502.. option:: -fprofile-arcs, -fno-profile-arcs
1503
Richard Smith081ad4d2017-01-24 19:39:46 +00001504.. option:: -fprofile-dir=<arg>
1505
Richard Smith081ad4d2017-01-24 19:39:46 +00001506.. option:: -fprofile-generate, -fno-profile-generate
1507
1508Generate instrumented code to collect execution counts into default.profraw (overridden by LLVM\_PROFILE\_FILE env var)
1509
Richard Smithb2c82a62017-01-27 01:54:42 +00001510.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001511.. option:: -fprofile-generate=<directory>
Richard Smithb2c82a62017-01-27 01:54:42 +00001512.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001513
1514Generate instrumented code to collect execution counts into <directory>/default.profraw (overridden by LLVM\_PROFILE\_FILE env var)
1515
Richard Smith081ad4d2017-01-24 19:39:46 +00001516.. option:: -fprofile-instr-generate, -fno-profile-instr-generate
1517
1518Generate instrumented code to collect execution counts into default.profraw file (overridden by '=' form of option or LLVM\_PROFILE\_FILE env var)
1519
Richard Smithb2c82a62017-01-27 01:54:42 +00001520.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001521.. option:: -fprofile-instr-generate=<file>
Richard Smithb2c82a62017-01-27 01:54:42 +00001522.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001523
1524Generate instrumented code to collect execution counts into <file> (overridden by LLVM\_PROFILE\_FILE env var)
1525
Richard Smith081ad4d2017-01-24 19:39:46 +00001526.. option:: -fprofile-instr-use, -fno-profile-instr-use, -fprofile-use
1527
Richard Smithb2c82a62017-01-27 01:54:42 +00001528.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001529.. option:: -fprofile-instr-use=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001530.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001531
1532Use instrumentation data for profile-guided optimization
1533
Richard Smith081ad4d2017-01-24 19:39:46 +00001534.. option:: -fprofile-sample-use=<arg>, -fauto-profile=<arg>
1535
1536Enable sample-based profile guided optimizations
1537
Richard Smithb2c82a62017-01-27 01:54:42 +00001538.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001539.. option:: -fprofile-use=<pathname>
Richard Smithb2c82a62017-01-27 01:54:42 +00001540.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001541
1542Use instrumentation data for profile-guided optimization. If pathname is a directory, it reads from <pathname>/default.profdata. Otherwise, it reads from file <pathname>.
1543
Richard Smith081ad4d2017-01-24 19:39:46 +00001544.. option:: -freciprocal-math, -fno-reciprocal-math
1545
1546Allow division operations to be reassociated
1547
Richard Smith081ad4d2017-01-24 19:39:46 +00001548.. option:: -freg-struct-return
1549
1550Override the default ABI to return small structs in registers
1551
Richard Smith081ad4d2017-01-24 19:39:46 +00001552.. option:: -frelaxed-template-template-args, -fno-relaxed-template-template-args
1553
1554Enable C++17 relaxed template template argument matching
1555
Richard Smith081ad4d2017-01-24 19:39:46 +00001556.. option:: -freroll-loops, -fno-reroll-loops
1557
1558Turn on loop reroller
1559
Richard Smith081ad4d2017-01-24 19:39:46 +00001560.. option:: -fretain-comments-from-system-headers
1561
Richard Smith081ad4d2017-01-24 19:39:46 +00001562.. option:: -frewrite-includes, -fno-rewrite-includes
1563
Richard Smith081ad4d2017-01-24 19:39:46 +00001564.. option:: -frewrite-map-file <arg>
1565
Richard Smithb2c82a62017-01-27 01:54:42 +00001566.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001567.. option:: -frewrite-map-file=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001568.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001569
Richard Smith081ad4d2017-01-24 19:39:46 +00001570.. option:: -fropi, -fno-ropi
1571
Richard Smith081ad4d2017-01-24 19:39:46 +00001572.. option:: -frtti, -fno-rtti
1573
Richard Smith081ad4d2017-01-24 19:39:46 +00001574.. option:: -frwpi, -fno-rwpi
1575
Richard Smith081ad4d2017-01-24 19:39:46 +00001576.. option:: -fsave-optimization-record, -fno-save-optimization-record
1577
1578Generate a YAML optimization record file
1579
Richard Smith081ad4d2017-01-24 19:39:46 +00001580.. option:: -fshort-enums, -fno-short-enums
1581
1582Allocate to an enum type only as many bytes as it needs for the declared range of possible values
1583
Richard Smith081ad4d2017-01-24 19:39:46 +00001584.. option:: -fshort-wchar, -fno-short-wchar
1585
1586Force wchar\_t to be a short unsigned int
1587
Richard Smith081ad4d2017-01-24 19:39:46 +00001588.. option:: -fshow-column, -fno-show-column
1589
Richard Smith081ad4d2017-01-24 19:39:46 +00001590.. option:: -fshow-overloads=<arg>
1591
1592Which overload candidates to show when overload resolution fails: best\|all; defaults to all
1593
Richard Smith081ad4d2017-01-24 19:39:46 +00001594.. option:: -fshow-source-location, -fno-show-source-location
1595
Richard Smith081ad4d2017-01-24 19:39:46 +00001596.. option:: -fsignaling-math, -fno-signaling-math
1597
Richard Smith081ad4d2017-01-24 19:39:46 +00001598.. option:: -fsigned-bitfields
1599
Richard Smith081ad4d2017-01-24 19:39:46 +00001600.. option:: -fsigned-char, -fno-signed-char, --signed-char
1601
Richard Smith081ad4d2017-01-24 19:39:46 +00001602.. option:: -fsigned-zeros, -fno-signed-zeros
1603
Richard Smith081ad4d2017-01-24 19:39:46 +00001604.. option:: -fsized-deallocation, -fno-sized-deallocation
1605
1606Enable C++14 sized global deallocation functions
1607
Richard Smith081ad4d2017-01-24 19:39:46 +00001608.. option:: -fsjlj-exceptions
1609
1610Use SjLj style exceptions
1611
Richard Smith081ad4d2017-01-24 19:39:46 +00001612.. option:: -fslp-vectorize, -fno-slp-vectorize, -ftree-slp-vectorize
1613
1614Enable the superword-level parallelism vectorization passes
1615
Richard Smith081ad4d2017-01-24 19:39:46 +00001616.. option:: -fslp-vectorize-aggressive, -fno-slp-vectorize-aggressive
1617
1618Enable the BB vectorization passes
1619
Richard Smith081ad4d2017-01-24 19:39:46 +00001620.. option:: -fspell-checking, -fno-spell-checking
1621
Richard Smith081ad4d2017-01-24 19:39:46 +00001622.. option:: -fspell-checking-limit=<arg>
1623
Richard Smith081ad4d2017-01-24 19:39:46 +00001624.. option:: -fsplit-dwarf-inlining, -fno-split-dwarf-inlining
1625
1626Place debug types in their own section (ELF Only)
1627
Richard Smith081ad4d2017-01-24 19:39:46 +00001628.. option:: -fsplit-stack
1629
Richard Smith081ad4d2017-01-24 19:39:46 +00001630.. option:: -fstack-protector, -fno-stack-protector
1631
1632Enable stack protectors for functions potentially vulnerable to stack smashing
1633
Richard Smith081ad4d2017-01-24 19:39:46 +00001634.. option:: -fstack-protector-all
1635
1636Force the usage of stack protectors for all functions
1637
Richard Smith081ad4d2017-01-24 19:39:46 +00001638.. option:: -fstack-protector-strong
1639
1640Use a strong heuristic to apply stack protectors to functions
1641
Richard Smith081ad4d2017-01-24 19:39:46 +00001642.. option:: -fstandalone-debug, -fno-limit-debug-info, -fno-standalone-debug
1643
1644Emit full debug info for all types used by the program
1645
Richard Smith081ad4d2017-01-24 19:39:46 +00001646.. option:: -fstrict-aliasing, -fno-strict-aliasing
1647
Richard Smith081ad4d2017-01-24 19:39:46 +00001648.. option:: -fstrict-enums, -fno-strict-enums
1649
1650Enable optimizations based on the strict definition of an enum's value range
1651
Richard Smith081ad4d2017-01-24 19:39:46 +00001652.. option:: -fstrict-overflow, -fno-strict-overflow
1653
Richard Smith081ad4d2017-01-24 19:39:46 +00001654.. option:: -fstrict-return, -fno-strict-return
1655
1656Always treat control flow paths that fall off the end of a non-voidfunction as unreachable
1657
Richard Smith081ad4d2017-01-24 19:39:46 +00001658.. option:: -fstrict-vtable-pointers, -fno-strict-vtable-pointers
1659
1660Enable optimizations based on the strict rules for overwriting polymorphic C++ objects
1661
Richard Smith081ad4d2017-01-24 19:39:46 +00001662.. option:: -fstruct-path-tbaa, -fno-struct-path-tbaa
1663
Richard Smith081ad4d2017-01-24 19:39:46 +00001664.. option:: -ftabstop=<arg>
1665
Richard Smith081ad4d2017-01-24 19:39:46 +00001666.. option:: -ftemplate-backtrace-limit=<arg>
1667
Richard Smith081ad4d2017-01-24 19:39:46 +00001668.. option:: -ftemplate-depth-<arg>
1669
Richard Smith081ad4d2017-01-24 19:39:46 +00001670.. option:: -ftemplate-depth=<arg>
1671
Richard Smith081ad4d2017-01-24 19:39:46 +00001672.. option:: -ftest-coverage
1673
Richard Smith081ad4d2017-01-24 19:39:46 +00001674.. option:: -fthinlto-index=<arg>
1675
1676Perform ThinLTO importing using provided function summary index
1677
Richard Smith081ad4d2017-01-24 19:39:46 +00001678.. option:: -fthreadsafe-statics, -fno-threadsafe-statics
1679
Richard Smith081ad4d2017-01-24 19:39:46 +00001680.. option:: -ftime-report
1681
Richard Smith081ad4d2017-01-24 19:39:46 +00001682.. option:: -ftls-model=<arg>
1683
Richard Smith081ad4d2017-01-24 19:39:46 +00001684.. option:: -ftrap-function=<arg>
1685
1686Issue call to specified function rather than a trap instruction
1687
Richard Smith081ad4d2017-01-24 19:39:46 +00001688.. option:: -ftrapping-math, -fno-trapping-math
1689
Richard Smith081ad4d2017-01-24 19:39:46 +00001690.. option:: -ftrapv
1691
1692Trap on integer overflow
1693
Richard Smith081ad4d2017-01-24 19:39:46 +00001694.. option:: -ftrapv-handler <arg>
1695
Richard Smithb2c82a62017-01-27 01:54:42 +00001696.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001697.. option:: -ftrapv-handler=<function name>
Richard Smithb2c82a62017-01-27 01:54:42 +00001698.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001699
1700Specify the function to be called on overflow
1701
Richard Smith081ad4d2017-01-24 19:39:46 +00001702.. option:: -ftrigraphs, -fno-trigraphs, -trigraphs, --trigraphs
1703
1704Process trigraph sequences
1705
Richard Smith081ad4d2017-01-24 19:39:46 +00001706.. option:: -funique-section-names, -fno-unique-section-names
1707
1708Use unique names for text and data sections (ELF Only)
1709
Richard Smith081ad4d2017-01-24 19:39:46 +00001710.. option:: -funit-at-a-time, -fno-unit-at-a-time
1711
Richard Smith081ad4d2017-01-24 19:39:46 +00001712.. option:: -funroll-loops, -fno-unroll-loops
1713
1714Turn on loop unroller
1715
Richard Smith081ad4d2017-01-24 19:39:46 +00001716.. option:: -funsafe-math-optimizations, -fno-unsafe-math-optimizations
1717
Richard Smith081ad4d2017-01-24 19:39:46 +00001718.. option:: -funsigned-bitfields
1719
Richard Smith081ad4d2017-01-24 19:39:46 +00001720.. option:: -funsigned-char, -fno-unsigned-char, --unsigned-char
1721
Richard Smith081ad4d2017-01-24 19:39:46 +00001722.. option:: -funwind-tables, -fno-unwind-tables
1723
Richard Smith081ad4d2017-01-24 19:39:46 +00001724.. option:: -fuse-cxa-atexit, -fno-use-cxa-atexit
1725
Richard Smith081ad4d2017-01-24 19:39:46 +00001726.. option:: -fuse-init-array, -fno-use-init-array
1727
1728Use .init\_array instead of .ctors
1729
Richard Smith081ad4d2017-01-24 19:39:46 +00001730.. option:: -fuse-ld=<arg>
1731
Richard Smith081ad4d2017-01-24 19:39:46 +00001732.. option:: -fuse-line-directives, -fno-use-line-directives
1733
Richard Smith081ad4d2017-01-24 19:39:46 +00001734.. option:: -fveclib=<arg>
1735
1736Use the given vector functions library
1737
Richard Smith081ad4d2017-01-24 19:39:46 +00001738.. option:: -fvectorize, -fno-vectorize, -ftree-vectorize
1739
1740Enable the loop vectorization passes
1741
Richard Smith081ad4d2017-01-24 19:39:46 +00001742.. option:: -fverbose-asm, -fno-verbose-asm
1743
Richard Smith081ad4d2017-01-24 19:39:46 +00001744.. option:: -fvisibility-inlines-hidden
1745
1746Give inline C++ member functions default visibility by default
1747
Richard Smith081ad4d2017-01-24 19:39:46 +00001748.. option:: -fvisibility-ms-compat
1749
1750Give global types 'default' visibility and global functions and variables 'hidden' visibility by default
1751
Richard Smith081ad4d2017-01-24 19:39:46 +00001752.. option:: -fvisibility=<arg>
1753
1754Set the default symbol visibility for all global declarations
1755
Richard Smith081ad4d2017-01-24 19:39:46 +00001756.. option:: -fwhole-program-vtables, -fno-whole-program-vtables
1757
1758Enables whole-program vtable optimization. Requires -flto
1759
Richard Smith081ad4d2017-01-24 19:39:46 +00001760.. option:: -fwrapv, -fno-wrapv
1761
1762Treat signed integer overflow as two's complement
1763
Richard Smith081ad4d2017-01-24 19:39:46 +00001764.. option:: -fwritable-strings
1765
1766Store string literals as writable data
1767
Richard Smith081ad4d2017-01-24 19:39:46 +00001768.. option:: -fxray-instruction-threshold<arg>
1769
Richard Smithb2c82a62017-01-27 01:54:42 +00001770.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001771.. option:: -fxray-instruction-threshold=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001772.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001773
1774Sets the minimum function size to instrument with XRay
1775
Richard Smith081ad4d2017-01-24 19:39:46 +00001776.. option:: -fxray-instrument, -fno-xray-instrument
1777
1778Generate XRay instrumentation sleds on function entry and exit
1779
Richard Smith081ad4d2017-01-24 19:39:46 +00001780.. option:: -fzero-initialized-in-bss, -fno-zero-initialized-in-bss
1781
Richard Smith081ad4d2017-01-24 19:39:46 +00001782.. option:: -fzvector, -fno-zvector, -mzvector
1783
1784Enable System z vector language extension
1785
Richard Smith081ad4d2017-01-24 19:39:46 +00001786.. option:: -pedantic, --pedantic, -no-pedantic, --no-pedantic
1787
Richard Smith081ad4d2017-01-24 19:39:46 +00001788.. option:: -pedantic-errors, --pedantic-errors
1789
1790OpenCL flags
1791------------
Richard Smith081ad4d2017-01-24 19:39:46 +00001792.. option:: -cl-denorms-are-zero
1793
1794OpenCL only. Allow denormals to be flushed to zero.
1795
Richard Smith081ad4d2017-01-24 19:39:46 +00001796.. option:: -cl-fast-relaxed-math
1797
1798OpenCL only. Sets -cl-finite-math-only and -cl-unsafe-math-optimizations, and defines \_\_FAST\_RELAXED\_MATH\_\_.
1799
Richard Smith081ad4d2017-01-24 19:39:46 +00001800.. option:: -cl-finite-math-only
1801
1802OpenCL only. Allow floating-point optimizations that assume arguments and results are not NaNs or +-Inf.
1803
Richard Smith081ad4d2017-01-24 19:39:46 +00001804.. option:: -cl-fp32-correctly-rounded-divide-sqrt
1805
1806OpenCL only. Specify that single precision floating-point divide and sqrt used in the program source are correctly rounded.
1807
Richard Smith081ad4d2017-01-24 19:39:46 +00001808.. option:: -cl-kernel-arg-info
1809
1810OpenCL only. Generate kernel argument metadata.
1811
Richard Smith081ad4d2017-01-24 19:39:46 +00001812.. option:: -cl-mad-enable
1813
1814OpenCL only. Allow use of less precise MAD computations in the generated binary.
1815
Richard Smith081ad4d2017-01-24 19:39:46 +00001816.. option:: -cl-no-signed-zeros
1817
1818OpenCL only. Allow use of less precise no signed zeros computations in the generated binary.
1819
Richard Smith081ad4d2017-01-24 19:39:46 +00001820.. option:: -cl-opt-disable
1821
1822OpenCL only. This option disables all optimizations. By default optimizations are enabled.
1823
Richard Smith081ad4d2017-01-24 19:39:46 +00001824.. option:: -cl-single-precision-constant
1825
1826OpenCL only. Treat double precision floating-point constant as single precision constant.
1827
Richard Smith081ad4d2017-01-24 19:39:46 +00001828.. option:: -cl-std=<arg>
1829
1830OpenCL language standard to compile for.
1831
Richard Smith081ad4d2017-01-24 19:39:46 +00001832.. option:: -cl-strict-aliasing
1833
1834OpenCL only. This option is added for compatibility with OpenCL 1.0.
1835
Richard Smith081ad4d2017-01-24 19:39:46 +00001836.. option:: -cl-unsafe-math-optimizations
1837
1838OpenCL only. Allow unsafe floating-point optimizations. Also implies -cl-no-signed-zeros and -cl-mad-enable.
1839
1840Target-dependent compilation options
1841~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Richard Smithc5b2e002017-01-27 02:08:37 +00001842.. option:: -G<size>, -G=<arg>, -msmall-data-threshold=<arg>
1843
1844Put objects of at most <size> bytes into small data section (MIPS / Hexagon)
1845
Richard Smith081ad4d2017-01-24 19:39:46 +00001846.. option:: -m16
1847
Richard Smith081ad4d2017-01-24 19:39:46 +00001848.. option:: -m32
1849
Richard Smith081ad4d2017-01-24 19:39:46 +00001850.. option:: -m64
1851
Richard Smith081ad4d2017-01-24 19:39:46 +00001852.. option:: -mabi=<arg>
1853
Richard Smith081ad4d2017-01-24 19:39:46 +00001854.. option:: -mabicalls, -mno-abicalls
1855
1856Enable SVR4-style position-independent code (Mips only)
1857
Richard Smith081ad4d2017-01-24 19:39:46 +00001858.. option:: -malign-double
1859
1860Align doubles to two words in structs (x86 only)
1861
Richard Smith081ad4d2017-01-24 19:39:46 +00001862.. option:: -march=<arg>
1863
Richard Smith081ad4d2017-01-24 19:39:46 +00001864.. option:: -masm=<arg>
1865
Richard Smith081ad4d2017-01-24 19:39:46 +00001866.. option:: -mbackchain, -mno-backchain
1867
1868Link stack frames through backchain on System Z
1869
Richard Smith081ad4d2017-01-24 19:39:46 +00001870.. option:: -mcheck-zero-division, -mno-check-zero-division
1871
Richard Smith081ad4d2017-01-24 19:39:46 +00001872.. option:: -mcmodel=<arg>
1873
Richard Smith081ad4d2017-01-24 19:39:46 +00001874.. option:: -mcompact-branches=<arg>
1875
Richard Smith081ad4d2017-01-24 19:39:46 +00001876.. option:: -mconsole<arg>
1877
Richard Smith081ad4d2017-01-24 19:39:46 +00001878.. option:: -mcpu=<arg>, -mv4 (equivalent to -mcpu=hexagonv4), -mv5 (equivalent to -mcpu=hexagonv5), -mv55 (equivalent to -mcpu=hexagonv55), -mv60 (equivalent to -mcpu=hexagonv60)
1879
Richard Smith081ad4d2017-01-24 19:39:46 +00001880.. option:: -mdll<arg>
1881
Richard Smith081ad4d2017-01-24 19:39:46 +00001882.. option:: -mdouble-float
1883
Richard Smith081ad4d2017-01-24 19:39:46 +00001884.. option:: -mdsp, -mno-dsp
1885
Richard Smith081ad4d2017-01-24 19:39:46 +00001886.. option:: -mdspr2, -mno-dspr2
1887
Richard Smith081ad4d2017-01-24 19:39:46 +00001888.. option:: -mdynamic-no-pic<arg>
1889
Richard Smith081ad4d2017-01-24 19:39:46 +00001890.. option:: -meabi <arg>
1891
1892Set EABI type, e.g. 4, 5 or gnu (default depends on triple)
1893
Richard Smith081ad4d2017-01-24 19:39:46 +00001894.. option:: -mfloat-abi=<arg>
1895
Richard Smith081ad4d2017-01-24 19:39:46 +00001896.. option:: -mfp32
1897
1898Use 32-bit floating point registers (MIPS only)
1899
Richard Smith081ad4d2017-01-24 19:39:46 +00001900.. option:: -mfp64
1901
1902Use 64-bit floating point registers (MIPS only)
1903
Richard Smith081ad4d2017-01-24 19:39:46 +00001904.. option:: -mfpmath=<arg>
1905
Richard Smith081ad4d2017-01-24 19:39:46 +00001906.. option:: -mfpu=<arg>
1907
Richard Smith081ad4d2017-01-24 19:39:46 +00001908.. option:: -mglobal-merge, -mno-global-merge
1909
1910Enable merging of globals
1911
Richard Smith081ad4d2017-01-24 19:39:46 +00001912.. option:: -mhard-float
1913
Richard Smith081ad4d2017-01-24 19:39:46 +00001914.. option:: -mhwdiv=<arg>, --mhwdiv <arg>, --mhwdiv=<arg>
1915
Richard Smith081ad4d2017-01-24 19:39:46 +00001916.. option:: -miamcu, -mno-iamcu
1917
1918Use Intel MCU ABI
1919
Richard Smith081ad4d2017-01-24 19:39:46 +00001920.. option:: -mimplicit-float, -mno-implicit-float
1921
Richard Smith081ad4d2017-01-24 19:39:46 +00001922.. option:: -mimplicit-it=<arg>
1923
Richard Smith081ad4d2017-01-24 19:39:46 +00001924.. option:: -mincremental-linker-compatible, -mno-incremental-linker-compatible
1925
1926(integrated-as) Emit an object file which can be used with an incremental linker
1927
Richard Smith081ad4d2017-01-24 19:39:46 +00001928.. option:: -miphoneos-version-min=<arg>, -mios-simulator-version-min=<arg>, -mios-version-min=<arg>, -miphonesimulator-version-min=<arg>
1929
Richard Smith081ad4d2017-01-24 19:39:46 +00001930.. option:: -mips16
1931
Richard Smith081ad4d2017-01-24 19:39:46 +00001932.. option:: -mkernel
1933
Richard Smith081ad4d2017-01-24 19:39:46 +00001934.. option:: -mldc1-sdc1, -mno-ldc1-sdc1
1935
Richard Smith081ad4d2017-01-24 19:39:46 +00001936.. option:: -mlong-calls, -mno-long-calls
1937
1938Generate branches with extended addressability, usually via indirect jumps.
1939
Richard Smith081ad4d2017-01-24 19:39:46 +00001940.. option:: -mmacosx-version-min=<arg>
1941
1942Set Mac OS X deployment target
1943
Richard Smith081ad4d2017-01-24 19:39:46 +00001944.. option:: -mmicromips, -mno-micromips
1945
Richard Smith081ad4d2017-01-24 19:39:46 +00001946.. option:: -mms-bitfields, -mno-ms-bitfields
1947
1948Set the default structure layout to be compatible with the Microsoft compiler standard
1949
Richard Smith081ad4d2017-01-24 19:39:46 +00001950.. option:: -mmsa, -mno-msa
1951
1952Enable MSA ASE (MIPS only)
1953
Richard Smith081ad4d2017-01-24 19:39:46 +00001954.. option:: -mnan=<arg>
1955
Richard Smith081ad4d2017-01-24 19:39:46 +00001956.. option:: -mno-mips16
1957
Richard Smith081ad4d2017-01-24 19:39:46 +00001958.. option:: -momit-leaf-frame-pointer, -mno-omit-leaf-frame-pointer
1959
1960Omit frame pointer setup for leaf functions
1961
Richard Smith081ad4d2017-01-24 19:39:46 +00001962.. option:: -moslib=<arg>
1963
Richard Smith081ad4d2017-01-24 19:39:46 +00001964.. option:: -mpie-copy-relocations, -mno-pie-copy-relocations
1965
1966Use copy relocations support for PIE builds
1967
Richard Smith081ad4d2017-01-24 19:39:46 +00001968.. option:: -mqdsp6-compat
1969
1970Enable hexagon-qdsp6 backward compatibility
1971
Richard Smith081ad4d2017-01-24 19:39:46 +00001972.. option:: -mrecip
1973
Richard Smithb2c82a62017-01-27 01:54:42 +00001974.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001975.. option:: -mrecip=<arg1>,<arg2>...
Richard Smithb2c82a62017-01-27 01:54:42 +00001976.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001977
Richard Smith081ad4d2017-01-24 19:39:46 +00001978.. option:: -mred-zone, -mno-red-zone
1979
Richard Smith081ad4d2017-01-24 19:39:46 +00001980.. option:: -mregparm=<arg>
1981
Richard Smith081ad4d2017-01-24 19:39:46 +00001982.. option:: -mrelax-all, -mno-relax-all
1983
1984(integrated-as) Relax all machine instructions
1985
Richard Smith081ad4d2017-01-24 19:39:46 +00001986.. option:: -mrtd, -mno-rtd
1987
1988Make StdCall calling convention the default
1989
Richard Smith081ad4d2017-01-24 19:39:46 +00001990.. option:: -msingle-float
1991
Richard Smith081ad4d2017-01-24 19:39:46 +00001992.. option:: -msoft-float, -mno-soft-float
1993
1994Use software floating point
1995
Richard Smith081ad4d2017-01-24 19:39:46 +00001996.. option:: -mstack-alignment=<arg>
1997
1998Set the stack alignment
1999
Richard Smith081ad4d2017-01-24 19:39:46 +00002000.. option:: -mstack-probe-size=<arg>
2001
2002Set the stack probe size
2003
Richard Smith081ad4d2017-01-24 19:39:46 +00002004.. option:: -mstackrealign, -mno-stackrealign
2005
2006Force realign the stack at entry to every function
2007
Richard Smith081ad4d2017-01-24 19:39:46 +00002008.. option:: -mthread-model <arg>
2009
2010The thread model to use, e.g. posix, single (posix by default)
2011
Richard Smith081ad4d2017-01-24 19:39:46 +00002012.. option:: -mthreads<arg>
2013
Richard Smith081ad4d2017-01-24 19:39:46 +00002014.. option:: -mthumb, -mno-thumb
2015
Richard Smith081ad4d2017-01-24 19:39:46 +00002016.. option:: -mtune=<arg>
2017
Richard Smith081ad4d2017-01-24 19:39:46 +00002018.. option:: -mtvos-version-min=<arg>, -mappletvos-version-min=<arg>, -mappletvsimulator-version-min=<arg>, -mtvos-simulator-version-min=<arg>
2019
Richard Smith081ad4d2017-01-24 19:39:46 +00002020.. option:: -municode<arg>
2021
Richard Smith081ad4d2017-01-24 19:39:46 +00002022.. option:: -mvx, -mno-vx
2023
Richard Smith081ad4d2017-01-24 19:39:46 +00002024.. option:: -mwarn-nonportable-cfstrings, -mno-warn-nonportable-cfstrings
2025
Richard Smith081ad4d2017-01-24 19:39:46 +00002026.. option:: -mwatchos-version-min=<arg>, -mwatchos-simulator-version-min=<arg>, -mwatchsimulator-version-min=<arg>
2027
Richard Smith081ad4d2017-01-24 19:39:46 +00002028.. option:: -mwindows<arg>
2029
Richard Smith081ad4d2017-01-24 19:39:46 +00002030.. option:: -mx32
2031
Richard Smith081ad4d2017-01-24 19:39:46 +00002032.. option:: -mxgot, -mno-xgot
2033
2034AARCH64
2035-------
Richard Smith081ad4d2017-01-24 19:39:46 +00002036.. option:: -ffixed-x18
2037
2038Reserve the x18 register (AArch64 only)
2039
Richard Smith081ad4d2017-01-24 19:39:46 +00002040.. option:: -mfix-cortex-a53-835769, -mno-fix-cortex-a53-835769
2041
2042Workaround Cortex-A53 erratum 835769 (AArch64 only)
2043
Richard Smith081ad4d2017-01-24 19:39:46 +00002044.. option:: -mgeneral-regs-only
2045
2046Generate code which only uses the general purpose registers (AArch64 only)
2047
2048AMDGPU
2049------
2050ARM
2051---
Richard Smith081ad4d2017-01-24 19:39:46 +00002052.. option:: -ffixed-r9
2053
2054Reserve the r9 register (ARM only)
2055
Richard Smith081ad4d2017-01-24 19:39:46 +00002056.. option:: -mcrc
2057
2058Allow use of CRC instructions (ARM only)
2059
Richard Smith081ad4d2017-01-24 19:39:46 +00002060.. option:: -mexecute-only, -mno-execute-only, -mpure-code
2061
2062Disallow generation of data access to code sections (ARM only)
2063
Richard Smith081ad4d2017-01-24 19:39:46 +00002064.. option:: -mno-movt
2065
2066Disallow use of movt/movw pairs (ARM only)
2067
Richard Smith081ad4d2017-01-24 19:39:46 +00002068.. option:: -mnocrc
2069
2070Disallow use of CRC instructions (ARM only)
2071
Richard Smith081ad4d2017-01-24 19:39:46 +00002072.. option:: -mrestrict-it, -mno-restrict-it
2073
2074Disallow generation of deprecated IT blocks for ARMv8. It is on by default for ARMv8 Thumb mode.
2075
Richard Smith081ad4d2017-01-24 19:39:46 +00002076.. option:: -munaligned-access, -mno-unaligned-access
2077
2078Allow memory accesses to be unaligned (AArch32/AArch64 only)
2079
2080Hexagon
2081-------
Richard Smith081ad4d2017-01-24 19:39:46 +00002082.. option:: -mhvx, -mno-hvx
2083
2084Enable Hexagon Vector eXtensions
2085
Richard Smith081ad4d2017-01-24 19:39:46 +00002086.. option:: -mhvx-double, -mno-hvx-double
2087
2088Enable Hexagon Double Vector eXtensions
2089
Richard Smith081ad4d2017-01-24 19:39:46 +00002090.. option:: -mieee-rnd-near
2091
2092PowerPC
2093-------
Richard Smith081ad4d2017-01-24 19:39:46 +00002094.. option:: -mcmpb, -mno-cmpb
2095
Richard Smith081ad4d2017-01-24 19:39:46 +00002096.. option:: -mcrbits, -mno-crbits
2097
Richard Smith081ad4d2017-01-24 19:39:46 +00002098.. option:: -mcrypto, -mno-crypto
2099
Richard Smith081ad4d2017-01-24 19:39:46 +00002100.. option:: -mdirect-move, -mno-direct-move
2101
Richard Smith081ad4d2017-01-24 19:39:46 +00002102.. option:: -mfloat128, -mno-float128
2103
Richard Smith081ad4d2017-01-24 19:39:46 +00002104.. option:: -mfprnd, -mno-fprnd
2105
Richard Smith081ad4d2017-01-24 19:39:46 +00002106.. option:: -mhtm, -mno-htm
2107
Richard Smith081ad4d2017-01-24 19:39:46 +00002108.. option:: -minvariant-function-descriptors, -mno-invariant-function-descriptors
2109
Richard Smith081ad4d2017-01-24 19:39:46 +00002110.. option:: -misel, -mno-isel
2111
Richard Smith081ad4d2017-01-24 19:39:46 +00002112.. option:: -mlongcall, -mno-longcall
2113
Richard Smith081ad4d2017-01-24 19:39:46 +00002114.. option:: -mmfocrf, -mmfcrf, -mno-mfocrf
2115
Richard Smith081ad4d2017-01-24 19:39:46 +00002116.. option:: -mpopcntd, -mno-popcntd
2117
Richard Smith081ad4d2017-01-24 19:39:46 +00002118.. option:: -mpower8-vector, -mno-power8-vector
2119
Richard Smith081ad4d2017-01-24 19:39:46 +00002120.. option:: -mpower9-vector, -mno-power9-vector
2121
Richard Smith081ad4d2017-01-24 19:39:46 +00002122.. option:: -mqpx, -mno-qpx
2123
Richard Smith081ad4d2017-01-24 19:39:46 +00002124.. option:: -mvsx, -mno-vsx
2125
2126WebAssembly
2127-----------
Richard Smith081ad4d2017-01-24 19:39:46 +00002128.. option:: -msimd128, -mno-simd128
2129
2130X86
2131---
Richard Smith081ad4d2017-01-24 19:39:46 +00002132.. option:: -m3dnow, -mno-3dnow
2133
Richard Smith081ad4d2017-01-24 19:39:46 +00002134.. option:: -m3dnowa, -mno-3dnowa
2135
Richard Smith081ad4d2017-01-24 19:39:46 +00002136.. option:: -madx, -mno-adx
2137
Richard Smith081ad4d2017-01-24 19:39:46 +00002138.. option:: -maes, -mno-aes
2139
Richard Smith081ad4d2017-01-24 19:39:46 +00002140.. option:: -mavx, -mno-avx
2141
Richard Smith081ad4d2017-01-24 19:39:46 +00002142.. option:: -mavx2, -mno-avx2
2143
Richard Smith081ad4d2017-01-24 19:39:46 +00002144.. option:: -mavx512bw, -mno-avx512bw
2145
Richard Smith081ad4d2017-01-24 19:39:46 +00002146.. option:: -mavx512cd, -mno-avx512cd
2147
Richard Smith081ad4d2017-01-24 19:39:46 +00002148.. option:: -mavx512dq, -mno-avx512dq
2149
Richard Smith081ad4d2017-01-24 19:39:46 +00002150.. option:: -mavx512er, -mno-avx512er
2151
Richard Smith081ad4d2017-01-24 19:39:46 +00002152.. option:: -mavx512f, -mno-avx512f
2153
Richard Smith081ad4d2017-01-24 19:39:46 +00002154.. option:: -mavx512ifma, -mno-avx512ifma
2155
Richard Smith081ad4d2017-01-24 19:39:46 +00002156.. option:: -mavx512pf, -mno-avx512pf
2157
Richard Smith081ad4d2017-01-24 19:39:46 +00002158.. option:: -mavx512vbmi, -mno-avx512vbmi
2159
Richard Smith081ad4d2017-01-24 19:39:46 +00002160.. option:: -mavx512vl, -mno-avx512vl
2161
Richard Smith081ad4d2017-01-24 19:39:46 +00002162.. option:: -mbmi, -mno-bmi
2163
Richard Smith081ad4d2017-01-24 19:39:46 +00002164.. option:: -mbmi2, -mno-bmi2
2165
Craig Topper78b47872017-02-08 06:48:58 +00002166.. option:: -mclflushopt, -mno-clflushopt
2167
Richard Smith081ad4d2017-01-24 19:39:46 +00002168.. option:: -mcx16, -mno-cx16
2169
Richard Smith081ad4d2017-01-24 19:39:46 +00002170.. option:: -mf16c, -mno-f16c
2171
Richard Smith081ad4d2017-01-24 19:39:46 +00002172.. option:: -mfma, -mno-fma
2173
Richard Smith081ad4d2017-01-24 19:39:46 +00002174.. option:: -mfma4, -mno-fma4
2175
Richard Smith081ad4d2017-01-24 19:39:46 +00002176.. option:: -mfsgsbase, -mno-fsgsbase
2177
Richard Smith081ad4d2017-01-24 19:39:46 +00002178.. option:: -mfxsr, -mno-fxsr
2179
Richard Smith081ad4d2017-01-24 19:39:46 +00002180.. option:: -mlzcnt, -mno-lzcnt
2181
Richard Smith081ad4d2017-01-24 19:39:46 +00002182.. option:: -mmmx, -mno-mmx
2183
Craig Topperb16cb822017-02-08 07:56:42 +00002184.. option:: -mmpx, -mno-mpx
2185
Richard Smith081ad4d2017-01-24 19:39:46 +00002186.. option:: -mmwaitx, -mno-mwaitx
2187
Richard Smith081ad4d2017-01-24 19:39:46 +00002188.. option:: -mpclmul, -mno-pclmul
2189
Richard Smith081ad4d2017-01-24 19:39:46 +00002190.. option:: -mpku, -mno-pku
2191
Richard Smith081ad4d2017-01-24 19:39:46 +00002192.. option:: -mpopcnt, -mno-popcnt
2193
Richard Smith081ad4d2017-01-24 19:39:46 +00002194.. option:: -mprfchw, -mno-prfchw
2195
Richard Smith081ad4d2017-01-24 19:39:46 +00002196.. option:: -mrdrnd, -mno-rdrnd
2197
Richard Smith081ad4d2017-01-24 19:39:46 +00002198.. option:: -mrdseed, -mno-rdseed
2199
Richard Smith081ad4d2017-01-24 19:39:46 +00002200.. option:: -mrtm, -mno-rtm
2201
Richard Smith081ad4d2017-01-24 19:39:46 +00002202.. option:: -msha, -mno-sha
2203
Richard Smith081ad4d2017-01-24 19:39:46 +00002204.. option:: -msse, -mno-sse
2205
Richard Smith081ad4d2017-01-24 19:39:46 +00002206.. option:: -msse2, -mno-sse2
2207
Richard Smith081ad4d2017-01-24 19:39:46 +00002208.. option:: -msse3, -mno-sse3
2209
Richard Smith081ad4d2017-01-24 19:39:46 +00002210.. option:: -msse4.1, -mno-sse4.1
2211
Richard Smithb2c82a62017-01-27 01:54:42 +00002212.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00002213.. option:: -msse4.2, -mno-sse4.2, -msse4
Richard Smithb2c82a62017-01-27 01:54:42 +00002214.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00002215
Richard Smith081ad4d2017-01-24 19:39:46 +00002216.. option:: -msse4a, -mno-sse4a
2217
Richard Smith081ad4d2017-01-24 19:39:46 +00002218.. option:: -mssse3, -mno-ssse3
2219
Richard Smith081ad4d2017-01-24 19:39:46 +00002220.. option:: -mtbm, -mno-tbm
2221
Richard Smith081ad4d2017-01-24 19:39:46 +00002222.. option:: -mx87, -m80387, -mno-x87
2223
Richard Smith081ad4d2017-01-24 19:39:46 +00002224.. option:: -mxop, -mno-xop
2225
Richard Smith081ad4d2017-01-24 19:39:46 +00002226.. option:: -mxsave, -mno-xsave
2227
Richard Smith081ad4d2017-01-24 19:39:46 +00002228.. option:: -mxsavec, -mno-xsavec
2229
Richard Smith081ad4d2017-01-24 19:39:46 +00002230.. option:: -mxsaveopt, -mno-xsaveopt
2231
Richard Smith081ad4d2017-01-24 19:39:46 +00002232.. option:: -mxsaves, -mno-xsaves
2233
2234Optimization level
2235~~~~~~~~~~~~~~~~~~
2236
2237Flags controlling how much optimization should be performed.
2238
Richard Smith081ad4d2017-01-24 19:39:46 +00002239.. option:: -O<arg>, -O (equivalent to -O2), --optimize, --optimize=<arg>
2240
Richard Smith081ad4d2017-01-24 19:39:46 +00002241.. option:: -Ofast<arg>
2242
2243Debug information generation
2244~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2245
2246Flags controlling how much and what kind of debug information should be
2247generated.
2248
2249Kind and level of debug information
2250-----------------------------------
Richard Smith081ad4d2017-01-24 19:39:46 +00002251.. option:: -g, --debug, --debug=<arg>
2252
2253Generate source-level debug information
2254
Richard Smith081ad4d2017-01-24 19:39:46 +00002255.. option:: -gdwarf-2
2256
2257Generate source-level debug information with dwarf version 2
2258
Richard Smith081ad4d2017-01-24 19:39:46 +00002259.. option:: -gdwarf-3
2260
2261Generate source-level debug information with dwarf version 3
2262
Richard Smith081ad4d2017-01-24 19:39:46 +00002263.. option:: -gdwarf-4, -gdwarf
2264
2265Generate source-level debug information with dwarf version 4
2266
Richard Smith081ad4d2017-01-24 19:39:46 +00002267.. option:: -gdwarf-5
2268
2269Generate source-level debug information with dwarf version 5
2270
Richard Smith081ad4d2017-01-24 19:39:46 +00002271.. option:: -gfull
2272
Richard Smith081ad4d2017-01-24 19:39:46 +00002273.. option:: -gused
2274
2275Debug level
2276___________
Richard Smith081ad4d2017-01-24 19:39:46 +00002277.. option:: -g0
2278
Richard Smith081ad4d2017-01-24 19:39:46 +00002279.. option:: -g2
2280
Richard Smith081ad4d2017-01-24 19:39:46 +00002281.. option:: -g3
2282
Richard Smith081ad4d2017-01-24 19:39:46 +00002283.. option:: -ggdb0
2284
Richard Smith081ad4d2017-01-24 19:39:46 +00002285.. option:: -ggdb1
2286
Richard Smith081ad4d2017-01-24 19:39:46 +00002287.. option:: -ggdb2
2288
Richard Smith081ad4d2017-01-24 19:39:46 +00002289.. option:: -ggdb3
2290
Richard Smith081ad4d2017-01-24 19:39:46 +00002291.. option:: -gline-tables-only, -g1, -gmlt
2292
2293Emit debug line number tables only
2294
Richard Smith081ad4d2017-01-24 19:39:46 +00002295.. option:: -gmodules
2296
2297Generate debug info with external references to clang modules or precompiled headers
2298
2299Debugger to tune debug information for
2300______________________________________
Richard Smith081ad4d2017-01-24 19:39:46 +00002301.. option:: -ggdb
2302
Richard Smith081ad4d2017-01-24 19:39:46 +00002303.. option:: -glldb
2304
Richard Smith081ad4d2017-01-24 19:39:46 +00002305.. option:: -gsce
2306
2307Debug information flags
2308-----------------------
Richard Smith081ad4d2017-01-24 19:39:46 +00002309.. option:: -gcolumn-info, -gno-column-info
2310
Richard Smith081ad4d2017-01-24 19:39:46 +00002311.. option:: -gdwarf-aranges
2312
Richard Smith081ad4d2017-01-24 19:39:46 +00002313.. option:: -ggnu-pubnames
2314
Richard Smith081ad4d2017-01-24 19:39:46 +00002315.. option:: -grecord-gcc-switches, -gno-record-gcc-switches
2316
Richard Smith081ad4d2017-01-24 19:39:46 +00002317.. option:: -gsplit-dwarf
2318
Richard Smith081ad4d2017-01-24 19:39:46 +00002319.. option:: -gstrict-dwarf, -gno-strict-dwarf
2320
Richard Smithc5b2e002017-01-27 02:08:37 +00002321Static analyzer flags
2322=====================
Richard Smith081ad4d2017-01-24 19:39:46 +00002323
Richard Smithc5b2e002017-01-27 02:08:37 +00002324Flags controlling the behavior of the Clang Static Analyzer.
Richard Smith081ad4d2017-01-24 19:39:46 +00002325
Richard Smithc5b2e002017-01-27 02:08:37 +00002326.. option:: -Xanalyzer <arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00002327
Richard Smithc5b2e002017-01-27 02:08:37 +00002328Pass <arg> to the static analyzer
Richard Smith081ad4d2017-01-24 19:39:46 +00002329
2330Fortran compilation flags
2331=========================
2332
2333Flags that will be passed onto the ``gfortran`` compiler when Clang is given
2334a Fortran input.
2335
Richard Smithc5b2e002017-01-27 02:08:37 +00002336.. option:: -A<arg>, --assert <arg>, --assert=<arg>
2337
Richard Smith081ad4d2017-01-24 19:39:46 +00002338.. option:: -A-<arg>
2339
Richard Smith081ad4d2017-01-24 19:39:46 +00002340.. option:: -J<arg>
2341
Richard Smith081ad4d2017-01-24 19:39:46 +00002342.. option:: -cpp
2343
Richard Smith081ad4d2017-01-24 19:39:46 +00002344.. option:: -faggressive-function-elimination, -fno-aggressive-function-elimination
2345
Richard Smith081ad4d2017-01-24 19:39:46 +00002346.. option:: -falign-commons, -fno-align-commons
2347
Richard Smith081ad4d2017-01-24 19:39:46 +00002348.. option:: -fall-intrinsics, -fno-all-intrinsics
2349
Richard Smith081ad4d2017-01-24 19:39:46 +00002350.. option:: -fautomatic, -fno-automatic
2351
Richard Smith081ad4d2017-01-24 19:39:46 +00002352.. option:: -fbackslash, -fno-backslash
2353
Richard Smith081ad4d2017-01-24 19:39:46 +00002354.. option:: -fbacktrace, -fno-backtrace
2355
Richard Smith081ad4d2017-01-24 19:39:46 +00002356.. option:: -fblas-matmul-limit=<arg>
2357
Richard Smith081ad4d2017-01-24 19:39:46 +00002358.. option:: -fbounds-check, -fno-bounds-check
2359
Richard Smith081ad4d2017-01-24 19:39:46 +00002360.. option:: -fcheck-array-temporaries, -fno-check-array-temporaries
2361
Richard Smith081ad4d2017-01-24 19:39:46 +00002362.. option:: -fcheck=<arg>
2363
Richard Smith081ad4d2017-01-24 19:39:46 +00002364.. option:: -fcoarray=<arg>
2365
Richard Smith081ad4d2017-01-24 19:39:46 +00002366.. option:: -fconvert=<arg>
2367
Richard Smith081ad4d2017-01-24 19:39:46 +00002368.. option:: -fcray-pointer, -fno-cray-pointer
2369
Richard Smith081ad4d2017-01-24 19:39:46 +00002370.. option:: -fd-lines-as-code, -fno-d-lines-as-code
2371
Richard Smith081ad4d2017-01-24 19:39:46 +00002372.. option:: -fd-lines-as-comments, -fno-d-lines-as-comments
2373
Richard Smith081ad4d2017-01-24 19:39:46 +00002374.. option:: -fdefault-double-8, -fno-default-double-8
2375
Richard Smith081ad4d2017-01-24 19:39:46 +00002376.. option:: -fdefault-integer-8, -fno-default-integer-8
2377
Richard Smith081ad4d2017-01-24 19:39:46 +00002378.. option:: -fdefault-real-8, -fno-default-real-8
2379
Richard Smith081ad4d2017-01-24 19:39:46 +00002380.. option:: -fdollar-ok, -fno-dollar-ok
2381
Richard Smith081ad4d2017-01-24 19:39:46 +00002382.. option:: -fdump-fortran-optimized, -fno-dump-fortran-optimized
2383
Richard Smith081ad4d2017-01-24 19:39:46 +00002384.. option:: -fdump-fortran-original, -fno-dump-fortran-original
2385
Richard Smith081ad4d2017-01-24 19:39:46 +00002386.. option:: -fdump-parse-tree, -fno-dump-parse-tree
2387
Richard Smith081ad4d2017-01-24 19:39:46 +00002388.. option:: -fexternal-blas, -fno-external-blas
2389
Richard Smith081ad4d2017-01-24 19:39:46 +00002390.. option:: -ff2c, -fno-f2c
2391
Richard Smith081ad4d2017-01-24 19:39:46 +00002392.. option:: -ffixed-form, -fno-fixed-form
2393
Richard Smith081ad4d2017-01-24 19:39:46 +00002394.. option:: -ffixed-line-length-<arg>
2395
Richard Smith081ad4d2017-01-24 19:39:46 +00002396.. option:: -ffpe-trap=<arg>
2397
Richard Smith081ad4d2017-01-24 19:39:46 +00002398.. option:: -ffree-form, -fno-free-form
2399
Richard Smith081ad4d2017-01-24 19:39:46 +00002400.. option:: -ffree-line-length-<arg>
2401
Richard Smith081ad4d2017-01-24 19:39:46 +00002402.. option:: -ffrontend-optimize, -fno-frontend-optimize
2403
Richard Smith081ad4d2017-01-24 19:39:46 +00002404.. option:: -fimplicit-none, -fno-implicit-none
2405
Richard Smith081ad4d2017-01-24 19:39:46 +00002406.. option:: -finit-character=<arg>
2407
Richard Smith081ad4d2017-01-24 19:39:46 +00002408.. option:: -finit-integer=<arg>
2409
Richard Smith081ad4d2017-01-24 19:39:46 +00002410.. option:: -finit-local-zero, -fno-init-local-zero
2411
Richard Smith081ad4d2017-01-24 19:39:46 +00002412.. option:: -finit-logical=<arg>
2413
Richard Smith081ad4d2017-01-24 19:39:46 +00002414.. option:: -finit-real=<arg>
2415
Richard Smith081ad4d2017-01-24 19:39:46 +00002416.. option:: -finteger-4-integer-8, -fno-integer-4-integer-8
2417
Richard Smith081ad4d2017-01-24 19:39:46 +00002418.. option:: -fintrinsic-modules-path, -fno-intrinsic-modules-path
2419
Richard Smith081ad4d2017-01-24 19:39:46 +00002420.. option:: -fmax-array-constructor=<arg>
2421
Richard Smith081ad4d2017-01-24 19:39:46 +00002422.. option:: -fmax-errors=<arg>
2423
Richard Smith081ad4d2017-01-24 19:39:46 +00002424.. option:: -fmax-identifier-length, -fno-max-identifier-length
2425
Richard Smith081ad4d2017-01-24 19:39:46 +00002426.. option:: -fmax-stack-var-size=<arg>
2427
Richard Smith081ad4d2017-01-24 19:39:46 +00002428.. option:: -fmax-subrecord-length=<arg>
2429
Richard Smith081ad4d2017-01-24 19:39:46 +00002430.. option:: -fmodule-private, -fno-module-private
2431
Richard Smith081ad4d2017-01-24 19:39:46 +00002432.. option:: -fpack-derived, -fno-pack-derived
2433
Richard Smith081ad4d2017-01-24 19:39:46 +00002434.. option:: -fprotect-parens, -fno-protect-parens
2435
Richard Smith081ad4d2017-01-24 19:39:46 +00002436.. option:: -frange-check, -fno-range-check
2437
Richard Smith081ad4d2017-01-24 19:39:46 +00002438.. option:: -freal-4-real-10, -fno-real-4-real-10
2439
Richard Smith081ad4d2017-01-24 19:39:46 +00002440.. option:: -freal-4-real-16, -fno-real-4-real-16
2441
Richard Smith081ad4d2017-01-24 19:39:46 +00002442.. option:: -freal-4-real-8, -fno-real-4-real-8
2443
Richard Smith081ad4d2017-01-24 19:39:46 +00002444.. option:: -freal-8-real-10, -fno-real-8-real-10
2445
Richard Smith081ad4d2017-01-24 19:39:46 +00002446.. option:: -freal-8-real-16, -fno-real-8-real-16
2447
Richard Smith081ad4d2017-01-24 19:39:46 +00002448.. option:: -freal-8-real-4, -fno-real-8-real-4
2449
Richard Smith081ad4d2017-01-24 19:39:46 +00002450.. option:: -frealloc-lhs, -fno-realloc-lhs
2451
Richard Smith081ad4d2017-01-24 19:39:46 +00002452.. option:: -frecord-marker=<arg>
2453
Richard Smith081ad4d2017-01-24 19:39:46 +00002454.. option:: -frecursive, -fno-recursive
2455
Richard Smith081ad4d2017-01-24 19:39:46 +00002456.. option:: -frepack-arrays, -fno-repack-arrays
2457
Richard Smith081ad4d2017-01-24 19:39:46 +00002458.. option:: -fsecond-underscore, -fno-second-underscore
2459
Richard Smith081ad4d2017-01-24 19:39:46 +00002460.. option:: -fsign-zero, -fno-sign-zero
2461
Richard Smith081ad4d2017-01-24 19:39:46 +00002462.. option:: -fstack-arrays, -fno-stack-arrays
2463
Richard Smith081ad4d2017-01-24 19:39:46 +00002464.. option:: -funderscoring, -fno-underscoring
2465
Richard Smith081ad4d2017-01-24 19:39:46 +00002466.. option:: -fwhole-file, -fno-whole-file
2467
Richard Smith081ad4d2017-01-24 19:39:46 +00002468.. option:: -nocpp
2469
Richard Smith081ad4d2017-01-24 19:39:46 +00002470.. option:: -static-libgfortran
2471
Richard Smithc5b2e002017-01-27 02:08:37 +00002472Linker flags
2473============
2474Flags that are passed on to the linker
2475
2476.. option:: -L<dir>, --library-directory <arg>, --library-directory=<arg>
2477
2478Add directory to library search path
2479
2480.. option:: -Mach
2481
2482.. option:: -T<script>
2483
2484Specify <script> as linker script
2485
2486.. option:: -Tbss<addr
2487
2488Set starting address of BSS to <addr>
2489
2490.. option:: -Tdata<addr
2491
2492Set starting address of BSS to <addr>
2493
2494.. option:: -Ttext<addr
2495
2496Set starting address of BSS to <addr>
2497
2498.. option:: -Wl,<arg>,<arg2>...
2499
2500Pass the comma separated arguments in <arg> to the linker
2501
2502.. option:: -X
2503
2504.. option:: -Xlinker <arg>, --for-linker <arg>, --for-linker=<arg>
2505
2506Pass <arg> to the linker
2507
2508.. program:: clang1
2509.. option:: -Z
2510.. program:: clang
2511
2512.. option:: -e<arg>, --entry
2513
2514.. option:: -filelist <arg>
2515
2516.. option:: -l<arg>
2517
2518.. option:: -r
2519
2520.. option:: -rpath <arg>
2521
2522.. option:: -s
2523
2524.. option:: -t
2525
2526.. option:: -u<arg>, --force-link <arg>, --force-link=<arg>
2527
2528.. option:: -undef
2529
2530undef all system defines
2531
2532.. option:: -undefined<arg>, --no-undefined
2533
2534.. option:: -z <arg>
2535
2536Pass -z <arg> to the linker
2537