blob: 435c43347d5676fb43c5eee246122e59bbd0c86d [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
Craig Topperd23254a2017-07-20 17:52:48 +000099.. option:: --autocomplete=<arg>
100
Richard Smith081ad4d2017-01-24 19:39:46 +0000101.. option:: -bind\_at\_load
102
Richard Smith081ad4d2017-01-24 19:39:46 +0000103.. option:: -bundle
104
Richard Smithb2c82a62017-01-27 01:54:42 +0000105.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000106.. option:: -bundle\_loader <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000107.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000108
Richard Smith081ad4d2017-01-24 19:39:46 +0000109.. option:: -client\_name<arg>
110
Richard Smith081ad4d2017-01-24 19:39:46 +0000111.. option:: -compatibility\_version<arg>
112
Richard Smith081ad4d2017-01-24 19:39:46 +0000113.. option:: --constant-cfstrings
114
Richard Smith081ad4d2017-01-24 19:39:46 +0000115.. option:: -coverage, --coverage
116
Richard Smith081ad4d2017-01-24 19:39:46 +0000117.. option:: --cuda-compile-host-device
118
119Compile CUDA code for both host and device (default). Has no effect on non-CUDA compilations.
120
Richard Smith081ad4d2017-01-24 19:39:46 +0000121.. option:: --cuda-device-only
122
123Compile CUDA code for device only
124
Richard Smith081ad4d2017-01-24 19:39:46 +0000125.. option:: --cuda-gpu-arch=<arg>, --no-cuda-gpu-arch=<arg>
126
127CUDA GPU architecture (e.g. sm\_35). May be specified more than once.
128
Richard Smith081ad4d2017-01-24 19:39:46 +0000129.. option:: --cuda-host-only
130
131Compile CUDA code for host only. Has no effect on non-CUDA compilations.
132
Richard Smith081ad4d2017-01-24 19:39:46 +0000133.. option:: --cuda-noopt-device-debug, --no-cuda-noopt-device-debug
134
135Enable device-side debug info generation. Disables ptxas optimizations.
136
Richard Smith081ad4d2017-01-24 19:39:46 +0000137.. option:: -current\_version<arg>
138
Richard Smith081ad4d2017-01-24 19:39:46 +0000139.. option:: -dead\_strip
140
Richard Smith081ad4d2017-01-24 19:39:46 +0000141.. option:: -dependency-dot <arg>
142
143Filename to write DOT-formatted header dependencies to
144
Richard Smith081ad4d2017-01-24 19:39:46 +0000145.. option:: -dependency-file <arg>
146
147Filename (or -) to write dependency output to
148
Richard Smith081ad4d2017-01-24 19:39:46 +0000149.. option:: -dumpmachine
150
Richard Smith081ad4d2017-01-24 19:39:46 +0000151.. option:: -dumpversion
152
Richard Smith081ad4d2017-01-24 19:39:46 +0000153.. option:: --dyld-prefix=<arg>, --dyld-prefix <arg>
154
Richard Smith081ad4d2017-01-24 19:39:46 +0000155.. option:: -dylib\_file <arg>
156
Richard Smith081ad4d2017-01-24 19:39:46 +0000157.. option:: -dylinker
158
Richard Smithb2c82a62017-01-27 01:54:42 +0000159.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000160.. option:: -dylinker\_install\_name<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000161.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000162
Richard Smith081ad4d2017-01-24 19:39:46 +0000163.. option:: -dynamic
164
Richard Smith081ad4d2017-01-24 19:39:46 +0000165.. option:: -dynamiclib
166
Richard Smith081ad4d2017-01-24 19:39:46 +0000167.. option:: -emit-ast
168
169Emit Clang AST files for source inputs
170
Richard Smith081ad4d2017-01-24 19:39:46 +0000171.. option:: -exported\_symbols\_list <arg>
172
Richard Smith081ad4d2017-01-24 19:39:46 +0000173.. option:: -faligned-new=<arg>
174
Richard Smith081ad4d2017-01-24 19:39:46 +0000175.. option:: -fcuda-approx-transcendentals, -fno-cuda-approx-transcendentals
176
177Use approximate transcendental functions
178
Richard Smith081ad4d2017-01-24 19:39:46 +0000179.. option:: -fcuda-flush-denormals-to-zero, -fno-cuda-flush-denormals-to-zero
180
181Flush denormal floating point values to zero in CUDA device mode.
182
Richard Smith081ad4d2017-01-24 19:39:46 +0000183.. option:: -fheinous-gnu-extensions
184
Richard Smith081ad4d2017-01-24 19:39:46 +0000185.. option:: -flat\_namespace
186
Richard Smith081ad4d2017-01-24 19:39:46 +0000187.. option:: -fopenmp-targets=<arg1>,<arg2>...
188
189Specify comma-separated list of triples OpenMP offloading targets to be supported
190
Richard Smith081ad4d2017-01-24 19:39:46 +0000191.. option:: -force\_cpusubtype\_ALL
192
Richard Smithb2c82a62017-01-27 01:54:42 +0000193.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000194.. option:: -force\_flat\_namespace
Richard Smithb2c82a62017-01-27 01:54:42 +0000195.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000196
Richard Smithb2c82a62017-01-27 01:54:42 +0000197.. program:: clang2
Richard Smith081ad4d2017-01-24 19:39:46 +0000198.. option:: -force\_load <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000199.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000200
Richard Smith081ad4d2017-01-24 19:39:46 +0000201.. option:: -framework <arg>
202
Richard Smith78e23fd2017-04-13 22:39:49 +0000203.. option:: -frtlib-add-rpath, -fno-rtlib-add-rpath
204
205Add -rpath with architecture-specific resource directory to the linker flags
206
Richard Smith081ad4d2017-01-24 19:39:46 +0000207.. option:: --gcc-toolchain=<arg>, -gcc-toolchain <arg>
208
209Use the gcc toolchain at the given directory
210
Richard Smith081ad4d2017-01-24 19:39:46 +0000211.. option:: -gcodeview
212
213Generate CodeView debug information
214
Richard Smith081ad4d2017-01-24 19:39:46 +0000215.. option:: -headerpad\_max\_install\_names<arg>
216
Richard Smith081ad4d2017-01-24 19:39:46 +0000217.. option:: -help, --help
218
219Display available options
220
Richard Smith081ad4d2017-01-24 19:39:46 +0000221.. option:: --help-hidden
222
Richard Smith081ad4d2017-01-24 19:39:46 +0000223.. option:: -image\_base <arg>
224
Richard Smith081ad4d2017-01-24 19:39:46 +0000225.. option:: -index-header-map
226
227Make the next included directory (-I or -F) an indexer header map
228
Richard Smith081ad4d2017-01-24 19:39:46 +0000229.. option:: -init <arg>
230
Richard Smith081ad4d2017-01-24 19:39:46 +0000231.. option:: -install\_name <arg>
232
Richard Smith081ad4d2017-01-24 19:39:46 +0000233.. option:: -keep\_private\_externs
234
Richard Smith081ad4d2017-01-24 19:39:46 +0000235.. option:: -lazy\_framework <arg>
236
Richard Smithb2c82a62017-01-27 01:54:42 +0000237.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000238.. option:: -lazy\_library <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000239.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000240
Richard Smith081ad4d2017-01-24 19:39:46 +0000241.. option:: -mbig-endian, -EB
242
Richard Smith081ad4d2017-01-24 19:39:46 +0000243.. option:: --migrate
244
245Run the migrator
246
Richard Smith78e23fd2017-04-13 22:39:49 +0000247.. option:: -mios-simulator-version-min=<arg>, -miphonesimulator-version-min=<arg>
248
Richard Smith081ad4d2017-01-24 19:39:46 +0000249.. option:: -mlinker-version=<arg>
250
Richard Smith081ad4d2017-01-24 19:39:46 +0000251.. option:: -mlittle-endian, -EL
252
Richard Smith081ad4d2017-01-24 19:39:46 +0000253.. option:: -mllvm <arg>
254
255Additional arguments to forward to LLVM's option processing
256
Richard Smith081ad4d2017-01-24 19:39:46 +0000257.. option:: -module-dependency-dir <arg>
258
259Directory to dump module dependencies to
260
Richard Smith78e23fd2017-04-13 22:39:49 +0000261.. option:: -mtvos-simulator-version-min=<arg>, -mappletvsimulator-version-min=<arg>
262
Richard Smith081ad4d2017-01-24 19:39:46 +0000263.. option:: -multi\_module
264
Richard Smith081ad4d2017-01-24 19:39:46 +0000265.. option:: -multiply\_defined <arg>
266
Richard Smithb2c82a62017-01-27 01:54:42 +0000267.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000268.. option:: -multiply\_defined\_unused <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000269.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000270
Richard Smith78e23fd2017-04-13 22:39:49 +0000271.. option:: -mwatchos-simulator-version-min=<arg>, -mwatchsimulator-version-min=<arg>
272
Richard Smith081ad4d2017-01-24 19:39:46 +0000273.. option:: --no-cuda-version-check
274
275Don't error out if the detected version of the CUDA install is too low for the requested CUDA gpu architecture.
276
Richard Smith081ad4d2017-01-24 19:39:46 +0000277.. option:: -no-integrated-cpp, --no-integrated-cpp
278
Richard Smith081ad4d2017-01-24 19:39:46 +0000279.. option:: -no\_dead\_strip\_inits\_and\_terms
280
Richard Smith081ad4d2017-01-24 19:39:46 +0000281.. option:: -nobuiltininc
282
283Disable builtin #include directories
284
Richard Smith081ad4d2017-01-24 19:39:46 +0000285.. option:: -nocudainc
286
Richard Smith081ad4d2017-01-24 19:39:46 +0000287.. option:: -nocudalib
288
Richard Smith081ad4d2017-01-24 19:39:46 +0000289.. option:: -nodefaultlibs
290
Richard Smith081ad4d2017-01-24 19:39:46 +0000291.. option:: -nofixprebinding
292
Richard Smith081ad4d2017-01-24 19:39:46 +0000293.. option:: -nolibc
294
Richard Smith081ad4d2017-01-24 19:39:46 +0000295.. option:: -nomultidefs
296
Craig Topperd23254a2017-07-20 17:52:48 +0000297.. option:: -nopie, -no-pie
Richard Smith081ad4d2017-01-24 19:39:46 +0000298
Richard Smith081ad4d2017-01-24 19:39:46 +0000299.. option:: -noprebind
300
Richard Smith081ad4d2017-01-24 19:39:46 +0000301.. option:: -noseglinkedit
302
Richard Smith081ad4d2017-01-24 19:39:46 +0000303.. option:: -nostartfiles
304
Richard Smith081ad4d2017-01-24 19:39:46 +0000305.. option:: -nostdinc, --no-standard-includes
306
Richard Smithb2c82a62017-01-27 01:54:42 +0000307.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000308.. option:: -nostdinc++
Richard Smithb2c82a62017-01-27 01:54:42 +0000309.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000310
311Disable standard #include directories for the C++ standard library
312
Richard Smith081ad4d2017-01-24 19:39:46 +0000313.. option:: -nostdlib, --no-standard-libraries
314
Richard Smith081ad4d2017-01-24 19:39:46 +0000315.. option:: -nostdlibinc
316
Richard Smith081ad4d2017-01-24 19:39:46 +0000317.. option:: -o<file>, --output <arg>, --output=<arg>
318
319Write output to <file>
320
Richard Smith081ad4d2017-01-24 19:39:46 +0000321.. option:: -objcmt-atomic-property
322
323Make migration to 'atomic' properties
324
Richard Smith081ad4d2017-01-24 19:39:46 +0000325.. option:: -objcmt-migrate-all
326
327Enable migration to modern ObjC
328
Richard Smith081ad4d2017-01-24 19:39:46 +0000329.. option:: -objcmt-migrate-annotation
330
331Enable migration to property and method annotations
332
Richard Smith081ad4d2017-01-24 19:39:46 +0000333.. option:: -objcmt-migrate-designated-init
334
335Enable migration to infer NS\_DESIGNATED\_INITIALIZER for initializer methods
336
Richard Smith081ad4d2017-01-24 19:39:46 +0000337.. option:: -objcmt-migrate-instancetype
338
339Enable migration to infer instancetype for method result type
340
Richard Smith081ad4d2017-01-24 19:39:46 +0000341.. option:: -objcmt-migrate-literals
342
343Enable migration to modern ObjC literals
344
Richard Smith081ad4d2017-01-24 19:39:46 +0000345.. option:: -objcmt-migrate-ns-macros
346
347Enable migration to NS\_ENUM/NS\_OPTIONS macros
348
Richard Smith081ad4d2017-01-24 19:39:46 +0000349.. option:: -objcmt-migrate-property
350
351Enable migration to modern ObjC property
352
Richard Smith081ad4d2017-01-24 19:39:46 +0000353.. option:: -objcmt-migrate-property-dot-syntax
354
355Enable migration of setter/getter messages to property-dot syntax
356
Richard Smith081ad4d2017-01-24 19:39:46 +0000357.. option:: -objcmt-migrate-protocol-conformance
358
359Enable migration to add protocol conformance on classes
360
Richard Smith081ad4d2017-01-24 19:39:46 +0000361.. option:: -objcmt-migrate-readonly-property
362
363Enable migration to modern ObjC readonly property
364
Richard Smith081ad4d2017-01-24 19:39:46 +0000365.. option:: -objcmt-migrate-readwrite-property
366
367Enable migration to modern ObjC readwrite property
368
Richard Smith081ad4d2017-01-24 19:39:46 +0000369.. option:: -objcmt-migrate-subscripting
370
371Enable migration to modern ObjC subscripting
372
Richard Smith081ad4d2017-01-24 19:39:46 +0000373.. option:: -objcmt-ns-nonatomic-iosonly
374
375Enable migration to use NS\_NONATOMIC\_IOSONLY macro for setting property's 'atomic' attribute
376
Richard Smith081ad4d2017-01-24 19:39:46 +0000377.. option:: -objcmt-returns-innerpointer-property
378
379Enable migration to annotate property with NS\_RETURNS\_INNER\_POINTER
380
Richard Smith081ad4d2017-01-24 19:39:46 +0000381.. option:: -objcmt-whitelist-dir-path=<arg>, -objcmt-white-list-dir-path=<arg>
382
383Only modify files with a filename contained in the provided directory path
384
Richard Smith081ad4d2017-01-24 19:39:46 +0000385.. option:: -object
386
Richard Smith081ad4d2017-01-24 19:39:46 +0000387.. option:: -p, --profile
388
Richard Smith081ad4d2017-01-24 19:39:46 +0000389.. option:: -pagezero\_size<arg>
390
Richard Smith081ad4d2017-01-24 19:39:46 +0000391.. option:: -pg
392
393Enable mcount instrumentation
394
Richard Smith081ad4d2017-01-24 19:39:46 +0000395.. option:: -pie
396
Richard Smith081ad4d2017-01-24 19:39:46 +0000397.. option:: -pipe, --pipe
398
399Use pipes between commands, when possible
400
Richard Smith081ad4d2017-01-24 19:39:46 +0000401.. option:: -prebind
402
Richard Smithb2c82a62017-01-27 01:54:42 +0000403.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000404.. option:: -prebind\_all\_twolevel\_modules
Richard Smithb2c82a62017-01-27 01:54:42 +0000405.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000406
Richard Smith081ad4d2017-01-24 19:39:46 +0000407.. option:: -preload
408
Richard Smith081ad4d2017-01-24 19:39:46 +0000409.. option:: --print-diagnostic-categories
410
Richard Smith081ad4d2017-01-24 19:39:46 +0000411.. option:: -print-file-name=<file>, --print-file-name=<file>, --print-file-name <arg>
412
413Print the full library path of <file>
414
Richard Smith081ad4d2017-01-24 19:39:46 +0000415.. option:: -print-ivar-layout
416
417Enable Objective-C Ivar layout bitmap print trace
418
Richard Smith081ad4d2017-01-24 19:39:46 +0000419.. option:: -print-libgcc-file-name, --print-libgcc-file-name
420
421Print the library path for the currently used compiler runtime library ("libgcc.a" or "libclang\_rt.builtins.\*.a")
422
Richard Smith081ad4d2017-01-24 19:39:46 +0000423.. option:: -print-multi-directory, --print-multi-directory
424
Richard Smith081ad4d2017-01-24 19:39:46 +0000425.. option:: -print-multi-lib, --print-multi-lib
426
Richard Smith081ad4d2017-01-24 19:39:46 +0000427.. option:: -print-prog-name=<name>, --print-prog-name=<name>, --print-prog-name <arg>
428
429Print the full program path of <name>
430
Richard Smith78e23fd2017-04-13 22:39:49 +0000431.. option:: -print-resource-dir, --print-resource-dir
432
433Print the resource directory pathname
434
Richard Smith081ad4d2017-01-24 19:39:46 +0000435.. option:: -print-search-dirs, --print-search-dirs
436
437Print the paths used for finding libraries and programs
438
Richard Smith081ad4d2017-01-24 19:39:46 +0000439.. option:: -private\_bundle
440
Richard Smith081ad4d2017-01-24 19:39:46 +0000441.. option:: -pthread, -no-pthread
442
443Support POSIX threads in generated code
444
Richard Smith081ad4d2017-01-24 19:39:46 +0000445.. option:: -pthreads
446
Richard Smith081ad4d2017-01-24 19:39:46 +0000447.. option:: -rdynamic
448
Richard Smith081ad4d2017-01-24 19:39:46 +0000449.. option:: -read\_only\_relocs <arg>
450
Richard Smith081ad4d2017-01-24 19:39:46 +0000451.. option:: -relocatable-pch, --relocatable-pch
452
453Whether to build a relocatable precompiled header
454
Richard Smith081ad4d2017-01-24 19:39:46 +0000455.. option:: -remap
456
Richard Smith081ad4d2017-01-24 19:39:46 +0000457.. option:: -rewrite-legacy-objc
458
459Rewrite Legacy Objective-C source to C++
460
Richard Smith081ad4d2017-01-24 19:39:46 +0000461.. option:: -rtlib=<arg>, --rtlib=<arg>, --rtlib <arg>
462
463Compiler runtime library to use
464
Richard Smith081ad4d2017-01-24 19:39:46 +0000465.. option:: -save-stats=<arg>, --save-stats=<arg>, -save-stats (equivalent to -save-stats=cwd), --save-stats (equivalent to -save-stats=cwd)
466
467Save llvm statistics.
468
Richard Smith081ad4d2017-01-24 19:39:46 +0000469.. option:: -save-temps=<arg>, --save-temps=<arg>, -save-temps (equivalent to -save-temps=cwd), --save-temps (equivalent to -save-temps=cwd)
470
471Save intermediate compilation results.
472
Richard Smith081ad4d2017-01-24 19:39:46 +0000473.. option:: -sectalign <arg1> <arg2> <arg3>
474
Richard Smith081ad4d2017-01-24 19:39:46 +0000475.. option:: -sectcreate <arg1> <arg2> <arg3>
476
Richard Smith081ad4d2017-01-24 19:39:46 +0000477.. option:: -sectobjectsymbols <arg1> <arg2>
478
Richard Smith081ad4d2017-01-24 19:39:46 +0000479.. option:: -sectorder <arg1> <arg2> <arg3>
480
Richard Smith081ad4d2017-01-24 19:39:46 +0000481.. option:: -seg1addr<arg>
482
Richard Smith081ad4d2017-01-24 19:39:46 +0000483.. option:: -seg\_addr\_table <arg>
484
Richard Smithb2c82a62017-01-27 01:54:42 +0000485.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000486.. option:: -seg\_addr\_table\_filename <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000487.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000488
Richard Smith081ad4d2017-01-24 19:39:46 +0000489.. option:: -segaddr <arg1> <arg2>
490
Richard Smith081ad4d2017-01-24 19:39:46 +0000491.. option:: -segcreate <arg1> <arg2> <arg3>
492
Richard Smith081ad4d2017-01-24 19:39:46 +0000493.. option:: -seglinkedit
494
Richard Smith081ad4d2017-01-24 19:39:46 +0000495.. option:: -segprot <arg1> <arg2> <arg3>
496
Richard Smith081ad4d2017-01-24 19:39:46 +0000497.. option:: -segs\_read\_<arg>
498
Richard Smithb2c82a62017-01-27 01:54:42 +0000499.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000500.. option:: -segs\_read\_only\_addr <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000501.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000502
Richard Smithb2c82a62017-01-27 01:54:42 +0000503.. program:: clang2
Richard Smith081ad4d2017-01-24 19:39:46 +0000504.. option:: -segs\_read\_write\_addr <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000505.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000506
Richard Smith081ad4d2017-01-24 19:39:46 +0000507.. option:: -serialize-diagnostics <arg>, --serialize-diagnostics <arg>
508
509Serialize compiler diagnostics to a file
510
Richard Smith081ad4d2017-01-24 19:39:46 +0000511.. option:: -shared, --shared
512
Richard Smith081ad4d2017-01-24 19:39:46 +0000513.. option:: -shared-libasan
514
Richard Smith081ad4d2017-01-24 19:39:46 +0000515.. option:: -shared-libgcc
516
Richard Smith081ad4d2017-01-24 19:39:46 +0000517.. option:: -single\_module
518
Richard Smith081ad4d2017-01-24 19:39:46 +0000519.. option:: -specs=<arg>, --specs=<arg>
520
Richard Smith081ad4d2017-01-24 19:39:46 +0000521.. option:: -static, --static
522
Richard Smith081ad4d2017-01-24 19:39:46 +0000523.. option:: -static-libgcc
524
Richard Smith081ad4d2017-01-24 19:39:46 +0000525.. option:: -static-libstdc++
526
Richard Smith081ad4d2017-01-24 19:39:46 +0000527.. option:: -std-default=<arg>
528
Richard Smith081ad4d2017-01-24 19:39:46 +0000529.. option:: -stdlib=<arg>, --stdlib=<arg>, --stdlib <arg>
530
531C++ standard library to use
532
Richard Smith081ad4d2017-01-24 19:39:46 +0000533.. option:: -sub\_library<arg>
534
Richard Smithb2c82a62017-01-27 01:54:42 +0000535.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000536.. option:: -sub\_umbrella<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000537.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000538
Richard Smith081ad4d2017-01-24 19:39:46 +0000539.. option:: --sysroot=<arg>, --sysroot <arg>
540
Richard Smith081ad4d2017-01-24 19:39:46 +0000541.. option:: --target-help
542
Richard Smith081ad4d2017-01-24 19:39:46 +0000543.. option:: --target=<arg>, -target <arg>
544
545Generate code for the given target
546
Richard Smith081ad4d2017-01-24 19:39:46 +0000547.. option:: -time
548
549Time individual commands
550
Richard Smith081ad4d2017-01-24 19:39:46 +0000551.. option:: -traditional, --traditional
552
Richard Smith081ad4d2017-01-24 19:39:46 +0000553.. option:: -traditional-cpp, --traditional-cpp
554
555Enable some traditional CPP emulation
556
Richard Smith081ad4d2017-01-24 19:39:46 +0000557.. option:: -twolevel\_namespace
558
Richard Smithb2c82a62017-01-27 01:54:42 +0000559.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000560.. option:: -twolevel\_namespace\_hints
Richard Smithb2c82a62017-01-27 01:54:42 +0000561.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000562
Richard Smith081ad4d2017-01-24 19:39:46 +0000563.. option:: -umbrella <arg>
564
Richard Smith081ad4d2017-01-24 19:39:46 +0000565.. option:: -unexported\_symbols\_list <arg>
566
Richard Smith081ad4d2017-01-24 19:39:46 +0000567.. option:: -v, --verbose
568
569Show commands to run and use verbose output
570
Richard Smith081ad4d2017-01-24 19:39:46 +0000571.. option:: --verify-debug-info
572
573Verify the binary representation of debug output
574
Richard Smith081ad4d2017-01-24 19:39:46 +0000575.. option:: --version
576
Richard Smith081ad4d2017-01-24 19:39:46 +0000577.. option:: -w, --no-warnings
578
579Suppress all warnings
580
Richard Smith081ad4d2017-01-24 19:39:46 +0000581.. option:: -weak-l<arg>
582
Richard Smith081ad4d2017-01-24 19:39:46 +0000583.. option:: -weak\_framework <arg>
584
Richard Smithb2c82a62017-01-27 01:54:42 +0000585.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000586.. option:: -weak\_library <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000587.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000588
Richard Smithb2c82a62017-01-27 01:54:42 +0000589.. program:: clang2
Richard Smith081ad4d2017-01-24 19:39:46 +0000590.. option:: -weak\_reference\_mismatches <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000591.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000592
Richard Smith081ad4d2017-01-24 19:39:46 +0000593.. option:: -whatsloaded
594
Richard Smith081ad4d2017-01-24 19:39:46 +0000595.. option:: -whyload
596
Richard Smith081ad4d2017-01-24 19:39:46 +0000597.. option:: -working-directory<arg>, -working-directory=<arg>
598
599Resolve file paths relative to the specified directory
600
Richard Smith081ad4d2017-01-24 19:39:46 +0000601.. option:: -x<language>, --language <arg>, --language=<arg>
602
603Treat subsequent input files as having type <language>
604
Richard Smith081ad4d2017-01-24 19:39:46 +0000605.. option:: -y<arg>
606
607Actions
608=======
609The action to perform on the input.
610
Richard Smith081ad4d2017-01-24 19:39:46 +0000611.. option:: -E, --preprocess
612
613Only run the preprocessor
614
Richard Smith081ad4d2017-01-24 19:39:46 +0000615.. option:: -S, --assemble
616
617Only run preprocess and compilation steps
618
Richard Smithc5b2e002017-01-27 02:08:37 +0000619.. option:: -c, --compile
620
621Only run preprocess, compile, and assemble steps
622
Richard Smith081ad4d2017-01-24 19:39:46 +0000623.. option:: -emit-llvm
624
625Use the LLVM representation for assembler and object files
626
Richard Smith081ad4d2017-01-24 19:39:46 +0000627.. option:: -fsyntax-only
628
Richard Smith081ad4d2017-01-24 19:39:46 +0000629.. option:: -module-file-info
630
631Provide information about a particular module file
632
Richard Smith081ad4d2017-01-24 19:39:46 +0000633.. option:: --precompile
634
635Only precompile the input
636
Richard Smith081ad4d2017-01-24 19:39:46 +0000637.. option:: -rewrite-objc
638
639Rewrite Objective-C source to C++
640
Richard Smith081ad4d2017-01-24 19:39:46 +0000641.. option:: -verify-pch
642
643Load and verify that a pre-compiled header file is not stale
644
645Compilation flags
646=================
647
648Flags controlling the behavior of Clang during compilation. These flags have
649no effect during actions that do not perform compilation.
650
Richard Smithc5b2e002017-01-27 02:08:37 +0000651.. option:: -Xassembler <arg>
Richard Smith081ad4d2017-01-24 19:39:46 +0000652
Richard Smithc5b2e002017-01-27 02:08:37 +0000653Pass <arg> to the assembler
Richard Smith081ad4d2017-01-24 19:39:46 +0000654
Richard Smith081ad4d2017-01-24 19:39:46 +0000655.. option:: -Xclang <arg>
656
657Pass <arg> to the clang compiler
658
Richard Smith081ad4d2017-01-24 19:39:46 +0000659.. option:: -fcomment-block-commands=<arg>,<arg2>...
660
661Treat each comma separated argument in <arg> as a documentation comment block command
662
Richard Smith081ad4d2017-01-24 19:39:46 +0000663.. option:: -fdeclspec, -fno-declspec
664
665Allow \_\_declspec as a keyword
666
Richard Smith081ad4d2017-01-24 19:39:46 +0000667.. option:: -fdepfile-entry=<arg>
668
Richard Smith081ad4d2017-01-24 19:39:46 +0000669.. option:: -fdiagnostics-fixit-info, -fno-diagnostics-fixit-info
670
Richard Smith081ad4d2017-01-24 19:39:46 +0000671.. option:: -fdiagnostics-format=<arg>
672
Richard Smith081ad4d2017-01-24 19:39:46 +0000673.. option:: -fdiagnostics-parseable-fixits
674
675Print fix-its in machine parseable form
676
Richard Smith081ad4d2017-01-24 19:39:46 +0000677.. option:: -fdiagnostics-print-source-range-info
678
679Print source range spans in numeric form
680
Richard Smith081ad4d2017-01-24 19:39:46 +0000681.. option:: -fdiagnostics-show-category=<arg>
682
Richard Smith081ad4d2017-01-24 19:39:46 +0000683.. option:: -fexperimental-new-pass-manager, -fno-experimental-new-pass-manager
684
685Enables an experimental new pass manager in LLVM.
686
Richard Smith081ad4d2017-01-24 19:39:46 +0000687.. option:: -finline-functions, -fno-inline-functions
688
689Inline suitable functions
690
Richard Smith081ad4d2017-01-24 19:39:46 +0000691.. option:: -finline-hint-functions
692
693Inline functions which are (explicitly or implicitly) marked inline
694
Richard Smith081ad4d2017-01-24 19:39:46 +0000695.. option:: -fno-crash-diagnostics
696
Richard Smith78e23fd2017-04-13 22:39:49 +0000697Disable auto-generation of preprocessed source files and a script for reproduction during a clang crash
698
Richard Smith081ad4d2017-01-24 19:39:46 +0000699.. option:: -fno-sanitize-blacklist
700
701Don't use blacklist file for sanitizers
702
Richard Smith081ad4d2017-01-24 19:39:46 +0000703.. option:: -fparse-all-comments
704
Richard Smith081ad4d2017-01-24 19:39:46 +0000705.. option:: -fsanitize-address-field-padding=<arg>
706
707Level of field padding for AddressSanitizer
708
Craig Topperd23254a2017-07-20 17:52:48 +0000709.. option:: -fsanitize-address-globals-dead-stripping
710
711Enable linker dead stripping of globals in AddressSanitizer
712
Richard Smith081ad4d2017-01-24 19:39:46 +0000713.. option:: -fsanitize-address-use-after-scope, -fno-sanitize-address-use-after-scope
714
715Enable use-after-scope detection in AddressSanitizer
716
Richard Smith081ad4d2017-01-24 19:39:46 +0000717.. option:: -fsanitize-blacklist=<arg>
718
719Path to blacklist file for sanitizers
720
Richard Smith081ad4d2017-01-24 19:39:46 +0000721.. option:: -fsanitize-cfi-cross-dso, -fno-sanitize-cfi-cross-dso
722
723Enable control flow integrity (CFI) checks for cross-DSO calls.
724
Richard Smith081ad4d2017-01-24 19:39:46 +0000725.. option:: -fsanitize-coverage=<arg1>,<arg2>..., -fno-sanitize-coverage=<arg1>,<arg2>...
726
727Specify the type of coverage instrumentation for Sanitizers
728
Richard Smith081ad4d2017-01-24 19:39:46 +0000729.. option:: -fsanitize-link-c++-runtime
730
Richard Smith081ad4d2017-01-24 19:39:46 +0000731.. option:: -fsanitize-memory-track-origins, -fno-sanitize-memory-track-origins
732
733Enable origins tracking in MemorySanitizer
734
Richard Smithb2c82a62017-01-27 01:54:42 +0000735.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000736.. option:: -fsanitize-memory-track-origins=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000737.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000738
739Enable origins tracking in MemorySanitizer
740
Richard Smith081ad4d2017-01-24 19:39:46 +0000741.. option:: -fsanitize-memory-use-after-dtor
742
743Enable use-after-destroy detection in MemorySanitizer
744
Richard Smith081ad4d2017-01-24 19:39:46 +0000745.. option:: -fsanitize-recover, -fno-sanitize-recover
746
Richard Smithb2c82a62017-01-27 01:54:42 +0000747.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000748.. option:: -fsanitize-recover=<arg1>,<arg2>..., -fno-sanitize-recover=<arg1>,<arg2>...
Richard Smithb2c82a62017-01-27 01:54:42 +0000749.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000750
751Enable recovery for specified sanitizers
752
Richard Smith081ad4d2017-01-24 19:39:46 +0000753.. option:: -fsanitize-stats, -fno-sanitize-stats
754
755Enable sanitizer statistics gathering.
756
Richard Smith081ad4d2017-01-24 19:39:46 +0000757.. option:: -fsanitize-thread-atomics, -fno-sanitize-thread-atomics
758
759Enable atomic operations instrumentation in ThreadSanitizer (default)
760
Richard Smith081ad4d2017-01-24 19:39:46 +0000761.. option:: -fsanitize-thread-func-entry-exit, -fno-sanitize-thread-func-entry-exit
762
763Enable function entry/exit instrumentation in ThreadSanitizer (default)
764
Richard Smith081ad4d2017-01-24 19:39:46 +0000765.. option:: -fsanitize-thread-memory-access, -fno-sanitize-thread-memory-access
766
767Enable memory access instrumentation in ThreadSanitizer (default)
768
Richard Smith081ad4d2017-01-24 19:39:46 +0000769.. option:: -fsanitize-trap=<arg1>,<arg2>..., -fno-sanitize-trap=<arg1>,<arg2>...
770
771Enable trapping for specified sanitizers
772
Richard Smith081ad4d2017-01-24 19:39:46 +0000773.. option:: -fsanitize-undefined-strip-path-components=<number>
774
775Strip (or keep only, if negative) a given number of path components when emitting check metadata.
776
Richard Smith081ad4d2017-01-24 19:39:46 +0000777.. option:: -fsanitize-undefined-trap-on-error, -fno-sanitize-undefined-trap-on-error
778
Richard Smith081ad4d2017-01-24 19:39:46 +0000779.. option:: -fsanitize=<check>,<arg2>..., -fno-sanitize=<arg1>,<arg2>...
780
781Turn on runtime checks for various forms of undefined or suspicious behavior. See user manual for available checks
782
Richard Smith081ad4d2017-01-24 19:39:46 +0000783.. option:: --param <arg>, --param=<arg>
784
Richard Smith081ad4d2017-01-24 19:39:46 +0000785.. option:: -std=<arg>, --std=<arg>, --std <arg>
786
787Language standard to compile for
788
Richard Smithc5b2e002017-01-27 02:08:37 +0000789Preprocessor flags
790~~~~~~~~~~~~~~~~~~
791
792Flags controlling the behavior of the Clang preprocessor.
793
794.. option:: -C, --comments
795
796Include comments in preprocessed output
797
798.. option:: -CC, --comments-in-macros
799
800Include comments from within macros in preprocessed output
801
802.. option:: -D<macro>=<value>, --define-macro <arg>, --define-macro=<arg>
803
804Define <macro> to <value> (or 1 if <value> omitted)
805
806.. option:: -H, --trace-includes
807
808Show header includes and nesting depth
809
810.. option:: -P, --no-line-commands
811
812Disable linemarker output in -E mode
813
814.. option:: -U<macro>, --undefine-macro <arg>, --undefine-macro=<arg>
815
816Undefine macro <macro>
817
818.. option:: -Wp,<arg>,<arg2>...
819
820Pass the comma separated arguments in <arg> to the preprocessor
821
822.. option:: -Xpreprocessor <arg>
823
824Pass <arg> to the preprocessor
825
Richard Smith081ad4d2017-01-24 19:39:46 +0000826Include path management
Richard Smithc5b2e002017-01-27 02:08:37 +0000827-----------------------
Richard Smith081ad4d2017-01-24 19:39:46 +0000828
829Flags controlling how ``#include``\s are resolved to files.
830
Richard Smithc5b2e002017-01-27 02:08:37 +0000831.. option:: -I<dir>, --include-directory <arg>, --include-directory=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +0000832
833Add directory to include search path
834
Richard Smith081ad4d2017-01-24 19:39:46 +0000835.. option:: -I-, --include-barrier
836
Richard Smithc5b2e002017-01-27 02:08:37 +0000837Restrict all prior -I flags to double-quoted inclusion and remove current directory from include path
838
Richard Smith081ad4d2017-01-24 19:39:46 +0000839.. option:: --cuda-path=<arg>
840
841CUDA installation path
842
Richard Smith081ad4d2017-01-24 19:39:46 +0000843.. option:: -cxx-isystem<directory>
844
845Add directory to the C++ SYSTEM include search path
846
Richard Smith081ad4d2017-01-24 19:39:46 +0000847.. option:: -fbuild-session-file=<file>
848
849Use the last modification time of <file> as the build session timestamp
850
Richard Smith081ad4d2017-01-24 19:39:46 +0000851.. option:: -fbuild-session-timestamp=<time since Epoch in seconds>
852
853Time when the current build session started
854
Richard Smith081ad4d2017-01-24 19:39:46 +0000855.. option:: -fmodules-cache-path=<directory>
856
857Specify the module cache path
858
Richard Smith081ad4d2017-01-24 19:39:46 +0000859.. option:: -fmodules-disable-diagnostic-validation
860
861Disable validation of the diagnostic options when loading the module
862
Richard Smith081ad4d2017-01-24 19:39:46 +0000863.. option:: -fmodules-prune-after=<seconds>
864
865Specify the interval (in seconds) after which a module file will be considered unused
866
Richard Smith081ad4d2017-01-24 19:39:46 +0000867.. option:: -fmodules-prune-interval=<seconds>
868
869Specify the interval (in seconds) between attempts to prune the module cache
870
Richard Smith081ad4d2017-01-24 19:39:46 +0000871.. option:: -fmodules-user-build-path <directory>
872
873Specify the module user build path
874
Richard Smith081ad4d2017-01-24 19:39:46 +0000875.. option:: -fmodules-validate-once-per-build-session
876
877Don't verify input files for the modules if the module has been successfully validated or loaded during this build session
878
Richard Smith081ad4d2017-01-24 19:39:46 +0000879.. option:: -fmodules-validate-system-headers
880
881Validate the system headers that a module depends on when loading the module
882
Richard Smith081ad4d2017-01-24 19:39:46 +0000883.. option:: -fprebuilt-module-path=<directory>
884
885Specify the prebuilt module path
886
Richard Smith081ad4d2017-01-24 19:39:46 +0000887.. option:: -i<arg>
888
Richard Smith081ad4d2017-01-24 19:39:46 +0000889.. option:: -idirafter<arg>, --include-directory-after <arg>, --include-directory-after=<arg>
890
891Add directory to AFTER include search path
892
Richard Smith081ad4d2017-01-24 19:39:46 +0000893.. option:: -iframework<arg>
894
895Add directory to SYSTEM framework search path
896
Richard Smith78e23fd2017-04-13 22:39:49 +0000897.. option:: -iframeworkwithsysroot<directory>
898
899Add directory to SYSTEM framework search path, absolute paths are relative to -isysroot
900
Richard Smith081ad4d2017-01-24 19:39:46 +0000901.. option:: -imacros<file>, --imacros<file>, --imacros=<arg>
902
903Include macros from file before parsing
904
Richard Smith081ad4d2017-01-24 19:39:46 +0000905.. option:: -include<file>, --include<file>, --include=<arg>
906
907Include file before parsing
908
Richard Smith081ad4d2017-01-24 19:39:46 +0000909.. option:: -include-pch <file>
910
911Include precompiled header file
912
Richard Smith081ad4d2017-01-24 19:39:46 +0000913.. option:: -iprefix<dir>, --include-prefix <arg>, --include-prefix=<arg>
914
915Set the -iwithprefix/-iwithprefixbefore prefix
916
Richard Smith081ad4d2017-01-24 19:39:46 +0000917.. option:: -iquote<directory>
918
919Add directory to QUOTE include search path
920
Richard Smith081ad4d2017-01-24 19:39:46 +0000921.. option:: -isysroot<dir>
922
923Set the system root directory (usually /)
924
Richard Smith081ad4d2017-01-24 19:39:46 +0000925.. option:: -isystem<directory>
926
927Add directory to SYSTEM include search path
928
Richard Smith081ad4d2017-01-24 19:39:46 +0000929.. option:: -isystem-after<directory>
930
931Add directory to end of the SYSTEM include search path
932
Richard Smith081ad4d2017-01-24 19:39:46 +0000933.. option:: -ivfsoverlay<arg>
934
935Overlay the virtual filesystem described by file over the real file system
936
Richard Smith081ad4d2017-01-24 19:39:46 +0000937.. option:: -iwithprefix<dir>, --include-with-prefix <arg>, --include-with-prefix-after <arg>, --include-with-prefix-after=<arg>, --include-with-prefix=<arg>
938
939Set directory to SYSTEM include search path with prefix
940
Richard Smith081ad4d2017-01-24 19:39:46 +0000941.. option:: -iwithprefixbefore<dir>, --include-with-prefix-before <arg>, --include-with-prefix-before=<arg>
942
943Set directory to include search path with prefix
944
Richard Smith081ad4d2017-01-24 19:39:46 +0000945.. option:: -iwithsysroot<directory>
946
947Add directory to SYSTEM include search path, absolute paths are relative to -isysroot
948
Richard Smith081ad4d2017-01-24 19:39:46 +0000949.. option:: --ptxas-path=<arg>
950
951Path to ptxas (used for compiling CUDA code)
952
Richard Smith081ad4d2017-01-24 19:39:46 +0000953.. option:: --system-header-prefix=<prefix>, --no-system-header-prefix=<prefix>, --system-header-prefix <arg>
954
955Treat all #include paths starting with <prefix> as including a system header.
956
957Dependency file generation
Richard Smithc5b2e002017-01-27 02:08:37 +0000958--------------------------
Richard Smith081ad4d2017-01-24 19:39:46 +0000959
960Flags controlling generation of a dependency file for ``make``-like build
961systems.
962
Richard Smith081ad4d2017-01-24 19:39:46 +0000963.. option:: -M, --dependencies
964
965Like -MD, but also implies -E and writes to stdout by default
966
Richard Smith081ad4d2017-01-24 19:39:46 +0000967.. option:: -MD, --write-dependencies
968
969Write a depfile containing user and system headers
970
Richard Smith081ad4d2017-01-24 19:39:46 +0000971.. option:: -MF<file>
972
973Write depfile output from -MMD, -MD, -MM, or -M to <file>
974
Richard Smith081ad4d2017-01-24 19:39:46 +0000975.. option:: -MG, --print-missing-file-dependencies
976
977Add missing headers to depfile
978
Richard Smith081ad4d2017-01-24 19:39:46 +0000979.. option:: -MJ<arg>
980
981Write a compilation database entry per input
982
Richard Smith081ad4d2017-01-24 19:39:46 +0000983.. option:: -MM, --user-dependencies
984
985Like -MMD, but also implies -E and writes to stdout by default
986
Richard Smith081ad4d2017-01-24 19:39:46 +0000987.. option:: -MMD, --write-user-dependencies
988
989Write a depfile containing user headers
990
Richard Smith081ad4d2017-01-24 19:39:46 +0000991.. option:: -MP
992
993Create phony target for each dependency (other than main file)
994
Richard Smith081ad4d2017-01-24 19:39:46 +0000995.. option:: -MQ<arg>
996
997Specify name of main file output to quote in depfile
998
Richard Smith081ad4d2017-01-24 19:39:46 +0000999.. option:: -MT<arg>
1000
1001Specify name of main file output in depfile
1002
Richard Smith081ad4d2017-01-24 19:39:46 +00001003.. option:: -MV
1004
1005Use NMake/Jom format for the depfile
1006
1007Dumping preprocessor state
Richard Smithc5b2e002017-01-27 02:08:37 +00001008--------------------------
Richard Smith081ad4d2017-01-24 19:39:46 +00001009
1010Flags allowing the state of the preprocessor to be dumped in various ways.
1011
Richard Smith081ad4d2017-01-24 19:39:46 +00001012.. option:: -d
1013
Richard Smithb2c82a62017-01-27 01:54:42 +00001014.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001015.. option:: -d<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001016.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001017
Richard Smith081ad4d2017-01-24 19:39:46 +00001018.. option:: -dA
1019
Richard Smith081ad4d2017-01-24 19:39:46 +00001020.. option:: -dD
1021
1022Print macro definitions in -E mode in addition to normal output
1023
Richard Smith081ad4d2017-01-24 19:39:46 +00001024.. option:: -dI
1025
1026Print include directives in -E mode in addition to normal output
1027
Richard Smith081ad4d2017-01-24 19:39:46 +00001028.. option:: -dM
1029
1030Print macro definitions in -E mode instead of normal output
1031
1032Diagnostic flags
1033~~~~~~~~~~~~~~~~
1034
1035Flags controlling which warnings, errors, and remarks Clang will generate.
1036See the :doc:`full list of warning and remark flags <DiagnosticsReference>`.
1037
Richard Smith081ad4d2017-01-24 19:39:46 +00001038.. option:: -R<remark>
1039
1040Enable the specified remark
1041
Richard Smith081ad4d2017-01-24 19:39:46 +00001042.. option:: -Rpass-analysis=<arg>
1043
1044Report transformation analysis from optimization passes whose name matches the given POSIX regular expression
1045
Richard Smith081ad4d2017-01-24 19:39:46 +00001046.. option:: -Rpass-missed=<arg>
1047
1048Report missed transformations by optimization passes whose name matches the given POSIX regular expression
1049
Richard Smith081ad4d2017-01-24 19:39:46 +00001050.. option:: -Rpass=<arg>
1051
1052Report transformations performed by optimization passes whose name matches the given POSIX regular expression
1053
Richard Smith081ad4d2017-01-24 19:39:46 +00001054.. option:: -W<warning>, --extra-warnings, --warn-<arg>, --warn-=<arg>
1055
1056Enable the specified warning
1057
Richard Smith081ad4d2017-01-24 19:39:46 +00001058.. option:: -Wdeprecated, -Wno-deprecated
1059
Richard Smithc5b2e002017-01-27 02:08:37 +00001060Enable warnings for deprecated constructs and define \_\_DEPRECATED
Richard Smith081ad4d2017-01-24 19:39:46 +00001061
Richard Smith081ad4d2017-01-24 19:39:46 +00001062.. option:: -Wnonportable-cfstrings<arg>, -Wno-nonportable-cfstrings<arg>
1063
Richard Smith081ad4d2017-01-24 19:39:46 +00001064Target-independent compilation options
1065~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Richard Smith081ad4d2017-01-24 19:39:46 +00001066.. option:: -Wframe-larger-than=<arg>
1067
Richard Smith081ad4d2017-01-24 19:39:46 +00001068.. option:: -fPIC, -fno-PIC
1069
Richard Smith081ad4d2017-01-24 19:39:46 +00001070.. option:: -fPIE, -fno-PIE
1071
Richard Smith081ad4d2017-01-24 19:39:46 +00001072.. option:: -faccess-control, -fno-access-control
1073
Richard Smithb2c82a62017-01-27 01:54:42 +00001074.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001075.. option:: -faligned-allocation, -faligned-new, -fno-aligned-allocation
Richard Smithb2c82a62017-01-27 01:54:42 +00001076.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001077
1078Enable C++17 aligned allocation functions
1079
Craig Topperd23254a2017-07-20 17:52:48 +00001080.. option:: -fallow-editor-placeholders, -fno-allow-editor-placeholders
1081
1082Treat editor placeholders as valid source code
1083
Richard Smith081ad4d2017-01-24 19:39:46 +00001084.. option:: -fallow-unsupported
1085
Richard Smith78e23fd2017-04-13 22:39:49 +00001086.. option:: -faltivec, -fno-altivec
Richard Smith081ad4d2017-01-24 19:39:46 +00001087
Richard Smith081ad4d2017-01-24 19:39:46 +00001088.. option:: -fansi-escape-codes
1089
1090Use ANSI escape codes for diagnostics
1091
Richard Smith081ad4d2017-01-24 19:39:46 +00001092.. option:: -fapple-kext, -findirect-virtual-calls, -fterminated-vtables
1093
1094Use Apple's kernel extensions ABI
1095
Richard Smith081ad4d2017-01-24 19:39:46 +00001096.. option:: -fapple-pragma-pack, -fno-apple-pragma-pack
1097
1098Enable Apple gcc-compatible #pragma pack handling
1099
Richard Smith081ad4d2017-01-24 19:39:46 +00001100.. option:: -fapplication-extension, -fno-application-extension
1101
1102Restrict code to those available for App Extensions
1103
Richard Smith081ad4d2017-01-24 19:39:46 +00001104.. option:: -fasm, -fno-asm
1105
Richard Smith081ad4d2017-01-24 19:39:46 +00001106.. option:: -fasm-blocks, -fno-asm-blocks
1107
Richard Smith081ad4d2017-01-24 19:39:46 +00001108.. option:: -fassociative-math, -fno-associative-math
1109
Richard Smith081ad4d2017-01-24 19:39:46 +00001110.. option:: -fassume-sane-operator-new, -fno-assume-sane-operator-new
1111
Richard Smith081ad4d2017-01-24 19:39:46 +00001112.. option:: -fast
1113
Richard Smith081ad4d2017-01-24 19:39:46 +00001114.. option:: -fastcp
1115
Richard Smith081ad4d2017-01-24 19:39:46 +00001116.. option:: -fastf
1117
Richard Smith081ad4d2017-01-24 19:39:46 +00001118.. option:: -fasynchronous-unwind-tables, -fno-asynchronous-unwind-tables
1119
Richard Smith081ad4d2017-01-24 19:39:46 +00001120.. option:: -fautolink, -fno-autolink
1121
Richard Smith081ad4d2017-01-24 19:39:46 +00001122.. option:: -fblocks, -fno-blocks
1123
1124Enable the 'blocks' language feature
1125
Richard Smith081ad4d2017-01-24 19:39:46 +00001126.. option:: -fbootclasspath=<arg>, --bootclasspath <arg>, --bootclasspath=<arg>
1127
Richard Smith081ad4d2017-01-24 19:39:46 +00001128.. option:: -fborland-extensions, -fno-borland-extensions
1129
1130Accept non-standard constructs supported by the Borland compiler
1131
Richard Smith081ad4d2017-01-24 19:39:46 +00001132.. option:: -fbracket-depth=<arg>
1133
Richard Smith081ad4d2017-01-24 19:39:46 +00001134.. option:: -fbuiltin, -fno-builtin
1135
Richard Smith081ad4d2017-01-24 19:39:46 +00001136.. option:: -fbuiltin-module-map
1137
1138Load the clang builtins module map file.
1139
Richard Smith081ad4d2017-01-24 19:39:46 +00001140.. option:: -fcaret-diagnostics, -fno-caret-diagnostics
1141
Richard Smith081ad4d2017-01-24 19:39:46 +00001142.. option:: -fclasspath=<arg>, --CLASSPATH <arg>, --CLASSPATH=<arg>, --classpath <arg>, --classpath=<arg>
1143
Richard Smith081ad4d2017-01-24 19:39:46 +00001144.. option:: -fcolor-diagnostics, -fno-color-diagnostics
1145
1146Use colors in diagnostics
1147
Richard Smith081ad4d2017-01-24 19:39:46 +00001148.. option:: -fcommon, -fno-common
1149
Richard Smith081ad4d2017-01-24 19:39:46 +00001150.. option:: -fcompile-resource=<arg>, --resource <arg>, --resource=<arg>
1151
Richard Smith081ad4d2017-01-24 19:39:46 +00001152.. option:: -fconstant-cfstrings, -fno-constant-cfstrings
1153
Richard Smith081ad4d2017-01-24 19:39:46 +00001154.. option:: -fconstant-string-class=<arg>
1155
Richard Smith081ad4d2017-01-24 19:39:46 +00001156.. option:: -fconstexpr-backtrace-limit=<arg>
1157
Richard Smith081ad4d2017-01-24 19:39:46 +00001158.. option:: -fconstexpr-depth=<arg>
1159
Richard Smith081ad4d2017-01-24 19:39:46 +00001160.. option:: -fconstexpr-steps=<arg>
1161
Richard Smith081ad4d2017-01-24 19:39:46 +00001162.. option:: -fcoroutines-ts, -fno-coroutines-ts
1163
1164Enable support for the C++ Coroutines TS
1165
Richard Smith081ad4d2017-01-24 19:39:46 +00001166.. option:: -fcoverage-mapping, -fno-coverage-mapping
1167
1168Generate coverage mapping to enable code coverage analysis
1169
Richard Smith081ad4d2017-01-24 19:39:46 +00001170.. option:: -fcreate-profile
1171
Richard Smith081ad4d2017-01-24 19:39:46 +00001172.. option:: -fcxx-exceptions, -fno-cxx-exceptions
1173
1174Enable C++ exceptions
1175
Richard Smith081ad4d2017-01-24 19:39:46 +00001176.. option:: -fcxx-modules, -fno-cxx-modules
1177
Richard Smith081ad4d2017-01-24 19:39:46 +00001178.. option:: -fdata-sections, -fno-data-sections
1179
1180Place each data in its own section (ELF Only)
1181
Richard Smith081ad4d2017-01-24 19:39:46 +00001182.. option:: -fdebug-info-for-profiling, -fno-debug-info-for-profiling
1183
1184Emit extra debug info to make sample profile more accurate.
1185
Richard Smith78e23fd2017-04-13 22:39:49 +00001186.. option:: -fdebug-macro, -fno-debug-macro
1187
1188Emit macro debug information
1189
Richard Smith081ad4d2017-01-24 19:39:46 +00001190.. option:: -fdebug-pass-arguments
1191
Richard Smith081ad4d2017-01-24 19:39:46 +00001192.. option:: -fdebug-pass-structure
1193
Richard Smith081ad4d2017-01-24 19:39:46 +00001194.. option:: -fdebug-prefix-map=<arg>
1195
1196remap file source paths in debug info
1197
Richard Smith081ad4d2017-01-24 19:39:46 +00001198.. option:: -fdebug-types-section, -fno-debug-types-section
1199
1200Place debug types in their own section (ELF Only)
1201
Richard Smith081ad4d2017-01-24 19:39:46 +00001202.. option:: -fdelayed-template-parsing, -fno-delayed-template-parsing
1203
1204Parse templated function definitions at the end of the translation unit
1205
Richard Smith081ad4d2017-01-24 19:39:46 +00001206.. option:: -fdenormal-fp-math=<arg>
1207
Richard Smith081ad4d2017-01-24 19:39:46 +00001208.. option:: -fdiagnostics-absolute-paths
1209
1210Print absolute paths in diagnostics
1211
Richard Smith081ad4d2017-01-24 19:39:46 +00001212.. option:: -fdiagnostics-color, -fno-diagnostics-color
1213
Richard Smithb2c82a62017-01-27 01:54:42 +00001214.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001215.. option:: -fdiagnostics-color=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001216.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001217
Craig Topperd23254a2017-07-20 17:52:48 +00001218.. option:: -fdiagnostics-hotness-threshold=<number>
1219
1220Prevent optimization remarks from being output if they do not have at least this profile count
1221
Richard Smith081ad4d2017-01-24 19:39:46 +00001222.. option:: -fdiagnostics-show-hotness, -fno-diagnostics-show-hotness
1223
1224Enable profile hotness information in diagnostic line
1225
Richard Smith081ad4d2017-01-24 19:39:46 +00001226.. option:: -fdiagnostics-show-note-include-stack, -fno-diagnostics-show-note-include-stack
1227
1228Display include stacks for diagnostic notes
1229
Richard Smith081ad4d2017-01-24 19:39:46 +00001230.. option:: -fdiagnostics-show-option, -fno-diagnostics-show-option
1231
1232Print option name with mappable diagnostics
1233
Richard Smith081ad4d2017-01-24 19:39:46 +00001234.. option:: -fdiagnostics-show-template-tree
1235
1236Print a template comparison tree for differing templates
1237
Richard Smith081ad4d2017-01-24 19:39:46 +00001238.. option:: -fdollars-in-identifiers, -fno-dollars-in-identifiers
1239
1240Allow '$' in identifiers
1241
Richard Smith081ad4d2017-01-24 19:39:46 +00001242.. option:: -fdwarf-directory-asm, -fno-dwarf-directory-asm
1243
Richard Smith081ad4d2017-01-24 19:39:46 +00001244.. option:: -felide-constructors, -fno-elide-constructors
1245
Richard Smith081ad4d2017-01-24 19:39:46 +00001246.. option:: -feliminate-unused-debug-symbols, -fno-eliminate-unused-debug-symbols
1247
Richard Smith081ad4d2017-01-24 19:39:46 +00001248.. option:: -fembed-bitcode=<option>, -fembed-bitcode (equivalent to -fembed-bitcode=all), -fembed-bitcode-marker (equivalent to -fembed-bitcode=marker)
1249
1250Embed LLVM bitcode (option: off, all, bitcode, marker)
1251
Richard Smith081ad4d2017-01-24 19:39:46 +00001252.. option:: -femit-all-decls
1253
1254Emit all declarations, even if unused
1255
Richard Smith081ad4d2017-01-24 19:39:46 +00001256.. option:: -femulated-tls, -fno-emulated-tls
1257
1258Use emutls functions to access thread\_local variables
1259
Richard Smith081ad4d2017-01-24 19:39:46 +00001260.. option:: -fencoding=<arg>, --encoding <arg>, --encoding=<arg>
1261
Richard Smith081ad4d2017-01-24 19:39:46 +00001262.. option:: -ferror-limit=<arg>
1263
Richard Smith081ad4d2017-01-24 19:39:46 +00001264.. option:: -fexceptions, -fno-exceptions
1265
1266Enable support for exception handling
1267
Richard Smith081ad4d2017-01-24 19:39:46 +00001268.. option:: -fexec-charset=<arg>
1269
Richard Smith081ad4d2017-01-24 19:39:46 +00001270.. option:: -fextdirs=<arg>, --extdirs <arg>, --extdirs=<arg>
1271
Richard Smith081ad4d2017-01-24 19:39:46 +00001272.. option:: -ffast-math, -fno-fast-math
1273
1274Allow aggressive, lossy floating-point optimizations
1275
Richard Smith081ad4d2017-01-24 19:39:46 +00001276.. option:: -ffinite-math-only, -fno-finite-math-only
1277
Richard Smith081ad4d2017-01-24 19:39:46 +00001278.. option:: -ffor-scope, -fno-for-scope
1279
Richard Smith081ad4d2017-01-24 19:39:46 +00001280.. option:: -ffp-contract=<arg>
1281
1282Form fused FP ops (e.g. FMAs): fast (everywhere) \| on (according to FP\_CONTRACT pragma, default) \| off (never fuse)
1283
Richard Smith081ad4d2017-01-24 19:39:46 +00001284.. option:: -ffreestanding
1285
1286Assert that the compilation takes place in a freestanding environment
1287
Richard Smith081ad4d2017-01-24 19:39:46 +00001288.. option:: -ffunction-sections, -fno-function-sections
1289
1290Place each function in its own section (ELF Only)
1291
Richard Smith081ad4d2017-01-24 19:39:46 +00001292.. option:: -fgnu-inline-asm, -fno-gnu-inline-asm
1293
Richard Smith081ad4d2017-01-24 19:39:46 +00001294.. option:: -fgnu-keywords, -fno-gnu-keywords
1295
1296Allow GNU-extension keywords regardless of language standard
1297
Richard Smith081ad4d2017-01-24 19:39:46 +00001298.. option:: -fgnu-runtime
1299
1300Generate output compatible with the standard GNU Objective-C runtime
1301
Richard Smith081ad4d2017-01-24 19:39:46 +00001302.. option:: -fgnu89-inline, -fno-gnu89-inline
1303
1304Use the gnu89 inline semantics
1305
Richard Smith081ad4d2017-01-24 19:39:46 +00001306.. option:: -fhonor-infinities, -fhonor-infinites, -fno-honor-infinities
1307
Richard Smith081ad4d2017-01-24 19:39:46 +00001308.. option:: -fhonor-nans, -fno-honor-nans
1309
Richard Smith081ad4d2017-01-24 19:39:46 +00001310.. option:: -fhosted
1311
Richard Smith081ad4d2017-01-24 19:39:46 +00001312.. option:: -fimplicit-module-maps, -fmodule-maps, -fno-implicit-module-maps
1313
1314Implicitly search the file system for module map files.
1315
Richard Smith081ad4d2017-01-24 19:39:46 +00001316.. option:: -fimplicit-modules, -fno-implicit-modules
1317
Richard Smith081ad4d2017-01-24 19:39:46 +00001318.. option:: -finput-charset=<arg>
1319
Richard Smith081ad4d2017-01-24 19:39:46 +00001320.. option:: -finstrument-functions
1321
1322Generate calls to instrument function entry and exit
1323
Richard Smith081ad4d2017-01-24 19:39:46 +00001324.. option:: -fintegrated-as, -fno-integrated-as, -integrated-as
1325
1326Enable the integrated assembler
1327
Richard Smith081ad4d2017-01-24 19:39:46 +00001328.. option:: -fjump-tables, -fno-jump-tables
1329
Richard Smith081ad4d2017-01-24 19:39:46 +00001330.. option:: -flax-vector-conversions, -fno-lax-vector-conversions
1331
Richard Smith081ad4d2017-01-24 19:39:46 +00001332.. option:: -flimited-precision=<arg>
1333
Richard Smith081ad4d2017-01-24 19:39:46 +00001334.. option:: -flto, -fno-lto
1335
1336Enable LTO in 'full' mode
1337
Richard Smith081ad4d2017-01-24 19:39:46 +00001338.. option:: -flto-jobs=<arg>
1339
1340Controls the backend parallelism of -flto=thin (default of 0 means the number of threads will be derived from the number of CPUs detected)
1341
Richard Smithb2c82a62017-01-27 01:54:42 +00001342.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001343.. option:: -flto=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001344.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001345
1346Set LTO mode to either 'full' or 'thin'
1347
Richard Smith081ad4d2017-01-24 19:39:46 +00001348.. option:: -fmacro-backtrace-limit=<arg>
1349
Richard Smith081ad4d2017-01-24 19:39:46 +00001350.. option:: -fmath-errno, -fno-math-errno
1351
1352Require math functions to indicate errors by setting errno
1353
Richard Smith081ad4d2017-01-24 19:39:46 +00001354.. option:: -fmax-type-align=<arg>
1355
1356Specify the maximum alignment to enforce on pointers lacking an explicit alignment
1357
Richard Smith081ad4d2017-01-24 19:39:46 +00001358.. option:: -fmerge-all-constants, -fno-merge-all-constants
1359
Richard Smith081ad4d2017-01-24 19:39:46 +00001360.. option:: -fmessage-length=<arg>
1361
Richard Smith081ad4d2017-01-24 19:39:46 +00001362.. option:: -fmodule-file-deps, -fno-module-file-deps
1363
Richard Smith081ad4d2017-01-24 19:39:46 +00001364.. option:: -fmodule-file=<file>
1365
1366Load this precompiled module file
1367
Richard Smith081ad4d2017-01-24 19:39:46 +00001368.. option:: -fmodule-map-file=<file>
1369
1370Load this module map file
1371
Richard Smith081ad4d2017-01-24 19:39:46 +00001372.. option:: -fmodule-name=<name>, -fmodule-implementation-of <arg>, -fmodule-name <arg>
1373
1374Specify the name of the module to build
1375
Richard Smith081ad4d2017-01-24 19:39:46 +00001376.. option:: -fmodules, -fno-modules
1377
1378Enable the 'modules' language feature
1379
Richard Smith081ad4d2017-01-24 19:39:46 +00001380.. option:: -fmodules-decluse, -fno-modules-decluse
1381
1382Require declaration of modules used within a module
1383
Richard Smith081ad4d2017-01-24 19:39:46 +00001384.. option:: -fmodules-ignore-macro=<arg>
1385
1386Ignore the definition of the given macro when building and loading modules
1387
Richard Smith081ad4d2017-01-24 19:39:46 +00001388.. option:: -fmodules-search-all, -fno-modules-search-all
1389
1390Search even non-imported modules to resolve references
1391
Richard Smith081ad4d2017-01-24 19:39:46 +00001392.. option:: -fmodules-strict-decluse
1393
1394Like -fmodules-decluse but requires all headers to be in modules
1395
Richard Smith081ad4d2017-01-24 19:39:46 +00001396.. option:: -fmodules-ts
1397
1398Enable support for the C++ Modules TS
1399
Richard Smith081ad4d2017-01-24 19:39:46 +00001400.. option:: -fms-compatibility, -fno-ms-compatibility
1401
1402Enable full Microsoft Visual C++ compatibility
1403
Richard Smith081ad4d2017-01-24 19:39:46 +00001404.. option:: -fms-compatibility-version=<arg>
1405
1406Dot-separated value representing the Microsoft compiler version number to report in \_MSC\_VER (0 = don't define it (default))
1407
Richard Smith081ad4d2017-01-24 19:39:46 +00001408.. option:: -fms-extensions, -fno-ms-extensions
1409
1410Accept some non-standard constructs supported by the Microsoft compiler
1411
Richard Smith081ad4d2017-01-24 19:39:46 +00001412.. option:: -fms-memptr-rep=<arg>
1413
Richard Smith081ad4d2017-01-24 19:39:46 +00001414.. option:: -fms-volatile<arg>
1415
Richard Smith081ad4d2017-01-24 19:39:46 +00001416.. option:: -fmsc-version=<arg>
1417
1418Microsoft compiler version number to report in \_MSC\_VER (0 = don't define it (default))
1419
Richard Smith081ad4d2017-01-24 19:39:46 +00001420.. option:: -fmudflap
1421
Richard Smith081ad4d2017-01-24 19:39:46 +00001422.. option:: -fmudflapth
1423
Richard Smith081ad4d2017-01-24 19:39:46 +00001424.. option:: -fnested-functions
1425
Richard Smith081ad4d2017-01-24 19:39:46 +00001426.. option:: -fnew-alignment=<align>, -fnew-alignment <arg>
1427
1428Specifies the largest alignment guaranteed by '::operator new(size\_t)'
1429
Richard Smith081ad4d2017-01-24 19:39:46 +00001430.. option:: -fnext-runtime
1431
Richard Smith081ad4d2017-01-24 19:39:46 +00001432.. option:: -fno-builtin-<arg>
1433
1434Disable implicit builtin knowledge of a specific function
1435
Richard Smith081ad4d2017-01-24 19:39:46 +00001436.. option:: -fno-elide-type
1437
1438Do not elide types when printing diagnostics
1439
Richard Smith081ad4d2017-01-24 19:39:46 +00001440.. option:: -fno-max-type-align
1441
Richard Smith081ad4d2017-01-24 19:39:46 +00001442.. option:: -fno-operator-names
1443
1444Do not treat C++ operator name keywords as synonyms for operators
1445
Richard Smith081ad4d2017-01-24 19:39:46 +00001446.. option:: -fno-strict-modules-decluse
1447
Richard Smith081ad4d2017-01-24 19:39:46 +00001448.. option:: -fno-working-directory
1449
Richard Smith081ad4d2017-01-24 19:39:46 +00001450.. option:: -fnoopenmp-use-tls
1451
Richard Smith081ad4d2017-01-24 19:39:46 +00001452.. option:: -fobjc-abi-version=<arg>
1453
Richard Smith081ad4d2017-01-24 19:39:46 +00001454.. option:: -fobjc-arc, -fno-objc-arc
1455
1456Synthesize retain and release calls for Objective-C pointers
1457
Richard Smith081ad4d2017-01-24 19:39:46 +00001458.. option:: -fobjc-arc-exceptions, -fno-objc-arc-exceptions
1459
1460Use EH-safe code when synthesizing retains and releases in -fobjc-arc
1461
Richard Smith081ad4d2017-01-24 19:39:46 +00001462.. option:: -fobjc-exceptions, -fno-objc-exceptions
1463
1464Enable Objective-C exceptions
1465
Richard Smith081ad4d2017-01-24 19:39:46 +00001466.. option:: -fobjc-infer-related-result-type, -fno-objc-infer-related-result-type
1467
Richard Smith081ad4d2017-01-24 19:39:46 +00001468.. option:: -fobjc-legacy-dispatch, -fno-objc-legacy-dispatch
1469
Richard Smith081ad4d2017-01-24 19:39:46 +00001470.. option:: -fobjc-link-runtime
1471
Richard Smith081ad4d2017-01-24 19:39:46 +00001472.. option:: -fobjc-nonfragile-abi, -fno-objc-nonfragile-abi
1473
Richard Smith081ad4d2017-01-24 19:39:46 +00001474.. option:: -fobjc-nonfragile-abi-version=<arg>
1475
Richard Smith081ad4d2017-01-24 19:39:46 +00001476.. option:: -fobjc-runtime=<arg>
1477
1478Specify the target Objective-C runtime kind and version
1479
Richard Smith081ad4d2017-01-24 19:39:46 +00001480.. option:: -fobjc-sender-dependent-dispatch
1481
Richard Smith081ad4d2017-01-24 19:39:46 +00001482.. option:: -fobjc-weak, -fno-objc-weak
1483
1484Enable ARC-style weak references in Objective-C
1485
Richard Smith081ad4d2017-01-24 19:39:46 +00001486.. option:: -fomit-frame-pointer, -fno-omit-frame-pointer
1487
Richard Smith081ad4d2017-01-24 19:39:46 +00001488.. option:: -fopenmp, -fno-openmp
1489
Richard Smith081ad4d2017-01-24 19:39:46 +00001490.. option:: -fopenmp-dump-offload-linker-script
1491
Richard Smith081ad4d2017-01-24 19:39:46 +00001492.. option:: -fopenmp-use-tls
1493
Richard Smith081ad4d2017-01-24 19:39:46 +00001494.. option:: -fopenmp-version=<arg>
1495
Richard Smithb2c82a62017-01-27 01:54:42 +00001496.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001497.. option:: -fopenmp=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001498.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001499
Richard Smith081ad4d2017-01-24 19:39:46 +00001500.. option:: -foperator-arrow-depth=<arg>
1501
Richard Smith081ad4d2017-01-24 19:39:46 +00001502.. option:: -foptimization-record-file=<arg>
1503
1504Specify the file name of any generated YAML optimization record
1505
Richard Smith081ad4d2017-01-24 19:39:46 +00001506.. option:: -foptimize-sibling-calls, -fno-optimize-sibling-calls
1507
Richard Smith081ad4d2017-01-24 19:39:46 +00001508.. option:: -foutput-class-dir=<arg>, --output-class-directory <arg>, --output-class-directory=<arg>
1509
Richard Smith081ad4d2017-01-24 19:39:46 +00001510.. option:: -fpack-struct, -fno-pack-struct
1511
Richard Smithb2c82a62017-01-27 01:54:42 +00001512.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001513.. option:: -fpack-struct=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001514.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001515
1516Specify the default maximum struct packing alignment
1517
Richard Smith081ad4d2017-01-24 19:39:46 +00001518.. option:: -fpascal-strings, -fno-pascal-strings, -mpascal-strings
1519
1520Recognize and construct Pascal-style string literals
1521
Richard Smith081ad4d2017-01-24 19:39:46 +00001522.. option:: -fpcc-struct-return
1523
1524Override the default ABI to return all structs on the stack
1525
Richard Smith081ad4d2017-01-24 19:39:46 +00001526.. option:: -fpch-preprocess
1527
Richard Smith081ad4d2017-01-24 19:39:46 +00001528.. option:: -fpic, -fno-pic
1529
Richard Smith081ad4d2017-01-24 19:39:46 +00001530.. option:: -fpie, -fno-pie
1531
Richard Smith081ad4d2017-01-24 19:39:46 +00001532.. option:: -fplugin=<dsopath>
1533
1534Load the named plugin (dynamic shared object)
1535
Richard Smith081ad4d2017-01-24 19:39:46 +00001536.. option:: -fpreserve-as-comments, -fno-preserve-as-comments
1537
Richard Smith081ad4d2017-01-24 19:39:46 +00001538.. option:: -fprofile-arcs, -fno-profile-arcs
1539
Richard Smith081ad4d2017-01-24 19:39:46 +00001540.. option:: -fprofile-dir=<arg>
1541
Richard Smith081ad4d2017-01-24 19:39:46 +00001542.. option:: -fprofile-generate, -fno-profile-generate
1543
1544Generate instrumented code to collect execution counts into default.profraw (overridden by LLVM\_PROFILE\_FILE env var)
1545
Richard Smithb2c82a62017-01-27 01:54:42 +00001546.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001547.. option:: -fprofile-generate=<directory>
Richard Smithb2c82a62017-01-27 01:54:42 +00001548.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001549
1550Generate instrumented code to collect execution counts into <directory>/default.profraw (overridden by LLVM\_PROFILE\_FILE env var)
1551
Richard Smith081ad4d2017-01-24 19:39:46 +00001552.. option:: -fprofile-instr-generate, -fno-profile-instr-generate
1553
1554Generate instrumented code to collect execution counts into default.profraw file (overridden by '=' form of option or LLVM\_PROFILE\_FILE env var)
1555
Richard Smithb2c82a62017-01-27 01:54:42 +00001556.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001557.. option:: -fprofile-instr-generate=<file>
Richard Smithb2c82a62017-01-27 01:54:42 +00001558.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001559
1560Generate instrumented code to collect execution counts into <file> (overridden by LLVM\_PROFILE\_FILE env var)
1561
Richard Smith081ad4d2017-01-24 19:39:46 +00001562.. option:: -fprofile-instr-use, -fno-profile-instr-use, -fprofile-use
1563
Richard Smithb2c82a62017-01-27 01:54:42 +00001564.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001565.. option:: -fprofile-instr-use=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001566.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001567
1568Use instrumentation data for profile-guided optimization
1569
Richard Smith78e23fd2017-04-13 22:39:49 +00001570.. option:: -fprofile-sample-use, -fauto-profile, -fno-profile-sample-use
1571
1572.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001573.. option:: -fprofile-sample-use=<arg>, -fauto-profile=<arg>
Richard Smith78e23fd2017-04-13 22:39:49 +00001574.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001575
1576Enable sample-based profile guided optimizations
1577
Richard Smithb2c82a62017-01-27 01:54:42 +00001578.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001579.. option:: -fprofile-use=<pathname>
Richard Smithb2c82a62017-01-27 01:54:42 +00001580.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001581
1582Use instrumentation data for profile-guided optimization. If pathname is a directory, it reads from <pathname>/default.profdata. Otherwise, it reads from file <pathname>.
1583
Richard Smith081ad4d2017-01-24 19:39:46 +00001584.. option:: -freciprocal-math, -fno-reciprocal-math
1585
1586Allow division operations to be reassociated
1587
Richard Smith081ad4d2017-01-24 19:39:46 +00001588.. option:: -freg-struct-return
1589
1590Override the default ABI to return small structs in registers
1591
Richard Smith081ad4d2017-01-24 19:39:46 +00001592.. option:: -frelaxed-template-template-args, -fno-relaxed-template-template-args
1593
1594Enable C++17 relaxed template template argument matching
1595
Richard Smith081ad4d2017-01-24 19:39:46 +00001596.. option:: -freroll-loops, -fno-reroll-loops
1597
1598Turn on loop reroller
1599
Richard Smith081ad4d2017-01-24 19:39:46 +00001600.. option:: -fretain-comments-from-system-headers
1601
Craig Topperd23254a2017-07-20 17:52:48 +00001602.. option:: -frewrite-imports, -fno-rewrite-imports
1603
Richard Smith081ad4d2017-01-24 19:39:46 +00001604.. option:: -frewrite-includes, -fno-rewrite-includes
1605
Richard Smith081ad4d2017-01-24 19:39:46 +00001606.. option:: -frewrite-map-file <arg>
1607
Richard Smithb2c82a62017-01-27 01:54:42 +00001608.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001609.. option:: -frewrite-map-file=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001610.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001611
Richard Smith081ad4d2017-01-24 19:39:46 +00001612.. option:: -fropi, -fno-ropi
1613
Richard Smith081ad4d2017-01-24 19:39:46 +00001614.. option:: -frtti, -fno-rtti
1615
Richard Smith081ad4d2017-01-24 19:39:46 +00001616.. option:: -frwpi, -fno-rwpi
1617
Richard Smith081ad4d2017-01-24 19:39:46 +00001618.. option:: -fsave-optimization-record, -fno-save-optimization-record
1619
1620Generate a YAML optimization record file
1621
Richard Smith081ad4d2017-01-24 19:39:46 +00001622.. option:: -fshort-enums, -fno-short-enums
1623
1624Allocate to an enum type only as many bytes as it needs for the declared range of possible values
1625
Richard Smith081ad4d2017-01-24 19:39:46 +00001626.. option:: -fshort-wchar, -fno-short-wchar
1627
1628Force wchar\_t to be a short unsigned int
1629
Richard Smith081ad4d2017-01-24 19:39:46 +00001630.. option:: -fshow-column, -fno-show-column
1631
Richard Smith081ad4d2017-01-24 19:39:46 +00001632.. option:: -fshow-overloads=<arg>
1633
1634Which overload candidates to show when overload resolution fails: best\|all; defaults to all
1635
Richard Smith081ad4d2017-01-24 19:39:46 +00001636.. option:: -fshow-source-location, -fno-show-source-location
1637
Richard Smith081ad4d2017-01-24 19:39:46 +00001638.. option:: -fsignaling-math, -fno-signaling-math
1639
Richard Smith081ad4d2017-01-24 19:39:46 +00001640.. option:: -fsigned-bitfields
1641
Richard Smith081ad4d2017-01-24 19:39:46 +00001642.. option:: -fsigned-char, -fno-signed-char, --signed-char
1643
Richard Smith081ad4d2017-01-24 19:39:46 +00001644.. option:: -fsigned-zeros, -fno-signed-zeros
1645
Richard Smith081ad4d2017-01-24 19:39:46 +00001646.. option:: -fsized-deallocation, -fno-sized-deallocation
1647
1648Enable C++14 sized global deallocation functions
1649
Richard Smith081ad4d2017-01-24 19:39:46 +00001650.. option:: -fsjlj-exceptions
1651
1652Use SjLj style exceptions
1653
Richard Smith081ad4d2017-01-24 19:39:46 +00001654.. option:: -fslp-vectorize, -fno-slp-vectorize, -ftree-slp-vectorize
1655
1656Enable the superword-level parallelism vectorization passes
1657
Richard Smith081ad4d2017-01-24 19:39:46 +00001658.. option:: -fspell-checking, -fno-spell-checking
1659
Richard Smith081ad4d2017-01-24 19:39:46 +00001660.. option:: -fspell-checking-limit=<arg>
1661
Richard Smith081ad4d2017-01-24 19:39:46 +00001662.. option:: -fsplit-dwarf-inlining, -fno-split-dwarf-inlining
1663
1664Place debug types in their own section (ELF Only)
1665
Richard Smith081ad4d2017-01-24 19:39:46 +00001666.. option:: -fsplit-stack
1667
Richard Smith081ad4d2017-01-24 19:39:46 +00001668.. option:: -fstack-protector, -fno-stack-protector
1669
1670Enable stack protectors for functions potentially vulnerable to stack smashing
1671
Richard Smith081ad4d2017-01-24 19:39:46 +00001672.. option:: -fstack-protector-all
1673
1674Force the usage of stack protectors for all functions
1675
Richard Smith081ad4d2017-01-24 19:39:46 +00001676.. option:: -fstack-protector-strong
1677
1678Use a strong heuristic to apply stack protectors to functions
1679
Richard Smith081ad4d2017-01-24 19:39:46 +00001680.. option:: -fstandalone-debug, -fno-limit-debug-info, -fno-standalone-debug
1681
1682Emit full debug info for all types used by the program
1683
Richard Smith081ad4d2017-01-24 19:39:46 +00001684.. option:: -fstrict-aliasing, -fno-strict-aliasing
1685
Richard Smith081ad4d2017-01-24 19:39:46 +00001686.. option:: -fstrict-enums, -fno-strict-enums
1687
1688Enable optimizations based on the strict definition of an enum's value range
1689
Richard Smith081ad4d2017-01-24 19:39:46 +00001690.. option:: -fstrict-overflow, -fno-strict-overflow
1691
Richard Smith081ad4d2017-01-24 19:39:46 +00001692.. option:: -fstrict-return, -fno-strict-return
1693
Richard Smith78e23fd2017-04-13 22:39:49 +00001694Always treat control flow paths that fall off the end of a non-void function as unreachable
Richard Smith081ad4d2017-01-24 19:39:46 +00001695
Richard Smith081ad4d2017-01-24 19:39:46 +00001696.. option:: -fstrict-vtable-pointers, -fno-strict-vtable-pointers
1697
1698Enable optimizations based on the strict rules for overwriting polymorphic C++ objects
1699
Richard Smith081ad4d2017-01-24 19:39:46 +00001700.. option:: -fstruct-path-tbaa, -fno-struct-path-tbaa
1701
Richard Smith081ad4d2017-01-24 19:39:46 +00001702.. option:: -ftabstop=<arg>
1703
Richard Smith081ad4d2017-01-24 19:39:46 +00001704.. option:: -ftemplate-backtrace-limit=<arg>
1705
Richard Smith081ad4d2017-01-24 19:39:46 +00001706.. option:: -ftemplate-depth-<arg>
1707
Richard Smith081ad4d2017-01-24 19:39:46 +00001708.. option:: -ftemplate-depth=<arg>
1709
Richard Smith081ad4d2017-01-24 19:39:46 +00001710.. option:: -ftest-coverage
1711
Richard Smith081ad4d2017-01-24 19:39:46 +00001712.. option:: -fthinlto-index=<arg>
1713
1714Perform ThinLTO importing using provided function summary index
1715
Richard Smith081ad4d2017-01-24 19:39:46 +00001716.. option:: -fthreadsafe-statics, -fno-threadsafe-statics
1717
Richard Smith081ad4d2017-01-24 19:39:46 +00001718.. option:: -ftime-report
1719
Richard Smith081ad4d2017-01-24 19:39:46 +00001720.. option:: -ftls-model=<arg>
1721
Richard Smith081ad4d2017-01-24 19:39:46 +00001722.. option:: -ftrap-function=<arg>
1723
1724Issue call to specified function rather than a trap instruction
1725
Richard Smith081ad4d2017-01-24 19:39:46 +00001726.. option:: -ftrapping-math, -fno-trapping-math
1727
Richard Smith081ad4d2017-01-24 19:39:46 +00001728.. option:: -ftrapv
1729
1730Trap on integer overflow
1731
Richard Smith081ad4d2017-01-24 19:39:46 +00001732.. option:: -ftrapv-handler <arg>
1733
Richard Smithb2c82a62017-01-27 01:54:42 +00001734.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001735.. option:: -ftrapv-handler=<function name>
Richard Smithb2c82a62017-01-27 01:54:42 +00001736.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001737
1738Specify the function to be called on overflow
1739
Richard Smith081ad4d2017-01-24 19:39:46 +00001740.. option:: -ftrigraphs, -fno-trigraphs, -trigraphs, --trigraphs
1741
1742Process trigraph sequences
1743
Richard Smith081ad4d2017-01-24 19:39:46 +00001744.. option:: -funique-section-names, -fno-unique-section-names
1745
1746Use unique names for text and data sections (ELF Only)
1747
Richard Smith081ad4d2017-01-24 19:39:46 +00001748.. option:: -funit-at-a-time, -fno-unit-at-a-time
1749
Richard Smith081ad4d2017-01-24 19:39:46 +00001750.. option:: -funroll-loops, -fno-unroll-loops
1751
1752Turn on loop unroller
1753
Richard Smith081ad4d2017-01-24 19:39:46 +00001754.. option:: -funsafe-math-optimizations, -fno-unsafe-math-optimizations
1755
Richard Smith081ad4d2017-01-24 19:39:46 +00001756.. option:: -funsigned-bitfields
1757
Richard Smith081ad4d2017-01-24 19:39:46 +00001758.. option:: -funsigned-char, -fno-unsigned-char, --unsigned-char
1759
Richard Smith081ad4d2017-01-24 19:39:46 +00001760.. option:: -funwind-tables, -fno-unwind-tables
1761
Richard Smith081ad4d2017-01-24 19:39:46 +00001762.. option:: -fuse-cxa-atexit, -fno-use-cxa-atexit
1763
Richard Smith081ad4d2017-01-24 19:39:46 +00001764.. option:: -fuse-init-array, -fno-use-init-array
1765
1766Use .init\_array instead of .ctors
1767
Richard Smith081ad4d2017-01-24 19:39:46 +00001768.. option:: -fuse-ld=<arg>
1769
Richard Smith081ad4d2017-01-24 19:39:46 +00001770.. option:: -fuse-line-directives, -fno-use-line-directives
1771
Richard Smith081ad4d2017-01-24 19:39:46 +00001772.. option:: -fveclib=<arg>
1773
1774Use the given vector functions library
1775
Richard Smith081ad4d2017-01-24 19:39:46 +00001776.. option:: -fvectorize, -fno-vectorize, -ftree-vectorize
1777
1778Enable the loop vectorization passes
1779
Richard Smith081ad4d2017-01-24 19:39:46 +00001780.. option:: -fverbose-asm, -fno-verbose-asm
1781
Richard Smith081ad4d2017-01-24 19:39:46 +00001782.. option:: -fvisibility-inlines-hidden
1783
1784Give inline C++ member functions default visibility by default
1785
Richard Smith081ad4d2017-01-24 19:39:46 +00001786.. option:: -fvisibility-ms-compat
1787
1788Give global types 'default' visibility and global functions and variables 'hidden' visibility by default
1789
Richard Smith081ad4d2017-01-24 19:39:46 +00001790.. option:: -fvisibility=<arg>
1791
1792Set the default symbol visibility for all global declarations
1793
Richard Smith081ad4d2017-01-24 19:39:46 +00001794.. option:: -fwhole-program-vtables, -fno-whole-program-vtables
1795
1796Enables whole-program vtable optimization. Requires -flto
1797
Richard Smith081ad4d2017-01-24 19:39:46 +00001798.. option:: -fwrapv, -fno-wrapv
1799
1800Treat signed integer overflow as two's complement
1801
Richard Smith081ad4d2017-01-24 19:39:46 +00001802.. option:: -fwritable-strings
1803
1804Store string literals as writable data
1805
Richard Smith78e23fd2017-04-13 22:39:49 +00001806.. option:: -fxray-always-instrument=<arg>
1807
1808Filename defining the whitelist for imbuing the 'always instrument' XRay attribute.
1809
Richard Smith081ad4d2017-01-24 19:39:46 +00001810.. option:: -fxray-instruction-threshold<arg>
1811
Richard Smithb2c82a62017-01-27 01:54:42 +00001812.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001813.. option:: -fxray-instruction-threshold=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001814.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001815
1816Sets the minimum function size to instrument with XRay
1817
Richard Smith081ad4d2017-01-24 19:39:46 +00001818.. option:: -fxray-instrument, -fno-xray-instrument
1819
1820Generate XRay instrumentation sleds on function entry and exit
1821
Richard Smith78e23fd2017-04-13 22:39:49 +00001822.. option:: -fxray-never-instrument=<arg>
1823
1824Filename defining the whitelist for imbuing the 'never instrument' XRay attribute.
1825
Richard Smith081ad4d2017-01-24 19:39:46 +00001826.. option:: -fzero-initialized-in-bss, -fno-zero-initialized-in-bss
1827
Richard Smith081ad4d2017-01-24 19:39:46 +00001828.. option:: -fzvector, -fno-zvector, -mzvector
1829
1830Enable System z vector language extension
1831
Richard Smith081ad4d2017-01-24 19:39:46 +00001832.. option:: -pedantic, --pedantic, -no-pedantic, --no-pedantic
1833
Richard Smith081ad4d2017-01-24 19:39:46 +00001834.. option:: -pedantic-errors, --pedantic-errors
1835
1836OpenCL flags
1837------------
Richard Smith081ad4d2017-01-24 19:39:46 +00001838.. option:: -cl-denorms-are-zero
1839
1840OpenCL only. Allow denormals to be flushed to zero.
1841
Richard Smith081ad4d2017-01-24 19:39:46 +00001842.. option:: -cl-fast-relaxed-math
1843
1844OpenCL only. Sets -cl-finite-math-only and -cl-unsafe-math-optimizations, and defines \_\_FAST\_RELAXED\_MATH\_\_.
1845
Richard Smith081ad4d2017-01-24 19:39:46 +00001846.. option:: -cl-finite-math-only
1847
1848OpenCL only. Allow floating-point optimizations that assume arguments and results are not NaNs or +-Inf.
1849
Richard Smith081ad4d2017-01-24 19:39:46 +00001850.. option:: -cl-fp32-correctly-rounded-divide-sqrt
1851
1852OpenCL only. Specify that single precision floating-point divide and sqrt used in the program source are correctly rounded.
1853
Richard Smith081ad4d2017-01-24 19:39:46 +00001854.. option:: -cl-kernel-arg-info
1855
1856OpenCL only. Generate kernel argument metadata.
1857
Richard Smith081ad4d2017-01-24 19:39:46 +00001858.. option:: -cl-mad-enable
1859
1860OpenCL only. Allow use of less precise MAD computations in the generated binary.
1861
Richard Smith081ad4d2017-01-24 19:39:46 +00001862.. option:: -cl-no-signed-zeros
1863
1864OpenCL only. Allow use of less precise no signed zeros computations in the generated binary.
1865
Richard Smith081ad4d2017-01-24 19:39:46 +00001866.. option:: -cl-opt-disable
1867
1868OpenCL only. This option disables all optimizations. By default optimizations are enabled.
1869
Richard Smith081ad4d2017-01-24 19:39:46 +00001870.. option:: -cl-single-precision-constant
1871
1872OpenCL only. Treat double precision floating-point constant as single precision constant.
1873
Richard Smith081ad4d2017-01-24 19:39:46 +00001874.. option:: -cl-std=<arg>
1875
1876OpenCL language standard to compile for.
1877
Richard Smith081ad4d2017-01-24 19:39:46 +00001878.. option:: -cl-strict-aliasing
1879
1880OpenCL only. This option is added for compatibility with OpenCL 1.0.
1881
Richard Smith081ad4d2017-01-24 19:39:46 +00001882.. option:: -cl-unsafe-math-optimizations
1883
1884OpenCL only. Allow unsafe floating-point optimizations. Also implies -cl-no-signed-zeros and -cl-mad-enable.
1885
1886Target-dependent compilation options
1887~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Richard Smithc5b2e002017-01-27 02:08:37 +00001888.. option:: -G<size>, -G=<arg>, -msmall-data-threshold=<arg>
1889
1890Put objects of at most <size> bytes into small data section (MIPS / Hexagon)
1891
Richard Smith081ad4d2017-01-24 19:39:46 +00001892.. option:: -m16
1893
Richard Smith081ad4d2017-01-24 19:39:46 +00001894.. option:: -m32
1895
Richard Smith081ad4d2017-01-24 19:39:46 +00001896.. option:: -m64
1897
Richard Smith081ad4d2017-01-24 19:39:46 +00001898.. option:: -mabi=<arg>
1899
Richard Smith081ad4d2017-01-24 19:39:46 +00001900.. option:: -mabicalls, -mno-abicalls
1901
1902Enable SVR4-style position-independent code (Mips only)
1903
Richard Smith081ad4d2017-01-24 19:39:46 +00001904.. option:: -malign-double
1905
1906Align doubles to two words in structs (x86 only)
1907
Richard Smith081ad4d2017-01-24 19:39:46 +00001908.. option:: -march=<arg>
1909
Richard Smith081ad4d2017-01-24 19:39:46 +00001910.. option:: -masm=<arg>
1911
Richard Smith081ad4d2017-01-24 19:39:46 +00001912.. option:: -mbackchain, -mno-backchain
1913
1914Link stack frames through backchain on System Z
1915
Richard Smith081ad4d2017-01-24 19:39:46 +00001916.. option:: -mcheck-zero-division, -mno-check-zero-division
1917
Richard Smith081ad4d2017-01-24 19:39:46 +00001918.. option:: -mcmodel=<arg>
1919
Richard Smith081ad4d2017-01-24 19:39:46 +00001920.. option:: -mcompact-branches=<arg>
1921
Richard Smith081ad4d2017-01-24 19:39:46 +00001922.. option:: -mconsole<arg>
1923
Richard Smith78e23fd2017-04-13 22:39:49 +00001924.. option:: -mcpu=<arg>, -mv4 (equivalent to -mcpu=hexagonv4), -mv5 (equivalent to -mcpu=hexagonv5), -mv55 (equivalent to -mcpu=hexagonv55), -mv60 (equivalent to -mcpu=hexagonv60), -mv62 (equivalent to -mcpu=hexagonv62)
Richard Smith081ad4d2017-01-24 19:39:46 +00001925
Craig Topperd23254a2017-07-20 17:52:48 +00001926.. option:: -mdefault-build-attributes<arg>, -mno-default-build-attributes<arg>
1927
Richard Smith081ad4d2017-01-24 19:39:46 +00001928.. option:: -mdll<arg>
1929
Richard Smith081ad4d2017-01-24 19:39:46 +00001930.. option:: -mdouble-float
1931
Richard Smith081ad4d2017-01-24 19:39:46 +00001932.. option:: -mdsp, -mno-dsp
1933
Richard Smith081ad4d2017-01-24 19:39:46 +00001934.. option:: -mdspr2, -mno-dspr2
1935
Richard Smith081ad4d2017-01-24 19:39:46 +00001936.. option:: -mdynamic-no-pic<arg>
1937
Richard Smith081ad4d2017-01-24 19:39:46 +00001938.. option:: -meabi <arg>
1939
1940Set EABI type, e.g. 4, 5 or gnu (default depends on triple)
1941
Richard Smith78e23fd2017-04-13 22:39:49 +00001942.. option:: -mfentry
1943
1944Insert calls to fentry at function entry (x86 only)
1945
Richard Smith081ad4d2017-01-24 19:39:46 +00001946.. option:: -mfloat-abi=<arg>
1947
Richard Smith081ad4d2017-01-24 19:39:46 +00001948.. option:: -mfp32
1949
1950Use 32-bit floating point registers (MIPS only)
1951
Richard Smith081ad4d2017-01-24 19:39:46 +00001952.. option:: -mfp64
1953
1954Use 64-bit floating point registers (MIPS only)
1955
Richard Smith081ad4d2017-01-24 19:39:46 +00001956.. option:: -mfpmath=<arg>
1957
Richard Smith081ad4d2017-01-24 19:39:46 +00001958.. option:: -mfpu=<arg>
1959
Richard Smith081ad4d2017-01-24 19:39:46 +00001960.. option:: -mglobal-merge, -mno-global-merge
1961
1962Enable merging of globals
1963
Craig Topperd23254a2017-07-20 17:52:48 +00001964.. option:: -mgpopt, -mno-gpopt
1965
1966Use GP relative accesses for symbols known to be in a small data section (MIPS)
1967
Richard Smith081ad4d2017-01-24 19:39:46 +00001968.. option:: -mhard-float
1969
Richard Smith081ad4d2017-01-24 19:39:46 +00001970.. option:: -mhwdiv=<arg>, --mhwdiv <arg>, --mhwdiv=<arg>
1971
Richard Smith081ad4d2017-01-24 19:39:46 +00001972.. option:: -miamcu, -mno-iamcu
1973
1974Use Intel MCU ABI
1975
Richard Smith081ad4d2017-01-24 19:39:46 +00001976.. option:: -mimplicit-float, -mno-implicit-float
1977
Richard Smith081ad4d2017-01-24 19:39:46 +00001978.. option:: -mimplicit-it=<arg>
1979
Richard Smith081ad4d2017-01-24 19:39:46 +00001980.. option:: -mincremental-linker-compatible, -mno-incremental-linker-compatible
1981
1982(integrated-as) Emit an object file which can be used with an incremental linker
1983
Richard Smith78e23fd2017-04-13 22:39:49 +00001984.. option:: -miphoneos-version-min=<arg>, -mios-version-min=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00001985
Richard Smith081ad4d2017-01-24 19:39:46 +00001986.. option:: -mips16
1987
Richard Smith081ad4d2017-01-24 19:39:46 +00001988.. option:: -mkernel
1989
Richard Smith081ad4d2017-01-24 19:39:46 +00001990.. option:: -mldc1-sdc1, -mno-ldc1-sdc1
1991
Richard Smith081ad4d2017-01-24 19:39:46 +00001992.. option:: -mlong-calls, -mno-long-calls
1993
1994Generate branches with extended addressability, usually via indirect jumps.
1995
Craig Topperd23254a2017-07-20 17:52:48 +00001996.. option:: -mmacosx-version-min=<arg>, -mmacos-version-min=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00001997
1998Set Mac OS X deployment target
1999
Craig Topperd23254a2017-07-20 17:52:48 +00002000.. option:: -mmadd4, -mno-madd4
2001
2002Enable the generation of 4-operand madd.s, madd.d and related instructions.
2003
2004.. option:: -mmcu=<arg>
2005
Richard Smith081ad4d2017-01-24 19:39:46 +00002006.. option:: -mmicromips, -mno-micromips
2007
Richard Smith081ad4d2017-01-24 19:39:46 +00002008.. option:: -mms-bitfields, -mno-ms-bitfields
2009
2010Set the default structure layout to be compatible with the Microsoft compiler standard
2011
Richard Smith081ad4d2017-01-24 19:39:46 +00002012.. option:: -mmsa, -mno-msa
2013
2014Enable MSA ASE (MIPS only)
2015
Craig Topperd23254a2017-07-20 17:52:48 +00002016.. option:: -mmt, -mno-mt
2017
2018Enable MT ASE (MIPS only)
2019
Richard Smith081ad4d2017-01-24 19:39:46 +00002020.. option:: -mnan=<arg>
2021
Richard Smith081ad4d2017-01-24 19:39:46 +00002022.. option:: -mno-mips16
2023
Richard Smith081ad4d2017-01-24 19:39:46 +00002024.. option:: -momit-leaf-frame-pointer, -mno-omit-leaf-frame-pointer
2025
2026Omit frame pointer setup for leaf functions
2027
Richard Smith081ad4d2017-01-24 19:39:46 +00002028.. option:: -moslib=<arg>
2029
Richard Smith081ad4d2017-01-24 19:39:46 +00002030.. option:: -mpie-copy-relocations, -mno-pie-copy-relocations
2031
2032Use copy relocations support for PIE builds
2033
Richard Smith081ad4d2017-01-24 19:39:46 +00002034.. option:: -mqdsp6-compat
2035
2036Enable hexagon-qdsp6 backward compatibility
2037
Richard Smith081ad4d2017-01-24 19:39:46 +00002038.. option:: -mrecip
2039
Richard Smithb2c82a62017-01-27 01:54:42 +00002040.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00002041.. option:: -mrecip=<arg1>,<arg2>...
Richard Smithb2c82a62017-01-27 01:54:42 +00002042.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00002043
Richard Smith081ad4d2017-01-24 19:39:46 +00002044.. option:: -mred-zone, -mno-red-zone
2045
Richard Smith081ad4d2017-01-24 19:39:46 +00002046.. option:: -mregparm=<arg>
2047
Richard Smith081ad4d2017-01-24 19:39:46 +00002048.. option:: -mrelax-all, -mno-relax-all
2049
2050(integrated-as) Relax all machine instructions
2051
Richard Smith081ad4d2017-01-24 19:39:46 +00002052.. option:: -mrtd, -mno-rtd
2053
2054Make StdCall calling convention the default
2055
Richard Smith081ad4d2017-01-24 19:39:46 +00002056.. option:: -msingle-float
2057
Richard Smith081ad4d2017-01-24 19:39:46 +00002058.. option:: -msoft-float, -mno-soft-float
2059
2060Use software floating point
2061
Richard Smith081ad4d2017-01-24 19:39:46 +00002062.. option:: -mstack-alignment=<arg>
2063
2064Set the stack alignment
2065
Richard Smith081ad4d2017-01-24 19:39:46 +00002066.. option:: -mstack-probe-size=<arg>
2067
2068Set the stack probe size
2069
Richard Smith081ad4d2017-01-24 19:39:46 +00002070.. option:: -mstackrealign, -mno-stackrealign
2071
2072Force realign the stack at entry to every function
2073
Richard Smith081ad4d2017-01-24 19:39:46 +00002074.. option:: -mthread-model <arg>
2075
2076The thread model to use, e.g. posix, single (posix by default)
2077
Richard Smith081ad4d2017-01-24 19:39:46 +00002078.. option:: -mthreads<arg>
2079
Richard Smith081ad4d2017-01-24 19:39:46 +00002080.. option:: -mthumb, -mno-thumb
2081
Richard Smith081ad4d2017-01-24 19:39:46 +00002082.. option:: -mtune=<arg>
2083
Richard Smith78e23fd2017-04-13 22:39:49 +00002084.. option:: -mtvos-version-min=<arg>, -mappletvos-version-min=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00002085
Richard Smith081ad4d2017-01-24 19:39:46 +00002086.. option:: -municode<arg>
2087
Richard Smith081ad4d2017-01-24 19:39:46 +00002088.. option:: -mvx, -mno-vx
2089
Richard Smith081ad4d2017-01-24 19:39:46 +00002090.. option:: -mwarn-nonportable-cfstrings, -mno-warn-nonportable-cfstrings
2091
Richard Smith78e23fd2017-04-13 22:39:49 +00002092.. option:: -mwatchos-version-min=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00002093
Richard Smith081ad4d2017-01-24 19:39:46 +00002094.. option:: -mwindows<arg>
2095
Richard Smith081ad4d2017-01-24 19:39:46 +00002096.. option:: -mx32
2097
Richard Smith081ad4d2017-01-24 19:39:46 +00002098.. option:: -mxgot, -mno-xgot
2099
2100AARCH64
2101-------
Richard Smith081ad4d2017-01-24 19:39:46 +00002102.. option:: -ffixed-x18
2103
2104Reserve the x18 register (AArch64 only)
2105
Richard Smith081ad4d2017-01-24 19:39:46 +00002106.. option:: -mfix-cortex-a53-835769, -mno-fix-cortex-a53-835769
2107
2108Workaround Cortex-A53 erratum 835769 (AArch64 only)
2109
Richard Smith081ad4d2017-01-24 19:39:46 +00002110.. option:: -mgeneral-regs-only
2111
2112Generate code which only uses the general purpose registers (AArch64 only)
2113
2114AMDGPU
2115------
2116ARM
2117---
Richard Smith081ad4d2017-01-24 19:39:46 +00002118.. option:: -ffixed-r9
2119
2120Reserve the r9 register (ARM only)
2121
Richard Smith081ad4d2017-01-24 19:39:46 +00002122.. option:: -mcrc
2123
2124Allow use of CRC instructions (ARM only)
2125
Richard Smith081ad4d2017-01-24 19:39:46 +00002126.. option:: -mexecute-only, -mno-execute-only, -mpure-code
2127
2128Disallow generation of data access to code sections (ARM only)
2129
Richard Smith081ad4d2017-01-24 19:39:46 +00002130.. option:: -mno-movt
2131
2132Disallow use of movt/movw pairs (ARM only)
2133
Richard Smith78e23fd2017-04-13 22:39:49 +00002134.. option:: -mno-neg-immediates
2135
2136Disallow converting instructions with negative immediates to their negation or inversion.
2137
Richard Smith081ad4d2017-01-24 19:39:46 +00002138.. option:: -mnocrc
2139
2140Disallow use of CRC instructions (ARM only)
2141
Richard Smith081ad4d2017-01-24 19:39:46 +00002142.. option:: -mrestrict-it, -mno-restrict-it
2143
2144Disallow generation of deprecated IT blocks for ARMv8. It is on by default for ARMv8 Thumb mode.
2145
Richard Smith081ad4d2017-01-24 19:39:46 +00002146.. option:: -munaligned-access, -mno-unaligned-access
2147
2148Allow memory accesses to be unaligned (AArch32/AArch64 only)
2149
2150Hexagon
2151-------
Richard Smith081ad4d2017-01-24 19:39:46 +00002152.. option:: -mhvx, -mno-hvx
2153
2154Enable Hexagon Vector eXtensions
2155
Richard Smith081ad4d2017-01-24 19:39:46 +00002156.. option:: -mhvx-double, -mno-hvx-double
2157
2158Enable Hexagon Double Vector eXtensions
2159
Richard Smith081ad4d2017-01-24 19:39:46 +00002160.. option:: -mieee-rnd-near
2161
2162PowerPC
2163-------
Richard Smith78e23fd2017-04-13 22:39:49 +00002164.. option:: -maltivec, -mno-altivec
2165
Richard Smith081ad4d2017-01-24 19:39:46 +00002166.. option:: -mcmpb, -mno-cmpb
2167
Richard Smith081ad4d2017-01-24 19:39:46 +00002168.. option:: -mcrbits, -mno-crbits
2169
Richard Smith081ad4d2017-01-24 19:39:46 +00002170.. option:: -mcrypto, -mno-crypto
2171
Richard Smith081ad4d2017-01-24 19:39:46 +00002172.. option:: -mdirect-move, -mno-direct-move
2173
Richard Smith081ad4d2017-01-24 19:39:46 +00002174.. option:: -mfloat128, -mno-float128
2175
Richard Smith081ad4d2017-01-24 19:39:46 +00002176.. option:: -mfprnd, -mno-fprnd
2177
Richard Smith081ad4d2017-01-24 19:39:46 +00002178.. option:: -mhtm, -mno-htm
2179
Richard Smith081ad4d2017-01-24 19:39:46 +00002180.. option:: -minvariant-function-descriptors, -mno-invariant-function-descriptors
2181
Richard Smith081ad4d2017-01-24 19:39:46 +00002182.. option:: -misel, -mno-isel
2183
Richard Smith081ad4d2017-01-24 19:39:46 +00002184.. option:: -mlongcall, -mno-longcall
2185
Richard Smith081ad4d2017-01-24 19:39:46 +00002186.. option:: -mmfocrf, -mmfcrf, -mno-mfocrf
2187
Richard Smith081ad4d2017-01-24 19:39:46 +00002188.. option:: -mpopcntd, -mno-popcntd
2189
Richard Smith081ad4d2017-01-24 19:39:46 +00002190.. option:: -mpower8-vector, -mno-power8-vector
2191
Richard Smith081ad4d2017-01-24 19:39:46 +00002192.. option:: -mpower9-vector, -mno-power9-vector
2193
Richard Smith081ad4d2017-01-24 19:39:46 +00002194.. option:: -mqpx, -mno-qpx
2195
Richard Smith081ad4d2017-01-24 19:39:46 +00002196.. option:: -mvsx, -mno-vsx
2197
2198WebAssembly
2199-----------
Richard Smith081ad4d2017-01-24 19:39:46 +00002200.. option:: -msimd128, -mno-simd128
2201
2202X86
2203---
Richard Smith081ad4d2017-01-24 19:39:46 +00002204.. option:: -m3dnow, -mno-3dnow
2205
Richard Smith081ad4d2017-01-24 19:39:46 +00002206.. option:: -m3dnowa, -mno-3dnowa
2207
Richard Smith081ad4d2017-01-24 19:39:46 +00002208.. option:: -madx, -mno-adx
2209
Richard Smith081ad4d2017-01-24 19:39:46 +00002210.. option:: -maes, -mno-aes
2211
Richard Smith081ad4d2017-01-24 19:39:46 +00002212.. option:: -mavx, -mno-avx
2213
Richard Smith081ad4d2017-01-24 19:39:46 +00002214.. option:: -mavx2, -mno-avx2
2215
Richard Smith081ad4d2017-01-24 19:39:46 +00002216.. option:: -mavx512bw, -mno-avx512bw
2217
Richard Smith081ad4d2017-01-24 19:39:46 +00002218.. option:: -mavx512cd, -mno-avx512cd
2219
Richard Smith081ad4d2017-01-24 19:39:46 +00002220.. option:: -mavx512dq, -mno-avx512dq
2221
Richard Smith081ad4d2017-01-24 19:39:46 +00002222.. option:: -mavx512er, -mno-avx512er
2223
Richard Smith081ad4d2017-01-24 19:39:46 +00002224.. option:: -mavx512f, -mno-avx512f
2225
Richard Smith081ad4d2017-01-24 19:39:46 +00002226.. option:: -mavx512ifma, -mno-avx512ifma
2227
Richard Smith081ad4d2017-01-24 19:39:46 +00002228.. option:: -mavx512pf, -mno-avx512pf
2229
Richard Smith081ad4d2017-01-24 19:39:46 +00002230.. option:: -mavx512vbmi, -mno-avx512vbmi
2231
Richard Smith081ad4d2017-01-24 19:39:46 +00002232.. option:: -mavx512vl, -mno-avx512vl
2233
Craig Topperd23254a2017-07-20 17:52:48 +00002234.. option:: -mavx512vpopcntdq, -mno-avx512vpopcntdq
2235
Richard Smith081ad4d2017-01-24 19:39:46 +00002236.. option:: -mbmi, -mno-bmi
2237
Richard Smith081ad4d2017-01-24 19:39:46 +00002238.. option:: -mbmi2, -mno-bmi2
2239
Craig Topper78b47872017-02-08 06:48:58 +00002240.. option:: -mclflushopt, -mno-clflushopt
2241
Craig Topper177a57c2017-02-08 07:57:01 +00002242.. option:: -mclwb, -mno-clwb
2243
Richard Smith78e23fd2017-04-13 22:39:49 +00002244.. option:: -mclzero, -mno-clzero
2245
Richard Smith081ad4d2017-01-24 19:39:46 +00002246.. option:: -mcx16, -mno-cx16
2247
Richard Smith081ad4d2017-01-24 19:39:46 +00002248.. option:: -mf16c, -mno-f16c
2249
Richard Smith081ad4d2017-01-24 19:39:46 +00002250.. option:: -mfma, -mno-fma
2251
Richard Smith081ad4d2017-01-24 19:39:46 +00002252.. option:: -mfma4, -mno-fma4
2253
Richard Smith081ad4d2017-01-24 19:39:46 +00002254.. option:: -mfsgsbase, -mno-fsgsbase
2255
Richard Smith081ad4d2017-01-24 19:39:46 +00002256.. option:: -mfxsr, -mno-fxsr
2257
Craig Topperd23254a2017-07-20 17:52:48 +00002258.. option:: -mlwp, -mno-lwp
2259
Richard Smith081ad4d2017-01-24 19:39:46 +00002260.. option:: -mlzcnt, -mno-lzcnt
2261
Richard Smith081ad4d2017-01-24 19:39:46 +00002262.. option:: -mmmx, -mno-mmx
2263
Craig Topper177a57c2017-02-08 07:57:01 +00002264.. option:: -mmovbe, -mno-movbe
2265
Craig Topperb16cb822017-02-08 07:56:42 +00002266.. option:: -mmpx, -mno-mpx
2267
Richard Smith081ad4d2017-01-24 19:39:46 +00002268.. option:: -mmwaitx, -mno-mwaitx
2269
Richard Smith081ad4d2017-01-24 19:39:46 +00002270.. option:: -mpclmul, -mno-pclmul
2271
Richard Smith081ad4d2017-01-24 19:39:46 +00002272.. option:: -mpku, -mno-pku
2273
Richard Smith081ad4d2017-01-24 19:39:46 +00002274.. option:: -mpopcnt, -mno-popcnt
2275
Craig Topperd2bf7b02017-02-08 08:23:40 +00002276.. option:: -mprefetchwt1, -mno-prefetchwt1
2277
Richard Smith081ad4d2017-01-24 19:39:46 +00002278.. option:: -mprfchw, -mno-prfchw
2279
Richard Smith081ad4d2017-01-24 19:39:46 +00002280.. option:: -mrdrnd, -mno-rdrnd
2281
Richard Smith081ad4d2017-01-24 19:39:46 +00002282.. option:: -mrdseed, -mno-rdseed
2283
Richard Smith081ad4d2017-01-24 19:39:46 +00002284.. option:: -mrtm, -mno-rtm
2285
Craig Topper204ecff2017-02-08 08:23:17 +00002286.. option:: -msgx, -mno-sgx
2287
Richard Smith081ad4d2017-01-24 19:39:46 +00002288.. option:: -msha, -mno-sha
2289
Richard Smith081ad4d2017-01-24 19:39:46 +00002290.. option:: -msse, -mno-sse
2291
Richard Smith081ad4d2017-01-24 19:39:46 +00002292.. option:: -msse2, -mno-sse2
2293
Richard Smith081ad4d2017-01-24 19:39:46 +00002294.. option:: -msse3, -mno-sse3
2295
Richard Smith081ad4d2017-01-24 19:39:46 +00002296.. option:: -msse4.1, -mno-sse4.1
2297
Richard Smithb2c82a62017-01-27 01:54:42 +00002298.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00002299.. option:: -msse4.2, -mno-sse4.2, -msse4
Richard Smithb2c82a62017-01-27 01:54:42 +00002300.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00002301
Richard Smith081ad4d2017-01-24 19:39:46 +00002302.. option:: -msse4a, -mno-sse4a
2303
Richard Smith081ad4d2017-01-24 19:39:46 +00002304.. option:: -mssse3, -mno-ssse3
2305
Richard Smith081ad4d2017-01-24 19:39:46 +00002306.. option:: -mtbm, -mno-tbm
2307
Richard Smith081ad4d2017-01-24 19:39:46 +00002308.. option:: -mx87, -m80387, -mno-x87
2309
Richard Smith081ad4d2017-01-24 19:39:46 +00002310.. option:: -mxop, -mno-xop
2311
Richard Smith081ad4d2017-01-24 19:39:46 +00002312.. option:: -mxsave, -mno-xsave
2313
Richard Smith081ad4d2017-01-24 19:39:46 +00002314.. option:: -mxsavec, -mno-xsavec
2315
Richard Smith081ad4d2017-01-24 19:39:46 +00002316.. option:: -mxsaveopt, -mno-xsaveopt
2317
Richard Smith081ad4d2017-01-24 19:39:46 +00002318.. option:: -mxsaves, -mno-xsaves
2319
2320Optimization level
2321~~~~~~~~~~~~~~~~~~
2322
2323Flags controlling how much optimization should be performed.
2324
Richard Smith081ad4d2017-01-24 19:39:46 +00002325.. option:: -O<arg>, -O (equivalent to -O2), --optimize, --optimize=<arg>
2326
Richard Smith081ad4d2017-01-24 19:39:46 +00002327.. option:: -Ofast<arg>
2328
2329Debug information generation
2330~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2331
2332Flags controlling how much and what kind of debug information should be
2333generated.
2334
2335Kind and level of debug information
2336-----------------------------------
Richard Smith081ad4d2017-01-24 19:39:46 +00002337.. option:: -g, --debug, --debug=<arg>
2338
2339Generate source-level debug information
2340
Richard Smith081ad4d2017-01-24 19:39:46 +00002341.. option:: -gdwarf-2
2342
2343Generate source-level debug information with dwarf version 2
2344
Richard Smith081ad4d2017-01-24 19:39:46 +00002345.. option:: -gdwarf-3
2346
2347Generate source-level debug information with dwarf version 3
2348
Richard Smith081ad4d2017-01-24 19:39:46 +00002349.. option:: -gdwarf-4, -gdwarf
2350
2351Generate source-level debug information with dwarf version 4
2352
Richard Smith081ad4d2017-01-24 19:39:46 +00002353.. option:: -gdwarf-5
2354
2355Generate source-level debug information with dwarf version 5
2356
Richard Smith081ad4d2017-01-24 19:39:46 +00002357.. option:: -gfull
2358
Richard Smith081ad4d2017-01-24 19:39:46 +00002359.. option:: -gused
2360
2361Debug level
2362___________
Richard Smith081ad4d2017-01-24 19:39:46 +00002363.. option:: -g0
2364
Richard Smith081ad4d2017-01-24 19:39:46 +00002365.. option:: -g2
2366
Richard Smith081ad4d2017-01-24 19:39:46 +00002367.. option:: -g3
2368
Richard Smith081ad4d2017-01-24 19:39:46 +00002369.. option:: -ggdb0
2370
Richard Smith081ad4d2017-01-24 19:39:46 +00002371.. option:: -ggdb1
2372
Richard Smith081ad4d2017-01-24 19:39:46 +00002373.. option:: -ggdb2
2374
Richard Smith081ad4d2017-01-24 19:39:46 +00002375.. option:: -ggdb3
2376
Richard Smith081ad4d2017-01-24 19:39:46 +00002377.. option:: -gline-tables-only, -g1, -gmlt
2378
2379Emit debug line number tables only
2380
Richard Smith081ad4d2017-01-24 19:39:46 +00002381.. option:: -gmodules
2382
2383Generate debug info with external references to clang modules or precompiled headers
2384
2385Debugger to tune debug information for
2386______________________________________
Richard Smith081ad4d2017-01-24 19:39:46 +00002387.. option:: -ggdb
2388
Richard Smith081ad4d2017-01-24 19:39:46 +00002389.. option:: -glldb
2390
Richard Smith081ad4d2017-01-24 19:39:46 +00002391.. option:: -gsce
2392
2393Debug information flags
2394-----------------------
Richard Smith081ad4d2017-01-24 19:39:46 +00002395.. option:: -gcolumn-info, -gno-column-info
2396
Richard Smith081ad4d2017-01-24 19:39:46 +00002397.. option:: -gdwarf-aranges
2398
Richard Smith081ad4d2017-01-24 19:39:46 +00002399.. option:: -ggnu-pubnames
2400
Richard Smith081ad4d2017-01-24 19:39:46 +00002401.. option:: -grecord-gcc-switches, -gno-record-gcc-switches
2402
Richard Smith081ad4d2017-01-24 19:39:46 +00002403.. option:: -gsplit-dwarf
2404
Richard Smith081ad4d2017-01-24 19:39:46 +00002405.. option:: -gstrict-dwarf, -gno-strict-dwarf
2406
Craig Topperd23254a2017-07-20 17:52:48 +00002407.. option:: -gz
2408
2409DWARF debug sections compression type
2410
2411.. program:: clang1
2412.. option:: -gz=<arg>
2413.. program:: clang
2414
2415DWARF debug sections compression type
2416
Richard Smithc5b2e002017-01-27 02:08:37 +00002417Static analyzer flags
2418=====================
Richard Smith081ad4d2017-01-24 19:39:46 +00002419
Richard Smithc5b2e002017-01-27 02:08:37 +00002420Flags controlling the behavior of the Clang Static Analyzer.
Richard Smith081ad4d2017-01-24 19:39:46 +00002421
Richard Smithc5b2e002017-01-27 02:08:37 +00002422.. option:: -Xanalyzer <arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00002423
Richard Smithc5b2e002017-01-27 02:08:37 +00002424Pass <arg> to the static analyzer
Richard Smith081ad4d2017-01-24 19:39:46 +00002425
2426Fortran compilation flags
2427=========================
2428
2429Flags that will be passed onto the ``gfortran`` compiler when Clang is given
2430a Fortran input.
2431
Richard Smithc5b2e002017-01-27 02:08:37 +00002432.. option:: -A<arg>, --assert <arg>, --assert=<arg>
2433
Richard Smith081ad4d2017-01-24 19:39:46 +00002434.. option:: -A-<arg>
2435
Richard Smith081ad4d2017-01-24 19:39:46 +00002436.. option:: -J<arg>
2437
Richard Smith081ad4d2017-01-24 19:39:46 +00002438.. option:: -cpp
2439
Richard Smith081ad4d2017-01-24 19:39:46 +00002440.. option:: -faggressive-function-elimination, -fno-aggressive-function-elimination
2441
Richard Smith081ad4d2017-01-24 19:39:46 +00002442.. option:: -falign-commons, -fno-align-commons
2443
Richard Smith081ad4d2017-01-24 19:39:46 +00002444.. option:: -fall-intrinsics, -fno-all-intrinsics
2445
Richard Smith081ad4d2017-01-24 19:39:46 +00002446.. option:: -fautomatic, -fno-automatic
2447
Richard Smith081ad4d2017-01-24 19:39:46 +00002448.. option:: -fbackslash, -fno-backslash
2449
Richard Smith081ad4d2017-01-24 19:39:46 +00002450.. option:: -fbacktrace, -fno-backtrace
2451
Richard Smith081ad4d2017-01-24 19:39:46 +00002452.. option:: -fblas-matmul-limit=<arg>
2453
Richard Smith081ad4d2017-01-24 19:39:46 +00002454.. option:: -fbounds-check, -fno-bounds-check
2455
Richard Smith081ad4d2017-01-24 19:39:46 +00002456.. option:: -fcheck-array-temporaries, -fno-check-array-temporaries
2457
Richard Smith081ad4d2017-01-24 19:39:46 +00002458.. option:: -fcheck=<arg>
2459
Richard Smith081ad4d2017-01-24 19:39:46 +00002460.. option:: -fcoarray=<arg>
2461
Richard Smith081ad4d2017-01-24 19:39:46 +00002462.. option:: -fconvert=<arg>
2463
Richard Smith081ad4d2017-01-24 19:39:46 +00002464.. option:: -fcray-pointer, -fno-cray-pointer
2465
Richard Smith081ad4d2017-01-24 19:39:46 +00002466.. option:: -fd-lines-as-code, -fno-d-lines-as-code
2467
Richard Smith081ad4d2017-01-24 19:39:46 +00002468.. option:: -fd-lines-as-comments, -fno-d-lines-as-comments
2469
Richard Smith081ad4d2017-01-24 19:39:46 +00002470.. option:: -fdefault-double-8, -fno-default-double-8
2471
Richard Smith081ad4d2017-01-24 19:39:46 +00002472.. option:: -fdefault-integer-8, -fno-default-integer-8
2473
Richard Smith081ad4d2017-01-24 19:39:46 +00002474.. option:: -fdefault-real-8, -fno-default-real-8
2475
Richard Smith081ad4d2017-01-24 19:39:46 +00002476.. option:: -fdollar-ok, -fno-dollar-ok
2477
Richard Smith081ad4d2017-01-24 19:39:46 +00002478.. option:: -fdump-fortran-optimized, -fno-dump-fortran-optimized
2479
Richard Smith081ad4d2017-01-24 19:39:46 +00002480.. option:: -fdump-fortran-original, -fno-dump-fortran-original
2481
Richard Smith081ad4d2017-01-24 19:39:46 +00002482.. option:: -fdump-parse-tree, -fno-dump-parse-tree
2483
Richard Smith081ad4d2017-01-24 19:39:46 +00002484.. option:: -fexternal-blas, -fno-external-blas
2485
Richard Smith081ad4d2017-01-24 19:39:46 +00002486.. option:: -ff2c, -fno-f2c
2487
Richard Smith081ad4d2017-01-24 19:39:46 +00002488.. option:: -ffixed-form, -fno-fixed-form
2489
Richard Smith081ad4d2017-01-24 19:39:46 +00002490.. option:: -ffixed-line-length-<arg>
2491
Richard Smith081ad4d2017-01-24 19:39:46 +00002492.. option:: -ffpe-trap=<arg>
2493
Richard Smith081ad4d2017-01-24 19:39:46 +00002494.. option:: -ffree-form, -fno-free-form
2495
Richard Smith081ad4d2017-01-24 19:39:46 +00002496.. option:: -ffree-line-length-<arg>
2497
Richard Smith081ad4d2017-01-24 19:39:46 +00002498.. option:: -ffrontend-optimize, -fno-frontend-optimize
2499
Richard Smith081ad4d2017-01-24 19:39:46 +00002500.. option:: -fimplicit-none, -fno-implicit-none
2501
Richard Smith081ad4d2017-01-24 19:39:46 +00002502.. option:: -finit-character=<arg>
2503
Richard Smith081ad4d2017-01-24 19:39:46 +00002504.. option:: -finit-integer=<arg>
2505
Richard Smith081ad4d2017-01-24 19:39:46 +00002506.. option:: -finit-local-zero, -fno-init-local-zero
2507
Richard Smith081ad4d2017-01-24 19:39:46 +00002508.. option:: -finit-logical=<arg>
2509
Richard Smith081ad4d2017-01-24 19:39:46 +00002510.. option:: -finit-real=<arg>
2511
Richard Smith081ad4d2017-01-24 19:39:46 +00002512.. option:: -finteger-4-integer-8, -fno-integer-4-integer-8
2513
Richard Smith081ad4d2017-01-24 19:39:46 +00002514.. option:: -fintrinsic-modules-path, -fno-intrinsic-modules-path
2515
Richard Smith081ad4d2017-01-24 19:39:46 +00002516.. option:: -fmax-array-constructor=<arg>
2517
Richard Smith081ad4d2017-01-24 19:39:46 +00002518.. option:: -fmax-errors=<arg>
2519
Richard Smith081ad4d2017-01-24 19:39:46 +00002520.. option:: -fmax-identifier-length, -fno-max-identifier-length
2521
Richard Smith081ad4d2017-01-24 19:39:46 +00002522.. option:: -fmax-stack-var-size=<arg>
2523
Richard Smith081ad4d2017-01-24 19:39:46 +00002524.. option:: -fmax-subrecord-length=<arg>
2525
Richard Smith081ad4d2017-01-24 19:39:46 +00002526.. option:: -fmodule-private, -fno-module-private
2527
Richard Smith081ad4d2017-01-24 19:39:46 +00002528.. option:: -fpack-derived, -fno-pack-derived
2529
Richard Smith081ad4d2017-01-24 19:39:46 +00002530.. option:: -fprotect-parens, -fno-protect-parens
2531
Richard Smith081ad4d2017-01-24 19:39:46 +00002532.. option:: -frange-check, -fno-range-check
2533
Richard Smith081ad4d2017-01-24 19:39:46 +00002534.. option:: -freal-4-real-10, -fno-real-4-real-10
2535
Richard Smith081ad4d2017-01-24 19:39:46 +00002536.. option:: -freal-4-real-16, -fno-real-4-real-16
2537
Richard Smith081ad4d2017-01-24 19:39:46 +00002538.. option:: -freal-4-real-8, -fno-real-4-real-8
2539
Richard Smith081ad4d2017-01-24 19:39:46 +00002540.. option:: -freal-8-real-10, -fno-real-8-real-10
2541
Richard Smith081ad4d2017-01-24 19:39:46 +00002542.. option:: -freal-8-real-16, -fno-real-8-real-16
2543
Richard Smith081ad4d2017-01-24 19:39:46 +00002544.. option:: -freal-8-real-4, -fno-real-8-real-4
2545
Richard Smith081ad4d2017-01-24 19:39:46 +00002546.. option:: -frealloc-lhs, -fno-realloc-lhs
2547
Richard Smith081ad4d2017-01-24 19:39:46 +00002548.. option:: -frecord-marker=<arg>
2549
Richard Smith081ad4d2017-01-24 19:39:46 +00002550.. option:: -frecursive, -fno-recursive
2551
Richard Smith081ad4d2017-01-24 19:39:46 +00002552.. option:: -frepack-arrays, -fno-repack-arrays
2553
Richard Smith081ad4d2017-01-24 19:39:46 +00002554.. option:: -fsecond-underscore, -fno-second-underscore
2555
Richard Smith081ad4d2017-01-24 19:39:46 +00002556.. option:: -fsign-zero, -fno-sign-zero
2557
Richard Smith081ad4d2017-01-24 19:39:46 +00002558.. option:: -fstack-arrays, -fno-stack-arrays
2559
Richard Smith081ad4d2017-01-24 19:39:46 +00002560.. option:: -funderscoring, -fno-underscoring
2561
Richard Smith081ad4d2017-01-24 19:39:46 +00002562.. option:: -fwhole-file, -fno-whole-file
2563
Richard Smith081ad4d2017-01-24 19:39:46 +00002564.. option:: -nocpp
2565
Richard Smith081ad4d2017-01-24 19:39:46 +00002566.. option:: -static-libgfortran
2567
Richard Smithc5b2e002017-01-27 02:08:37 +00002568Linker flags
2569============
2570Flags that are passed on to the linker
2571
2572.. option:: -L<dir>, --library-directory <arg>, --library-directory=<arg>
2573
2574Add directory to library search path
2575
2576.. option:: -Mach
2577
2578.. option:: -T<script>
2579
2580Specify <script> as linker script
2581
Richard Smith78e23fd2017-04-13 22:39:49 +00002582.. option:: -Tbss<addr>
Richard Smithc5b2e002017-01-27 02:08:37 +00002583
2584Set starting address of BSS to <addr>
2585
Richard Smith78e23fd2017-04-13 22:39:49 +00002586.. option:: -Tdata<addr>
Richard Smithc5b2e002017-01-27 02:08:37 +00002587
2588Set starting address of BSS to <addr>
2589
Richard Smith78e23fd2017-04-13 22:39:49 +00002590.. option:: -Ttext<addr>
Richard Smithc5b2e002017-01-27 02:08:37 +00002591
2592Set starting address of BSS to <addr>
2593
2594.. option:: -Wl,<arg>,<arg2>...
2595
2596Pass the comma separated arguments in <arg> to the linker
2597
2598.. option:: -X
2599
2600.. option:: -Xlinker <arg>, --for-linker <arg>, --for-linker=<arg>
2601
2602Pass <arg> to the linker
2603
2604.. program:: clang1
2605.. option:: -Z
2606.. program:: clang
2607
2608.. option:: -e<arg>, --entry
2609
2610.. option:: -filelist <arg>
2611
2612.. option:: -l<arg>
2613
2614.. option:: -r
2615
2616.. option:: -rpath <arg>
2617
2618.. option:: -s
2619
2620.. option:: -t
2621
2622.. option:: -u<arg>, --force-link <arg>, --force-link=<arg>
2623
2624.. option:: -undef
2625
2626undef all system defines
2627
2628.. option:: -undefined<arg>, --no-undefined
2629
2630.. option:: -z <arg>
2631
2632Pass -z <arg> to the linker
2633