blob: e39d983954a7d52003be83210d94a0458d27917f [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 Smith081ad4d2017-01-24 19:39:46 +000021.. option:: -A<arg>, --assert <arg>, --assert=<arg>
22
Richard Smith081ad4d2017-01-24 19:39:46 +000023.. option:: -B<arg>, --prefix <arg>, --prefix=<arg>
24
Richard Smith081ad4d2017-01-24 19:39:46 +000025.. option:: -C, --comments
26
Richard Smith081ad4d2017-01-24 19:39:46 +000027.. option:: -CC, --comments-in-macros
28
Richard Smith081ad4d2017-01-24 19:39:46 +000029.. option:: -F<arg>
30
31Add directory to framework include search path
32
Richard Smith081ad4d2017-01-24 19:39:46 +000033.. option:: -G<arg>
34
Richard Smithb2c82a62017-01-27 01:54:42 +000035.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +000036.. option:: -G=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +000037.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +000038
Richard Smith081ad4d2017-01-24 19:39:46 +000039.. option:: -H, --trace-includes
40
41Show header includes and nesting depth
42
Richard Smith081ad4d2017-01-24 19:39:46 +000043.. option:: -Mach
44
Richard Smith081ad4d2017-01-24 19:39:46 +000045.. option:: -ObjC
46
47Treat source input files as Objective-C inputs
48
Richard Smithb2c82a62017-01-27 01:54:42 +000049.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +000050.. option:: -ObjC++
Richard Smithb2c82a62017-01-27 01:54:42 +000051.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +000052
53Treat source input files as Objective-C++ inputs
54
Richard Smith081ad4d2017-01-24 19:39:46 +000055.. option:: -P, --no-line-commands
56
57Disable linemarker output in -E mode
58
Richard Smith081ad4d2017-01-24 19:39:46 +000059.. option:: -Q
60
Richard Smith081ad4d2017-01-24 19:39:46 +000061.. option:: -Qn
62
Richard Smith081ad4d2017-01-24 19:39:46 +000063.. option:: -Qunused-arguments
64
65Don't emit warning for unused driver arguments
66
Richard Smith081ad4d2017-01-24 19:39:46 +000067.. option:: -Wa,<arg>,<arg2>...
68
69Pass the comma separated arguments in <arg> to the assembler
70
Richard Smith081ad4d2017-01-24 19:39:46 +000071.. option:: -Wlarge-by-value-copy=<arg>
72
Richard Smith081ad4d2017-01-24 19:39:46 +000073.. option:: -Wp,<arg>,<arg2>...
74
75Pass the comma separated arguments in <arg> to the preprocessor
76
Richard Smith081ad4d2017-01-24 19:39:46 +000077.. option:: -X<arg>
78
Richard Smithb2c82a62017-01-27 01:54:42 +000079.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +000080.. option:: -X
Richard Smithb2c82a62017-01-27 01:54:42 +000081.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +000082
Richard Smith081ad4d2017-01-24 19:39:46 +000083.. option:: -Xanalyzer <arg>
84
85Pass <arg> to the static analyzer
86
Richard Smith081ad4d2017-01-24 19:39:46 +000087.. option:: -Xarch\_<arg1> <arg2>
88
Richard Smith081ad4d2017-01-24 19:39:46 +000089.. option:: -Xassembler <arg>
90
91Pass <arg> to the assembler
92
Richard Smith081ad4d2017-01-24 19:39:46 +000093.. option:: -Xcuda-fatbinary <arg>
94
95Pass <arg> to fatbinary invocation
96
Richard Smith081ad4d2017-01-24 19:39:46 +000097.. option:: -Xcuda-ptxas <arg>
98
99Pass <arg> to the ptxas assembler
100
Richard Smith081ad4d2017-01-24 19:39:46 +0000101.. option:: -Xpreprocessor <arg>
102
103Pass <arg> to the preprocessor
104
Richard Smith081ad4d2017-01-24 19:39:46 +0000105.. option:: -Z<arg>
106
Richard Smith081ad4d2017-01-24 19:39:46 +0000107.. option:: -a<arg>, --profile-blocks
108
Richard Smith081ad4d2017-01-24 19:39:46 +0000109.. option:: -all\_load
110
Richard Smith081ad4d2017-01-24 19:39:46 +0000111.. option:: -allowable\_client <arg>
112
Richard Smith081ad4d2017-01-24 19:39:46 +0000113.. option:: --analyze
114
115Run the static analyzer
116
Richard Smith081ad4d2017-01-24 19:39:46 +0000117.. option:: --analyze-auto
118
Richard Smith081ad4d2017-01-24 19:39:46 +0000119.. option:: --analyzer-no-default-checks
120
Richard Smith081ad4d2017-01-24 19:39:46 +0000121.. option:: --analyzer-output<arg>
122
123Static analyzer report output format (html\|plist\|plist-multi-file\|plist-html\|text).
124
Richard Smith081ad4d2017-01-24 19:39:46 +0000125.. option:: -ansi, --ansi
126
Richard Smith081ad4d2017-01-24 19:39:46 +0000127.. option:: -arch <arg>
128
Richard Smithb2c82a62017-01-27 01:54:42 +0000129.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000130.. option:: -arch\_errors\_fatal
Richard Smithb2c82a62017-01-27 01:54:42 +0000131.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000132
Richard Smithb2c82a62017-01-27 01:54:42 +0000133.. program:: clang2
Richard Smith081ad4d2017-01-24 19:39:46 +0000134.. option:: -arch\_only <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000135.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000136
Richard Smith081ad4d2017-01-24 19:39:46 +0000137.. option:: -arcmt-migrate-emit-errors
138
139Emit ARC errors even if the migrator can fix them
140
Richard Smith081ad4d2017-01-24 19:39:46 +0000141.. option:: -arcmt-migrate-report-output <arg>
142
143Output path for the plist report
144
Richard Smith081ad4d2017-01-24 19:39:46 +0000145.. option:: -bind\_at\_load
146
Richard Smith081ad4d2017-01-24 19:39:46 +0000147.. option:: -bundle
148
Richard Smithb2c82a62017-01-27 01:54:42 +0000149.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000150.. option:: -bundle\_loader <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000151.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000152
Richard Smith081ad4d2017-01-24 19:39:46 +0000153.. option:: -c, --compile
154
155Only run preprocess, compile, and assemble steps
156
Richard Smith081ad4d2017-01-24 19:39:46 +0000157.. option:: -client\_name<arg>
158
Richard Smith081ad4d2017-01-24 19:39:46 +0000159.. option:: -compatibility\_version<arg>
160
Richard Smith081ad4d2017-01-24 19:39:46 +0000161.. option:: --constant-cfstrings
162
Richard Smith081ad4d2017-01-24 19:39:46 +0000163.. option:: -coverage, --coverage
164
Richard Smith081ad4d2017-01-24 19:39:46 +0000165.. option:: --cuda-compile-host-device
166
167Compile CUDA code for both host and device (default). Has no effect on non-CUDA compilations.
168
Richard Smith081ad4d2017-01-24 19:39:46 +0000169.. option:: --cuda-device-only
170
171Compile CUDA code for device only
172
Richard Smith081ad4d2017-01-24 19:39:46 +0000173.. option:: --cuda-gpu-arch=<arg>, --no-cuda-gpu-arch=<arg>
174
175CUDA GPU architecture (e.g. sm\_35). May be specified more than once.
176
Richard Smith081ad4d2017-01-24 19:39:46 +0000177.. option:: --cuda-host-only
178
179Compile CUDA code for host only. Has no effect on non-CUDA compilations.
180
Richard Smith081ad4d2017-01-24 19:39:46 +0000181.. option:: --cuda-noopt-device-debug, --no-cuda-noopt-device-debug
182
183Enable device-side debug info generation. Disables ptxas optimizations.
184
Richard Smith081ad4d2017-01-24 19:39:46 +0000185.. option:: -current\_version<arg>
186
Richard Smith081ad4d2017-01-24 19:39:46 +0000187.. option:: -dead\_strip
188
Richard Smith081ad4d2017-01-24 19:39:46 +0000189.. option:: -dependency-dot <arg>
190
191Filename to write DOT-formatted header dependencies to
192
Richard Smith081ad4d2017-01-24 19:39:46 +0000193.. option:: -dependency-file <arg>
194
195Filename (or -) to write dependency output to
196
Richard Smith081ad4d2017-01-24 19:39:46 +0000197.. option:: -dumpmachine
198
Richard Smith081ad4d2017-01-24 19:39:46 +0000199.. option:: -dumpversion
200
Richard Smith081ad4d2017-01-24 19:39:46 +0000201.. option:: --dyld-prefix=<arg>, --dyld-prefix <arg>
202
Richard Smith081ad4d2017-01-24 19:39:46 +0000203.. option:: -dylib\_file <arg>
204
Richard Smith081ad4d2017-01-24 19:39:46 +0000205.. option:: -dylinker
206
Richard Smithb2c82a62017-01-27 01:54:42 +0000207.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000208.. option:: -dylinker\_install\_name<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000209.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000210
Richard Smith081ad4d2017-01-24 19:39:46 +0000211.. option:: -dynamic
212
Richard Smith081ad4d2017-01-24 19:39:46 +0000213.. option:: -dynamiclib
214
Richard Smith081ad4d2017-01-24 19:39:46 +0000215.. option:: -emit-ast
216
217Emit Clang AST files for source inputs
218
Richard Smith081ad4d2017-01-24 19:39:46 +0000219.. option:: -exported\_symbols\_list <arg>
220
Richard Smith081ad4d2017-01-24 19:39:46 +0000221.. option:: -faligned-new=<arg>
222
Richard Smith081ad4d2017-01-24 19:39:46 +0000223.. option:: -fcuda-approx-transcendentals, -fno-cuda-approx-transcendentals
224
225Use approximate transcendental functions
226
Richard Smith081ad4d2017-01-24 19:39:46 +0000227.. option:: -fcuda-flush-denormals-to-zero, -fno-cuda-flush-denormals-to-zero
228
229Flush denormal floating point values to zero in CUDA device mode.
230
Richard Smith081ad4d2017-01-24 19:39:46 +0000231.. option:: -fheinous-gnu-extensions
232
Richard Smith081ad4d2017-01-24 19:39:46 +0000233.. option:: -flat\_namespace
234
Richard Smith081ad4d2017-01-24 19:39:46 +0000235.. option:: -fopenmp-targets=<arg1>,<arg2>...
236
237Specify comma-separated list of triples OpenMP offloading targets to be supported
238
Richard Smith081ad4d2017-01-24 19:39:46 +0000239.. option:: -force\_cpusubtype\_ALL
240
Richard Smithb2c82a62017-01-27 01:54:42 +0000241.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000242.. option:: -force\_flat\_namespace
Richard Smithb2c82a62017-01-27 01:54:42 +0000243.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000244
Richard Smithb2c82a62017-01-27 01:54:42 +0000245.. program:: clang2
Richard Smith081ad4d2017-01-24 19:39:46 +0000246.. option:: -force\_load <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000247.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000248
Richard Smith081ad4d2017-01-24 19:39:46 +0000249.. option:: -framework <arg>
250
Richard Smith081ad4d2017-01-24 19:39:46 +0000251.. option:: --gcc-toolchain=<arg>, -gcc-toolchain <arg>
252
253Use the gcc toolchain at the given directory
254
Richard Smith081ad4d2017-01-24 19:39:46 +0000255.. option:: -gcodeview
256
257Generate CodeView debug information
258
Richard Smith081ad4d2017-01-24 19:39:46 +0000259.. option:: -headerpad\_max\_install\_names<arg>
260
Richard Smith081ad4d2017-01-24 19:39:46 +0000261.. option:: -help, --help
262
263Display available options
264
Richard Smith081ad4d2017-01-24 19:39:46 +0000265.. option:: --help-hidden
266
Richard Smith081ad4d2017-01-24 19:39:46 +0000267.. option:: -image\_base <arg>
268
Richard Smith081ad4d2017-01-24 19:39:46 +0000269.. option:: -index-header-map
270
271Make the next included directory (-I or -F) an indexer header map
272
Richard Smith081ad4d2017-01-24 19:39:46 +0000273.. option:: -init <arg>
274
Richard Smith081ad4d2017-01-24 19:39:46 +0000275.. option:: -install\_name <arg>
276
Richard Smith081ad4d2017-01-24 19:39:46 +0000277.. option:: -keep\_private\_externs
278
Richard Smith081ad4d2017-01-24 19:39:46 +0000279.. option:: -lazy\_framework <arg>
280
Richard Smithb2c82a62017-01-27 01:54:42 +0000281.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000282.. option:: -lazy\_library <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000283.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000284
Richard Smith081ad4d2017-01-24 19:39:46 +0000285.. option:: -mbig-endian, -EB
286
Richard Smith081ad4d2017-01-24 19:39:46 +0000287.. option:: --migrate
288
289Run the migrator
290
Richard Smith081ad4d2017-01-24 19:39:46 +0000291.. option:: -mlinker-version=<arg>
292
Richard Smith081ad4d2017-01-24 19:39:46 +0000293.. option:: -mlittle-endian, -EL
294
Richard Smith081ad4d2017-01-24 19:39:46 +0000295.. option:: -mllvm <arg>
296
297Additional arguments to forward to LLVM's option processing
298
Richard Smith081ad4d2017-01-24 19:39:46 +0000299.. option:: -module-dependency-dir <arg>
300
301Directory to dump module dependencies to
302
Richard Smith081ad4d2017-01-24 19:39:46 +0000303.. option:: -multi\_module
304
Richard Smith081ad4d2017-01-24 19:39:46 +0000305.. option:: -multiply\_defined <arg>
306
Richard Smithb2c82a62017-01-27 01:54:42 +0000307.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000308.. option:: -multiply\_defined\_unused <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000309.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000310
Richard Smith081ad4d2017-01-24 19:39:46 +0000311.. option:: --no-cuda-version-check
312
313Don't error out if the detected version of the CUDA install is too low for the requested CUDA gpu architecture.
314
Richard Smith081ad4d2017-01-24 19:39:46 +0000315.. option:: -no-integrated-cpp, --no-integrated-cpp
316
Richard Smith081ad4d2017-01-24 19:39:46 +0000317.. option:: -no\_dead\_strip\_inits\_and\_terms
318
Richard Smith081ad4d2017-01-24 19:39:46 +0000319.. option:: -nobuiltininc
320
321Disable builtin #include directories
322
Richard Smith081ad4d2017-01-24 19:39:46 +0000323.. option:: -nocudainc
324
Richard Smith081ad4d2017-01-24 19:39:46 +0000325.. option:: -nocudalib
326
Richard Smith081ad4d2017-01-24 19:39:46 +0000327.. option:: -nodefaultlibs
328
Richard Smith081ad4d2017-01-24 19:39:46 +0000329.. option:: -nofixprebinding
330
Richard Smith081ad4d2017-01-24 19:39:46 +0000331.. option:: -nolibc
332
Richard Smith081ad4d2017-01-24 19:39:46 +0000333.. option:: -nomultidefs
334
Richard Smith081ad4d2017-01-24 19:39:46 +0000335.. option:: -nopie
336
Richard Smith081ad4d2017-01-24 19:39:46 +0000337.. option:: -noprebind
338
Richard Smith081ad4d2017-01-24 19:39:46 +0000339.. option:: -noseglinkedit
340
Richard Smith081ad4d2017-01-24 19:39:46 +0000341.. option:: -nostartfiles
342
Richard Smith081ad4d2017-01-24 19:39:46 +0000343.. option:: -nostdinc, --no-standard-includes
344
Richard Smithb2c82a62017-01-27 01:54:42 +0000345.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000346.. option:: -nostdinc++
Richard Smithb2c82a62017-01-27 01:54:42 +0000347.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000348
349Disable standard #include directories for the C++ standard library
350
Richard Smith081ad4d2017-01-24 19:39:46 +0000351.. option:: -nostdlib, --no-standard-libraries
352
Richard Smith081ad4d2017-01-24 19:39:46 +0000353.. option:: -nostdlibinc
354
Richard Smith081ad4d2017-01-24 19:39:46 +0000355.. option:: -o<file>, --output <arg>, --output=<arg>
356
357Write output to <file>
358
Richard Smith081ad4d2017-01-24 19:39:46 +0000359.. option:: -objcmt-atomic-property
360
361Make migration to 'atomic' properties
362
Richard Smith081ad4d2017-01-24 19:39:46 +0000363.. option:: -objcmt-migrate-all
364
365Enable migration to modern ObjC
366
Richard Smith081ad4d2017-01-24 19:39:46 +0000367.. option:: -objcmt-migrate-annotation
368
369Enable migration to property and method annotations
370
Richard Smith081ad4d2017-01-24 19:39:46 +0000371.. option:: -objcmt-migrate-designated-init
372
373Enable migration to infer NS\_DESIGNATED\_INITIALIZER for initializer methods
374
Richard Smith081ad4d2017-01-24 19:39:46 +0000375.. option:: -objcmt-migrate-instancetype
376
377Enable migration to infer instancetype for method result type
378
Richard Smith081ad4d2017-01-24 19:39:46 +0000379.. option:: -objcmt-migrate-literals
380
381Enable migration to modern ObjC literals
382
Richard Smith081ad4d2017-01-24 19:39:46 +0000383.. option:: -objcmt-migrate-ns-macros
384
385Enable migration to NS\_ENUM/NS\_OPTIONS macros
386
Richard Smith081ad4d2017-01-24 19:39:46 +0000387.. option:: -objcmt-migrate-property
388
389Enable migration to modern ObjC property
390
Richard Smith081ad4d2017-01-24 19:39:46 +0000391.. option:: -objcmt-migrate-property-dot-syntax
392
393Enable migration of setter/getter messages to property-dot syntax
394
Richard Smith081ad4d2017-01-24 19:39:46 +0000395.. option:: -objcmt-migrate-protocol-conformance
396
397Enable migration to add protocol conformance on classes
398
Richard Smith081ad4d2017-01-24 19:39:46 +0000399.. option:: -objcmt-migrate-readonly-property
400
401Enable migration to modern ObjC readonly property
402
Richard Smith081ad4d2017-01-24 19:39:46 +0000403.. option:: -objcmt-migrate-readwrite-property
404
405Enable migration to modern ObjC readwrite property
406
Richard Smith081ad4d2017-01-24 19:39:46 +0000407.. option:: -objcmt-migrate-subscripting
408
409Enable migration to modern ObjC subscripting
410
Richard Smith081ad4d2017-01-24 19:39:46 +0000411.. option:: -objcmt-ns-nonatomic-iosonly
412
413Enable migration to use NS\_NONATOMIC\_IOSONLY macro for setting property's 'atomic' attribute
414
Richard Smith081ad4d2017-01-24 19:39:46 +0000415.. option:: -objcmt-returns-innerpointer-property
416
417Enable migration to annotate property with NS\_RETURNS\_INNER\_POINTER
418
Richard Smith081ad4d2017-01-24 19:39:46 +0000419.. option:: -objcmt-whitelist-dir-path=<arg>, -objcmt-white-list-dir-path=<arg>
420
421Only modify files with a filename contained in the provided directory path
422
Richard Smith081ad4d2017-01-24 19:39:46 +0000423.. option:: -object
424
Richard Smith081ad4d2017-01-24 19:39:46 +0000425.. option:: -p, --profile
426
Richard Smith081ad4d2017-01-24 19:39:46 +0000427.. option:: -pagezero\_size<arg>
428
Richard Smith081ad4d2017-01-24 19:39:46 +0000429.. option:: -pg
430
431Enable mcount instrumentation
432
Richard Smith081ad4d2017-01-24 19:39:46 +0000433.. option:: -pie
434
Richard Smith081ad4d2017-01-24 19:39:46 +0000435.. option:: -pipe, --pipe
436
437Use pipes between commands, when possible
438
Richard Smith081ad4d2017-01-24 19:39:46 +0000439.. option:: -prebind
440
Richard Smithb2c82a62017-01-27 01:54:42 +0000441.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000442.. option:: -prebind\_all\_twolevel\_modules
Richard Smithb2c82a62017-01-27 01:54:42 +0000443.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000444
Richard Smith081ad4d2017-01-24 19:39:46 +0000445.. option:: -preload
446
Richard Smith081ad4d2017-01-24 19:39:46 +0000447.. option:: --print-diagnostic-categories
448
Richard Smith081ad4d2017-01-24 19:39:46 +0000449.. option:: -print-file-name=<file>, --print-file-name=<file>, --print-file-name <arg>
450
451Print the full library path of <file>
452
Richard Smith081ad4d2017-01-24 19:39:46 +0000453.. option:: -print-ivar-layout
454
455Enable Objective-C Ivar layout bitmap print trace
456
Richard Smith081ad4d2017-01-24 19:39:46 +0000457.. option:: -print-libgcc-file-name, --print-libgcc-file-name
458
459Print the library path for the currently used compiler runtime library ("libgcc.a" or "libclang\_rt.builtins.\*.a")
460
Richard Smith081ad4d2017-01-24 19:39:46 +0000461.. option:: -print-multi-directory, --print-multi-directory
462
Richard Smith081ad4d2017-01-24 19:39:46 +0000463.. option:: -print-multi-lib, --print-multi-lib
464
Richard Smith081ad4d2017-01-24 19:39:46 +0000465.. option:: -print-prog-name=<name>, --print-prog-name=<name>, --print-prog-name <arg>
466
467Print the full program path of <name>
468
Richard Smith081ad4d2017-01-24 19:39:46 +0000469.. option:: -print-search-dirs, --print-search-dirs
470
471Print the paths used for finding libraries and programs
472
Richard Smith081ad4d2017-01-24 19:39:46 +0000473.. option:: -private\_bundle
474
Richard Smith081ad4d2017-01-24 19:39:46 +0000475.. option:: -pthread, -no-pthread
476
477Support POSIX threads in generated code
478
Richard Smith081ad4d2017-01-24 19:39:46 +0000479.. option:: -pthreads
480
Richard Smith081ad4d2017-01-24 19:39:46 +0000481.. option:: -rdynamic
482
Richard Smith081ad4d2017-01-24 19:39:46 +0000483.. option:: -read\_only\_relocs <arg>
484
Richard Smith081ad4d2017-01-24 19:39:46 +0000485.. option:: -relocatable-pch, --relocatable-pch
486
487Whether to build a relocatable precompiled header
488
Richard Smith081ad4d2017-01-24 19:39:46 +0000489.. option:: -remap
490
Richard Smith081ad4d2017-01-24 19:39:46 +0000491.. option:: -rewrite-legacy-objc
492
493Rewrite Legacy Objective-C source to C++
494
Richard Smith081ad4d2017-01-24 19:39:46 +0000495.. option:: -rtlib=<arg>, --rtlib=<arg>, --rtlib <arg>
496
497Compiler runtime library to use
498
Richard Smith081ad4d2017-01-24 19:39:46 +0000499.. option:: -save-stats=<arg>, --save-stats=<arg>, -save-stats (equivalent to -save-stats=cwd), --save-stats (equivalent to -save-stats=cwd)
500
501Save llvm statistics.
502
Richard Smith081ad4d2017-01-24 19:39:46 +0000503.. option:: -save-temps=<arg>, --save-temps=<arg>, -save-temps (equivalent to -save-temps=cwd), --save-temps (equivalent to -save-temps=cwd)
504
505Save intermediate compilation results.
506
Richard Smith081ad4d2017-01-24 19:39:46 +0000507.. option:: -sectalign <arg1> <arg2> <arg3>
508
Richard Smith081ad4d2017-01-24 19:39:46 +0000509.. option:: -sectcreate <arg1> <arg2> <arg3>
510
Richard Smith081ad4d2017-01-24 19:39:46 +0000511.. option:: -sectobjectsymbols <arg1> <arg2>
512
Richard Smith081ad4d2017-01-24 19:39:46 +0000513.. option:: -sectorder <arg1> <arg2> <arg3>
514
Richard Smith081ad4d2017-01-24 19:39:46 +0000515.. option:: -seg1addr<arg>
516
Richard Smith081ad4d2017-01-24 19:39:46 +0000517.. option:: -seg\_addr\_table <arg>
518
Richard Smithb2c82a62017-01-27 01:54:42 +0000519.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000520.. option:: -seg\_addr\_table\_filename <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000521.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000522
Richard Smith081ad4d2017-01-24 19:39:46 +0000523.. option:: -segaddr <arg1> <arg2>
524
Richard Smith081ad4d2017-01-24 19:39:46 +0000525.. option:: -segcreate <arg1> <arg2> <arg3>
526
Richard Smith081ad4d2017-01-24 19:39:46 +0000527.. option:: -seglinkedit
528
Richard Smith081ad4d2017-01-24 19:39:46 +0000529.. option:: -segprot <arg1> <arg2> <arg3>
530
Richard Smith081ad4d2017-01-24 19:39:46 +0000531.. option:: -segs\_read\_<arg>
532
Richard Smithb2c82a62017-01-27 01:54:42 +0000533.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000534.. option:: -segs\_read\_only\_addr <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000535.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000536
Richard Smithb2c82a62017-01-27 01:54:42 +0000537.. program:: clang2
Richard Smith081ad4d2017-01-24 19:39:46 +0000538.. option:: -segs\_read\_write\_addr <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000539.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000540
Richard Smith081ad4d2017-01-24 19:39:46 +0000541.. option:: -serialize-diagnostics <arg>, --serialize-diagnostics <arg>
542
543Serialize compiler diagnostics to a file
544
Richard Smith081ad4d2017-01-24 19:39:46 +0000545.. option:: -shared, --shared
546
Richard Smith081ad4d2017-01-24 19:39:46 +0000547.. option:: -shared-libasan
548
Richard Smith081ad4d2017-01-24 19:39:46 +0000549.. option:: -shared-libgcc
550
Richard Smith081ad4d2017-01-24 19:39:46 +0000551.. option:: -single\_module
552
Richard Smith081ad4d2017-01-24 19:39:46 +0000553.. option:: -specs=<arg>, --specs=<arg>
554
Richard Smith081ad4d2017-01-24 19:39:46 +0000555.. option:: -static, --static
556
Richard Smith081ad4d2017-01-24 19:39:46 +0000557.. option:: -static-libgcc
558
Richard Smith081ad4d2017-01-24 19:39:46 +0000559.. option:: -static-libstdc++
560
Richard Smith081ad4d2017-01-24 19:39:46 +0000561.. option:: -std-default=<arg>
562
Richard Smith081ad4d2017-01-24 19:39:46 +0000563.. option:: -stdlib=<arg>, --stdlib=<arg>, --stdlib <arg>
564
565C++ standard library to use
566
Richard Smith081ad4d2017-01-24 19:39:46 +0000567.. option:: -sub\_library<arg>
568
Richard Smithb2c82a62017-01-27 01:54:42 +0000569.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000570.. option:: -sub\_umbrella<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000571.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000572
Richard Smith081ad4d2017-01-24 19:39:46 +0000573.. option:: --sysroot=<arg>, --sysroot <arg>
574
Richard Smith081ad4d2017-01-24 19:39:46 +0000575.. option:: --target-help
576
Richard Smith081ad4d2017-01-24 19:39:46 +0000577.. option:: --target=<arg>, -target <arg>
578
579Generate code for the given target
580
Richard Smith081ad4d2017-01-24 19:39:46 +0000581.. option:: -time
582
583Time individual commands
584
Richard Smith081ad4d2017-01-24 19:39:46 +0000585.. option:: -traditional, --traditional
586
Richard Smith081ad4d2017-01-24 19:39:46 +0000587.. option:: -traditional-cpp, --traditional-cpp
588
589Enable some traditional CPP emulation
590
Richard Smith081ad4d2017-01-24 19:39:46 +0000591.. option:: -twolevel\_namespace
592
Richard Smithb2c82a62017-01-27 01:54:42 +0000593.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000594.. option:: -twolevel\_namespace\_hints
Richard Smithb2c82a62017-01-27 01:54:42 +0000595.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000596
Richard Smith081ad4d2017-01-24 19:39:46 +0000597.. option:: -umbrella <arg>
598
Richard Smith081ad4d2017-01-24 19:39:46 +0000599.. option:: -unexported\_symbols\_list <arg>
600
Richard Smith081ad4d2017-01-24 19:39:46 +0000601.. option:: -v, --verbose
602
603Show commands to run and use verbose output
604
Richard Smith081ad4d2017-01-24 19:39:46 +0000605.. option:: --verify-debug-info
606
607Verify the binary representation of debug output
608
Richard Smith081ad4d2017-01-24 19:39:46 +0000609.. option:: --version
610
Richard Smith081ad4d2017-01-24 19:39:46 +0000611.. option:: -w, --no-warnings
612
613Suppress all warnings
614
Richard Smith081ad4d2017-01-24 19:39:46 +0000615.. option:: -weak-l<arg>
616
Richard Smith081ad4d2017-01-24 19:39:46 +0000617.. option:: -weak\_framework <arg>
618
Richard Smithb2c82a62017-01-27 01:54:42 +0000619.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000620.. option:: -weak\_library <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000621.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000622
Richard Smithb2c82a62017-01-27 01:54:42 +0000623.. program:: clang2
Richard Smith081ad4d2017-01-24 19:39:46 +0000624.. option:: -weak\_reference\_mismatches <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000625.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000626
Richard Smith081ad4d2017-01-24 19:39:46 +0000627.. option:: -whatsloaded
628
Richard Smith081ad4d2017-01-24 19:39:46 +0000629.. option:: -whyload
630
Richard Smith081ad4d2017-01-24 19:39:46 +0000631.. option:: -working-directory<arg>, -working-directory=<arg>
632
633Resolve file paths relative to the specified directory
634
Richard Smith081ad4d2017-01-24 19:39:46 +0000635.. option:: -x<language>, --language <arg>, --language=<arg>
636
637Treat subsequent input files as having type <language>
638
Richard Smith081ad4d2017-01-24 19:39:46 +0000639.. option:: -y<arg>
640
641Actions
642=======
643The action to perform on the input.
644
Richard Smith081ad4d2017-01-24 19:39:46 +0000645.. option:: -E, --preprocess
646
647Only run the preprocessor
648
Richard Smith081ad4d2017-01-24 19:39:46 +0000649.. option:: -S, --assemble
650
651Only run preprocess and compilation steps
652
Richard Smith081ad4d2017-01-24 19:39:46 +0000653.. option:: -emit-llvm
654
655Use the LLVM representation for assembler and object files
656
Richard Smith081ad4d2017-01-24 19:39:46 +0000657.. option:: -fsyntax-only
658
Richard Smith081ad4d2017-01-24 19:39:46 +0000659.. option:: -module-file-info
660
661Provide information about a particular module file
662
Richard Smith081ad4d2017-01-24 19:39:46 +0000663.. option:: --precompile
664
665Only precompile the input
666
Richard Smith081ad4d2017-01-24 19:39:46 +0000667.. option:: -rewrite-objc
668
669Rewrite Objective-C source to C++
670
Richard Smith081ad4d2017-01-24 19:39:46 +0000671.. option:: -verify-pch
672
673Load and verify that a pre-compiled header file is not stale
674
675Compilation flags
676=================
677
678Flags controlling the behavior of Clang during compilation. These flags have
679no effect during actions that do not perform compilation.
680
Richard Smith081ad4d2017-01-24 19:39:46 +0000681.. option:: -D<arg>, --define-macro <arg>, --define-macro=<arg>
682
Richard Smith081ad4d2017-01-24 19:39:46 +0000683.. option:: -U<arg>, --undefine-macro <arg>, --undefine-macro=<arg>
684
Richard Smith081ad4d2017-01-24 19:39:46 +0000685.. option:: -Xclang <arg>
686
687Pass <arg> to the clang compiler
688
Richard Smith081ad4d2017-01-24 19:39:46 +0000689.. option:: -fcomment-block-commands=<arg>,<arg2>...
690
691Treat each comma separated argument in <arg> as a documentation comment block command
692
Richard Smith081ad4d2017-01-24 19:39:46 +0000693.. option:: -fdeclspec, -fno-declspec
694
695Allow \_\_declspec as a keyword
696
Richard Smith081ad4d2017-01-24 19:39:46 +0000697.. option:: -fdepfile-entry=<arg>
698
Richard Smith081ad4d2017-01-24 19:39:46 +0000699.. option:: -fdiagnostics-fixit-info, -fno-diagnostics-fixit-info
700
Richard Smith081ad4d2017-01-24 19:39:46 +0000701.. option:: -fdiagnostics-format=<arg>
702
Richard Smith081ad4d2017-01-24 19:39:46 +0000703.. option:: -fdiagnostics-parseable-fixits
704
705Print fix-its in machine parseable form
706
Richard Smith081ad4d2017-01-24 19:39:46 +0000707.. option:: -fdiagnostics-print-source-range-info
708
709Print source range spans in numeric form
710
Richard Smith081ad4d2017-01-24 19:39:46 +0000711.. option:: -fdiagnostics-show-category=<arg>
712
Richard Smith081ad4d2017-01-24 19:39:46 +0000713.. option:: -fexperimental-new-pass-manager, -fno-experimental-new-pass-manager
714
715Enables an experimental new pass manager in LLVM.
716
Richard Smith081ad4d2017-01-24 19:39:46 +0000717.. option:: -finline-functions, -fno-inline-functions
718
719Inline suitable functions
720
Richard Smith081ad4d2017-01-24 19:39:46 +0000721.. option:: -finline-hint-functions
722
723Inline functions which are (explicitly or implicitly) marked inline
724
Richard Smith081ad4d2017-01-24 19:39:46 +0000725.. option:: -fno-crash-diagnostics
726
Richard Smith081ad4d2017-01-24 19:39:46 +0000727.. option:: -fno-sanitize-blacklist
728
729Don't use blacklist file for sanitizers
730
Richard Smith081ad4d2017-01-24 19:39:46 +0000731.. option:: -fparse-all-comments
732
Richard Smith081ad4d2017-01-24 19:39:46 +0000733.. option:: -fsanitize-address-field-padding=<arg>
734
735Level of field padding for AddressSanitizer
736
Richard Smith081ad4d2017-01-24 19:39:46 +0000737.. option:: -fsanitize-address-use-after-scope, -fno-sanitize-address-use-after-scope
738
739Enable use-after-scope detection in AddressSanitizer
740
Richard Smith081ad4d2017-01-24 19:39:46 +0000741.. option:: -fsanitize-blacklist=<arg>
742
743Path to blacklist file for sanitizers
744
Richard Smith081ad4d2017-01-24 19:39:46 +0000745.. option:: -fsanitize-cfi-cross-dso, -fno-sanitize-cfi-cross-dso
746
747Enable control flow integrity (CFI) checks for cross-DSO calls.
748
Richard Smith081ad4d2017-01-24 19:39:46 +0000749.. option:: -fsanitize-coverage=<arg1>,<arg2>..., -fno-sanitize-coverage=<arg1>,<arg2>...
750
751Specify the type of coverage instrumentation for Sanitizers
752
Richard Smith081ad4d2017-01-24 19:39:46 +0000753.. option:: -fsanitize-link-c++-runtime
754
Richard Smith081ad4d2017-01-24 19:39:46 +0000755.. option:: -fsanitize-memory-track-origins, -fno-sanitize-memory-track-origins
756
757Enable origins tracking in MemorySanitizer
758
Richard Smithb2c82a62017-01-27 01:54:42 +0000759.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000760.. option:: -fsanitize-memory-track-origins=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000761.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000762
763Enable origins tracking in MemorySanitizer
764
Richard Smith081ad4d2017-01-24 19:39:46 +0000765.. option:: -fsanitize-memory-use-after-dtor
766
767Enable use-after-destroy detection in MemorySanitizer
768
Richard Smith081ad4d2017-01-24 19:39:46 +0000769.. option:: -fsanitize-recover, -fno-sanitize-recover
770
Richard Smithb2c82a62017-01-27 01:54:42 +0000771.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000772.. option:: -fsanitize-recover=<arg1>,<arg2>..., -fno-sanitize-recover=<arg1>,<arg2>...
Richard Smithb2c82a62017-01-27 01:54:42 +0000773.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000774
775Enable recovery for specified sanitizers
776
Richard Smith081ad4d2017-01-24 19:39:46 +0000777.. option:: -fsanitize-stats, -fno-sanitize-stats
778
779Enable sanitizer statistics gathering.
780
Richard Smith081ad4d2017-01-24 19:39:46 +0000781.. option:: -fsanitize-thread-atomics, -fno-sanitize-thread-atomics
782
783Enable atomic operations instrumentation in ThreadSanitizer (default)
784
Richard Smith081ad4d2017-01-24 19:39:46 +0000785.. option:: -fsanitize-thread-func-entry-exit, -fno-sanitize-thread-func-entry-exit
786
787Enable function entry/exit instrumentation in ThreadSanitizer (default)
788
Richard Smith081ad4d2017-01-24 19:39:46 +0000789.. option:: -fsanitize-thread-memory-access, -fno-sanitize-thread-memory-access
790
791Enable memory access instrumentation in ThreadSanitizer (default)
792
Richard Smith081ad4d2017-01-24 19:39:46 +0000793.. option:: -fsanitize-trap=<arg1>,<arg2>..., -fno-sanitize-trap=<arg1>,<arg2>...
794
795Enable trapping for specified sanitizers
796
Richard Smith081ad4d2017-01-24 19:39:46 +0000797.. option:: -fsanitize-undefined-strip-path-components=<number>
798
799Strip (or keep only, if negative) a given number of path components when emitting check metadata.
800
Richard Smith081ad4d2017-01-24 19:39:46 +0000801.. option:: -fsanitize-undefined-trap-on-error, -fno-sanitize-undefined-trap-on-error
802
Richard Smith081ad4d2017-01-24 19:39:46 +0000803.. option:: -fsanitize=<check>,<arg2>..., -fno-sanitize=<arg1>,<arg2>...
804
805Turn on runtime checks for various forms of undefined or suspicious behavior. See user manual for available checks
806
Richard Smith081ad4d2017-01-24 19:39:46 +0000807.. option:: --param <arg>, --param=<arg>
808
Richard Smith081ad4d2017-01-24 19:39:46 +0000809.. option:: -std=<arg>, --std=<arg>, --std <arg>
810
811Language standard to compile for
812
813Include path management
814~~~~~~~~~~~~~~~~~~~~~~~
815
816Flags controlling how ``#include``\s are resolved to files.
817
Richard Smith081ad4d2017-01-24 19:39:46 +0000818.. option:: -I<arg>, --include-directory <arg>, --include-directory=<arg>
819
820Add directory to include search path
821
Richard Smith081ad4d2017-01-24 19:39:46 +0000822.. option:: -I-, --include-barrier
823
Richard Smith081ad4d2017-01-24 19:39:46 +0000824.. option:: --cuda-path=<arg>
825
826CUDA installation path
827
Richard Smith081ad4d2017-01-24 19:39:46 +0000828.. option:: -cxx-isystem<directory>
829
830Add directory to the C++ SYSTEM include search path
831
Richard Smith081ad4d2017-01-24 19:39:46 +0000832.. option:: -fbuild-session-file=<file>
833
834Use the last modification time of <file> as the build session timestamp
835
Richard Smith081ad4d2017-01-24 19:39:46 +0000836.. option:: -fbuild-session-timestamp=<time since Epoch in seconds>
837
838Time when the current build session started
839
Richard Smith081ad4d2017-01-24 19:39:46 +0000840.. option:: -fmodules-cache-path=<directory>
841
842Specify the module cache path
843
Richard Smith081ad4d2017-01-24 19:39:46 +0000844.. option:: -fmodules-disable-diagnostic-validation
845
846Disable validation of the diagnostic options when loading the module
847
Richard Smith081ad4d2017-01-24 19:39:46 +0000848.. option:: -fmodules-prune-after=<seconds>
849
850Specify the interval (in seconds) after which a module file will be considered unused
851
Richard Smith081ad4d2017-01-24 19:39:46 +0000852.. option:: -fmodules-prune-interval=<seconds>
853
854Specify the interval (in seconds) between attempts to prune the module cache
855
Richard Smith081ad4d2017-01-24 19:39:46 +0000856.. option:: -fmodules-user-build-path <directory>
857
858Specify the module user build path
859
Richard Smith081ad4d2017-01-24 19:39:46 +0000860.. option:: -fmodules-validate-once-per-build-session
861
862Don't verify input files for the modules if the module has been successfully validated or loaded during this build session
863
Richard Smith081ad4d2017-01-24 19:39:46 +0000864.. option:: -fmodules-validate-system-headers
865
866Validate the system headers that a module depends on when loading the module
867
Richard Smith081ad4d2017-01-24 19:39:46 +0000868.. option:: -fprebuilt-module-path=<directory>
869
870Specify the prebuilt module path
871
Richard Smith081ad4d2017-01-24 19:39:46 +0000872.. option:: -i<arg>
873
Richard Smith081ad4d2017-01-24 19:39:46 +0000874.. option:: -idirafter<arg>, --include-directory-after <arg>, --include-directory-after=<arg>
875
876Add directory to AFTER include search path
877
Richard Smith081ad4d2017-01-24 19:39:46 +0000878.. option:: -iframework<arg>
879
880Add directory to SYSTEM framework search path
881
Richard Smith081ad4d2017-01-24 19:39:46 +0000882.. option:: -imacros<file>, --imacros<file>, --imacros=<arg>
883
884Include macros from file before parsing
885
Richard Smith081ad4d2017-01-24 19:39:46 +0000886.. option:: -include<file>, --include<file>, --include=<arg>
887
888Include file before parsing
889
Richard Smith081ad4d2017-01-24 19:39:46 +0000890.. option:: -include-pch <file>
891
892Include precompiled header file
893
Richard Smith081ad4d2017-01-24 19:39:46 +0000894.. option:: -iprefix<dir>, --include-prefix <arg>, --include-prefix=<arg>
895
896Set the -iwithprefix/-iwithprefixbefore prefix
897
Richard Smith081ad4d2017-01-24 19:39:46 +0000898.. option:: -iquote<directory>
899
900Add directory to QUOTE include search path
901
Richard Smith081ad4d2017-01-24 19:39:46 +0000902.. option:: -isysroot<dir>
903
904Set the system root directory (usually /)
905
Richard Smith081ad4d2017-01-24 19:39:46 +0000906.. option:: -isystem<directory>
907
908Add directory to SYSTEM include search path
909
Richard Smith081ad4d2017-01-24 19:39:46 +0000910.. option:: -isystem-after<directory>
911
912Add directory to end of the SYSTEM include search path
913
Richard Smith081ad4d2017-01-24 19:39:46 +0000914.. option:: -ivfsoverlay<arg>
915
916Overlay the virtual filesystem described by file over the real file system
917
Richard Smith081ad4d2017-01-24 19:39:46 +0000918.. option:: -iwithprefix<dir>, --include-with-prefix <arg>, --include-with-prefix-after <arg>, --include-with-prefix-after=<arg>, --include-with-prefix=<arg>
919
920Set directory to SYSTEM include search path with prefix
921
Richard Smith081ad4d2017-01-24 19:39:46 +0000922.. option:: -iwithprefixbefore<dir>, --include-with-prefix-before <arg>, --include-with-prefix-before=<arg>
923
924Set directory to include search path with prefix
925
Richard Smith081ad4d2017-01-24 19:39:46 +0000926.. option:: -iwithsysroot<directory>
927
928Add directory to SYSTEM include search path, absolute paths are relative to -isysroot
929
Richard Smith081ad4d2017-01-24 19:39:46 +0000930.. option:: --ptxas-path=<arg>
931
932Path to ptxas (used for compiling CUDA code)
933
Richard Smith081ad4d2017-01-24 19:39:46 +0000934.. option:: --system-header-prefix=<prefix>, --no-system-header-prefix=<prefix>, --system-header-prefix <arg>
935
936Treat all #include paths starting with <prefix> as including a system header.
937
938Dependency file generation
939~~~~~~~~~~~~~~~~~~~~~~~~~~
940
941Flags controlling generation of a dependency file for ``make``-like build
942systems.
943
Richard Smith081ad4d2017-01-24 19:39:46 +0000944.. option:: -M, --dependencies
945
946Like -MD, but also implies -E and writes to stdout by default
947
Richard Smith081ad4d2017-01-24 19:39:46 +0000948.. option:: -MD, --write-dependencies
949
950Write a depfile containing user and system headers
951
Richard Smith081ad4d2017-01-24 19:39:46 +0000952.. option:: -MF<file>
953
954Write depfile output from -MMD, -MD, -MM, or -M to <file>
955
Richard Smith081ad4d2017-01-24 19:39:46 +0000956.. option:: -MG, --print-missing-file-dependencies
957
958Add missing headers to depfile
959
Richard Smith081ad4d2017-01-24 19:39:46 +0000960.. option:: -MJ<arg>
961
962Write a compilation database entry per input
963
Richard Smith081ad4d2017-01-24 19:39:46 +0000964.. option:: -MM, --user-dependencies
965
966Like -MMD, but also implies -E and writes to stdout by default
967
Richard Smith081ad4d2017-01-24 19:39:46 +0000968.. option:: -MMD, --write-user-dependencies
969
970Write a depfile containing user headers
971
Richard Smith081ad4d2017-01-24 19:39:46 +0000972.. option:: -MP
973
974Create phony target for each dependency (other than main file)
975
Richard Smith081ad4d2017-01-24 19:39:46 +0000976.. option:: -MQ<arg>
977
978Specify name of main file output to quote in depfile
979
Richard Smith081ad4d2017-01-24 19:39:46 +0000980.. option:: -MT<arg>
981
982Specify name of main file output in depfile
983
Richard Smith081ad4d2017-01-24 19:39:46 +0000984.. option:: -MV
985
986Use NMake/Jom format for the depfile
987
988Dumping preprocessor state
989~~~~~~~~~~~~~~~~~~~~~~~~~~
990
991Flags allowing the state of the preprocessor to be dumped in various ways.
992
Richard Smith081ad4d2017-01-24 19:39:46 +0000993.. option:: -d
994
Richard Smithb2c82a62017-01-27 01:54:42 +0000995.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000996.. option:: -d<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000997.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000998
Richard Smith081ad4d2017-01-24 19:39:46 +0000999.. option:: -dA
1000
Richard Smith081ad4d2017-01-24 19:39:46 +00001001.. option:: -dD
1002
1003Print macro definitions in -E mode in addition to normal output
1004
Richard Smith081ad4d2017-01-24 19:39:46 +00001005.. option:: -dI
1006
1007Print include directives in -E mode in addition to normal output
1008
Richard Smith081ad4d2017-01-24 19:39:46 +00001009.. option:: -dM
1010
1011Print macro definitions in -E mode instead of normal output
1012
1013Diagnostic flags
1014~~~~~~~~~~~~~~~~
1015
1016Flags controlling which warnings, errors, and remarks Clang will generate.
1017See the :doc:`full list of warning and remark flags <DiagnosticsReference>`.
1018
Richard Smith081ad4d2017-01-24 19:39:46 +00001019.. option:: -R<remark>
1020
1021Enable the specified remark
1022
Richard Smith081ad4d2017-01-24 19:39:46 +00001023.. option:: -Rpass-analysis=<arg>
1024
1025Report transformation analysis from optimization passes whose name matches the given POSIX regular expression
1026
Richard Smith081ad4d2017-01-24 19:39:46 +00001027.. option:: -Rpass-missed=<arg>
1028
1029Report missed transformations by optimization passes whose name matches the given POSIX regular expression
1030
Richard Smith081ad4d2017-01-24 19:39:46 +00001031.. option:: -Rpass=<arg>
1032
1033Report transformations performed by optimization passes whose name matches the given POSIX regular expression
1034
Richard Smith081ad4d2017-01-24 19:39:46 +00001035.. option:: -W<warning>, --extra-warnings, --warn-<arg>, --warn-=<arg>
1036
1037Enable the specified warning
1038
Richard Smith081ad4d2017-01-24 19:39:46 +00001039.. option:: -WCL4
1040
Richard Smith081ad4d2017-01-24 19:39:46 +00001041.. option:: -Wall, --all-warnings
1042
Richard Smith081ad4d2017-01-24 19:39:46 +00001043.. option:: -Wdeprecated, -Wno-deprecated
1044
Richard Smith081ad4d2017-01-24 19:39:46 +00001045.. option:: -Wextra
1046
Richard Smith081ad4d2017-01-24 19:39:46 +00001047.. option:: -Wnonportable-cfstrings<arg>, -Wno-nonportable-cfstrings<arg>
1048
Richard Smith081ad4d2017-01-24 19:39:46 +00001049.. option:: -Wwrite-strings, -Wno-write-strings
1050
1051Target-independent compilation options
1052~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Richard Smith081ad4d2017-01-24 19:39:46 +00001053.. option:: -Wframe-larger-than=<arg>
1054
Richard Smith081ad4d2017-01-24 19:39:46 +00001055.. option:: -fPIC, -fno-PIC
1056
Richard Smith081ad4d2017-01-24 19:39:46 +00001057.. option:: -fPIE, -fno-PIE
1058
Richard Smith081ad4d2017-01-24 19:39:46 +00001059.. option:: -faccess-control, -fno-access-control
1060
Richard Smithb2c82a62017-01-27 01:54:42 +00001061.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001062.. option:: -faligned-allocation, -faligned-new, -fno-aligned-allocation
Richard Smithb2c82a62017-01-27 01:54:42 +00001063.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001064
1065Enable C++17 aligned allocation functions
1066
Richard Smith081ad4d2017-01-24 19:39:46 +00001067.. option:: -fallow-unsupported
1068
Richard Smith081ad4d2017-01-24 19:39:46 +00001069.. option:: -faltivec, -fno-altivec, -maltivec
1070
1071Enable AltiVec vector initializer syntax
1072
Richard Smith081ad4d2017-01-24 19:39:46 +00001073.. option:: -fansi-escape-codes
1074
1075Use ANSI escape codes for diagnostics
1076
Richard Smith081ad4d2017-01-24 19:39:46 +00001077.. option:: -fapple-kext, -findirect-virtual-calls, -fterminated-vtables
1078
1079Use Apple's kernel extensions ABI
1080
Richard Smith081ad4d2017-01-24 19:39:46 +00001081.. option:: -fapple-pragma-pack, -fno-apple-pragma-pack
1082
1083Enable Apple gcc-compatible #pragma pack handling
1084
Richard Smith081ad4d2017-01-24 19:39:46 +00001085.. option:: -fapplication-extension, -fno-application-extension
1086
1087Restrict code to those available for App Extensions
1088
Richard Smith081ad4d2017-01-24 19:39:46 +00001089.. option:: -fasm, -fno-asm
1090
Richard Smith081ad4d2017-01-24 19:39:46 +00001091.. option:: -fasm-blocks, -fno-asm-blocks
1092
Richard Smith081ad4d2017-01-24 19:39:46 +00001093.. option:: -fassociative-math, -fno-associative-math
1094
Richard Smith081ad4d2017-01-24 19:39:46 +00001095.. option:: -fassume-sane-operator-new, -fno-assume-sane-operator-new
1096
Richard Smith081ad4d2017-01-24 19:39:46 +00001097.. option:: -fast
1098
Richard Smith081ad4d2017-01-24 19:39:46 +00001099.. option:: -fastcp
1100
Richard Smith081ad4d2017-01-24 19:39:46 +00001101.. option:: -fastf
1102
Richard Smith081ad4d2017-01-24 19:39:46 +00001103.. option:: -fasynchronous-unwind-tables, -fno-asynchronous-unwind-tables
1104
Richard Smith081ad4d2017-01-24 19:39:46 +00001105.. option:: -fautolink, -fno-autolink
1106
Richard Smith081ad4d2017-01-24 19:39:46 +00001107.. option:: -fblocks, -fno-blocks
1108
1109Enable the 'blocks' language feature
1110
Richard Smith081ad4d2017-01-24 19:39:46 +00001111.. option:: -fbootclasspath=<arg>, --bootclasspath <arg>, --bootclasspath=<arg>
1112
Richard Smith081ad4d2017-01-24 19:39:46 +00001113.. option:: -fborland-extensions, -fno-borland-extensions
1114
1115Accept non-standard constructs supported by the Borland compiler
1116
Richard Smith081ad4d2017-01-24 19:39:46 +00001117.. option:: -fbracket-depth=<arg>
1118
Richard Smith081ad4d2017-01-24 19:39:46 +00001119.. option:: -fbuiltin, -fno-builtin
1120
Richard Smith081ad4d2017-01-24 19:39:46 +00001121.. option:: -fbuiltin-module-map
1122
1123Load the clang builtins module map file.
1124
Richard Smith081ad4d2017-01-24 19:39:46 +00001125.. option:: -fcaret-diagnostics, -fno-caret-diagnostics
1126
Richard Smith081ad4d2017-01-24 19:39:46 +00001127.. option:: -fclasspath=<arg>, --CLASSPATH <arg>, --CLASSPATH=<arg>, --classpath <arg>, --classpath=<arg>
1128
Richard Smith081ad4d2017-01-24 19:39:46 +00001129.. option:: -fcolor-diagnostics, -fno-color-diagnostics
1130
1131Use colors in diagnostics
1132
Richard Smith081ad4d2017-01-24 19:39:46 +00001133.. option:: -fcommon, -fno-common
1134
Richard Smith081ad4d2017-01-24 19:39:46 +00001135.. option:: -fcompile-resource=<arg>, --resource <arg>, --resource=<arg>
1136
Richard Smith081ad4d2017-01-24 19:39:46 +00001137.. option:: -fconstant-cfstrings, -fno-constant-cfstrings
1138
Richard Smith081ad4d2017-01-24 19:39:46 +00001139.. option:: -fconstant-string-class=<arg>
1140
Richard Smith081ad4d2017-01-24 19:39:46 +00001141.. option:: -fconstexpr-backtrace-limit=<arg>
1142
Richard Smith081ad4d2017-01-24 19:39:46 +00001143.. option:: -fconstexpr-depth=<arg>
1144
Richard Smith081ad4d2017-01-24 19:39:46 +00001145.. option:: -fconstexpr-steps=<arg>
1146
Richard Smith081ad4d2017-01-24 19:39:46 +00001147.. option:: -fcoroutines-ts, -fno-coroutines-ts
1148
1149Enable support for the C++ Coroutines TS
1150
Richard Smith081ad4d2017-01-24 19:39:46 +00001151.. option:: -fcoverage-mapping, -fno-coverage-mapping
1152
1153Generate coverage mapping to enable code coverage analysis
1154
Richard Smith081ad4d2017-01-24 19:39:46 +00001155.. option:: -fcreate-profile
1156
Richard Smith081ad4d2017-01-24 19:39:46 +00001157.. option:: -fcxx-exceptions, -fno-cxx-exceptions
1158
1159Enable C++ exceptions
1160
Richard Smith081ad4d2017-01-24 19:39:46 +00001161.. option:: -fcxx-modules, -fno-cxx-modules
1162
Richard Smith081ad4d2017-01-24 19:39:46 +00001163.. option:: -fdata-sections, -fno-data-sections
1164
1165Place each data in its own section (ELF Only)
1166
Richard Smith081ad4d2017-01-24 19:39:46 +00001167.. option:: -fdebug-info-for-profiling, -fno-debug-info-for-profiling
1168
1169Emit extra debug info to make sample profile more accurate.
1170
Richard Smith081ad4d2017-01-24 19:39:46 +00001171.. option:: -fdebug-pass-arguments
1172
Richard Smith081ad4d2017-01-24 19:39:46 +00001173.. option:: -fdebug-pass-structure
1174
Richard Smith081ad4d2017-01-24 19:39:46 +00001175.. option:: -fdebug-prefix-map=<arg>
1176
1177remap file source paths in debug info
1178
Richard Smith081ad4d2017-01-24 19:39:46 +00001179.. option:: -fdebug-types-section, -fno-debug-types-section
1180
1181Place debug types in their own section (ELF Only)
1182
Richard Smith081ad4d2017-01-24 19:39:46 +00001183.. option:: -fdelayed-template-parsing, -fno-delayed-template-parsing
1184
1185Parse templated function definitions at the end of the translation unit
1186
Richard Smith081ad4d2017-01-24 19:39:46 +00001187.. option:: -fdenormal-fp-math=<arg>
1188
Richard Smith081ad4d2017-01-24 19:39:46 +00001189.. option:: -fdiagnostics-absolute-paths
1190
1191Print absolute paths in diagnostics
1192
Richard Smith081ad4d2017-01-24 19:39:46 +00001193.. option:: -fdiagnostics-color, -fno-diagnostics-color
1194
Richard Smithb2c82a62017-01-27 01:54:42 +00001195.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001196.. option:: -fdiagnostics-color=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001197.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001198
Richard Smith081ad4d2017-01-24 19:39:46 +00001199.. option:: -fdiagnostics-show-hotness, -fno-diagnostics-show-hotness
1200
1201Enable profile hotness information in diagnostic line
1202
Richard Smith081ad4d2017-01-24 19:39:46 +00001203.. option:: -fdiagnostics-show-note-include-stack, -fno-diagnostics-show-note-include-stack
1204
1205Display include stacks for diagnostic notes
1206
Richard Smith081ad4d2017-01-24 19:39:46 +00001207.. option:: -fdiagnostics-show-option, -fno-diagnostics-show-option
1208
1209Print option name with mappable diagnostics
1210
Richard Smith081ad4d2017-01-24 19:39:46 +00001211.. option:: -fdiagnostics-show-template-tree
1212
1213Print a template comparison tree for differing templates
1214
Richard Smith081ad4d2017-01-24 19:39:46 +00001215.. option:: -fdollars-in-identifiers, -fno-dollars-in-identifiers
1216
1217Allow '$' in identifiers
1218
Richard Smith081ad4d2017-01-24 19:39:46 +00001219.. option:: -fdwarf-directory-asm, -fno-dwarf-directory-asm
1220
Richard Smith081ad4d2017-01-24 19:39:46 +00001221.. option:: -felide-constructors, -fno-elide-constructors
1222
Richard Smith081ad4d2017-01-24 19:39:46 +00001223.. option:: -feliminate-unused-debug-symbols, -fno-eliminate-unused-debug-symbols
1224
Richard Smith081ad4d2017-01-24 19:39:46 +00001225.. option:: -fembed-bitcode=<option>, -fembed-bitcode (equivalent to -fembed-bitcode=all), -fembed-bitcode-marker (equivalent to -fembed-bitcode=marker)
1226
1227Embed LLVM bitcode (option: off, all, bitcode, marker)
1228
Richard Smith081ad4d2017-01-24 19:39:46 +00001229.. option:: -femit-all-decls
1230
1231Emit all declarations, even if unused
1232
Richard Smith081ad4d2017-01-24 19:39:46 +00001233.. option:: -femulated-tls, -fno-emulated-tls
1234
1235Use emutls functions to access thread\_local variables
1236
Richard Smith081ad4d2017-01-24 19:39:46 +00001237.. option:: -fencoding=<arg>, --encoding <arg>, --encoding=<arg>
1238
Richard Smith081ad4d2017-01-24 19:39:46 +00001239.. option:: -ferror-limit=<arg>
1240
Richard Smith081ad4d2017-01-24 19:39:46 +00001241.. option:: -fexceptions, -fno-exceptions
1242
1243Enable support for exception handling
1244
Richard Smith081ad4d2017-01-24 19:39:46 +00001245.. option:: -fexec-charset=<arg>
1246
Richard Smith081ad4d2017-01-24 19:39:46 +00001247.. option:: -fextdirs=<arg>, --extdirs <arg>, --extdirs=<arg>
1248
Richard Smith081ad4d2017-01-24 19:39:46 +00001249.. option:: -ffast-math, -fno-fast-math
1250
1251Allow aggressive, lossy floating-point optimizations
1252
Richard Smith081ad4d2017-01-24 19:39:46 +00001253.. option:: -ffinite-math-only, -fno-finite-math-only
1254
Richard Smith081ad4d2017-01-24 19:39:46 +00001255.. option:: -ffor-scope, -fno-for-scope
1256
Richard Smith081ad4d2017-01-24 19:39:46 +00001257.. option:: -ffp-contract=<arg>
1258
1259Form fused FP ops (e.g. FMAs): fast (everywhere) \| on (according to FP\_CONTRACT pragma, default) \| off (never fuse)
1260
Richard Smith081ad4d2017-01-24 19:39:46 +00001261.. option:: -ffreestanding
1262
1263Assert that the compilation takes place in a freestanding environment
1264
Richard Smith081ad4d2017-01-24 19:39:46 +00001265.. option:: -ffunction-sections, -fno-function-sections
1266
1267Place each function in its own section (ELF Only)
1268
Richard Smith081ad4d2017-01-24 19:39:46 +00001269.. option:: -fgnu-inline-asm, -fno-gnu-inline-asm
1270
Richard Smith081ad4d2017-01-24 19:39:46 +00001271.. option:: -fgnu-keywords, -fno-gnu-keywords
1272
1273Allow GNU-extension keywords regardless of language standard
1274
Richard Smith081ad4d2017-01-24 19:39:46 +00001275.. option:: -fgnu-runtime
1276
1277Generate output compatible with the standard GNU Objective-C runtime
1278
Richard Smith081ad4d2017-01-24 19:39:46 +00001279.. option:: -fgnu89-inline, -fno-gnu89-inline
1280
1281Use the gnu89 inline semantics
1282
Richard Smith081ad4d2017-01-24 19:39:46 +00001283.. option:: -fhonor-infinities, -fhonor-infinites, -fno-honor-infinities
1284
Richard Smith081ad4d2017-01-24 19:39:46 +00001285.. option:: -fhonor-nans, -fno-honor-nans
1286
Richard Smith081ad4d2017-01-24 19:39:46 +00001287.. option:: -fhosted
1288
Richard Smith081ad4d2017-01-24 19:39:46 +00001289.. option:: -fimplicit-module-maps, -fmodule-maps, -fno-implicit-module-maps
1290
1291Implicitly search the file system for module map files.
1292
Richard Smith081ad4d2017-01-24 19:39:46 +00001293.. option:: -fimplicit-modules, -fno-implicit-modules
1294
Richard Smith081ad4d2017-01-24 19:39:46 +00001295.. option:: -finput-charset=<arg>
1296
Richard Smith081ad4d2017-01-24 19:39:46 +00001297.. option:: -finstrument-functions
1298
1299Generate calls to instrument function entry and exit
1300
Richard Smith081ad4d2017-01-24 19:39:46 +00001301.. option:: -fintegrated-as, -fno-integrated-as, -integrated-as
1302
1303Enable the integrated assembler
1304
Richard Smith081ad4d2017-01-24 19:39:46 +00001305.. option:: -fjump-tables, -fno-jump-tables
1306
Richard Smith081ad4d2017-01-24 19:39:46 +00001307.. option:: -flax-vector-conversions, -fno-lax-vector-conversions
1308
Richard Smith081ad4d2017-01-24 19:39:46 +00001309.. option:: -flimited-precision=<arg>
1310
Richard Smith081ad4d2017-01-24 19:39:46 +00001311.. option:: -flto, -fno-lto
1312
1313Enable LTO in 'full' mode
1314
Richard Smith081ad4d2017-01-24 19:39:46 +00001315.. option:: -flto-jobs=<arg>
1316
1317Controls the backend parallelism of -flto=thin (default of 0 means the number of threads will be derived from the number of CPUs detected)
1318
Richard Smithb2c82a62017-01-27 01:54:42 +00001319.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001320.. option:: -flto=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001321.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001322
1323Set LTO mode to either 'full' or 'thin'
1324
Richard Smith081ad4d2017-01-24 19:39:46 +00001325.. option:: -fmacro-backtrace-limit=<arg>
1326
Richard Smith081ad4d2017-01-24 19:39:46 +00001327.. option:: -fmath-errno, -fno-math-errno
1328
1329Require math functions to indicate errors by setting errno
1330
Richard Smith081ad4d2017-01-24 19:39:46 +00001331.. option:: -fmax-type-align=<arg>
1332
1333Specify the maximum alignment to enforce on pointers lacking an explicit alignment
1334
Richard Smith081ad4d2017-01-24 19:39:46 +00001335.. option:: -fmerge-all-constants, -fno-merge-all-constants
1336
Richard Smith081ad4d2017-01-24 19:39:46 +00001337.. option:: -fmessage-length=<arg>
1338
Richard Smith081ad4d2017-01-24 19:39:46 +00001339.. option:: -fmodule-file-deps, -fno-module-file-deps
1340
Richard Smith081ad4d2017-01-24 19:39:46 +00001341.. option:: -fmodule-file=<file>
1342
1343Load this precompiled module file
1344
Richard Smith081ad4d2017-01-24 19:39:46 +00001345.. option:: -fmodule-map-file=<file>
1346
1347Load this module map file
1348
Richard Smith081ad4d2017-01-24 19:39:46 +00001349.. option:: -fmodule-name=<name>, -fmodule-implementation-of <arg>, -fmodule-name <arg>
1350
1351Specify the name of the module to build
1352
Richard Smith081ad4d2017-01-24 19:39:46 +00001353.. option:: -fmodules, -fno-modules
1354
1355Enable the 'modules' language feature
1356
Richard Smith081ad4d2017-01-24 19:39:46 +00001357.. option:: -fmodules-decluse, -fno-modules-decluse
1358
1359Require declaration of modules used within a module
1360
Richard Smith081ad4d2017-01-24 19:39:46 +00001361.. option:: -fmodules-ignore-macro=<arg>
1362
1363Ignore the definition of the given macro when building and loading modules
1364
Richard Smith081ad4d2017-01-24 19:39:46 +00001365.. option:: -fmodules-search-all, -fno-modules-search-all
1366
1367Search even non-imported modules to resolve references
1368
Richard Smith081ad4d2017-01-24 19:39:46 +00001369.. option:: -fmodules-strict-decluse
1370
1371Like -fmodules-decluse but requires all headers to be in modules
1372
Richard Smith081ad4d2017-01-24 19:39:46 +00001373.. option:: -fmodules-ts
1374
1375Enable support for the C++ Modules TS
1376
Richard Smith081ad4d2017-01-24 19:39:46 +00001377.. option:: -fms-compatibility, -fno-ms-compatibility
1378
1379Enable full Microsoft Visual C++ compatibility
1380
Richard Smith081ad4d2017-01-24 19:39:46 +00001381.. option:: -fms-compatibility-version=<arg>
1382
1383Dot-separated value representing the Microsoft compiler version number to report in \_MSC\_VER (0 = don't define it (default))
1384
Richard Smith081ad4d2017-01-24 19:39:46 +00001385.. option:: -fms-extensions, -fno-ms-extensions
1386
1387Accept some non-standard constructs supported by the Microsoft compiler
1388
Richard Smith081ad4d2017-01-24 19:39:46 +00001389.. option:: -fms-memptr-rep=<arg>
1390
Richard Smith081ad4d2017-01-24 19:39:46 +00001391.. option:: -fms-volatile<arg>
1392
Richard Smith081ad4d2017-01-24 19:39:46 +00001393.. option:: -fmsc-version=<arg>
1394
1395Microsoft compiler version number to report in \_MSC\_VER (0 = don't define it (default))
1396
Richard Smith081ad4d2017-01-24 19:39:46 +00001397.. option:: -fmudflap
1398
Richard Smith081ad4d2017-01-24 19:39:46 +00001399.. option:: -fmudflapth
1400
Richard Smith081ad4d2017-01-24 19:39:46 +00001401.. option:: -fnested-functions
1402
Richard Smith081ad4d2017-01-24 19:39:46 +00001403.. option:: -fnew-alignment=<align>, -fnew-alignment <arg>
1404
1405Specifies the largest alignment guaranteed by '::operator new(size\_t)'
1406
Richard Smith081ad4d2017-01-24 19:39:46 +00001407.. option:: -fnext-runtime
1408
Richard Smith081ad4d2017-01-24 19:39:46 +00001409.. option:: -fno-builtin-<arg>
1410
1411Disable implicit builtin knowledge of a specific function
1412
Richard Smith081ad4d2017-01-24 19:39:46 +00001413.. option:: -fno-elide-type
1414
1415Do not elide types when printing diagnostics
1416
Richard Smith081ad4d2017-01-24 19:39:46 +00001417.. option:: -fno-max-type-align
1418
Richard Smith081ad4d2017-01-24 19:39:46 +00001419.. option:: -fno-operator-names
1420
1421Do not treat C++ operator name keywords as synonyms for operators
1422
Richard Smith081ad4d2017-01-24 19:39:46 +00001423.. option:: -fno-strict-modules-decluse
1424
Richard Smith081ad4d2017-01-24 19:39:46 +00001425.. option:: -fno-working-directory
1426
Richard Smith081ad4d2017-01-24 19:39:46 +00001427.. option:: -fnoopenmp-use-tls
1428
Richard Smith081ad4d2017-01-24 19:39:46 +00001429.. option:: -fobjc-abi-version=<arg>
1430
Richard Smith081ad4d2017-01-24 19:39:46 +00001431.. option:: -fobjc-arc, -fno-objc-arc
1432
1433Synthesize retain and release calls for Objective-C pointers
1434
Richard Smith081ad4d2017-01-24 19:39:46 +00001435.. option:: -fobjc-arc-exceptions, -fno-objc-arc-exceptions
1436
1437Use EH-safe code when synthesizing retains and releases in -fobjc-arc
1438
Richard Smith081ad4d2017-01-24 19:39:46 +00001439.. option:: -fobjc-exceptions, -fno-objc-exceptions
1440
1441Enable Objective-C exceptions
1442
Richard Smith081ad4d2017-01-24 19:39:46 +00001443.. option:: -fobjc-infer-related-result-type, -fno-objc-infer-related-result-type
1444
Richard Smith081ad4d2017-01-24 19:39:46 +00001445.. option:: -fobjc-legacy-dispatch, -fno-objc-legacy-dispatch
1446
Richard Smith081ad4d2017-01-24 19:39:46 +00001447.. option:: -fobjc-link-runtime
1448
Richard Smith081ad4d2017-01-24 19:39:46 +00001449.. option:: -fobjc-nonfragile-abi, -fno-objc-nonfragile-abi
1450
Richard Smith081ad4d2017-01-24 19:39:46 +00001451.. option:: -fobjc-nonfragile-abi-version=<arg>
1452
Richard Smith081ad4d2017-01-24 19:39:46 +00001453.. option:: -fobjc-runtime=<arg>
1454
1455Specify the target Objective-C runtime kind and version
1456
Richard Smith081ad4d2017-01-24 19:39:46 +00001457.. option:: -fobjc-sender-dependent-dispatch
1458
Richard Smith081ad4d2017-01-24 19:39:46 +00001459.. option:: -fobjc-weak, -fno-objc-weak
1460
1461Enable ARC-style weak references in Objective-C
1462
Richard Smith081ad4d2017-01-24 19:39:46 +00001463.. option:: -fomit-frame-pointer, -fno-omit-frame-pointer
1464
Richard Smith081ad4d2017-01-24 19:39:46 +00001465.. option:: -fopenmp, -fno-openmp
1466
Richard Smith081ad4d2017-01-24 19:39:46 +00001467.. option:: -fopenmp-dump-offload-linker-script
1468
Richard Smith081ad4d2017-01-24 19:39:46 +00001469.. option:: -fopenmp-use-tls
1470
Richard Smith081ad4d2017-01-24 19:39:46 +00001471.. option:: -fopenmp-version=<arg>
1472
Richard Smithb2c82a62017-01-27 01:54:42 +00001473.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001474.. option:: -fopenmp=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001475.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001476
Richard Smith081ad4d2017-01-24 19:39:46 +00001477.. option:: -foperator-arrow-depth=<arg>
1478
Richard Smith081ad4d2017-01-24 19:39:46 +00001479.. option:: -foptimization-record-file=<arg>
1480
1481Specify the file name of any generated YAML optimization record
1482
Richard Smith081ad4d2017-01-24 19:39:46 +00001483.. option:: -foptimize-sibling-calls, -fno-optimize-sibling-calls
1484
Richard Smith081ad4d2017-01-24 19:39:46 +00001485.. option:: -foutput-class-dir=<arg>, --output-class-directory <arg>, --output-class-directory=<arg>
1486
Richard Smith081ad4d2017-01-24 19:39:46 +00001487.. option:: -fpack-struct, -fno-pack-struct
1488
Richard Smithb2c82a62017-01-27 01:54:42 +00001489.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001490.. option:: -fpack-struct=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001491.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001492
1493Specify the default maximum struct packing alignment
1494
Richard Smith081ad4d2017-01-24 19:39:46 +00001495.. option:: -fpascal-strings, -fno-pascal-strings, -mpascal-strings
1496
1497Recognize and construct Pascal-style string literals
1498
Richard Smith081ad4d2017-01-24 19:39:46 +00001499.. option:: -fpcc-struct-return
1500
1501Override the default ABI to return all structs on the stack
1502
Richard Smith081ad4d2017-01-24 19:39:46 +00001503.. option:: -fpch-preprocess
1504
Richard Smith081ad4d2017-01-24 19:39:46 +00001505.. option:: -fpic, -fno-pic
1506
Richard Smith081ad4d2017-01-24 19:39:46 +00001507.. option:: -fpie, -fno-pie
1508
Richard Smith081ad4d2017-01-24 19:39:46 +00001509.. option:: -fplugin=<dsopath>
1510
1511Load the named plugin (dynamic shared object)
1512
Richard Smith081ad4d2017-01-24 19:39:46 +00001513.. option:: -fpreserve-as-comments, -fno-preserve-as-comments
1514
Richard Smith081ad4d2017-01-24 19:39:46 +00001515.. option:: -fprofile-arcs, -fno-profile-arcs
1516
Richard Smith081ad4d2017-01-24 19:39:46 +00001517.. option:: -fprofile-dir=<arg>
1518
Richard Smith081ad4d2017-01-24 19:39:46 +00001519.. option:: -fprofile-generate, -fno-profile-generate
1520
1521Generate instrumented code to collect execution counts into default.profraw (overridden by LLVM\_PROFILE\_FILE env var)
1522
Richard Smithb2c82a62017-01-27 01:54:42 +00001523.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001524.. option:: -fprofile-generate=<directory>
Richard Smithb2c82a62017-01-27 01:54:42 +00001525.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001526
1527Generate instrumented code to collect execution counts into <directory>/default.profraw (overridden by LLVM\_PROFILE\_FILE env var)
1528
Richard Smith081ad4d2017-01-24 19:39:46 +00001529.. option:: -fprofile-instr-generate, -fno-profile-instr-generate
1530
1531Generate instrumented code to collect execution counts into default.profraw file (overridden by '=' form of option or LLVM\_PROFILE\_FILE env var)
1532
Richard Smithb2c82a62017-01-27 01:54:42 +00001533.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001534.. option:: -fprofile-instr-generate=<file>
Richard Smithb2c82a62017-01-27 01:54:42 +00001535.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001536
1537Generate instrumented code to collect execution counts into <file> (overridden by LLVM\_PROFILE\_FILE env var)
1538
Richard Smith081ad4d2017-01-24 19:39:46 +00001539.. option:: -fprofile-instr-use, -fno-profile-instr-use, -fprofile-use
1540
Richard Smithb2c82a62017-01-27 01:54:42 +00001541.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001542.. option:: -fprofile-instr-use=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001543.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001544
1545Use instrumentation data for profile-guided optimization
1546
Richard Smith081ad4d2017-01-24 19:39:46 +00001547.. option:: -fprofile-sample-use=<arg>, -fauto-profile=<arg>
1548
1549Enable sample-based profile guided optimizations
1550
Richard Smithb2c82a62017-01-27 01:54:42 +00001551.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001552.. option:: -fprofile-use=<pathname>
Richard Smithb2c82a62017-01-27 01:54:42 +00001553.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001554
1555Use instrumentation data for profile-guided optimization. If pathname is a directory, it reads from <pathname>/default.profdata. Otherwise, it reads from file <pathname>.
1556
Richard Smith081ad4d2017-01-24 19:39:46 +00001557.. option:: -freciprocal-math, -fno-reciprocal-math
1558
1559Allow division operations to be reassociated
1560
Richard Smith081ad4d2017-01-24 19:39:46 +00001561.. option:: -freg-struct-return
1562
1563Override the default ABI to return small structs in registers
1564
Richard Smith081ad4d2017-01-24 19:39:46 +00001565.. option:: -frelaxed-template-template-args, -fno-relaxed-template-template-args
1566
1567Enable C++17 relaxed template template argument matching
1568
Richard Smith081ad4d2017-01-24 19:39:46 +00001569.. option:: -freroll-loops, -fno-reroll-loops
1570
1571Turn on loop reroller
1572
Richard Smith081ad4d2017-01-24 19:39:46 +00001573.. option:: -fretain-comments-from-system-headers
1574
Richard Smith081ad4d2017-01-24 19:39:46 +00001575.. option:: -frewrite-includes, -fno-rewrite-includes
1576
Richard Smith081ad4d2017-01-24 19:39:46 +00001577.. option:: -frewrite-map-file <arg>
1578
Richard Smithb2c82a62017-01-27 01:54:42 +00001579.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001580.. option:: -frewrite-map-file=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001581.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001582
Richard Smith081ad4d2017-01-24 19:39:46 +00001583.. option:: -fropi, -fno-ropi
1584
Richard Smith081ad4d2017-01-24 19:39:46 +00001585.. option:: -frtti, -fno-rtti
1586
Richard Smith081ad4d2017-01-24 19:39:46 +00001587.. option:: -frwpi, -fno-rwpi
1588
Richard Smith081ad4d2017-01-24 19:39:46 +00001589.. option:: -fsave-optimization-record, -fno-save-optimization-record
1590
1591Generate a YAML optimization record file
1592
Richard Smith081ad4d2017-01-24 19:39:46 +00001593.. option:: -fshort-enums, -fno-short-enums
1594
1595Allocate to an enum type only as many bytes as it needs for the declared range of possible values
1596
Richard Smith081ad4d2017-01-24 19:39:46 +00001597.. option:: -fshort-wchar, -fno-short-wchar
1598
1599Force wchar\_t to be a short unsigned int
1600
Richard Smith081ad4d2017-01-24 19:39:46 +00001601.. option:: -fshow-column, -fno-show-column
1602
Richard Smith081ad4d2017-01-24 19:39:46 +00001603.. option:: -fshow-overloads=<arg>
1604
1605Which overload candidates to show when overload resolution fails: best\|all; defaults to all
1606
Richard Smith081ad4d2017-01-24 19:39:46 +00001607.. option:: -fshow-source-location, -fno-show-source-location
1608
Richard Smith081ad4d2017-01-24 19:39:46 +00001609.. option:: -fsignaling-math, -fno-signaling-math
1610
Richard Smith081ad4d2017-01-24 19:39:46 +00001611.. option:: -fsigned-bitfields
1612
Richard Smith081ad4d2017-01-24 19:39:46 +00001613.. option:: -fsigned-char, -fno-signed-char, --signed-char
1614
Richard Smith081ad4d2017-01-24 19:39:46 +00001615.. option:: -fsigned-zeros, -fno-signed-zeros
1616
Richard Smith081ad4d2017-01-24 19:39:46 +00001617.. option:: -fsized-deallocation, -fno-sized-deallocation
1618
1619Enable C++14 sized global deallocation functions
1620
Richard Smith081ad4d2017-01-24 19:39:46 +00001621.. option:: -fsjlj-exceptions
1622
1623Use SjLj style exceptions
1624
Richard Smith081ad4d2017-01-24 19:39:46 +00001625.. option:: -fslp-vectorize, -fno-slp-vectorize, -ftree-slp-vectorize
1626
1627Enable the superword-level parallelism vectorization passes
1628
Richard Smith081ad4d2017-01-24 19:39:46 +00001629.. option:: -fslp-vectorize-aggressive, -fno-slp-vectorize-aggressive
1630
1631Enable the BB vectorization passes
1632
Richard Smith081ad4d2017-01-24 19:39:46 +00001633.. option:: -fspell-checking, -fno-spell-checking
1634
Richard Smith081ad4d2017-01-24 19:39:46 +00001635.. option:: -fspell-checking-limit=<arg>
1636
Richard Smith081ad4d2017-01-24 19:39:46 +00001637.. option:: -fsplit-dwarf-inlining, -fno-split-dwarf-inlining
1638
1639Place debug types in their own section (ELF Only)
1640
Richard Smith081ad4d2017-01-24 19:39:46 +00001641.. option:: -fsplit-stack
1642
Richard Smith081ad4d2017-01-24 19:39:46 +00001643.. option:: -fstack-protector, -fno-stack-protector
1644
1645Enable stack protectors for functions potentially vulnerable to stack smashing
1646
Richard Smith081ad4d2017-01-24 19:39:46 +00001647.. option:: -fstack-protector-all
1648
1649Force the usage of stack protectors for all functions
1650
Richard Smith081ad4d2017-01-24 19:39:46 +00001651.. option:: -fstack-protector-strong
1652
1653Use a strong heuristic to apply stack protectors to functions
1654
Richard Smith081ad4d2017-01-24 19:39:46 +00001655.. option:: -fstandalone-debug, -fno-limit-debug-info, -fno-standalone-debug
1656
1657Emit full debug info for all types used by the program
1658
Richard Smith081ad4d2017-01-24 19:39:46 +00001659.. option:: -fstrict-aliasing, -fno-strict-aliasing
1660
Richard Smith081ad4d2017-01-24 19:39:46 +00001661.. option:: -fstrict-enums, -fno-strict-enums
1662
1663Enable optimizations based on the strict definition of an enum's value range
1664
Richard Smith081ad4d2017-01-24 19:39:46 +00001665.. option:: -fstrict-overflow, -fno-strict-overflow
1666
Richard Smith081ad4d2017-01-24 19:39:46 +00001667.. option:: -fstrict-return, -fno-strict-return
1668
1669Always treat control flow paths that fall off the end of a non-voidfunction as unreachable
1670
Richard Smith081ad4d2017-01-24 19:39:46 +00001671.. option:: -fstrict-vtable-pointers, -fno-strict-vtable-pointers
1672
1673Enable optimizations based on the strict rules for overwriting polymorphic C++ objects
1674
Richard Smith081ad4d2017-01-24 19:39:46 +00001675.. option:: -fstruct-path-tbaa, -fno-struct-path-tbaa
1676
Richard Smith081ad4d2017-01-24 19:39:46 +00001677.. option:: -ftabstop=<arg>
1678
Richard Smith081ad4d2017-01-24 19:39:46 +00001679.. option:: -ftemplate-backtrace-limit=<arg>
1680
Richard Smith081ad4d2017-01-24 19:39:46 +00001681.. option:: -ftemplate-depth-<arg>
1682
Richard Smith081ad4d2017-01-24 19:39:46 +00001683.. option:: -ftemplate-depth=<arg>
1684
Richard Smith081ad4d2017-01-24 19:39:46 +00001685.. option:: -ftest-coverage
1686
Richard Smith081ad4d2017-01-24 19:39:46 +00001687.. option:: -fthinlto-index=<arg>
1688
1689Perform ThinLTO importing using provided function summary index
1690
Richard Smith081ad4d2017-01-24 19:39:46 +00001691.. option:: -fthreadsafe-statics, -fno-threadsafe-statics
1692
Richard Smith081ad4d2017-01-24 19:39:46 +00001693.. option:: -ftime-report
1694
Richard Smith081ad4d2017-01-24 19:39:46 +00001695.. option:: -ftls-model=<arg>
1696
Richard Smith081ad4d2017-01-24 19:39:46 +00001697.. option:: -ftrap-function=<arg>
1698
1699Issue call to specified function rather than a trap instruction
1700
Richard Smith081ad4d2017-01-24 19:39:46 +00001701.. option:: -ftrapping-math, -fno-trapping-math
1702
Richard Smith081ad4d2017-01-24 19:39:46 +00001703.. option:: -ftrapv
1704
1705Trap on integer overflow
1706
Richard Smith081ad4d2017-01-24 19:39:46 +00001707.. option:: -ftrapv-handler <arg>
1708
Richard Smithb2c82a62017-01-27 01:54:42 +00001709.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001710.. option:: -ftrapv-handler=<function name>
Richard Smithb2c82a62017-01-27 01:54:42 +00001711.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001712
1713Specify the function to be called on overflow
1714
Richard Smith081ad4d2017-01-24 19:39:46 +00001715.. option:: -ftrigraphs, -fno-trigraphs, -trigraphs, --trigraphs
1716
1717Process trigraph sequences
1718
Richard Smith081ad4d2017-01-24 19:39:46 +00001719.. option:: -funique-section-names, -fno-unique-section-names
1720
1721Use unique names for text and data sections (ELF Only)
1722
Richard Smith081ad4d2017-01-24 19:39:46 +00001723.. option:: -funit-at-a-time, -fno-unit-at-a-time
1724
Richard Smith081ad4d2017-01-24 19:39:46 +00001725.. option:: -funroll-loops, -fno-unroll-loops
1726
1727Turn on loop unroller
1728
Richard Smith081ad4d2017-01-24 19:39:46 +00001729.. option:: -funsafe-math-optimizations, -fno-unsafe-math-optimizations
1730
Richard Smith081ad4d2017-01-24 19:39:46 +00001731.. option:: -funsigned-bitfields
1732
Richard Smith081ad4d2017-01-24 19:39:46 +00001733.. option:: -funsigned-char, -fno-unsigned-char, --unsigned-char
1734
Richard Smith081ad4d2017-01-24 19:39:46 +00001735.. option:: -funwind-tables, -fno-unwind-tables
1736
Richard Smith081ad4d2017-01-24 19:39:46 +00001737.. option:: -fuse-cxa-atexit, -fno-use-cxa-atexit
1738
Richard Smith081ad4d2017-01-24 19:39:46 +00001739.. option:: -fuse-init-array, -fno-use-init-array
1740
1741Use .init\_array instead of .ctors
1742
Richard Smith081ad4d2017-01-24 19:39:46 +00001743.. option:: -fuse-ld=<arg>
1744
Richard Smith081ad4d2017-01-24 19:39:46 +00001745.. option:: -fuse-line-directives, -fno-use-line-directives
1746
Richard Smith081ad4d2017-01-24 19:39:46 +00001747.. option:: -fveclib=<arg>
1748
1749Use the given vector functions library
1750
Richard Smith081ad4d2017-01-24 19:39:46 +00001751.. option:: -fvectorize, -fno-vectorize, -ftree-vectorize
1752
1753Enable the loop vectorization passes
1754
Richard Smith081ad4d2017-01-24 19:39:46 +00001755.. option:: -fverbose-asm, -fno-verbose-asm
1756
Richard Smith081ad4d2017-01-24 19:39:46 +00001757.. option:: -fvisibility-inlines-hidden
1758
1759Give inline C++ member functions default visibility by default
1760
Richard Smith081ad4d2017-01-24 19:39:46 +00001761.. option:: -fvisibility-ms-compat
1762
1763Give global types 'default' visibility and global functions and variables 'hidden' visibility by default
1764
Richard Smith081ad4d2017-01-24 19:39:46 +00001765.. option:: -fvisibility=<arg>
1766
1767Set the default symbol visibility for all global declarations
1768
Richard Smith081ad4d2017-01-24 19:39:46 +00001769.. option:: -fwhole-program-vtables, -fno-whole-program-vtables
1770
1771Enables whole-program vtable optimization. Requires -flto
1772
Richard Smith081ad4d2017-01-24 19:39:46 +00001773.. option:: -fwrapv, -fno-wrapv
1774
1775Treat signed integer overflow as two's complement
1776
Richard Smith081ad4d2017-01-24 19:39:46 +00001777.. option:: -fwritable-strings
1778
1779Store string literals as writable data
1780
Richard Smith081ad4d2017-01-24 19:39:46 +00001781.. option:: -fxray-instruction-threshold<arg>
1782
Richard Smithb2c82a62017-01-27 01:54:42 +00001783.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001784.. option:: -fxray-instruction-threshold=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001785.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001786
1787Sets the minimum function size to instrument with XRay
1788
Richard Smith081ad4d2017-01-24 19:39:46 +00001789.. option:: -fxray-instrument, -fno-xray-instrument
1790
1791Generate XRay instrumentation sleds on function entry and exit
1792
Richard Smith081ad4d2017-01-24 19:39:46 +00001793.. option:: -fzero-initialized-in-bss, -fno-zero-initialized-in-bss
1794
Richard Smith081ad4d2017-01-24 19:39:46 +00001795.. option:: -fzvector, -fno-zvector, -mzvector
1796
1797Enable System z vector language extension
1798
Richard Smith081ad4d2017-01-24 19:39:46 +00001799.. option:: -pedantic, --pedantic, -no-pedantic, --no-pedantic
1800
Richard Smith081ad4d2017-01-24 19:39:46 +00001801.. option:: -pedantic-errors, --pedantic-errors
1802
1803OpenCL flags
1804------------
Richard Smith081ad4d2017-01-24 19:39:46 +00001805.. option:: -cl-denorms-are-zero
1806
1807OpenCL only. Allow denormals to be flushed to zero.
1808
Richard Smith081ad4d2017-01-24 19:39:46 +00001809.. option:: -cl-fast-relaxed-math
1810
1811OpenCL only. Sets -cl-finite-math-only and -cl-unsafe-math-optimizations, and defines \_\_FAST\_RELAXED\_MATH\_\_.
1812
Richard Smith081ad4d2017-01-24 19:39:46 +00001813.. option:: -cl-finite-math-only
1814
1815OpenCL only. Allow floating-point optimizations that assume arguments and results are not NaNs or +-Inf.
1816
Richard Smith081ad4d2017-01-24 19:39:46 +00001817.. option:: -cl-fp32-correctly-rounded-divide-sqrt
1818
1819OpenCL only. Specify that single precision floating-point divide and sqrt used in the program source are correctly rounded.
1820
Richard Smith081ad4d2017-01-24 19:39:46 +00001821.. option:: -cl-kernel-arg-info
1822
1823OpenCL only. Generate kernel argument metadata.
1824
Richard Smith081ad4d2017-01-24 19:39:46 +00001825.. option:: -cl-mad-enable
1826
1827OpenCL only. Allow use of less precise MAD computations in the generated binary.
1828
Richard Smith081ad4d2017-01-24 19:39:46 +00001829.. option:: -cl-no-signed-zeros
1830
1831OpenCL only. Allow use of less precise no signed zeros computations in the generated binary.
1832
Richard Smith081ad4d2017-01-24 19:39:46 +00001833.. option:: -cl-opt-disable
1834
1835OpenCL only. This option disables all optimizations. By default optimizations are enabled.
1836
Richard Smith081ad4d2017-01-24 19:39:46 +00001837.. option:: -cl-single-precision-constant
1838
1839OpenCL only. Treat double precision floating-point constant as single precision constant.
1840
Richard Smith081ad4d2017-01-24 19:39:46 +00001841.. option:: -cl-std=<arg>
1842
1843OpenCL language standard to compile for.
1844
Richard Smith081ad4d2017-01-24 19:39:46 +00001845.. option:: -cl-strict-aliasing
1846
1847OpenCL only. This option is added for compatibility with OpenCL 1.0.
1848
Richard Smith081ad4d2017-01-24 19:39:46 +00001849.. option:: -cl-unsafe-math-optimizations
1850
1851OpenCL only. Allow unsafe floating-point optimizations. Also implies -cl-no-signed-zeros and -cl-mad-enable.
1852
1853Target-dependent compilation options
1854~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Richard Smith081ad4d2017-01-24 19:39:46 +00001855.. option:: -m16
1856
Richard Smith081ad4d2017-01-24 19:39:46 +00001857.. option:: -m32
1858
Richard Smith081ad4d2017-01-24 19:39:46 +00001859.. option:: -m64
1860
Richard Smith081ad4d2017-01-24 19:39:46 +00001861.. option:: -mabi=<arg>
1862
Richard Smith081ad4d2017-01-24 19:39:46 +00001863.. option:: -mabicalls, -mno-abicalls
1864
1865Enable SVR4-style position-independent code (Mips only)
1866
Richard Smith081ad4d2017-01-24 19:39:46 +00001867.. option:: -malign-double
1868
1869Align doubles to two words in structs (x86 only)
1870
Richard Smith081ad4d2017-01-24 19:39:46 +00001871.. option:: -march=<arg>
1872
Richard Smith081ad4d2017-01-24 19:39:46 +00001873.. option:: -masm=<arg>
1874
Richard Smith081ad4d2017-01-24 19:39:46 +00001875.. option:: -mbackchain, -mno-backchain
1876
1877Link stack frames through backchain on System Z
1878
Richard Smith081ad4d2017-01-24 19:39:46 +00001879.. option:: -mcheck-zero-division, -mno-check-zero-division
1880
Richard Smith081ad4d2017-01-24 19:39:46 +00001881.. option:: -mcmodel=<arg>
1882
Richard Smith081ad4d2017-01-24 19:39:46 +00001883.. option:: -mcompact-branches=<arg>
1884
Richard Smith081ad4d2017-01-24 19:39:46 +00001885.. option:: -mconsole<arg>
1886
Richard Smith081ad4d2017-01-24 19:39:46 +00001887.. option:: -mcpu=<arg>, -mv4 (equivalent to -mcpu=hexagonv4), -mv5 (equivalent to -mcpu=hexagonv5), -mv55 (equivalent to -mcpu=hexagonv55), -mv60 (equivalent to -mcpu=hexagonv60)
1888
Richard Smith081ad4d2017-01-24 19:39:46 +00001889.. option:: -mdll<arg>
1890
Richard Smith081ad4d2017-01-24 19:39:46 +00001891.. option:: -mdouble-float
1892
Richard Smith081ad4d2017-01-24 19:39:46 +00001893.. option:: -mdsp, -mno-dsp
1894
Richard Smith081ad4d2017-01-24 19:39:46 +00001895.. option:: -mdspr2, -mno-dspr2
1896
Richard Smith081ad4d2017-01-24 19:39:46 +00001897.. option:: -mdynamic-no-pic<arg>
1898
Richard Smith081ad4d2017-01-24 19:39:46 +00001899.. option:: -meabi <arg>
1900
1901Set EABI type, e.g. 4, 5 or gnu (default depends on triple)
1902
Richard Smith081ad4d2017-01-24 19:39:46 +00001903.. option:: -mfloat-abi=<arg>
1904
Richard Smith081ad4d2017-01-24 19:39:46 +00001905.. option:: -mfp32
1906
1907Use 32-bit floating point registers (MIPS only)
1908
Richard Smith081ad4d2017-01-24 19:39:46 +00001909.. option:: -mfp64
1910
1911Use 64-bit floating point registers (MIPS only)
1912
Richard Smith081ad4d2017-01-24 19:39:46 +00001913.. option:: -mfpmath=<arg>
1914
Richard Smith081ad4d2017-01-24 19:39:46 +00001915.. option:: -mfpu=<arg>
1916
Richard Smith081ad4d2017-01-24 19:39:46 +00001917.. option:: -mglobal-merge, -mno-global-merge
1918
1919Enable merging of globals
1920
Richard Smith081ad4d2017-01-24 19:39:46 +00001921.. option:: -mhard-float
1922
Richard Smith081ad4d2017-01-24 19:39:46 +00001923.. option:: -mhwdiv=<arg>, --mhwdiv <arg>, --mhwdiv=<arg>
1924
Richard Smith081ad4d2017-01-24 19:39:46 +00001925.. option:: -miamcu, -mno-iamcu
1926
1927Use Intel MCU ABI
1928
Richard Smith081ad4d2017-01-24 19:39:46 +00001929.. option:: -mimplicit-float, -mno-implicit-float
1930
Richard Smith081ad4d2017-01-24 19:39:46 +00001931.. option:: -mimplicit-it=<arg>
1932
Richard Smith081ad4d2017-01-24 19:39:46 +00001933.. option:: -mincremental-linker-compatible, -mno-incremental-linker-compatible
1934
1935(integrated-as) Emit an object file which can be used with an incremental linker
1936
Richard Smith081ad4d2017-01-24 19:39:46 +00001937.. option:: -miphoneos-version-min=<arg>, -mios-simulator-version-min=<arg>, -mios-version-min=<arg>, -miphonesimulator-version-min=<arg>
1938
Richard Smith081ad4d2017-01-24 19:39:46 +00001939.. option:: -mips16
1940
Richard Smith081ad4d2017-01-24 19:39:46 +00001941.. option:: -mkernel
1942
Richard Smith081ad4d2017-01-24 19:39:46 +00001943.. option:: -mldc1-sdc1, -mno-ldc1-sdc1
1944
Richard Smith081ad4d2017-01-24 19:39:46 +00001945.. option:: -mlong-calls, -mno-long-calls
1946
1947Generate branches with extended addressability, usually via indirect jumps.
1948
Richard Smith081ad4d2017-01-24 19:39:46 +00001949.. option:: -mmacosx-version-min=<arg>
1950
1951Set Mac OS X deployment target
1952
Richard Smith081ad4d2017-01-24 19:39:46 +00001953.. option:: -mmicromips, -mno-micromips
1954
Richard Smith081ad4d2017-01-24 19:39:46 +00001955.. option:: -mms-bitfields, -mno-ms-bitfields
1956
1957Set the default structure layout to be compatible with the Microsoft compiler standard
1958
Richard Smith081ad4d2017-01-24 19:39:46 +00001959.. option:: -mmsa, -mno-msa
1960
1961Enable MSA ASE (MIPS only)
1962
Richard Smith081ad4d2017-01-24 19:39:46 +00001963.. option:: -mnan=<arg>
1964
Richard Smith081ad4d2017-01-24 19:39:46 +00001965.. option:: -mno-mips16
1966
Richard Smith081ad4d2017-01-24 19:39:46 +00001967.. option:: -momit-leaf-frame-pointer, -mno-omit-leaf-frame-pointer
1968
1969Omit frame pointer setup for leaf functions
1970
Richard Smith081ad4d2017-01-24 19:39:46 +00001971.. option:: -moslib=<arg>
1972
Richard Smith081ad4d2017-01-24 19:39:46 +00001973.. option:: -mpie-copy-relocations, -mno-pie-copy-relocations
1974
1975Use copy relocations support for PIE builds
1976
Richard Smith081ad4d2017-01-24 19:39:46 +00001977.. option:: -mqdsp6-compat
1978
1979Enable hexagon-qdsp6 backward compatibility
1980
Richard Smith081ad4d2017-01-24 19:39:46 +00001981.. option:: -mrecip
1982
Richard Smithb2c82a62017-01-27 01:54:42 +00001983.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001984.. option:: -mrecip=<arg1>,<arg2>...
Richard Smithb2c82a62017-01-27 01:54:42 +00001985.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001986
Richard Smith081ad4d2017-01-24 19:39:46 +00001987.. option:: -mred-zone, -mno-red-zone
1988
Richard Smith081ad4d2017-01-24 19:39:46 +00001989.. option:: -mregparm=<arg>
1990
Richard Smith081ad4d2017-01-24 19:39:46 +00001991.. option:: -mrelax-all, -mno-relax-all
1992
1993(integrated-as) Relax all machine instructions
1994
Richard Smith081ad4d2017-01-24 19:39:46 +00001995.. option:: -mrtd, -mno-rtd
1996
1997Make StdCall calling convention the default
1998
Richard Smith081ad4d2017-01-24 19:39:46 +00001999.. option:: -msingle-float
2000
Richard Smith081ad4d2017-01-24 19:39:46 +00002001.. option:: -msmall-data-threshold=<arg>
2002
Richard Smith081ad4d2017-01-24 19:39:46 +00002003.. option:: -msoft-float, -mno-soft-float
2004
2005Use software floating point
2006
Richard Smith081ad4d2017-01-24 19:39:46 +00002007.. option:: -mstack-alignment=<arg>
2008
2009Set the stack alignment
2010
Richard Smith081ad4d2017-01-24 19:39:46 +00002011.. option:: -mstack-probe-size=<arg>
2012
2013Set the stack probe size
2014
Richard Smith081ad4d2017-01-24 19:39:46 +00002015.. option:: -mstackrealign, -mno-stackrealign
2016
2017Force realign the stack at entry to every function
2018
Richard Smith081ad4d2017-01-24 19:39:46 +00002019.. option:: -mthread-model <arg>
2020
2021The thread model to use, e.g. posix, single (posix by default)
2022
Richard Smith081ad4d2017-01-24 19:39:46 +00002023.. option:: -mthreads<arg>
2024
Richard Smith081ad4d2017-01-24 19:39:46 +00002025.. option:: -mthumb, -mno-thumb
2026
Richard Smith081ad4d2017-01-24 19:39:46 +00002027.. option:: -mtune=<arg>
2028
Richard Smith081ad4d2017-01-24 19:39:46 +00002029.. option:: -mtvos-version-min=<arg>, -mappletvos-version-min=<arg>, -mappletvsimulator-version-min=<arg>, -mtvos-simulator-version-min=<arg>
2030
Richard Smith081ad4d2017-01-24 19:39:46 +00002031.. option:: -municode<arg>
2032
Richard Smith081ad4d2017-01-24 19:39:46 +00002033.. option:: -mvx, -mno-vx
2034
Richard Smith081ad4d2017-01-24 19:39:46 +00002035.. option:: -mwarn-nonportable-cfstrings, -mno-warn-nonportable-cfstrings
2036
Richard Smith081ad4d2017-01-24 19:39:46 +00002037.. option:: -mwatchos-version-min=<arg>, -mwatchos-simulator-version-min=<arg>, -mwatchsimulator-version-min=<arg>
2038
Richard Smith081ad4d2017-01-24 19:39:46 +00002039.. option:: -mwindows<arg>
2040
Richard Smith081ad4d2017-01-24 19:39:46 +00002041.. option:: -mx32
2042
Richard Smith081ad4d2017-01-24 19:39:46 +00002043.. option:: -mxgot, -mno-xgot
2044
2045AARCH64
2046-------
Richard Smith081ad4d2017-01-24 19:39:46 +00002047.. option:: -ffixed-x18
2048
2049Reserve the x18 register (AArch64 only)
2050
Richard Smith081ad4d2017-01-24 19:39:46 +00002051.. option:: -mfix-cortex-a53-835769, -mno-fix-cortex-a53-835769
2052
2053Workaround Cortex-A53 erratum 835769 (AArch64 only)
2054
Richard Smith081ad4d2017-01-24 19:39:46 +00002055.. option:: -mgeneral-regs-only
2056
2057Generate code which only uses the general purpose registers (AArch64 only)
2058
2059AMDGPU
2060------
2061ARM
2062---
Richard Smith081ad4d2017-01-24 19:39:46 +00002063.. option:: -ffixed-r9
2064
2065Reserve the r9 register (ARM only)
2066
Richard Smith081ad4d2017-01-24 19:39:46 +00002067.. option:: -mcrc
2068
2069Allow use of CRC instructions (ARM only)
2070
Richard Smith081ad4d2017-01-24 19:39:46 +00002071.. option:: -mexecute-only, -mno-execute-only, -mpure-code
2072
2073Disallow generation of data access to code sections (ARM only)
2074
Richard Smith081ad4d2017-01-24 19:39:46 +00002075.. option:: -mno-movt
2076
2077Disallow use of movt/movw pairs (ARM only)
2078
Richard Smith081ad4d2017-01-24 19:39:46 +00002079.. option:: -mnocrc
2080
2081Disallow use of CRC instructions (ARM only)
2082
Richard Smith081ad4d2017-01-24 19:39:46 +00002083.. option:: -mrestrict-it, -mno-restrict-it
2084
2085Disallow generation of deprecated IT blocks for ARMv8. It is on by default for ARMv8 Thumb mode.
2086
Richard Smith081ad4d2017-01-24 19:39:46 +00002087.. option:: -munaligned-access, -mno-unaligned-access
2088
2089Allow memory accesses to be unaligned (AArch32/AArch64 only)
2090
2091Hexagon
2092-------
Richard Smith081ad4d2017-01-24 19:39:46 +00002093.. option:: -mhvx, -mno-hvx
2094
2095Enable Hexagon Vector eXtensions
2096
Richard Smith081ad4d2017-01-24 19:39:46 +00002097.. option:: -mhvx-double, -mno-hvx-double
2098
2099Enable Hexagon Double Vector eXtensions
2100
Richard Smith081ad4d2017-01-24 19:39:46 +00002101.. option:: -mieee-rnd-near
2102
2103PowerPC
2104-------
Richard Smith081ad4d2017-01-24 19:39:46 +00002105.. option:: -mcmpb, -mno-cmpb
2106
Richard Smith081ad4d2017-01-24 19:39:46 +00002107.. option:: -mcrbits, -mno-crbits
2108
Richard Smith081ad4d2017-01-24 19:39:46 +00002109.. option:: -mcrypto, -mno-crypto
2110
Richard Smith081ad4d2017-01-24 19:39:46 +00002111.. option:: -mdirect-move, -mno-direct-move
2112
Richard Smith081ad4d2017-01-24 19:39:46 +00002113.. option:: -mfloat128, -mno-float128
2114
Richard Smith081ad4d2017-01-24 19:39:46 +00002115.. option:: -mfprnd, -mno-fprnd
2116
Richard Smith081ad4d2017-01-24 19:39:46 +00002117.. option:: -mhtm, -mno-htm
2118
Richard Smith081ad4d2017-01-24 19:39:46 +00002119.. option:: -minvariant-function-descriptors, -mno-invariant-function-descriptors
2120
Richard Smith081ad4d2017-01-24 19:39:46 +00002121.. option:: -misel, -mno-isel
2122
Richard Smith081ad4d2017-01-24 19:39:46 +00002123.. option:: -mlongcall, -mno-longcall
2124
Richard Smith081ad4d2017-01-24 19:39:46 +00002125.. option:: -mmfocrf, -mmfcrf, -mno-mfocrf
2126
Richard Smith081ad4d2017-01-24 19:39:46 +00002127.. option:: -mpopcntd, -mno-popcntd
2128
Richard Smith081ad4d2017-01-24 19:39:46 +00002129.. option:: -mpower8-vector, -mno-power8-vector
2130
Richard Smith081ad4d2017-01-24 19:39:46 +00002131.. option:: -mpower9-vector, -mno-power9-vector
2132
Richard Smith081ad4d2017-01-24 19:39:46 +00002133.. option:: -mqpx, -mno-qpx
2134
Richard Smith081ad4d2017-01-24 19:39:46 +00002135.. option:: -mvsx, -mno-vsx
2136
2137WebAssembly
2138-----------
Richard Smith081ad4d2017-01-24 19:39:46 +00002139.. option:: -msimd128, -mno-simd128
2140
2141X86
2142---
Richard Smith081ad4d2017-01-24 19:39:46 +00002143.. option:: -m3dnow, -mno-3dnow
2144
Richard Smith081ad4d2017-01-24 19:39:46 +00002145.. option:: -m3dnowa, -mno-3dnowa
2146
Richard Smith081ad4d2017-01-24 19:39:46 +00002147.. option:: -madx, -mno-adx
2148
Richard Smith081ad4d2017-01-24 19:39:46 +00002149.. option:: -maes, -mno-aes
2150
Richard Smith081ad4d2017-01-24 19:39:46 +00002151.. option:: -mavx, -mno-avx
2152
Richard Smith081ad4d2017-01-24 19:39:46 +00002153.. option:: -mavx2, -mno-avx2
2154
Richard Smith081ad4d2017-01-24 19:39:46 +00002155.. option:: -mavx512bw, -mno-avx512bw
2156
Richard Smith081ad4d2017-01-24 19:39:46 +00002157.. option:: -mavx512cd, -mno-avx512cd
2158
Richard Smith081ad4d2017-01-24 19:39:46 +00002159.. option:: -mavx512dq, -mno-avx512dq
2160
Richard Smith081ad4d2017-01-24 19:39:46 +00002161.. option:: -mavx512er, -mno-avx512er
2162
Richard Smith081ad4d2017-01-24 19:39:46 +00002163.. option:: -mavx512f, -mno-avx512f
2164
Richard Smith081ad4d2017-01-24 19:39:46 +00002165.. option:: -mavx512ifma, -mno-avx512ifma
2166
Richard Smith081ad4d2017-01-24 19:39:46 +00002167.. option:: -mavx512pf, -mno-avx512pf
2168
Richard Smith081ad4d2017-01-24 19:39:46 +00002169.. option:: -mavx512vbmi, -mno-avx512vbmi
2170
Richard Smith081ad4d2017-01-24 19:39:46 +00002171.. option:: -mavx512vl, -mno-avx512vl
2172
Richard Smith081ad4d2017-01-24 19:39:46 +00002173.. option:: -mbmi, -mno-bmi
2174
Richard Smith081ad4d2017-01-24 19:39:46 +00002175.. option:: -mbmi2, -mno-bmi2
2176
Richard Smith081ad4d2017-01-24 19:39:46 +00002177.. option:: -mcx16, -mno-cx16
2178
Richard Smith081ad4d2017-01-24 19:39:46 +00002179.. option:: -mf16c, -mno-f16c
2180
Richard Smith081ad4d2017-01-24 19:39:46 +00002181.. option:: -mfma, -mno-fma
2182
Richard Smith081ad4d2017-01-24 19:39:46 +00002183.. option:: -mfma4, -mno-fma4
2184
Richard Smith081ad4d2017-01-24 19:39:46 +00002185.. option:: -mfsgsbase, -mno-fsgsbase
2186
Richard Smith081ad4d2017-01-24 19:39:46 +00002187.. option:: -mfxsr, -mno-fxsr
2188
Richard Smith081ad4d2017-01-24 19:39:46 +00002189.. option:: -mlzcnt, -mno-lzcnt
2190
Richard Smith081ad4d2017-01-24 19:39:46 +00002191.. option:: -mmmx, -mno-mmx
2192
Richard Smith081ad4d2017-01-24 19:39:46 +00002193.. option:: -mmwaitx, -mno-mwaitx
2194
Richard Smith081ad4d2017-01-24 19:39:46 +00002195.. option:: -mpclmul, -mno-pclmul
2196
Richard Smith081ad4d2017-01-24 19:39:46 +00002197.. option:: -mpku, -mno-pku
2198
Richard Smith081ad4d2017-01-24 19:39:46 +00002199.. option:: -mpopcnt, -mno-popcnt
2200
Richard Smith081ad4d2017-01-24 19:39:46 +00002201.. option:: -mprfchw, -mno-prfchw
2202
Richard Smith081ad4d2017-01-24 19:39:46 +00002203.. option:: -mrdrnd, -mno-rdrnd
2204
Richard Smith081ad4d2017-01-24 19:39:46 +00002205.. option:: -mrdseed, -mno-rdseed
2206
Richard Smith081ad4d2017-01-24 19:39:46 +00002207.. option:: -mrtm, -mno-rtm
2208
Richard Smith081ad4d2017-01-24 19:39:46 +00002209.. option:: -msha, -mno-sha
2210
Richard Smith081ad4d2017-01-24 19:39:46 +00002211.. option:: -msse, -mno-sse
2212
Richard Smith081ad4d2017-01-24 19:39:46 +00002213.. option:: -msse2, -mno-sse2
2214
Richard Smith081ad4d2017-01-24 19:39:46 +00002215.. option:: -msse3, -mno-sse3
2216
Richard Smith081ad4d2017-01-24 19:39:46 +00002217.. option:: -msse4.1, -mno-sse4.1
2218
Richard Smithb2c82a62017-01-27 01:54:42 +00002219.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00002220.. option:: -msse4.2, -mno-sse4.2, -msse4
Richard Smithb2c82a62017-01-27 01:54:42 +00002221.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00002222
Richard Smith081ad4d2017-01-24 19:39:46 +00002223.. option:: -msse4a, -mno-sse4a
2224
Richard Smith081ad4d2017-01-24 19:39:46 +00002225.. option:: -mssse3, -mno-ssse3
2226
Richard Smith081ad4d2017-01-24 19:39:46 +00002227.. option:: -mtbm, -mno-tbm
2228
Richard Smith081ad4d2017-01-24 19:39:46 +00002229.. option:: -mx87, -m80387, -mno-x87
2230
Richard Smith081ad4d2017-01-24 19:39:46 +00002231.. option:: -mxop, -mno-xop
2232
Richard Smith081ad4d2017-01-24 19:39:46 +00002233.. option:: -mxsave, -mno-xsave
2234
Richard Smith081ad4d2017-01-24 19:39:46 +00002235.. option:: -mxsavec, -mno-xsavec
2236
Richard Smith081ad4d2017-01-24 19:39:46 +00002237.. option:: -mxsaveopt, -mno-xsaveopt
2238
Richard Smith081ad4d2017-01-24 19:39:46 +00002239.. option:: -mxsaves, -mno-xsaves
2240
2241Optimization level
2242~~~~~~~~~~~~~~~~~~
2243
2244Flags controlling how much optimization should be performed.
2245
Richard Smith081ad4d2017-01-24 19:39:46 +00002246.. option:: -O<arg>, -O (equivalent to -O2), --optimize, --optimize=<arg>
2247
Richard Smith081ad4d2017-01-24 19:39:46 +00002248.. option:: -O0
2249
Richard Smith081ad4d2017-01-24 19:39:46 +00002250.. option:: -O4
2251
Richard Smith081ad4d2017-01-24 19:39:46 +00002252.. option:: -Ofast<arg>
2253
2254Debug information generation
2255~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2256
2257Flags controlling how much and what kind of debug information should be
2258generated.
2259
2260Kind and level of debug information
2261-----------------------------------
Richard Smith081ad4d2017-01-24 19:39:46 +00002262.. option:: -g, --debug, --debug=<arg>
2263
2264Generate source-level debug information
2265
Richard Smith081ad4d2017-01-24 19:39:46 +00002266.. option:: -gdwarf-2
2267
2268Generate source-level debug information with dwarf version 2
2269
Richard Smith081ad4d2017-01-24 19:39:46 +00002270.. option:: -gdwarf-3
2271
2272Generate source-level debug information with dwarf version 3
2273
Richard Smith081ad4d2017-01-24 19:39:46 +00002274.. option:: -gdwarf-4, -gdwarf
2275
2276Generate source-level debug information with dwarf version 4
2277
Richard Smith081ad4d2017-01-24 19:39:46 +00002278.. option:: -gdwarf-5
2279
2280Generate source-level debug information with dwarf version 5
2281
Richard Smith081ad4d2017-01-24 19:39:46 +00002282.. option:: -gfull
2283
Richard Smith081ad4d2017-01-24 19:39:46 +00002284.. option:: -gused
2285
2286Debug level
2287___________
Richard Smith081ad4d2017-01-24 19:39:46 +00002288.. option:: -g0
2289
Richard Smith081ad4d2017-01-24 19:39:46 +00002290.. option:: -g2
2291
Richard Smith081ad4d2017-01-24 19:39:46 +00002292.. option:: -g3
2293
Richard Smith081ad4d2017-01-24 19:39:46 +00002294.. option:: -ggdb0
2295
Richard Smith081ad4d2017-01-24 19:39:46 +00002296.. option:: -ggdb1
2297
Richard Smith081ad4d2017-01-24 19:39:46 +00002298.. option:: -ggdb2
2299
Richard Smith081ad4d2017-01-24 19:39:46 +00002300.. option:: -ggdb3
2301
Richard Smith081ad4d2017-01-24 19:39:46 +00002302.. option:: -gline-tables-only, -g1, -gmlt
2303
2304Emit debug line number tables only
2305
Richard Smith081ad4d2017-01-24 19:39:46 +00002306.. option:: -gmodules
2307
2308Generate debug info with external references to clang modules or precompiled headers
2309
2310Debugger to tune debug information for
2311______________________________________
Richard Smith081ad4d2017-01-24 19:39:46 +00002312.. option:: -ggdb
2313
Richard Smith081ad4d2017-01-24 19:39:46 +00002314.. option:: -glldb
2315
Richard Smith081ad4d2017-01-24 19:39:46 +00002316.. option:: -gsce
2317
2318Debug information flags
2319-----------------------
Richard Smith081ad4d2017-01-24 19:39:46 +00002320.. option:: -gcolumn-info, -gno-column-info
2321
Richard Smith081ad4d2017-01-24 19:39:46 +00002322.. option:: -gdwarf-aranges
2323
Richard Smith081ad4d2017-01-24 19:39:46 +00002324.. option:: -ggnu-pubnames
2325
Richard Smith081ad4d2017-01-24 19:39:46 +00002326.. option:: -grecord-gcc-switches, -gno-record-gcc-switches
2327
Richard Smith081ad4d2017-01-24 19:39:46 +00002328.. option:: -gsplit-dwarf
2329
Richard Smith081ad4d2017-01-24 19:39:46 +00002330.. option:: -gstrict-dwarf, -gno-strict-dwarf
2331
2332Linker flags
2333============
2334Flags that are passed on to the linker
2335
Richard Smith081ad4d2017-01-24 19:39:46 +00002336.. option:: -L<arg>, --library-directory <arg>, --library-directory=<arg>
2337
Richard Smith081ad4d2017-01-24 19:39:46 +00002338.. option:: -T<arg>
2339
Richard Smith081ad4d2017-01-24 19:39:46 +00002340.. option:: -Tbss<arg>
2341
Richard Smith081ad4d2017-01-24 19:39:46 +00002342.. option:: -Tdata<arg>
2343
Richard Smith081ad4d2017-01-24 19:39:46 +00002344.. option:: -Ttext<arg>
2345
Richard Smith081ad4d2017-01-24 19:39:46 +00002346.. option:: -Wl,<arg>,<arg2>...
2347
2348Pass the comma separated arguments in <arg> to the linker
2349
Richard Smith081ad4d2017-01-24 19:39:46 +00002350.. option:: -Xlinker <arg>, --for-linker <arg>, --for-linker=<arg>
2351
2352Pass <arg> to the linker
2353
Richard Smithb2c82a62017-01-27 01:54:42 +00002354.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00002355.. option:: -Z
Richard Smithb2c82a62017-01-27 01:54:42 +00002356.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00002357
Richard Smith081ad4d2017-01-24 19:39:46 +00002358.. option:: -e<arg>, --entry
2359
Richard Smith081ad4d2017-01-24 19:39:46 +00002360.. option:: -filelist <arg>
2361
Richard Smith081ad4d2017-01-24 19:39:46 +00002362.. option:: -l<arg>
2363
Richard Smith081ad4d2017-01-24 19:39:46 +00002364.. option:: -r
2365
Richard Smith081ad4d2017-01-24 19:39:46 +00002366.. option:: -rpath <arg>
2367
Richard Smith081ad4d2017-01-24 19:39:46 +00002368.. option:: -s
2369
Richard Smith081ad4d2017-01-24 19:39:46 +00002370.. option:: -t
2371
Richard Smith081ad4d2017-01-24 19:39:46 +00002372.. option:: -u<arg>, --force-link <arg>, --force-link=<arg>
2373
Richard Smith081ad4d2017-01-24 19:39:46 +00002374.. option:: -undef
2375
2376undef all system defines
2377
Richard Smith081ad4d2017-01-24 19:39:46 +00002378.. option:: -undefined<arg>, --no-undefined
2379
Richard Smith081ad4d2017-01-24 19:39:46 +00002380.. option:: -z <arg>
2381
2382Pass -z <arg> to the linker
2383
2384Fortran compilation flags
2385=========================
2386
2387Flags that will be passed onto the ``gfortran`` compiler when Clang is given
2388a Fortran input.
2389
Richard Smith081ad4d2017-01-24 19:39:46 +00002390.. option:: -A-<arg>
2391
Richard Smith081ad4d2017-01-24 19:39:46 +00002392.. option:: -J<arg>
2393
Richard Smith081ad4d2017-01-24 19:39:46 +00002394.. option:: -cpp
2395
Richard Smith081ad4d2017-01-24 19:39:46 +00002396.. option:: -faggressive-function-elimination, -fno-aggressive-function-elimination
2397
Richard Smith081ad4d2017-01-24 19:39:46 +00002398.. option:: -falign-commons, -fno-align-commons
2399
Richard Smith081ad4d2017-01-24 19:39:46 +00002400.. option:: -fall-intrinsics, -fno-all-intrinsics
2401
Richard Smith081ad4d2017-01-24 19:39:46 +00002402.. option:: -fautomatic, -fno-automatic
2403
Richard Smith081ad4d2017-01-24 19:39:46 +00002404.. option:: -fbackslash, -fno-backslash
2405
Richard Smith081ad4d2017-01-24 19:39:46 +00002406.. option:: -fbacktrace, -fno-backtrace
2407
Richard Smith081ad4d2017-01-24 19:39:46 +00002408.. option:: -fblas-matmul-limit=<arg>
2409
Richard Smith081ad4d2017-01-24 19:39:46 +00002410.. option:: -fbounds-check, -fno-bounds-check
2411
Richard Smith081ad4d2017-01-24 19:39:46 +00002412.. option:: -fcheck-array-temporaries, -fno-check-array-temporaries
2413
Richard Smith081ad4d2017-01-24 19:39:46 +00002414.. option:: -fcheck=<arg>
2415
Richard Smith081ad4d2017-01-24 19:39:46 +00002416.. option:: -fcoarray=<arg>
2417
Richard Smith081ad4d2017-01-24 19:39:46 +00002418.. option:: -fconvert=<arg>
2419
Richard Smith081ad4d2017-01-24 19:39:46 +00002420.. option:: -fcray-pointer, -fno-cray-pointer
2421
Richard Smith081ad4d2017-01-24 19:39:46 +00002422.. option:: -fd-lines-as-code, -fno-d-lines-as-code
2423
Richard Smith081ad4d2017-01-24 19:39:46 +00002424.. option:: -fd-lines-as-comments, -fno-d-lines-as-comments
2425
Richard Smith081ad4d2017-01-24 19:39:46 +00002426.. option:: -fdefault-double-8, -fno-default-double-8
2427
Richard Smith081ad4d2017-01-24 19:39:46 +00002428.. option:: -fdefault-integer-8, -fno-default-integer-8
2429
Richard Smith081ad4d2017-01-24 19:39:46 +00002430.. option:: -fdefault-real-8, -fno-default-real-8
2431
Richard Smith081ad4d2017-01-24 19:39:46 +00002432.. option:: -fdollar-ok, -fno-dollar-ok
2433
Richard Smith081ad4d2017-01-24 19:39:46 +00002434.. option:: -fdump-fortran-optimized, -fno-dump-fortran-optimized
2435
Richard Smith081ad4d2017-01-24 19:39:46 +00002436.. option:: -fdump-fortran-original, -fno-dump-fortran-original
2437
Richard Smith081ad4d2017-01-24 19:39:46 +00002438.. option:: -fdump-parse-tree, -fno-dump-parse-tree
2439
Richard Smith081ad4d2017-01-24 19:39:46 +00002440.. option:: -fexternal-blas, -fno-external-blas
2441
Richard Smith081ad4d2017-01-24 19:39:46 +00002442.. option:: -ff2c, -fno-f2c
2443
Richard Smith081ad4d2017-01-24 19:39:46 +00002444.. option:: -ffixed-form, -fno-fixed-form
2445
Richard Smith081ad4d2017-01-24 19:39:46 +00002446.. option:: -ffixed-line-length-<arg>
2447
Richard Smith081ad4d2017-01-24 19:39:46 +00002448.. option:: -ffpe-trap=<arg>
2449
Richard Smith081ad4d2017-01-24 19:39:46 +00002450.. option:: -ffree-form, -fno-free-form
2451
Richard Smith081ad4d2017-01-24 19:39:46 +00002452.. option:: -ffree-line-length-<arg>
2453
Richard Smith081ad4d2017-01-24 19:39:46 +00002454.. option:: -ffrontend-optimize, -fno-frontend-optimize
2455
Richard Smith081ad4d2017-01-24 19:39:46 +00002456.. option:: -fimplicit-none, -fno-implicit-none
2457
Richard Smith081ad4d2017-01-24 19:39:46 +00002458.. option:: -finit-character=<arg>
2459
Richard Smith081ad4d2017-01-24 19:39:46 +00002460.. option:: -finit-integer=<arg>
2461
Richard Smith081ad4d2017-01-24 19:39:46 +00002462.. option:: -finit-local-zero, -fno-init-local-zero
2463
Richard Smith081ad4d2017-01-24 19:39:46 +00002464.. option:: -finit-logical=<arg>
2465
Richard Smith081ad4d2017-01-24 19:39:46 +00002466.. option:: -finit-real=<arg>
2467
Richard Smith081ad4d2017-01-24 19:39:46 +00002468.. option:: -finteger-4-integer-8, -fno-integer-4-integer-8
2469
Richard Smith081ad4d2017-01-24 19:39:46 +00002470.. option:: -fintrinsic-modules-path, -fno-intrinsic-modules-path
2471
Richard Smith081ad4d2017-01-24 19:39:46 +00002472.. option:: -fmax-array-constructor=<arg>
2473
Richard Smith081ad4d2017-01-24 19:39:46 +00002474.. option:: -fmax-errors=<arg>
2475
Richard Smith081ad4d2017-01-24 19:39:46 +00002476.. option:: -fmax-identifier-length, -fno-max-identifier-length
2477
Richard Smith081ad4d2017-01-24 19:39:46 +00002478.. option:: -fmax-stack-var-size=<arg>
2479
Richard Smith081ad4d2017-01-24 19:39:46 +00002480.. option:: -fmax-subrecord-length=<arg>
2481
Richard Smith081ad4d2017-01-24 19:39:46 +00002482.. option:: -fmodule-private, -fno-module-private
2483
Richard Smith081ad4d2017-01-24 19:39:46 +00002484.. option:: -fpack-derived, -fno-pack-derived
2485
Richard Smith081ad4d2017-01-24 19:39:46 +00002486.. option:: -fprotect-parens, -fno-protect-parens
2487
Richard Smith081ad4d2017-01-24 19:39:46 +00002488.. option:: -frange-check, -fno-range-check
2489
Richard Smith081ad4d2017-01-24 19:39:46 +00002490.. option:: -freal-4-real-10, -fno-real-4-real-10
2491
Richard Smith081ad4d2017-01-24 19:39:46 +00002492.. option:: -freal-4-real-16, -fno-real-4-real-16
2493
Richard Smith081ad4d2017-01-24 19:39:46 +00002494.. option:: -freal-4-real-8, -fno-real-4-real-8
2495
Richard Smith081ad4d2017-01-24 19:39:46 +00002496.. option:: -freal-8-real-10, -fno-real-8-real-10
2497
Richard Smith081ad4d2017-01-24 19:39:46 +00002498.. option:: -freal-8-real-16, -fno-real-8-real-16
2499
Richard Smith081ad4d2017-01-24 19:39:46 +00002500.. option:: -freal-8-real-4, -fno-real-8-real-4
2501
Richard Smith081ad4d2017-01-24 19:39:46 +00002502.. option:: -frealloc-lhs, -fno-realloc-lhs
2503
Richard Smith081ad4d2017-01-24 19:39:46 +00002504.. option:: -frecord-marker=<arg>
2505
Richard Smith081ad4d2017-01-24 19:39:46 +00002506.. option:: -frecursive, -fno-recursive
2507
Richard Smith081ad4d2017-01-24 19:39:46 +00002508.. option:: -frepack-arrays, -fno-repack-arrays
2509
Richard Smith081ad4d2017-01-24 19:39:46 +00002510.. option:: -fsecond-underscore, -fno-second-underscore
2511
Richard Smith081ad4d2017-01-24 19:39:46 +00002512.. option:: -fsign-zero, -fno-sign-zero
2513
Richard Smith081ad4d2017-01-24 19:39:46 +00002514.. option:: -fstack-arrays, -fno-stack-arrays
2515
Richard Smith081ad4d2017-01-24 19:39:46 +00002516.. option:: -funderscoring, -fno-underscoring
2517
Richard Smith081ad4d2017-01-24 19:39:46 +00002518.. option:: -fwhole-file, -fno-whole-file
2519
Richard Smith081ad4d2017-01-24 19:39:46 +00002520.. option:: -nocpp
2521
Richard Smith081ad4d2017-01-24 19:39:46 +00002522.. option:: -static-libgfortran
2523