blob: 6b86dd6ea9f323c59988f2a2177bf727d4251892 [file] [log] [blame]
Richard Smith081ad4d2017-01-24 19:39:46 +00001..
2 -------------------------------------------------------------------
3 NOTE: This file is automatically generated by running clang-tblgen
4 -gen-opt-docs. Do not edit this file by hand!!
5 -------------------------------------------------------------------
6
7=====================================
8Clang command line argument reference
9=====================================
10.. contents::
11 :local:
12
13Introduction
14============
15
16This page lists the command line arguments currently supported by the
17GCC-compatible ``clang`` and ``clang++`` drivers.
18
19
20.. program:: clang
Richard Smithc5b2e002017-01-27 02:08:37 +000021.. option:: -B<dir>, --prefix <arg>, --prefix=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +000022
Richard Smithc5b2e002017-01-27 02:08:37 +000023Add <dir> to search path for binaries and object files used implicitly
Richard Smith081ad4d2017-01-24 19:39:46 +000024
Richard Smith081ad4d2017-01-24 19:39:46 +000025.. option:: -F<arg>
26
27Add directory to framework include search path
28
Richard Smith081ad4d2017-01-24 19:39:46 +000029.. option:: -ObjC
30
31Treat source input files as Objective-C inputs
32
Richard Smithb2c82a62017-01-27 01:54:42 +000033.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +000034.. option:: -ObjC++
Richard Smithb2c82a62017-01-27 01:54:42 +000035.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +000036
37Treat source input files as Objective-C++ inputs
38
Richard Smith081ad4d2017-01-24 19:39:46 +000039.. option:: -Qunused-arguments
40
41Don't emit warning for unused driver arguments
42
Richard Smith081ad4d2017-01-24 19:39:46 +000043.. option:: -Wa,<arg>,<arg2>...
44
45Pass the comma separated arguments in <arg> to the assembler
46
Richard Smith081ad4d2017-01-24 19:39:46 +000047.. option:: -Wlarge-by-value-copy=<arg>
48
Richard Smith081ad4d2017-01-24 19:39:46 +000049.. option:: -Xarch\_<arg1> <arg2>
50
Richard Smith081ad4d2017-01-24 19:39:46 +000051.. option:: -Xcuda-fatbinary <arg>
52
53Pass <arg> to fatbinary invocation
54
Richard Smith081ad4d2017-01-24 19:39:46 +000055.. option:: -Xcuda-ptxas <arg>
56
57Pass <arg> to the ptxas assembler
58
Boris Kolpackovb150d242017-08-30 09:15:53 +000059.. option:: -Xopenmp-target <arg>
60
61Pass <arg> to the target offloading toolchain.
62
63.. program:: clang1
Jonas Hahnfelda180fc42018-02-22 17:10:28 +000064.. option:: -Xopenmp-target=<triple> <arg>
Boris Kolpackovb150d242017-08-30 09:15:53 +000065.. program:: clang
66
Jonas Hahnfelda180fc42018-02-22 17:10:28 +000067Pass <arg> to the target offloading toolchain identified by <triple>.
Boris Kolpackovb150d242017-08-30 09:15:53 +000068
Richard Smith081ad4d2017-01-24 19:39:46 +000069.. option:: -Z<arg>
70
Richard Smith081ad4d2017-01-24 19:39:46 +000071.. option:: -a<arg>, --profile-blocks
72
Richard Smith081ad4d2017-01-24 19:39:46 +000073.. option:: -all\_load
74
Richard Smith081ad4d2017-01-24 19:39:46 +000075.. option:: -allowable\_client <arg>
76
Richard Smith081ad4d2017-01-24 19:39:46 +000077.. option:: --analyze
78
79Run the static analyzer
80
Richard Smith081ad4d2017-01-24 19:39:46 +000081.. option:: --analyze-auto
82
Richard Smith081ad4d2017-01-24 19:39:46 +000083.. option:: --analyzer-no-default-checks
84
Richard Smith081ad4d2017-01-24 19:39:46 +000085.. option:: --analyzer-output<arg>
86
87Static analyzer report output format (html\|plist\|plist-multi-file\|plist-html\|text).
88
Richard Smith081ad4d2017-01-24 19:39:46 +000089.. option:: -ansi, --ansi
90
Richard Smith081ad4d2017-01-24 19:39:46 +000091.. option:: -arch <arg>
92
Richard Smithb2c82a62017-01-27 01:54:42 +000093.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +000094.. option:: -arch\_errors\_fatal
Richard Smithb2c82a62017-01-27 01:54:42 +000095.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +000096
Richard Smithb2c82a62017-01-27 01:54:42 +000097.. program:: clang2
Richard Smith081ad4d2017-01-24 19:39:46 +000098.. option:: -arch\_only <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +000099.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000100
Richard Smith081ad4d2017-01-24 19:39:46 +0000101.. option:: -arcmt-migrate-emit-errors
102
103Emit ARC errors even if the migrator can fix them
104
Richard Smith081ad4d2017-01-24 19:39:46 +0000105.. option:: -arcmt-migrate-report-output <arg>
106
107Output path for the plist report
108
Craig Topperd23254a2017-07-20 17:52:48 +0000109.. option:: --autocomplete=<arg>
110
Richard Smith081ad4d2017-01-24 19:39:46 +0000111.. option:: -bind\_at\_load
112
Richard Smith081ad4d2017-01-24 19:39:46 +0000113.. option:: -bundle
114
Richard Smithb2c82a62017-01-27 01:54:42 +0000115.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000116.. option:: -bundle\_loader <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000117.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000118
Craig Topper596527b2018-01-23 18:40:15 +0000119.. option:: -cfguard
120
121Emit tables required for Windows Control Flow Guard.
122
Richard Smith081ad4d2017-01-24 19:39:46 +0000123.. option:: -client\_name<arg>
124
Richard Smith081ad4d2017-01-24 19:39:46 +0000125.. option:: -compatibility\_version<arg>
126
Craig Topper287c8012018-01-03 18:29:12 +0000127.. option:: --config <arg>
128
129Specifies configuration file
130
Richard Smith081ad4d2017-01-24 19:39:46 +0000131.. option:: --constant-cfstrings
132
Richard Smith081ad4d2017-01-24 19:39:46 +0000133.. option:: -coverage, --coverage
134
Richard Smith081ad4d2017-01-24 19:39:46 +0000135.. option:: --cuda-compile-host-device
136
137Compile CUDA code for both host and device (default). Has no effect on non-CUDA compilations.
138
Richard Smith081ad4d2017-01-24 19:39:46 +0000139.. option:: --cuda-device-only
140
141Compile CUDA code for device only
142
Richard Smith081ad4d2017-01-24 19:39:46 +0000143.. option:: --cuda-gpu-arch=<arg>, --no-cuda-gpu-arch=<arg>
144
145CUDA GPU architecture (e.g. sm\_35). May be specified more than once.
146
Artem Belevichdde3dc22018-04-10 18:38:22 +0000147.. option:: --cuda-include-ptx=<arg>, --no-cuda-include-ptx=<arg>
148
149Include (or not) PTX along with CUDA GPU binary for the given architecture (e.g. sm\_35). Argument may be 'all'. The option may be specified more than once. Default: --cuda-include-ptx=all
150
Richard Smith081ad4d2017-01-24 19:39:46 +0000151.. option:: --cuda-host-only
152
153Compile CUDA code for host only. Has no effect on non-CUDA compilations.
154
Richard Smith081ad4d2017-01-24 19:39:46 +0000155.. option:: --cuda-noopt-device-debug, --no-cuda-noopt-device-debug
156
157Enable device-side debug info generation. Disables ptxas optimizations.
158
Richard Smith081ad4d2017-01-24 19:39:46 +0000159.. option:: -current\_version<arg>
160
Richard Smith081ad4d2017-01-24 19:39:46 +0000161.. option:: -dead\_strip
162
Richard Smith081ad4d2017-01-24 19:39:46 +0000163.. option:: -dependency-dot <arg>
164
165Filename to write DOT-formatted header dependencies to
166
Richard Smith081ad4d2017-01-24 19:39:46 +0000167.. option:: -dependency-file <arg>
168
169Filename (or -) to write dependency output to
170
Richard Smith081ad4d2017-01-24 19:39:46 +0000171.. option:: -dumpmachine
172
Richard Smith081ad4d2017-01-24 19:39:46 +0000173.. option:: -dumpversion
174
Richard Smith081ad4d2017-01-24 19:39:46 +0000175.. option:: --dyld-prefix=<arg>, --dyld-prefix <arg>
176
Richard Smith081ad4d2017-01-24 19:39:46 +0000177.. option:: -dylib\_file <arg>
178
Richard Smith081ad4d2017-01-24 19:39:46 +0000179.. option:: -dylinker
180
Richard Smithb2c82a62017-01-27 01:54:42 +0000181.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000182.. option:: -dylinker\_install\_name<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000183.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000184
Richard Smith081ad4d2017-01-24 19:39:46 +0000185.. option:: -dynamic
186
Richard Smith081ad4d2017-01-24 19:39:46 +0000187.. option:: -dynamiclib
188
Richard Smith081ad4d2017-01-24 19:39:46 +0000189.. option:: -emit-ast
190
191Emit Clang AST files for source inputs
192
Richard Smith081ad4d2017-01-24 19:39:46 +0000193.. option:: -exported\_symbols\_list <arg>
194
Richard Smith081ad4d2017-01-24 19:39:46 +0000195.. option:: -faligned-new=<arg>
196
Richard Smith081ad4d2017-01-24 19:39:46 +0000197.. option:: -fcuda-approx-transcendentals, -fno-cuda-approx-transcendentals
198
199Use approximate transcendental functions
200
Richard Smith081ad4d2017-01-24 19:39:46 +0000201.. option:: -fcuda-flush-denormals-to-zero, -fno-cuda-flush-denormals-to-zero
202
203Flush denormal floating point values to zero in CUDA device mode.
204
Richard Smith081ad4d2017-01-24 19:39:46 +0000205.. option:: -fheinous-gnu-extensions
206
Richard Smith081ad4d2017-01-24 19:39:46 +0000207.. option:: -flat\_namespace
208
Richard Smith081ad4d2017-01-24 19:39:46 +0000209.. option:: -fopenmp-targets=<arg1>,<arg2>...
210
211Specify comma-separated list of triples OpenMP offloading targets to be supported
212
Richard Smith081ad4d2017-01-24 19:39:46 +0000213.. option:: -force\_cpusubtype\_ALL
214
Richard Smithb2c82a62017-01-27 01:54:42 +0000215.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000216.. option:: -force\_flat\_namespace
Richard Smithb2c82a62017-01-27 01:54:42 +0000217.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000218
Richard Smithb2c82a62017-01-27 01:54:42 +0000219.. program:: clang2
Richard Smith081ad4d2017-01-24 19:39:46 +0000220.. option:: -force\_load <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000221.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000222
Richard Smith081ad4d2017-01-24 19:39:46 +0000223.. option:: -framework <arg>
224
Richard Smith78e23fd2017-04-13 22:39:49 +0000225.. option:: -frtlib-add-rpath, -fno-rtlib-add-rpath
226
227Add -rpath with architecture-specific resource directory to the linker flags
228
Richard Smith081ad4d2017-01-24 19:39:46 +0000229.. option:: --gcc-toolchain=<arg>, -gcc-toolchain <arg>
230
231Use the gcc toolchain at the given directory
232
Richard Smith081ad4d2017-01-24 19:39:46 +0000233.. option:: -gcodeview
234
235Generate CodeView debug information
236
Richard Smith081ad4d2017-01-24 19:39:46 +0000237.. option:: -headerpad\_max\_install\_names<arg>
238
Richard Smith081ad4d2017-01-24 19:39:46 +0000239.. option:: -help, --help
240
241Display available options
242
Richard Smith081ad4d2017-01-24 19:39:46 +0000243.. option:: --help-hidden
244
Richard Smith081ad4d2017-01-24 19:39:46 +0000245.. option:: -image\_base <arg>
246
Richard Smith081ad4d2017-01-24 19:39:46 +0000247.. option:: -index-header-map
248
249Make the next included directory (-I or -F) an indexer header map
250
Richard Smith081ad4d2017-01-24 19:39:46 +0000251.. option:: -init <arg>
252
Richard Smith081ad4d2017-01-24 19:39:46 +0000253.. option:: -install\_name <arg>
254
Richard Smith081ad4d2017-01-24 19:39:46 +0000255.. option:: -keep\_private\_externs
256
Richard Smith081ad4d2017-01-24 19:39:46 +0000257.. option:: -lazy\_framework <arg>
258
Richard Smithb2c82a62017-01-27 01:54:42 +0000259.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000260.. option:: -lazy\_library <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000261.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000262
Richard Smith081ad4d2017-01-24 19:39:46 +0000263.. option:: -mbig-endian, -EB
264
Richard Smith081ad4d2017-01-24 19:39:46 +0000265.. option:: --migrate
266
267Run the migrator
268
Richard Smith78e23fd2017-04-13 22:39:49 +0000269.. option:: -mios-simulator-version-min=<arg>, -miphonesimulator-version-min=<arg>
270
Richard Smith081ad4d2017-01-24 19:39:46 +0000271.. option:: -mlinker-version=<arg>
272
Richard Smith081ad4d2017-01-24 19:39:46 +0000273.. option:: -mlittle-endian, -EL
274
Richard Smith081ad4d2017-01-24 19:39:46 +0000275.. option:: -mllvm <arg>
276
277Additional arguments to forward to LLVM's option processing
278
Richard Smith081ad4d2017-01-24 19:39:46 +0000279.. option:: -module-dependency-dir <arg>
280
281Directory to dump module dependencies to
282
Richard Smith78e23fd2017-04-13 22:39:49 +0000283.. option:: -mtvos-simulator-version-min=<arg>, -mappletvsimulator-version-min=<arg>
284
Richard Smith081ad4d2017-01-24 19:39:46 +0000285.. option:: -multi\_module
286
Richard Smith081ad4d2017-01-24 19:39:46 +0000287.. option:: -multiply\_defined <arg>
288
Richard Smithb2c82a62017-01-27 01:54:42 +0000289.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000290.. option:: -multiply\_defined\_unused <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000291.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000292
Richard Smith78e23fd2017-04-13 22:39:49 +0000293.. option:: -mwatchos-simulator-version-min=<arg>, -mwatchsimulator-version-min=<arg>
294
Richard Smith081ad4d2017-01-24 19:39:46 +0000295.. option:: --no-cuda-version-check
296
297Don't error out if the detected version of the CUDA install is too low for the requested CUDA gpu architecture.
298
Richard Smith081ad4d2017-01-24 19:39:46 +0000299.. option:: -no-integrated-cpp, --no-integrated-cpp
300
Richard Smith081ad4d2017-01-24 19:39:46 +0000301.. option:: -no\_dead\_strip\_inits\_and\_terms
302
Richard Smith081ad4d2017-01-24 19:39:46 +0000303.. option:: -nobuiltininc
304
305Disable builtin #include directories
306
Richard Smith081ad4d2017-01-24 19:39:46 +0000307.. option:: -nocudainc
308
Richard Smith081ad4d2017-01-24 19:39:46 +0000309.. option:: -nocudalib
310
Richard Smith081ad4d2017-01-24 19:39:46 +0000311.. option:: -nodefaultlibs
312
Richard Smith081ad4d2017-01-24 19:39:46 +0000313.. option:: -nofixprebinding
314
Richard Smith081ad4d2017-01-24 19:39:46 +0000315.. option:: -nolibc
316
Richard Smith081ad4d2017-01-24 19:39:46 +0000317.. option:: -nomultidefs
318
Craig Topperd23254a2017-07-20 17:52:48 +0000319.. option:: -nopie, -no-pie
Richard Smith081ad4d2017-01-24 19:39:46 +0000320
Richard Smith081ad4d2017-01-24 19:39:46 +0000321.. option:: -noprebind
322
Richard Smith081ad4d2017-01-24 19:39:46 +0000323.. option:: -noseglinkedit
324
Richard Smith081ad4d2017-01-24 19:39:46 +0000325.. option:: -nostartfiles
326
Richard Smith081ad4d2017-01-24 19:39:46 +0000327.. option:: -nostdinc, --no-standard-includes
328
Richard Smithb2c82a62017-01-27 01:54:42 +0000329.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000330.. option:: -nostdinc++
Richard Smithb2c82a62017-01-27 01:54:42 +0000331.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000332
333Disable standard #include directories for the C++ standard library
334
Richard Smith081ad4d2017-01-24 19:39:46 +0000335.. option:: -nostdlib, --no-standard-libraries
336
Boris Kolpackovb150d242017-08-30 09:15:53 +0000337.. program:: clang1
338.. option:: -nostdlib++
339.. program:: clang
340
Richard Smith081ad4d2017-01-24 19:39:46 +0000341.. option:: -nostdlibinc
342
Richard Smith081ad4d2017-01-24 19:39:46 +0000343.. option:: -o<file>, --output <arg>, --output=<arg>
344
345Write output to <file>
346
Richard Smith081ad4d2017-01-24 19:39:46 +0000347.. option:: -objcmt-atomic-property
348
349Make migration to 'atomic' properties
350
Richard Smith081ad4d2017-01-24 19:39:46 +0000351.. option:: -objcmt-migrate-all
352
353Enable migration to modern ObjC
354
Richard Smith081ad4d2017-01-24 19:39:46 +0000355.. option:: -objcmt-migrate-annotation
356
357Enable migration to property and method annotations
358
Richard Smith081ad4d2017-01-24 19:39:46 +0000359.. option:: -objcmt-migrate-designated-init
360
361Enable migration to infer NS\_DESIGNATED\_INITIALIZER for initializer methods
362
Richard Smith081ad4d2017-01-24 19:39:46 +0000363.. option:: -objcmt-migrate-instancetype
364
365Enable migration to infer instancetype for method result type
366
Richard Smith081ad4d2017-01-24 19:39:46 +0000367.. option:: -objcmt-migrate-literals
368
369Enable migration to modern ObjC literals
370
Richard Smith081ad4d2017-01-24 19:39:46 +0000371.. option:: -objcmt-migrate-ns-macros
372
373Enable migration to NS\_ENUM/NS\_OPTIONS macros
374
Richard Smith081ad4d2017-01-24 19:39:46 +0000375.. option:: -objcmt-migrate-property
376
377Enable migration to modern ObjC property
378
Richard Smith081ad4d2017-01-24 19:39:46 +0000379.. option:: -objcmt-migrate-property-dot-syntax
380
381Enable migration of setter/getter messages to property-dot syntax
382
Richard Smith081ad4d2017-01-24 19:39:46 +0000383.. option:: -objcmt-migrate-protocol-conformance
384
385Enable migration to add protocol conformance on classes
386
Richard Smith081ad4d2017-01-24 19:39:46 +0000387.. option:: -objcmt-migrate-readonly-property
388
389Enable migration to modern ObjC readonly property
390
Richard Smith081ad4d2017-01-24 19:39:46 +0000391.. option:: -objcmt-migrate-readwrite-property
392
393Enable migration to modern ObjC readwrite property
394
Richard Smith081ad4d2017-01-24 19:39:46 +0000395.. option:: -objcmt-migrate-subscripting
396
397Enable migration to modern ObjC subscripting
398
Richard Smith081ad4d2017-01-24 19:39:46 +0000399.. option:: -objcmt-ns-nonatomic-iosonly
400
401Enable migration to use NS\_NONATOMIC\_IOSONLY macro for setting property's 'atomic' attribute
402
Richard Smith081ad4d2017-01-24 19:39:46 +0000403.. option:: -objcmt-returns-innerpointer-property
404
405Enable migration to annotate property with NS\_RETURNS\_INNER\_POINTER
406
Richard Smith081ad4d2017-01-24 19:39:46 +0000407.. option:: -objcmt-whitelist-dir-path=<arg>, -objcmt-white-list-dir-path=<arg>
408
409Only modify files with a filename contained in the provided directory path
410
Richard Smith081ad4d2017-01-24 19:39:46 +0000411.. option:: -object
412
Richard Smith081ad4d2017-01-24 19:39:46 +0000413.. option:: -p, --profile
414
Richard Smith081ad4d2017-01-24 19:39:46 +0000415.. option:: -pagezero\_size<arg>
416
Richard Smith081ad4d2017-01-24 19:39:46 +0000417.. option:: -pg
418
419Enable mcount instrumentation
420
Richard Smith081ad4d2017-01-24 19:39:46 +0000421.. option:: -pie
422
Richard Smith081ad4d2017-01-24 19:39:46 +0000423.. option:: -pipe, --pipe
424
425Use pipes between commands, when possible
426
Richard Smith081ad4d2017-01-24 19:39:46 +0000427.. option:: -prebind
428
Richard Smithb2c82a62017-01-27 01:54:42 +0000429.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000430.. option:: -prebind\_all\_twolevel\_modules
Richard Smithb2c82a62017-01-27 01:54:42 +0000431.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000432
Richard Smith081ad4d2017-01-24 19:39:46 +0000433.. option:: -preload
434
Richard Smith081ad4d2017-01-24 19:39:46 +0000435.. option:: --print-diagnostic-categories
436
Richard Smith081ad4d2017-01-24 19:39:46 +0000437.. option:: -print-file-name=<file>, --print-file-name=<file>, --print-file-name <arg>
438
439Print the full library path of <file>
440
Richard Smith081ad4d2017-01-24 19:39:46 +0000441.. option:: -print-ivar-layout
442
443Enable Objective-C Ivar layout bitmap print trace
444
Richard Smith081ad4d2017-01-24 19:39:46 +0000445.. option:: -print-libgcc-file-name, --print-libgcc-file-name
446
447Print the library path for the currently used compiler runtime library ("libgcc.a" or "libclang\_rt.builtins.\*.a")
448
Richard Smith081ad4d2017-01-24 19:39:46 +0000449.. option:: -print-multi-directory, --print-multi-directory
450
Richard Smith081ad4d2017-01-24 19:39:46 +0000451.. option:: -print-multi-lib, --print-multi-lib
452
Richard Smith081ad4d2017-01-24 19:39:46 +0000453.. option:: -print-prog-name=<name>, --print-prog-name=<name>, --print-prog-name <arg>
454
455Print the full program path of <name>
456
Richard Smith78e23fd2017-04-13 22:39:49 +0000457.. option:: -print-resource-dir, --print-resource-dir
458
459Print the resource directory pathname
460
Richard Smith081ad4d2017-01-24 19:39:46 +0000461.. option:: -print-search-dirs, --print-search-dirs
462
463Print the paths used for finding libraries and programs
464
Richard Smith081ad4d2017-01-24 19:39:46 +0000465.. option:: -private\_bundle
466
Richard Smith081ad4d2017-01-24 19:39:46 +0000467.. option:: -pthread, -no-pthread
468
469Support POSIX threads in generated code
470
Richard Smith081ad4d2017-01-24 19:39:46 +0000471.. option:: -pthreads
472
Richard Smith081ad4d2017-01-24 19:39:46 +0000473.. option:: -rdynamic
474
Richard Smith081ad4d2017-01-24 19:39:46 +0000475.. option:: -read\_only\_relocs <arg>
476
Richard Smith081ad4d2017-01-24 19:39:46 +0000477.. option:: -relocatable-pch, --relocatable-pch
478
479Whether to build a relocatable precompiled header
480
Richard Smith081ad4d2017-01-24 19:39:46 +0000481.. option:: -remap
482
Richard Smith081ad4d2017-01-24 19:39:46 +0000483.. option:: -rewrite-legacy-objc
484
485Rewrite Legacy Objective-C source to C++
486
Richard Smith081ad4d2017-01-24 19:39:46 +0000487.. option:: -rtlib=<arg>, --rtlib=<arg>, --rtlib <arg>
488
489Compiler runtime library to use
490
Richard Smith081ad4d2017-01-24 19:39:46 +0000491.. option:: -save-stats=<arg>, --save-stats=<arg>, -save-stats (equivalent to -save-stats=cwd), --save-stats (equivalent to -save-stats=cwd)
492
493Save llvm statistics.
494
Richard Smith081ad4d2017-01-24 19:39:46 +0000495.. option:: -save-temps=<arg>, --save-temps=<arg>, -save-temps (equivalent to -save-temps=cwd), --save-temps (equivalent to -save-temps=cwd)
496
497Save intermediate compilation results.
498
Richard Smith081ad4d2017-01-24 19:39:46 +0000499.. option:: -sectalign <arg1> <arg2> <arg3>
500
Richard Smith081ad4d2017-01-24 19:39:46 +0000501.. option:: -sectcreate <arg1> <arg2> <arg3>
502
Richard Smith081ad4d2017-01-24 19:39:46 +0000503.. option:: -sectobjectsymbols <arg1> <arg2>
504
Richard Smith081ad4d2017-01-24 19:39:46 +0000505.. option:: -sectorder <arg1> <arg2> <arg3>
506
Richard Smith081ad4d2017-01-24 19:39:46 +0000507.. option:: -seg1addr<arg>
508
Richard Smith081ad4d2017-01-24 19:39:46 +0000509.. option:: -seg\_addr\_table <arg>
510
Richard Smithb2c82a62017-01-27 01:54:42 +0000511.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000512.. option:: -seg\_addr\_table\_filename <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000513.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000514
Richard Smith081ad4d2017-01-24 19:39:46 +0000515.. option:: -segaddr <arg1> <arg2>
516
Richard Smith081ad4d2017-01-24 19:39:46 +0000517.. option:: -segcreate <arg1> <arg2> <arg3>
518
Richard Smith081ad4d2017-01-24 19:39:46 +0000519.. option:: -seglinkedit
520
Richard Smith081ad4d2017-01-24 19:39:46 +0000521.. option:: -segprot <arg1> <arg2> <arg3>
522
Richard Smith081ad4d2017-01-24 19:39:46 +0000523.. option:: -segs\_read\_<arg>
524
Richard Smithb2c82a62017-01-27 01:54:42 +0000525.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000526.. option:: -segs\_read\_only\_addr <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000527.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000528
Richard Smithb2c82a62017-01-27 01:54:42 +0000529.. program:: clang2
Richard Smith081ad4d2017-01-24 19:39:46 +0000530.. option:: -segs\_read\_write\_addr <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000531.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000532
Richard Smith081ad4d2017-01-24 19:39:46 +0000533.. option:: -serialize-diagnostics <arg>, --serialize-diagnostics <arg>
534
535Serialize compiler diagnostics to a file
536
Richard Smith081ad4d2017-01-24 19:39:46 +0000537.. option:: -shared, --shared
538
Richard Smith081ad4d2017-01-24 19:39:46 +0000539.. option:: -shared-libgcc
540
Craig Topper16418662017-11-20 18:07:43 +0000541.. option:: -shared-libsan, -shared-libasan
542
Richard Smith081ad4d2017-01-24 19:39:46 +0000543.. option:: -single\_module
544
Richard Smith081ad4d2017-01-24 19:39:46 +0000545.. option:: -specs=<arg>, --specs=<arg>
546
Richard Smith081ad4d2017-01-24 19:39:46 +0000547.. option:: -static, --static
548
Richard Smith081ad4d2017-01-24 19:39:46 +0000549.. option:: -static-libgcc
550
Craig Topper16418662017-11-20 18:07:43 +0000551.. option:: -static-libsan
552
Richard Smith081ad4d2017-01-24 19:39:46 +0000553.. option:: -static-libstdc++
554
Richard Smith081ad4d2017-01-24 19:39:46 +0000555.. option:: -std-default=<arg>
556
Richard Smith081ad4d2017-01-24 19:39:46 +0000557.. option:: -stdlib=<arg>, --stdlib=<arg>, --stdlib <arg>
558
559C++ standard library to use
560
Richard Smith081ad4d2017-01-24 19:39:46 +0000561.. option:: -sub\_library<arg>
562
Richard Smithb2c82a62017-01-27 01:54:42 +0000563.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000564.. option:: -sub\_umbrella<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000565.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000566
Richard Smith081ad4d2017-01-24 19:39:46 +0000567.. option:: --sysroot=<arg>, --sysroot <arg>
568
Richard Smith081ad4d2017-01-24 19:39:46 +0000569.. option:: --target-help
570
Richard Smith081ad4d2017-01-24 19:39:46 +0000571.. option:: --target=<arg>, -target <arg>
572
573Generate code for the given target
574
Richard Smith081ad4d2017-01-24 19:39:46 +0000575.. option:: -time
576
577Time individual commands
578
Richard Smith081ad4d2017-01-24 19:39:46 +0000579.. option:: -traditional, --traditional
580
Richard Smith081ad4d2017-01-24 19:39:46 +0000581.. option:: -traditional-cpp, --traditional-cpp
582
583Enable some traditional CPP emulation
584
Richard Smith081ad4d2017-01-24 19:39:46 +0000585.. option:: -twolevel\_namespace
586
Richard Smithb2c82a62017-01-27 01:54:42 +0000587.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000588.. option:: -twolevel\_namespace\_hints
Richard Smithb2c82a62017-01-27 01:54:42 +0000589.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000590
Richard Smith081ad4d2017-01-24 19:39:46 +0000591.. option:: -umbrella <arg>
592
Richard Smith081ad4d2017-01-24 19:39:46 +0000593.. option:: -unexported\_symbols\_list <arg>
594
Richard Smith081ad4d2017-01-24 19:39:46 +0000595.. option:: -v, --verbose
596
597Show commands to run and use verbose output
598
Richard Smith081ad4d2017-01-24 19:39:46 +0000599.. option:: --verify-debug-info
600
601Verify the binary representation of debug output
602
Richard Smith081ad4d2017-01-24 19:39:46 +0000603.. option:: --version
604
Craig Topper16418662017-11-20 18:07:43 +0000605Print version information
606
Richard Smith081ad4d2017-01-24 19:39:46 +0000607.. option:: -w, --no-warnings
608
609Suppress all warnings
610
Richard Smith081ad4d2017-01-24 19:39:46 +0000611.. option:: -weak-l<arg>
612
Richard Smith081ad4d2017-01-24 19:39:46 +0000613.. option:: -weak\_framework <arg>
614
Richard Smithb2c82a62017-01-27 01:54:42 +0000615.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000616.. option:: -weak\_library <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000617.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000618
Richard Smithb2c82a62017-01-27 01:54:42 +0000619.. program:: clang2
Richard Smith081ad4d2017-01-24 19:39:46 +0000620.. option:: -weak\_reference\_mismatches <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000621.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000622
Richard Smith081ad4d2017-01-24 19:39:46 +0000623.. option:: -whatsloaded
624
Richard Smith081ad4d2017-01-24 19:39:46 +0000625.. option:: -whyload
626
Richard Smith081ad4d2017-01-24 19:39:46 +0000627.. option:: -working-directory<arg>, -working-directory=<arg>
628
629Resolve file paths relative to the specified directory
630
Richard Smith081ad4d2017-01-24 19:39:46 +0000631.. option:: -x<language>, --language <arg>, --language=<arg>
632
633Treat subsequent input files as having type <language>
634
Richard Smith081ad4d2017-01-24 19:39:46 +0000635.. option:: -y<arg>
636
637Actions
638=======
639The action to perform on the input.
640
Richard Smith081ad4d2017-01-24 19:39:46 +0000641.. option:: -E, --preprocess
642
643Only run the preprocessor
644
Richard Smith081ad4d2017-01-24 19:39:46 +0000645.. option:: -S, --assemble
646
647Only run preprocess and compilation steps
648
Richard Smithc5b2e002017-01-27 02:08:37 +0000649.. option:: -c, --compile
650
651Only run preprocess, compile, and assemble 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 Smithc5b2e002017-01-27 02:08:37 +0000681.. option:: -Xassembler <arg>
Richard Smith081ad4d2017-01-24 19:39:46 +0000682
Richard Smithc5b2e002017-01-27 02:08:37 +0000683Pass <arg> to the assembler
Richard Smith081ad4d2017-01-24 19:39:46 +0000684
Richard Smith081ad4d2017-01-24 19:39:46 +0000685.. option:: -Xclang <arg>
686
687Pass <arg> to the clang compiler
688
Boris Kolpackovb150d242017-08-30 09:15:53 +0000689.. option:: -fclang-abi-compat=<version>
690
691Attempt to match the ABI of Clang <version>
692
Richard Smith081ad4d2017-01-24 19:39:46 +0000693.. option:: -fcomment-block-commands=<arg>,<arg2>...
694
695Treat each comma separated argument in <arg> as a documentation comment block command
696
Richard Smith081ad4d2017-01-24 19:39:46 +0000697.. option:: -fdeclspec, -fno-declspec
698
699Allow \_\_declspec as a keyword
700
Richard Smith081ad4d2017-01-24 19:39:46 +0000701.. option:: -fdepfile-entry=<arg>
702
Richard Smith081ad4d2017-01-24 19:39:46 +0000703.. option:: -fdiagnostics-fixit-info, -fno-diagnostics-fixit-info
704
Richard Smith081ad4d2017-01-24 19:39:46 +0000705.. option:: -fdiagnostics-format=<arg>
706
Richard Smith081ad4d2017-01-24 19:39:46 +0000707.. option:: -fdiagnostics-parseable-fixits
708
709Print fix-its in machine parseable form
710
Richard Smith081ad4d2017-01-24 19:39:46 +0000711.. option:: -fdiagnostics-print-source-range-info
712
713Print source range spans in numeric form
714
Richard Smith081ad4d2017-01-24 19:39:46 +0000715.. option:: -fdiagnostics-show-category=<arg>
716
Jonas Hahnfelda180fc42018-02-22 17:10:28 +0000717.. option:: -fdiscard-value-names, -fno-discard-value-names
718
719Discard value names in LLVM IR
720
721.. option:: -fexperimental-isel, -fno-experimental-isel
722
723Enables the experimental global instruction selector
724
Richard Smith081ad4d2017-01-24 19:39:46 +0000725.. option:: -fexperimental-new-pass-manager, -fno-experimental-new-pass-manager
726
727Enables an experimental new pass manager in LLVM.
728
Craig Topper16418662017-11-20 18:07:43 +0000729.. option:: -ffine-grained-bitfield-accesses, -fno-fine-grained-bitfield-accesses
730
731Use separate accesses for bitfields with legal widths and alignments.
732
Richard Smith081ad4d2017-01-24 19:39:46 +0000733.. option:: -finline-functions, -fno-inline-functions
734
735Inline suitable functions
736
Richard Smith081ad4d2017-01-24 19:39:46 +0000737.. option:: -finline-hint-functions
738
739Inline functions which are (explicitly or implicitly) marked inline
740
Richard Smith081ad4d2017-01-24 19:39:46 +0000741.. option:: -fno-crash-diagnostics
742
Richard Smith78e23fd2017-04-13 22:39:49 +0000743Disable auto-generation of preprocessed source files and a script for reproduction during a clang crash
744
Richard Smith081ad4d2017-01-24 19:39:46 +0000745.. option:: -fno-sanitize-blacklist
746
747Don't use blacklist file for sanitizers
748
Richard Smith081ad4d2017-01-24 19:39:46 +0000749.. option:: -fparse-all-comments
750
Richard Smith081ad4d2017-01-24 19:39:46 +0000751.. option:: -fsanitize-address-field-padding=<arg>
752
753Level of field padding for AddressSanitizer
754
Craig Topperd23254a2017-07-20 17:52:48 +0000755.. option:: -fsanitize-address-globals-dead-stripping
756
757Enable linker dead stripping of globals in AddressSanitizer
758
Jonas Hahnfelda180fc42018-02-22 17:10:28 +0000759.. option:: -fsanitize-address-poison-class-member-array-new-cookie, -fno-sanitize-address-poison-class-member-array-new-cookie
760
761Enable poisoning array cookies when using class member operator new\[\] in AddressSanitizer
762
Richard Smith081ad4d2017-01-24 19:39:46 +0000763.. option:: -fsanitize-address-use-after-scope, -fno-sanitize-address-use-after-scope
764
765Enable use-after-scope detection in AddressSanitizer
766
Richard Smith081ad4d2017-01-24 19:39:46 +0000767.. option:: -fsanitize-blacklist=<arg>
768
769Path to blacklist file for sanitizers
770
Richard Smith081ad4d2017-01-24 19:39:46 +0000771.. option:: -fsanitize-cfi-cross-dso, -fno-sanitize-cfi-cross-dso
772
773Enable control flow integrity (CFI) checks for cross-DSO calls.
774
Vlad Tsyrklevich634c6012017-10-31 22:39:44 +0000775.. option:: -fsanitize-cfi-icall-generalize-pointers
776
Craig Topper16418662017-11-20 18:07:43 +0000777Generalize pointers in CFI indirect call type signature checks
Vlad Tsyrklevich634c6012017-10-31 22:39:44 +0000778
Richard Smith081ad4d2017-01-24 19:39:46 +0000779.. option:: -fsanitize-coverage=<arg1>,<arg2>..., -fno-sanitize-coverage=<arg1>,<arg2>...
780
781Specify the type of coverage instrumentation for Sanitizers
782
Richard Smith081ad4d2017-01-24 19:39:46 +0000783.. option:: -fsanitize-link-c++-runtime
784
Richard Smith081ad4d2017-01-24 19:39:46 +0000785.. option:: -fsanitize-memory-track-origins, -fno-sanitize-memory-track-origins
786
787Enable origins tracking in MemorySanitizer
788
Richard Smithb2c82a62017-01-27 01:54:42 +0000789.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000790.. option:: -fsanitize-memory-track-origins=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000791.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000792
793Enable origins tracking in MemorySanitizer
794
Craig Topper16418662017-11-20 18:07:43 +0000795.. option:: -fsanitize-memory-use-after-dtor, -fno-sanitize-memory-use-after-dtor
Richard Smith081ad4d2017-01-24 19:39:46 +0000796
797Enable use-after-destroy detection in MemorySanitizer
798
Boris Kolpackovb150d242017-08-30 09:15:53 +0000799.. option:: -fsanitize-minimal-runtime, -fno-sanitize-minimal-runtime
800
Richard Smith081ad4d2017-01-24 19:39:46 +0000801.. option:: -fsanitize-recover, -fno-sanitize-recover
802
Richard Smithb2c82a62017-01-27 01:54:42 +0000803.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000804.. option:: -fsanitize-recover=<arg1>,<arg2>..., -fno-sanitize-recover=<arg1>,<arg2>...
Richard Smithb2c82a62017-01-27 01:54:42 +0000805.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000806
807Enable recovery for specified sanitizers
808
Richard Smith081ad4d2017-01-24 19:39:46 +0000809.. option:: -fsanitize-stats, -fno-sanitize-stats
810
811Enable sanitizer statistics gathering.
812
Richard Smith081ad4d2017-01-24 19:39:46 +0000813.. option:: -fsanitize-thread-atomics, -fno-sanitize-thread-atomics
814
815Enable atomic operations instrumentation in ThreadSanitizer (default)
816
Richard Smith081ad4d2017-01-24 19:39:46 +0000817.. option:: -fsanitize-thread-func-entry-exit, -fno-sanitize-thread-func-entry-exit
818
819Enable function entry/exit instrumentation in ThreadSanitizer (default)
820
Richard Smith081ad4d2017-01-24 19:39:46 +0000821.. option:: -fsanitize-thread-memory-access, -fno-sanitize-thread-memory-access
822
823Enable memory access instrumentation in ThreadSanitizer (default)
824
Richard Smith081ad4d2017-01-24 19:39:46 +0000825.. option:: -fsanitize-trap=<arg1>,<arg2>..., -fno-sanitize-trap=<arg1>,<arg2>...
826
827Enable trapping for specified sanitizers
828
Richard Smith081ad4d2017-01-24 19:39:46 +0000829.. option:: -fsanitize-undefined-strip-path-components=<number>
830
831Strip (or keep only, if negative) a given number of path components when emitting check metadata.
832
Richard Smith081ad4d2017-01-24 19:39:46 +0000833.. option:: -fsanitize-undefined-trap-on-error, -fno-sanitize-undefined-trap-on-error
834
Richard Smith081ad4d2017-01-24 19:39:46 +0000835.. option:: -fsanitize=<check>,<arg2>..., -fno-sanitize=<arg1>,<arg2>...
836
837Turn on runtime checks for various forms of undefined or suspicious behavior. See user manual for available checks
838
Richard Smith081ad4d2017-01-24 19:39:46 +0000839.. option:: --param <arg>, --param=<arg>
840
Richard Smith081ad4d2017-01-24 19:39:46 +0000841.. option:: -std=<arg>, --std=<arg>, --std <arg>
842
843Language standard to compile for
844
Richard Smithc5b2e002017-01-27 02:08:37 +0000845Preprocessor flags
846~~~~~~~~~~~~~~~~~~
847
848Flags controlling the behavior of the Clang preprocessor.
849
850.. option:: -C, --comments
851
852Include comments in preprocessed output
853
854.. option:: -CC, --comments-in-macros
855
856Include comments from within macros in preprocessed output
857
858.. option:: -D<macro>=<value>, --define-macro <arg>, --define-macro=<arg>
859
860Define <macro> to <value> (or 1 if <value> omitted)
861
862.. option:: -H, --trace-includes
863
864Show header includes and nesting depth
865
866.. option:: -P, --no-line-commands
867
868Disable linemarker output in -E mode
869
870.. option:: -U<macro>, --undefine-macro <arg>, --undefine-macro=<arg>
871
872Undefine macro <macro>
873
874.. option:: -Wp,<arg>,<arg2>...
875
876Pass the comma separated arguments in <arg> to the preprocessor
877
878.. option:: -Xpreprocessor <arg>
879
880Pass <arg> to the preprocessor
881
Richard Smith081ad4d2017-01-24 19:39:46 +0000882Include path management
Richard Smithc5b2e002017-01-27 02:08:37 +0000883-----------------------
Richard Smith081ad4d2017-01-24 19:39:46 +0000884
885Flags controlling how ``#include``\s are resolved to files.
886
Richard Smithc5b2e002017-01-27 02:08:37 +0000887.. option:: -I<dir>, --include-directory <arg>, --include-directory=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +0000888
889Add directory to include search path
890
Richard Smith081ad4d2017-01-24 19:39:46 +0000891.. option:: -I-, --include-barrier
892
Richard Smithc5b2e002017-01-27 02:08:37 +0000893Restrict all prior -I flags to double-quoted inclusion and remove current directory from include path
894
Jonas Hahnfelda180fc42018-02-22 17:10:28 +0000895.. option:: --cuda-path-ignore-env
896
897Ignore environment variables to detect CUDA installation
898
Richard Smith081ad4d2017-01-24 19:39:46 +0000899.. option:: --cuda-path=<arg>
900
901CUDA installation path
902
Richard Smith081ad4d2017-01-24 19:39:46 +0000903.. option:: -cxx-isystem<directory>
904
905Add directory to the C++ SYSTEM include search path
906
Richard Smith081ad4d2017-01-24 19:39:46 +0000907.. option:: -fbuild-session-file=<file>
908
909Use the last modification time of <file> as the build session timestamp
910
Richard Smith081ad4d2017-01-24 19:39:46 +0000911.. option:: -fbuild-session-timestamp=<time since Epoch in seconds>
912
913Time when the current build session started
914
Boris Kolpackovb150d242017-08-30 09:15:53 +0000915.. option:: -fmodule-file=\[<name>=\]<file>
916
917Specify the mapping of module name to precompiled module file, or load a module file if name is omitted.
918
Richard Smith081ad4d2017-01-24 19:39:46 +0000919.. option:: -fmodules-cache-path=<directory>
920
921Specify the module cache path
922
Richard Smith081ad4d2017-01-24 19:39:46 +0000923.. option:: -fmodules-disable-diagnostic-validation
924
925Disable validation of the diagnostic options when loading the module
926
Richard Smith081ad4d2017-01-24 19:39:46 +0000927.. option:: -fmodules-prune-after=<seconds>
928
929Specify the interval (in seconds) after which a module file will be considered unused
930
Richard Smith081ad4d2017-01-24 19:39:46 +0000931.. option:: -fmodules-prune-interval=<seconds>
932
933Specify the interval (in seconds) between attempts to prune the module cache
934
Richard Smith081ad4d2017-01-24 19:39:46 +0000935.. option:: -fmodules-user-build-path <directory>
936
937Specify the module user build path
938
Richard Smith081ad4d2017-01-24 19:39:46 +0000939.. option:: -fmodules-validate-once-per-build-session
940
941Don't verify input files for the modules if the module has been successfully validated or loaded during this build session
942
Richard Smith081ad4d2017-01-24 19:39:46 +0000943.. option:: -fmodules-validate-system-headers
944
945Validate the system headers that a module depends on when loading the module
946
Richard Smith081ad4d2017-01-24 19:39:46 +0000947.. option:: -fprebuilt-module-path=<directory>
948
949Specify the prebuilt module path
950
Richard Smith081ad4d2017-01-24 19:39:46 +0000951.. option:: -i<arg>
952
Richard Smith081ad4d2017-01-24 19:39:46 +0000953.. option:: -idirafter<arg>, --include-directory-after <arg>, --include-directory-after=<arg>
954
955Add directory to AFTER include search path
956
Richard Smith081ad4d2017-01-24 19:39:46 +0000957.. option:: -iframework<arg>
958
959Add directory to SYSTEM framework search path
960
Richard Smith78e23fd2017-04-13 22:39:49 +0000961.. option:: -iframeworkwithsysroot<directory>
962
963Add directory to SYSTEM framework search path, absolute paths are relative to -isysroot
964
Richard Smith081ad4d2017-01-24 19:39:46 +0000965.. option:: -imacros<file>, --imacros<file>, --imacros=<arg>
966
967Include macros from file before parsing
968
Richard Smith081ad4d2017-01-24 19:39:46 +0000969.. option:: -include<file>, --include<file>, --include=<arg>
970
971Include file before parsing
972
Richard Smith081ad4d2017-01-24 19:39:46 +0000973.. option:: -include-pch <file>
974
975Include precompiled header file
976
Richard Smith081ad4d2017-01-24 19:39:46 +0000977.. option:: -iprefix<dir>, --include-prefix <arg>, --include-prefix=<arg>
978
979Set the -iwithprefix/-iwithprefixbefore prefix
980
Richard Smith081ad4d2017-01-24 19:39:46 +0000981.. option:: -iquote<directory>
982
983Add directory to QUOTE include search path
984
Richard Smith081ad4d2017-01-24 19:39:46 +0000985.. option:: -isysroot<dir>
986
987Set the system root directory (usually /)
988
Richard Smith081ad4d2017-01-24 19:39:46 +0000989.. option:: -isystem<directory>
990
991Add directory to SYSTEM include search path
992
Richard Smith081ad4d2017-01-24 19:39:46 +0000993.. option:: -isystem-after<directory>
994
995Add directory to end of the SYSTEM include search path
996
Richard Smith081ad4d2017-01-24 19:39:46 +0000997.. option:: -ivfsoverlay<arg>
998
999Overlay the virtual filesystem described by file over the real file system
1000
Richard Smith081ad4d2017-01-24 19:39:46 +00001001.. option:: -iwithprefix<dir>, --include-with-prefix <arg>, --include-with-prefix-after <arg>, --include-with-prefix-after=<arg>, --include-with-prefix=<arg>
1002
1003Set directory to SYSTEM include search path with prefix
1004
Richard Smith081ad4d2017-01-24 19:39:46 +00001005.. option:: -iwithprefixbefore<dir>, --include-with-prefix-before <arg>, --include-with-prefix-before=<arg>
1006
1007Set directory to include search path with prefix
1008
Richard Smith081ad4d2017-01-24 19:39:46 +00001009.. option:: -iwithsysroot<directory>
1010
1011Add directory to SYSTEM include search path, absolute paths are relative to -isysroot
1012
Richard Smith081ad4d2017-01-24 19:39:46 +00001013.. option:: --ptxas-path=<arg>
1014
1015Path to ptxas (used for compiling CUDA code)
1016
Richard Smith081ad4d2017-01-24 19:39:46 +00001017.. option:: --system-header-prefix=<prefix>, --no-system-header-prefix=<prefix>, --system-header-prefix <arg>
1018
1019Treat all #include paths starting with <prefix> as including a system header.
1020
1021Dependency file generation
Richard Smithc5b2e002017-01-27 02:08:37 +00001022--------------------------
Richard Smith081ad4d2017-01-24 19:39:46 +00001023
1024Flags controlling generation of a dependency file for ``make``-like build
1025systems.
1026
Richard Smith081ad4d2017-01-24 19:39:46 +00001027.. option:: -M, --dependencies
1028
1029Like -MD, but also implies -E and writes to stdout by default
1030
Richard Smith081ad4d2017-01-24 19:39:46 +00001031.. option:: -MD, --write-dependencies
1032
1033Write a depfile containing user and system headers
1034
Richard Smith081ad4d2017-01-24 19:39:46 +00001035.. option:: -MF<file>
1036
1037Write depfile output from -MMD, -MD, -MM, or -M to <file>
1038
Richard Smith081ad4d2017-01-24 19:39:46 +00001039.. option:: -MG, --print-missing-file-dependencies
1040
1041Add missing headers to depfile
1042
Richard Smith081ad4d2017-01-24 19:39:46 +00001043.. option:: -MJ<arg>
1044
1045Write a compilation database entry per input
1046
Richard Smith081ad4d2017-01-24 19:39:46 +00001047.. option:: -MM, --user-dependencies
1048
1049Like -MMD, but also implies -E and writes to stdout by default
1050
Richard Smith081ad4d2017-01-24 19:39:46 +00001051.. option:: -MMD, --write-user-dependencies
1052
1053Write a depfile containing user headers
1054
Richard Smith081ad4d2017-01-24 19:39:46 +00001055.. option:: -MP
1056
1057Create phony target for each dependency (other than main file)
1058
Richard Smith081ad4d2017-01-24 19:39:46 +00001059.. option:: -MQ<arg>
1060
1061Specify name of main file output to quote in depfile
1062
Richard Smith081ad4d2017-01-24 19:39:46 +00001063.. option:: -MT<arg>
1064
1065Specify name of main file output in depfile
1066
Richard Smith081ad4d2017-01-24 19:39:46 +00001067.. option:: -MV
1068
1069Use NMake/Jom format for the depfile
1070
1071Dumping preprocessor state
Richard Smithc5b2e002017-01-27 02:08:37 +00001072--------------------------
Richard Smith081ad4d2017-01-24 19:39:46 +00001073
1074Flags allowing the state of the preprocessor to be dumped in various ways.
1075
Richard Smith081ad4d2017-01-24 19:39:46 +00001076.. option:: -d
1077
Richard Smithb2c82a62017-01-27 01:54:42 +00001078.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001079.. option:: -d<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001080.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001081
Richard Smith081ad4d2017-01-24 19:39:46 +00001082.. option:: -dA
1083
Richard Smith081ad4d2017-01-24 19:39:46 +00001084.. option:: -dD
1085
1086Print macro definitions in -E mode in addition to normal output
1087
Richard Smith081ad4d2017-01-24 19:39:46 +00001088.. option:: -dI
1089
1090Print include directives in -E mode in addition to normal output
1091
Richard Smith081ad4d2017-01-24 19:39:46 +00001092.. option:: -dM
1093
1094Print macro definitions in -E mode instead of normal output
1095
1096Diagnostic flags
1097~~~~~~~~~~~~~~~~
1098
1099Flags controlling which warnings, errors, and remarks Clang will generate.
1100See the :doc:`full list of warning and remark flags <DiagnosticsReference>`.
1101
Richard Smith081ad4d2017-01-24 19:39:46 +00001102.. option:: -R<remark>
1103
1104Enable the specified remark
1105
Richard Smith081ad4d2017-01-24 19:39:46 +00001106.. option:: -Rpass-analysis=<arg>
1107
1108Report transformation analysis from optimization passes whose name matches the given POSIX regular expression
1109
Richard Smith081ad4d2017-01-24 19:39:46 +00001110.. option:: -Rpass-missed=<arg>
1111
1112Report missed transformations by optimization passes whose name matches the given POSIX regular expression
1113
Richard Smith081ad4d2017-01-24 19:39:46 +00001114.. option:: -Rpass=<arg>
1115
1116Report transformations performed by optimization passes whose name matches the given POSIX regular expression
1117
Richard Smith081ad4d2017-01-24 19:39:46 +00001118.. option:: -W<warning>, --extra-warnings, --warn-<arg>, --warn-=<arg>
1119
1120Enable the specified warning
1121
Richard Smith081ad4d2017-01-24 19:39:46 +00001122.. option:: -Wdeprecated, -Wno-deprecated
1123
Richard Smithc5b2e002017-01-27 02:08:37 +00001124Enable warnings for deprecated constructs and define \_\_DEPRECATED
Richard Smith081ad4d2017-01-24 19:39:46 +00001125
Richard Smith081ad4d2017-01-24 19:39:46 +00001126.. option:: -Wnonportable-cfstrings<arg>, -Wno-nonportable-cfstrings<arg>
1127
Richard Smith081ad4d2017-01-24 19:39:46 +00001128Target-independent compilation options
1129~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Richard Smith081ad4d2017-01-24 19:39:46 +00001130.. option:: -Wframe-larger-than=<arg>
1131
Richard Smith081ad4d2017-01-24 19:39:46 +00001132.. option:: -fPIC, -fno-PIC
1133
Richard Smith081ad4d2017-01-24 19:39:46 +00001134.. option:: -fPIE, -fno-PIE
1135
Richard Smith081ad4d2017-01-24 19:39:46 +00001136.. option:: -faccess-control, -fno-access-control
1137
Richard Smithb2c82a62017-01-27 01:54:42 +00001138.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001139.. option:: -faligned-allocation, -faligned-new, -fno-aligned-allocation
Richard Smithb2c82a62017-01-27 01:54:42 +00001140.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001141
1142Enable C++17 aligned allocation functions
1143
Craig Topperd23254a2017-07-20 17:52:48 +00001144.. option:: -fallow-editor-placeholders, -fno-allow-editor-placeholders
1145
1146Treat editor placeholders as valid source code
1147
Richard Smith081ad4d2017-01-24 19:39:46 +00001148.. option:: -fallow-unsupported
1149
Richard Smith78e23fd2017-04-13 22:39:49 +00001150.. option:: -faltivec, -fno-altivec
Richard Smith081ad4d2017-01-24 19:39:46 +00001151
Richard Smith081ad4d2017-01-24 19:39:46 +00001152.. option:: -fansi-escape-codes
1153
1154Use ANSI escape codes for diagnostics
1155
Richard Smith081ad4d2017-01-24 19:39:46 +00001156.. option:: -fapple-kext, -findirect-virtual-calls, -fterminated-vtables
1157
1158Use Apple's kernel extensions ABI
1159
Richard Smith081ad4d2017-01-24 19:39:46 +00001160.. option:: -fapple-pragma-pack, -fno-apple-pragma-pack
1161
1162Enable Apple gcc-compatible #pragma pack handling
1163
Richard Smith081ad4d2017-01-24 19:39:46 +00001164.. option:: -fapplication-extension, -fno-application-extension
1165
1166Restrict code to those available for App Extensions
1167
Richard Smith081ad4d2017-01-24 19:39:46 +00001168.. option:: -fasm, -fno-asm
1169
Richard Smith081ad4d2017-01-24 19:39:46 +00001170.. option:: -fasm-blocks, -fno-asm-blocks
1171
Richard Smith081ad4d2017-01-24 19:39:46 +00001172.. option:: -fassociative-math, -fno-associative-math
1173
Richard Smith081ad4d2017-01-24 19:39:46 +00001174.. option:: -fassume-sane-operator-new, -fno-assume-sane-operator-new
1175
Richard Smith081ad4d2017-01-24 19:39:46 +00001176.. option:: -fast
1177
Richard Smith081ad4d2017-01-24 19:39:46 +00001178.. option:: -fastcp
1179
Richard Smith081ad4d2017-01-24 19:39:46 +00001180.. option:: -fastf
1181
Richard Smith081ad4d2017-01-24 19:39:46 +00001182.. option:: -fasynchronous-unwind-tables, -fno-asynchronous-unwind-tables
1183
Richard Smith081ad4d2017-01-24 19:39:46 +00001184.. option:: -fautolink, -fno-autolink
1185
Richard Smith081ad4d2017-01-24 19:39:46 +00001186.. option:: -fblocks, -fno-blocks
1187
1188Enable the 'blocks' language feature
1189
Richard Smith081ad4d2017-01-24 19:39:46 +00001190.. option:: -fbootclasspath=<arg>, --bootclasspath <arg>, --bootclasspath=<arg>
1191
Richard Smith081ad4d2017-01-24 19:39:46 +00001192.. option:: -fborland-extensions, -fno-borland-extensions
1193
1194Accept non-standard constructs supported by the Borland compiler
1195
Richard Smith081ad4d2017-01-24 19:39:46 +00001196.. option:: -fbracket-depth=<arg>
1197
Richard Smith081ad4d2017-01-24 19:39:46 +00001198.. option:: -fbuiltin, -fno-builtin
1199
Richard Smith081ad4d2017-01-24 19:39:46 +00001200.. option:: -fbuiltin-module-map
1201
1202Load the clang builtins module map file.
1203
Richard Smith081ad4d2017-01-24 19:39:46 +00001204.. option:: -fcaret-diagnostics, -fno-caret-diagnostics
1205
Craig Topper596527b2018-01-23 18:40:15 +00001206.. option:: -fcf-protection=<arg>, -fcf-protection (equivalent to -fcf-protection=full)
1207
1208Instrument control-flow architecture protection. Options: return, branch, full, none.
1209
Richard Smith081ad4d2017-01-24 19:39:46 +00001210.. option:: -fclasspath=<arg>, --CLASSPATH <arg>, --CLASSPATH=<arg>, --classpath <arg>, --classpath=<arg>
1211
Richard Smith081ad4d2017-01-24 19:39:46 +00001212.. option:: -fcolor-diagnostics, -fno-color-diagnostics
1213
1214Use colors in diagnostics
1215
Richard Smith081ad4d2017-01-24 19:39:46 +00001216.. option:: -fcommon, -fno-common
1217
Richard Smith081ad4d2017-01-24 19:39:46 +00001218.. option:: -fcompile-resource=<arg>, --resource <arg>, --resource=<arg>
1219
Richard Smith081ad4d2017-01-24 19:39:46 +00001220.. option:: -fconstant-cfstrings, -fno-constant-cfstrings
1221
Richard Smith081ad4d2017-01-24 19:39:46 +00001222.. option:: -fconstant-string-class=<arg>
1223
Richard Smith081ad4d2017-01-24 19:39:46 +00001224.. option:: -fconstexpr-backtrace-limit=<arg>
1225
Richard Smith081ad4d2017-01-24 19:39:46 +00001226.. option:: -fconstexpr-depth=<arg>
1227
Richard Smith081ad4d2017-01-24 19:39:46 +00001228.. option:: -fconstexpr-steps=<arg>
1229
Richard Smith081ad4d2017-01-24 19:39:46 +00001230.. option:: -fcoroutines-ts, -fno-coroutines-ts
1231
1232Enable support for the C++ Coroutines TS
1233
Richard Smith081ad4d2017-01-24 19:39:46 +00001234.. option:: -fcoverage-mapping, -fno-coverage-mapping
1235
1236Generate coverage mapping to enable code coverage analysis
1237
Richard Smith081ad4d2017-01-24 19:39:46 +00001238.. option:: -fcreate-profile
1239
Richard Smith081ad4d2017-01-24 19:39:46 +00001240.. option:: -fcxx-exceptions, -fno-cxx-exceptions
1241
1242Enable C++ exceptions
1243
Richard Smith081ad4d2017-01-24 19:39:46 +00001244.. option:: -fcxx-modules, -fno-cxx-modules
1245
Richard Smith081ad4d2017-01-24 19:39:46 +00001246.. option:: -fdata-sections, -fno-data-sections
1247
1248Place each data in its own section (ELF Only)
1249
Richard Smith081ad4d2017-01-24 19:39:46 +00001250.. option:: -fdebug-info-for-profiling, -fno-debug-info-for-profiling
1251
1252Emit extra debug info to make sample profile more accurate.
1253
Richard Smith78e23fd2017-04-13 22:39:49 +00001254.. option:: -fdebug-macro, -fno-debug-macro
1255
1256Emit macro debug information
1257
Richard Smith081ad4d2017-01-24 19:39:46 +00001258.. option:: -fdebug-pass-arguments
1259
Richard Smith081ad4d2017-01-24 19:39:46 +00001260.. option:: -fdebug-pass-structure
1261
Richard Smith081ad4d2017-01-24 19:39:46 +00001262.. option:: -fdebug-prefix-map=<arg>
1263
1264remap file source paths in debug info
1265
Richard Smith081ad4d2017-01-24 19:39:46 +00001266.. option:: -fdebug-types-section, -fno-debug-types-section
1267
1268Place debug types in their own section (ELF Only)
1269
Richard Smith081ad4d2017-01-24 19:39:46 +00001270.. option:: -fdelayed-template-parsing, -fno-delayed-template-parsing
1271
1272Parse templated function definitions at the end of the translation unit
1273
Richard Smith081ad4d2017-01-24 19:39:46 +00001274.. option:: -fdenormal-fp-math=<arg>
1275
Richard Smith081ad4d2017-01-24 19:39:46 +00001276.. option:: -fdiagnostics-absolute-paths
1277
1278Print absolute paths in diagnostics
1279
Richard Smith081ad4d2017-01-24 19:39:46 +00001280.. option:: -fdiagnostics-color, -fno-diagnostics-color
1281
Richard Smithb2c82a62017-01-27 01:54:42 +00001282.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001283.. option:: -fdiagnostics-color=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001284.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001285
Craig Topperd23254a2017-07-20 17:52:48 +00001286.. option:: -fdiagnostics-hotness-threshold=<number>
1287
1288Prevent optimization remarks from being output if they do not have at least this profile count
1289
Richard Smith081ad4d2017-01-24 19:39:46 +00001290.. option:: -fdiagnostics-show-hotness, -fno-diagnostics-show-hotness
1291
1292Enable profile hotness information in diagnostic line
1293
Richard Smith081ad4d2017-01-24 19:39:46 +00001294.. option:: -fdiagnostics-show-note-include-stack, -fno-diagnostics-show-note-include-stack
1295
1296Display include stacks for diagnostic notes
1297
Richard Smith081ad4d2017-01-24 19:39:46 +00001298.. option:: -fdiagnostics-show-option, -fno-diagnostics-show-option
1299
1300Print option name with mappable diagnostics
1301
Richard Smith081ad4d2017-01-24 19:39:46 +00001302.. option:: -fdiagnostics-show-template-tree
1303
1304Print a template comparison tree for differing templates
1305
Richard Smith081ad4d2017-01-24 19:39:46 +00001306.. option:: -fdollars-in-identifiers, -fno-dollars-in-identifiers
1307
1308Allow '$' in identifiers
1309
Craig Topper16418662017-11-20 18:07:43 +00001310.. option:: -fdouble-square-bracket-attributes, -fno-double-square-bracket-attributes
1311
1312Enable '\[\[\]\]' attributes in all C and C++ language modes
1313
Richard Smith081ad4d2017-01-24 19:39:46 +00001314.. option:: -fdwarf-directory-asm, -fno-dwarf-directory-asm
1315
Craig Topper188252d2017-12-11 21:09:16 +00001316.. option:: -fdwarf-exceptions
1317
1318Use DWARF style exceptions
1319
Richard Smith081ad4d2017-01-24 19:39:46 +00001320.. option:: -felide-constructors, -fno-elide-constructors
1321
Richard Smith081ad4d2017-01-24 19:39:46 +00001322.. option:: -feliminate-unused-debug-symbols, -fno-eliminate-unused-debug-symbols
1323
Richard Smith081ad4d2017-01-24 19:39:46 +00001324.. option:: -fembed-bitcode=<option>, -fembed-bitcode (equivalent to -fembed-bitcode=all), -fembed-bitcode-marker (equivalent to -fembed-bitcode=marker)
1325
1326Embed LLVM bitcode (option: off, all, bitcode, marker)
1327
Richard Smith081ad4d2017-01-24 19:39:46 +00001328.. option:: -femit-all-decls
1329
1330Emit all declarations, even if unused
1331
Richard Smith081ad4d2017-01-24 19:39:46 +00001332.. option:: -femulated-tls, -fno-emulated-tls
1333
1334Use emutls functions to access thread\_local variables
1335
Richard Smith081ad4d2017-01-24 19:39:46 +00001336.. option:: -fencoding=<arg>, --encoding <arg>, --encoding=<arg>
1337
Richard Smith081ad4d2017-01-24 19:39:46 +00001338.. option:: -ferror-limit=<arg>
1339
Richard Smith081ad4d2017-01-24 19:39:46 +00001340.. option:: -fexceptions, -fno-exceptions
1341
1342Enable support for exception handling
1343
Richard Smith081ad4d2017-01-24 19:39:46 +00001344.. option:: -fexec-charset=<arg>
1345
Richard Smith081ad4d2017-01-24 19:39:46 +00001346.. option:: -fextdirs=<arg>, --extdirs <arg>, --extdirs=<arg>
1347
Richard Smith081ad4d2017-01-24 19:39:46 +00001348.. option:: -ffast-math, -fno-fast-math
1349
1350Allow aggressive, lossy floating-point optimizations
1351
Richard Smith081ad4d2017-01-24 19:39:46 +00001352.. option:: -ffinite-math-only, -fno-finite-math-only
1353
Richard Smith081ad4d2017-01-24 19:39:46 +00001354.. option:: -ffor-scope, -fno-for-scope
1355
Richard Smith081ad4d2017-01-24 19:39:46 +00001356.. option:: -ffp-contract=<arg>
1357
1358Form fused FP ops (e.g. FMAs): fast (everywhere) \| on (according to FP\_CONTRACT pragma, default) \| off (never fuse)
1359
Richard Smith081ad4d2017-01-24 19:39:46 +00001360.. option:: -ffreestanding
1361
1362Assert that the compilation takes place in a freestanding environment
1363
Richard Smith081ad4d2017-01-24 19:39:46 +00001364.. option:: -ffunction-sections, -fno-function-sections
1365
1366Place each function in its own section (ELF Only)
1367
Richard Smith081ad4d2017-01-24 19:39:46 +00001368.. option:: -fgnu-inline-asm, -fno-gnu-inline-asm
1369
Richard Smith081ad4d2017-01-24 19:39:46 +00001370.. option:: -fgnu-keywords, -fno-gnu-keywords
1371
1372Allow GNU-extension keywords regardless of language standard
1373
Richard Smith081ad4d2017-01-24 19:39:46 +00001374.. option:: -fgnu-runtime
1375
1376Generate output compatible with the standard GNU Objective-C runtime
1377
Richard Smith081ad4d2017-01-24 19:39:46 +00001378.. option:: -fgnu89-inline, -fno-gnu89-inline
1379
1380Use the gnu89 inline semantics
1381
Richard Smith081ad4d2017-01-24 19:39:46 +00001382.. option:: -fhonor-infinities, -fhonor-infinites, -fno-honor-infinities
1383
Richard Smith081ad4d2017-01-24 19:39:46 +00001384.. option:: -fhonor-nans, -fno-honor-nans
1385
Richard Smith081ad4d2017-01-24 19:39:46 +00001386.. option:: -fhosted
1387
Richard Smith081ad4d2017-01-24 19:39:46 +00001388.. option:: -fimplicit-module-maps, -fmodule-maps, -fno-implicit-module-maps
1389
1390Implicitly search the file system for module map files.
1391
Richard Smith081ad4d2017-01-24 19:39:46 +00001392.. option:: -fimplicit-modules, -fno-implicit-modules
1393
Richard Smith081ad4d2017-01-24 19:39:46 +00001394.. option:: -finput-charset=<arg>
1395
Craig Topper188252d2017-12-11 21:09:16 +00001396.. option:: -finstrument-function-entry-bare
1397
1398Instrument function entry only, after inlining, without arguments to the instrumentation call
1399
Richard Smith081ad4d2017-01-24 19:39:46 +00001400.. option:: -finstrument-functions
1401
1402Generate calls to instrument function entry and exit
1403
Craig Topper16418662017-11-20 18:07:43 +00001404.. option:: -finstrument-functions-after-inlining
1405
1406Like -finstrument-functions, but insert the calls after inlining
1407
Richard Smith081ad4d2017-01-24 19:39:46 +00001408.. option:: -fintegrated-as, -fno-integrated-as, -integrated-as
1409
1410Enable the integrated assembler
1411
Richard Smith081ad4d2017-01-24 19:39:46 +00001412.. option:: -fjump-tables, -fno-jump-tables
1413
Richard Smith081ad4d2017-01-24 19:39:46 +00001414.. option:: -flax-vector-conversions, -fno-lax-vector-conversions
1415
Richard Smith081ad4d2017-01-24 19:39:46 +00001416.. option:: -flimited-precision=<arg>
1417
Richard Smith081ad4d2017-01-24 19:39:46 +00001418.. option:: -flto, -fno-lto
1419
1420Enable LTO in 'full' mode
1421
Richard Smith081ad4d2017-01-24 19:39:46 +00001422.. option:: -flto-jobs=<arg>
1423
1424Controls the backend parallelism of -flto=thin (default of 0 means the number of threads will be derived from the number of CPUs detected)
1425
Richard Smithb2c82a62017-01-27 01:54:42 +00001426.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001427.. option:: -flto=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001428.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001429
1430Set LTO mode to either 'full' or 'thin'
1431
Richard Smith081ad4d2017-01-24 19:39:46 +00001432.. option:: -fmacro-backtrace-limit=<arg>
1433
Richard Smith081ad4d2017-01-24 19:39:46 +00001434.. option:: -fmath-errno, -fno-math-errno
1435
1436Require math functions to indicate errors by setting errno
1437
Richard Smith081ad4d2017-01-24 19:39:46 +00001438.. option:: -fmax-type-align=<arg>
1439
1440Specify the maximum alignment to enforce on pointers lacking an explicit alignment
1441
Richard Smith081ad4d2017-01-24 19:39:46 +00001442.. option:: -fmerge-all-constants, -fno-merge-all-constants
1443
Richard Smith081ad4d2017-01-24 19:39:46 +00001444.. option:: -fmessage-length=<arg>
1445
Richard Smith081ad4d2017-01-24 19:39:46 +00001446.. option:: -fmodule-file-deps, -fno-module-file-deps
1447
Richard Smith081ad4d2017-01-24 19:39:46 +00001448.. option:: -fmodule-map-file=<file>
1449
1450Load this module map file
1451
Richard Smith081ad4d2017-01-24 19:39:46 +00001452.. option:: -fmodule-name=<name>, -fmodule-implementation-of <arg>, -fmodule-name <arg>
1453
1454Specify the name of the module to build
1455
Richard Smith081ad4d2017-01-24 19:39:46 +00001456.. option:: -fmodules, -fno-modules
1457
1458Enable the 'modules' language feature
1459
Richard Smith081ad4d2017-01-24 19:39:46 +00001460.. option:: -fmodules-decluse, -fno-modules-decluse
1461
1462Require declaration of modules used within a module
1463
Richard Smith081ad4d2017-01-24 19:39:46 +00001464.. option:: -fmodules-ignore-macro=<arg>
1465
1466Ignore the definition of the given macro when building and loading modules
1467
Richard Smith081ad4d2017-01-24 19:39:46 +00001468.. option:: -fmodules-search-all, -fno-modules-search-all
1469
1470Search even non-imported modules to resolve references
1471
Richard Smith081ad4d2017-01-24 19:39:46 +00001472.. option:: -fmodules-strict-decluse
1473
1474Like -fmodules-decluse but requires all headers to be in modules
1475
Richard Smith081ad4d2017-01-24 19:39:46 +00001476.. option:: -fmodules-ts
1477
1478Enable support for the C++ Modules TS
1479
Richard Smith081ad4d2017-01-24 19:39:46 +00001480.. option:: -fms-compatibility, -fno-ms-compatibility
1481
1482Enable full Microsoft Visual C++ compatibility
1483
Richard Smith081ad4d2017-01-24 19:39:46 +00001484.. option:: -fms-compatibility-version=<arg>
1485
1486Dot-separated value representing the Microsoft compiler version number to report in \_MSC\_VER (0 = don't define it (default))
1487
Richard Smith081ad4d2017-01-24 19:39:46 +00001488.. option:: -fms-extensions, -fno-ms-extensions
1489
1490Accept some non-standard constructs supported by the Microsoft compiler
1491
Richard Smith081ad4d2017-01-24 19:39:46 +00001492.. option:: -fms-memptr-rep=<arg>
1493
Richard Smith081ad4d2017-01-24 19:39:46 +00001494.. option:: -fms-volatile<arg>
1495
Richard Smith081ad4d2017-01-24 19:39:46 +00001496.. option:: -fmsc-version=<arg>
1497
1498Microsoft compiler version number to report in \_MSC\_VER (0 = don't define it (default))
1499
Richard Smith081ad4d2017-01-24 19:39:46 +00001500.. option:: -fmudflap
1501
Richard Smith081ad4d2017-01-24 19:39:46 +00001502.. option:: -fmudflapth
1503
Richard Smith081ad4d2017-01-24 19:39:46 +00001504.. option:: -fnested-functions
1505
Richard Smith081ad4d2017-01-24 19:39:46 +00001506.. option:: -fnew-alignment=<align>, -fnew-alignment <arg>
1507
1508Specifies the largest alignment guaranteed by '::operator new(size\_t)'
1509
Richard Smith081ad4d2017-01-24 19:39:46 +00001510.. option:: -fnext-runtime
1511
Richard Smith081ad4d2017-01-24 19:39:46 +00001512.. option:: -fno-builtin-<arg>
1513
1514Disable implicit builtin knowledge of a specific function
1515
Richard Smith081ad4d2017-01-24 19:39:46 +00001516.. option:: -fno-elide-type
1517
1518Do not elide types when printing diagnostics
1519
Richard Smith081ad4d2017-01-24 19:39:46 +00001520.. option:: -fno-max-type-align
1521
Richard Smith081ad4d2017-01-24 19:39:46 +00001522.. option:: -fno-operator-names
1523
1524Do not treat C++ operator name keywords as synonyms for operators
1525
Richard Smith081ad4d2017-01-24 19:39:46 +00001526.. option:: -fno-strict-modules-decluse
1527
Richard Smith081ad4d2017-01-24 19:39:46 +00001528.. option:: -fno-working-directory
1529
Richard Smith081ad4d2017-01-24 19:39:46 +00001530.. option:: -fobjc-abi-version=<arg>
1531
Richard Smith081ad4d2017-01-24 19:39:46 +00001532.. option:: -fobjc-arc, -fno-objc-arc
1533
1534Synthesize retain and release calls for Objective-C pointers
1535
Richard Smith081ad4d2017-01-24 19:39:46 +00001536.. option:: -fobjc-arc-exceptions, -fno-objc-arc-exceptions
1537
1538Use EH-safe code when synthesizing retains and releases in -fobjc-arc
1539
Richard Smith081ad4d2017-01-24 19:39:46 +00001540.. option:: -fobjc-exceptions, -fno-objc-exceptions
1541
1542Enable Objective-C exceptions
1543
Richard Smith081ad4d2017-01-24 19:39:46 +00001544.. option:: -fobjc-infer-related-result-type, -fno-objc-infer-related-result-type
1545
Richard Smith081ad4d2017-01-24 19:39:46 +00001546.. option:: -fobjc-legacy-dispatch, -fno-objc-legacy-dispatch
1547
Richard Smith081ad4d2017-01-24 19:39:46 +00001548.. option:: -fobjc-link-runtime
1549
Richard Smith081ad4d2017-01-24 19:39:46 +00001550.. option:: -fobjc-nonfragile-abi, -fno-objc-nonfragile-abi
1551
Richard Smith081ad4d2017-01-24 19:39:46 +00001552.. option:: -fobjc-nonfragile-abi-version=<arg>
1553
Richard Smith081ad4d2017-01-24 19:39:46 +00001554.. option:: -fobjc-runtime=<arg>
1555
1556Specify the target Objective-C runtime kind and version
1557
Richard Smith081ad4d2017-01-24 19:39:46 +00001558.. option:: -fobjc-sender-dependent-dispatch
1559
Richard Smith081ad4d2017-01-24 19:39:46 +00001560.. option:: -fobjc-weak, -fno-objc-weak
1561
1562Enable ARC-style weak references in Objective-C
1563
Richard Smith081ad4d2017-01-24 19:39:46 +00001564.. option:: -fomit-frame-pointer, -fno-omit-frame-pointer
1565
Richard Smith081ad4d2017-01-24 19:39:46 +00001566.. option:: -fopenmp, -fno-openmp
1567
Jonas Hahnfelda180fc42018-02-22 17:10:28 +00001568Parse OpenMP pragmas and generate parallel code.
Boris Kolpackovb150d242017-08-30 09:15:53 +00001569
Craig Topper287c8012018-01-03 18:29:12 +00001570.. option:: -fopenmp-simd, -fno-openmp-simd
1571
1572Emit OpenMP code only for SIMD-based constructs.
1573
Richard Smith081ad4d2017-01-24 19:39:46 +00001574.. option:: -fopenmp-version=<arg>
1575
Richard Smithb2c82a62017-01-27 01:54:42 +00001576.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001577.. option:: -fopenmp=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001578.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001579
Richard Smith081ad4d2017-01-24 19:39:46 +00001580.. option:: -foperator-arrow-depth=<arg>
1581
Richard Smith081ad4d2017-01-24 19:39:46 +00001582.. option:: -foptimization-record-file=<arg>
1583
1584Specify the file name of any generated YAML optimization record
1585
Richard Smith081ad4d2017-01-24 19:39:46 +00001586.. option:: -foptimize-sibling-calls, -fno-optimize-sibling-calls
1587
Richard Smith081ad4d2017-01-24 19:39:46 +00001588.. option:: -foutput-class-dir=<arg>, --output-class-directory <arg>, --output-class-directory=<arg>
1589
Richard Smith081ad4d2017-01-24 19:39:46 +00001590.. option:: -fpack-struct, -fno-pack-struct
1591
Richard Smithb2c82a62017-01-27 01:54:42 +00001592.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001593.. option:: -fpack-struct=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001594.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001595
1596Specify the default maximum struct packing alignment
1597
Richard Smith081ad4d2017-01-24 19:39:46 +00001598.. option:: -fpascal-strings, -fno-pascal-strings, -mpascal-strings
1599
1600Recognize and construct Pascal-style string literals
1601
Richard Smith081ad4d2017-01-24 19:39:46 +00001602.. option:: -fpcc-struct-return
1603
1604Override the default ABI to return all structs on the stack
1605
Richard Smith081ad4d2017-01-24 19:39:46 +00001606.. option:: -fpch-preprocess
1607
Richard Smith081ad4d2017-01-24 19:39:46 +00001608.. option:: -fpic, -fno-pic
1609
Richard Smith081ad4d2017-01-24 19:39:46 +00001610.. option:: -fpie, -fno-pie
1611
Craig Topper16418662017-11-20 18:07:43 +00001612.. option:: -fplt, -fno-plt
1613
1614Use the PLT to make function calls
1615
Richard Smith081ad4d2017-01-24 19:39:46 +00001616.. option:: -fplugin=<dsopath>
1617
1618Load the named plugin (dynamic shared object)
1619
Richard Smith081ad4d2017-01-24 19:39:46 +00001620.. option:: -fpreserve-as-comments, -fno-preserve-as-comments
1621
Richard Smith081ad4d2017-01-24 19:39:46 +00001622.. option:: -fprofile-arcs, -fno-profile-arcs
1623
Richard Smith081ad4d2017-01-24 19:39:46 +00001624.. option:: -fprofile-dir=<arg>
1625
Richard Smith081ad4d2017-01-24 19:39:46 +00001626.. option:: -fprofile-generate, -fno-profile-generate
1627
1628Generate instrumented code to collect execution counts into default.profraw (overridden by LLVM\_PROFILE\_FILE env var)
1629
Richard Smithb2c82a62017-01-27 01:54:42 +00001630.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001631.. option:: -fprofile-generate=<directory>
Richard Smithb2c82a62017-01-27 01:54:42 +00001632.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001633
1634Generate instrumented code to collect execution counts into <directory>/default.profraw (overridden by LLVM\_PROFILE\_FILE env var)
1635
Richard Smith081ad4d2017-01-24 19:39:46 +00001636.. option:: -fprofile-instr-generate, -fno-profile-instr-generate
1637
1638Generate instrumented code to collect execution counts into default.profraw file (overridden by '=' form of option or LLVM\_PROFILE\_FILE env var)
1639
Richard Smithb2c82a62017-01-27 01:54:42 +00001640.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001641.. option:: -fprofile-instr-generate=<file>
Richard Smithb2c82a62017-01-27 01:54:42 +00001642.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001643
1644Generate instrumented code to collect execution counts into <file> (overridden by LLVM\_PROFILE\_FILE env var)
1645
Richard Smith081ad4d2017-01-24 19:39:46 +00001646.. option:: -fprofile-instr-use, -fno-profile-instr-use, -fprofile-use
1647
Richard Smithb2c82a62017-01-27 01:54:42 +00001648.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001649.. option:: -fprofile-instr-use=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001650.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001651
1652Use instrumentation data for profile-guided optimization
1653
Boris Kolpackovb150d242017-08-30 09:15:53 +00001654.. option:: -fprofile-sample-accurate, -fauto-profile-accurate, -fno-profile-sample-accurate
1655
1656Specifies that the sample profile is accurate. If the sample
1657 profile is accurate, callsites without profile samples are marked
1658 as cold. Otherwise, treat callsites without profile samples as if
1659 we have no profile
1660
Richard Smith78e23fd2017-04-13 22:39:49 +00001661.. option:: -fprofile-sample-use, -fauto-profile, -fno-profile-sample-use
1662
1663.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001664.. option:: -fprofile-sample-use=<arg>, -fauto-profile=<arg>
Richard Smith78e23fd2017-04-13 22:39:49 +00001665.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001666
1667Enable sample-based profile guided optimizations
1668
Richard Smithb2c82a62017-01-27 01:54:42 +00001669.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001670.. option:: -fprofile-use=<pathname>
Richard Smithb2c82a62017-01-27 01:54:42 +00001671.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001672
1673Use instrumentation data for profile-guided optimization. If pathname is a directory, it reads from <pathname>/default.profdata. Otherwise, it reads from file <pathname>.
1674
Richard Smith081ad4d2017-01-24 19:39:46 +00001675.. option:: -freciprocal-math, -fno-reciprocal-math
1676
1677Allow division operations to be reassociated
1678
Richard Smith081ad4d2017-01-24 19:39:46 +00001679.. option:: -freg-struct-return
1680
1681Override the default ABI to return small structs in registers
1682
Richard Smith081ad4d2017-01-24 19:39:46 +00001683.. option:: -frelaxed-template-template-args, -fno-relaxed-template-template-args
1684
1685Enable C++17 relaxed template template argument matching
1686
Richard Smith081ad4d2017-01-24 19:39:46 +00001687.. option:: -freroll-loops, -fno-reroll-loops
1688
1689Turn on loop reroller
1690
Richard Smith081ad4d2017-01-24 19:39:46 +00001691.. option:: -fretain-comments-from-system-headers
1692
Craig Topperd23254a2017-07-20 17:52:48 +00001693.. option:: -frewrite-imports, -fno-rewrite-imports
1694
Richard Smith081ad4d2017-01-24 19:39:46 +00001695.. option:: -frewrite-includes, -fno-rewrite-includes
1696
Richard Smith081ad4d2017-01-24 19:39:46 +00001697.. option:: -frewrite-map-file <arg>
1698
Richard Smithb2c82a62017-01-27 01:54:42 +00001699.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001700.. option:: -frewrite-map-file=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001701.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001702
Richard Smith081ad4d2017-01-24 19:39:46 +00001703.. option:: -fropi, -fno-ropi
1704
Richard Smith081ad4d2017-01-24 19:39:46 +00001705.. option:: -frtti, -fno-rtti
1706
Richard Smith081ad4d2017-01-24 19:39:46 +00001707.. option:: -frwpi, -fno-rwpi
1708
Richard Smith081ad4d2017-01-24 19:39:46 +00001709.. option:: -fsave-optimization-record, -fno-save-optimization-record
1710
1711Generate a YAML optimization record file
1712
Craig Topper188252d2017-12-11 21:09:16 +00001713.. option:: -fseh-exceptions
1714
1715Use SEH style exceptions
1716
Richard Smith081ad4d2017-01-24 19:39:46 +00001717.. option:: -fshort-enums, -fno-short-enums
1718
1719Allocate to an enum type only as many bytes as it needs for the declared range of possible values
1720
Richard Smith081ad4d2017-01-24 19:39:46 +00001721.. option:: -fshort-wchar, -fno-short-wchar
1722
1723Force wchar\_t to be a short unsigned int
1724
Richard Smith081ad4d2017-01-24 19:39:46 +00001725.. option:: -fshow-column, -fno-show-column
1726
Richard Smith081ad4d2017-01-24 19:39:46 +00001727.. option:: -fshow-overloads=<arg>
1728
1729Which overload candidates to show when overload resolution fails: best\|all; defaults to all
1730
Richard Smith081ad4d2017-01-24 19:39:46 +00001731.. option:: -fshow-source-location, -fno-show-source-location
1732
Richard Smith081ad4d2017-01-24 19:39:46 +00001733.. option:: -fsignaling-math, -fno-signaling-math
1734
Richard Smith081ad4d2017-01-24 19:39:46 +00001735.. option:: -fsigned-bitfields
1736
Richard Smith081ad4d2017-01-24 19:39:46 +00001737.. option:: -fsigned-char, -fno-signed-char, --signed-char
1738
Richard Smith081ad4d2017-01-24 19:39:46 +00001739.. option:: -fsigned-zeros, -fno-signed-zeros
1740
Richard Smith081ad4d2017-01-24 19:39:46 +00001741.. option:: -fsized-deallocation, -fno-sized-deallocation
1742
1743Enable C++14 sized global deallocation functions
1744
Richard Smith081ad4d2017-01-24 19:39:46 +00001745.. option:: -fsjlj-exceptions
1746
1747Use SjLj style exceptions
1748
Richard Smith081ad4d2017-01-24 19:39:46 +00001749.. option:: -fslp-vectorize, -fno-slp-vectorize, -ftree-slp-vectorize
1750
1751Enable the superword-level parallelism vectorization passes
1752
Richard Smith081ad4d2017-01-24 19:39:46 +00001753.. option:: -fspell-checking, -fno-spell-checking
1754
Richard Smith081ad4d2017-01-24 19:39:46 +00001755.. option:: -fspell-checking-limit=<arg>
1756
Richard Smith081ad4d2017-01-24 19:39:46 +00001757.. option:: -fsplit-dwarf-inlining, -fno-split-dwarf-inlining
1758
Jonas Hahnfelda180fc42018-02-22 17:10:28 +00001759Provide minimal debug info in the object/executable to facilitate online symbolication/stack traces in the absence of .dwo/.dwp files when using Split DWARF
Richard Smith081ad4d2017-01-24 19:39:46 +00001760
Richard Smith081ad4d2017-01-24 19:39:46 +00001761.. option:: -fsplit-stack
1762
Richard Smith081ad4d2017-01-24 19:39:46 +00001763.. option:: -fstack-protector, -fno-stack-protector
1764
1765Enable stack protectors for functions potentially vulnerable to stack smashing
1766
Richard Smith081ad4d2017-01-24 19:39:46 +00001767.. option:: -fstack-protector-all
1768
1769Force the usage of stack protectors for all functions
1770
Richard Smith081ad4d2017-01-24 19:39:46 +00001771.. option:: -fstack-protector-strong
1772
1773Use a strong heuristic to apply stack protectors to functions
1774
Craig Topper596527b2018-01-23 18:40:15 +00001775.. option:: -fstack-size-section, -fno-stack-size-section
1776
1777Emit section containing metadata on function stack sizes
1778
Richard Smith081ad4d2017-01-24 19:39:46 +00001779.. option:: -fstandalone-debug, -fno-limit-debug-info, -fno-standalone-debug
1780
1781Emit full debug info for all types used by the program
1782
Richard Smith081ad4d2017-01-24 19:39:46 +00001783.. option:: -fstrict-aliasing, -fno-strict-aliasing
1784
Richard Smith081ad4d2017-01-24 19:39:46 +00001785.. option:: -fstrict-enums, -fno-strict-enums
1786
1787Enable optimizations based on the strict definition of an enum's value range
1788
Richard Smith081ad4d2017-01-24 19:39:46 +00001789.. option:: -fstrict-overflow, -fno-strict-overflow
1790
Richard Smith081ad4d2017-01-24 19:39:46 +00001791.. option:: -fstrict-return, -fno-strict-return
1792
Richard Smith78e23fd2017-04-13 22:39:49 +00001793Always treat control flow paths that fall off the end of a non-void function as unreachable
Richard Smith081ad4d2017-01-24 19:39:46 +00001794
Richard Smith081ad4d2017-01-24 19:39:46 +00001795.. option:: -fstrict-vtable-pointers, -fno-strict-vtable-pointers
1796
1797Enable optimizations based on the strict rules for overwriting polymorphic C++ objects
1798
Richard Smith081ad4d2017-01-24 19:39:46 +00001799.. option:: -fstruct-path-tbaa, -fno-struct-path-tbaa
1800
Richard Smith081ad4d2017-01-24 19:39:46 +00001801.. option:: -ftabstop=<arg>
1802
Richard Smith081ad4d2017-01-24 19:39:46 +00001803.. option:: -ftemplate-backtrace-limit=<arg>
1804
Richard Smith081ad4d2017-01-24 19:39:46 +00001805.. option:: -ftemplate-depth-<arg>
1806
Richard Smith081ad4d2017-01-24 19:39:46 +00001807.. option:: -ftemplate-depth=<arg>
1808
Richard Smith081ad4d2017-01-24 19:39:46 +00001809.. option:: -ftest-coverage
1810
Richard Smith081ad4d2017-01-24 19:39:46 +00001811.. option:: -fthinlto-index=<arg>
1812
1813Perform ThinLTO importing using provided function summary index
1814
Richard Smith081ad4d2017-01-24 19:39:46 +00001815.. option:: -fthreadsafe-statics, -fno-threadsafe-statics
1816
Richard Smith081ad4d2017-01-24 19:39:46 +00001817.. option:: -ftime-report
1818
Richard Smith081ad4d2017-01-24 19:39:46 +00001819.. option:: -ftls-model=<arg>
1820
Richard Smith081ad4d2017-01-24 19:39:46 +00001821.. option:: -ftrap-function=<arg>
1822
1823Issue call to specified function rather than a trap instruction
1824
Richard Smith081ad4d2017-01-24 19:39:46 +00001825.. option:: -ftrapping-math, -fno-trapping-math
1826
Richard Smith081ad4d2017-01-24 19:39:46 +00001827.. option:: -ftrapv
1828
1829Trap on integer overflow
1830
Richard Smith081ad4d2017-01-24 19:39:46 +00001831.. option:: -ftrapv-handler <arg>
1832
Richard Smithb2c82a62017-01-27 01:54:42 +00001833.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001834.. option:: -ftrapv-handler=<function name>
Richard Smithb2c82a62017-01-27 01:54:42 +00001835.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001836
1837Specify the function to be called on overflow
1838
Richard Smith081ad4d2017-01-24 19:39:46 +00001839.. option:: -ftrigraphs, -fno-trigraphs, -trigraphs, --trigraphs
1840
1841Process trigraph sequences
1842
Richard Smith081ad4d2017-01-24 19:39:46 +00001843.. option:: -funique-section-names, -fno-unique-section-names
1844
1845Use unique names for text and data sections (ELF Only)
1846
Richard Smith081ad4d2017-01-24 19:39:46 +00001847.. option:: -funit-at-a-time, -fno-unit-at-a-time
1848
Richard Smith081ad4d2017-01-24 19:39:46 +00001849.. option:: -funroll-loops, -fno-unroll-loops
1850
1851Turn on loop unroller
1852
Richard Smith081ad4d2017-01-24 19:39:46 +00001853.. option:: -funsafe-math-optimizations, -fno-unsafe-math-optimizations
1854
Richard Smith081ad4d2017-01-24 19:39:46 +00001855.. option:: -funsigned-bitfields
1856
Richard Smith081ad4d2017-01-24 19:39:46 +00001857.. option:: -funsigned-char, -fno-unsigned-char, --unsigned-char
1858
Richard Smith081ad4d2017-01-24 19:39:46 +00001859.. option:: -funwind-tables, -fno-unwind-tables
1860
Richard Smith081ad4d2017-01-24 19:39:46 +00001861.. option:: -fuse-cxa-atexit, -fno-use-cxa-atexit
1862
Richard Smith081ad4d2017-01-24 19:39:46 +00001863.. option:: -fuse-init-array, -fno-use-init-array
1864
1865Use .init\_array instead of .ctors
1866
Richard Smith081ad4d2017-01-24 19:39:46 +00001867.. option:: -fuse-ld=<arg>
1868
Richard Smith081ad4d2017-01-24 19:39:46 +00001869.. option:: -fuse-line-directives, -fno-use-line-directives
1870
Richard Smith081ad4d2017-01-24 19:39:46 +00001871.. option:: -fveclib=<arg>
1872
1873Use the given vector functions library
1874
Richard Smith081ad4d2017-01-24 19:39:46 +00001875.. option:: -fvectorize, -fno-vectorize, -ftree-vectorize
1876
1877Enable the loop vectorization passes
1878
Richard Smith081ad4d2017-01-24 19:39:46 +00001879.. option:: -fverbose-asm, -fno-verbose-asm
1880
Richard Smith081ad4d2017-01-24 19:39:46 +00001881.. option:: -fvisibility-inlines-hidden
1882
1883Give inline C++ member functions default visibility by default
1884
Richard Smith081ad4d2017-01-24 19:39:46 +00001885.. option:: -fvisibility-ms-compat
1886
1887Give global types 'default' visibility and global functions and variables 'hidden' visibility by default
1888
Richard Smith081ad4d2017-01-24 19:39:46 +00001889.. option:: -fvisibility=<arg>
1890
1891Set the default symbol visibility for all global declarations
1892
Richard Smith081ad4d2017-01-24 19:39:46 +00001893.. option:: -fwhole-program-vtables, -fno-whole-program-vtables
1894
1895Enables whole-program vtable optimization. Requires -flto
1896
Richard Smith081ad4d2017-01-24 19:39:46 +00001897.. option:: -fwrapv, -fno-wrapv
1898
1899Treat signed integer overflow as two's complement
1900
Richard Smith081ad4d2017-01-24 19:39:46 +00001901.. option:: -fwritable-strings
1902
1903Store string literals as writable data
1904
Craig Topper188252d2017-12-11 21:09:16 +00001905.. option:: -fxray-always-emit-customevents, -fno-xray-always-emit-customevents
1906
1907Determine whether to always emit \_\_xray\_customevent(...) calls even if the function it appears in is not always instrumented.
1908
Richard Smith78e23fd2017-04-13 22:39:49 +00001909.. option:: -fxray-always-instrument=<arg>
1910
1911Filename defining the whitelist for imbuing the 'always instrument' XRay attribute.
1912
Richard Smith081ad4d2017-01-24 19:39:46 +00001913.. option:: -fxray-instruction-threshold<arg>
1914
Richard Smithb2c82a62017-01-27 01:54:42 +00001915.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001916.. option:: -fxray-instruction-threshold=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001917.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001918
1919Sets the minimum function size to instrument with XRay
1920
Richard Smith081ad4d2017-01-24 19:39:46 +00001921.. option:: -fxray-instrument, -fno-xray-instrument
1922
1923Generate XRay instrumentation sleds on function entry and exit
1924
Richard Smith78e23fd2017-04-13 22:39:49 +00001925.. option:: -fxray-never-instrument=<arg>
1926
1927Filename defining the whitelist for imbuing the 'never instrument' XRay attribute.
1928
Richard Smith081ad4d2017-01-24 19:39:46 +00001929.. option:: -fzero-initialized-in-bss, -fno-zero-initialized-in-bss
1930
Richard Smith081ad4d2017-01-24 19:39:46 +00001931.. option:: -fzvector, -fno-zvector, -mzvector
1932
1933Enable System z vector language extension
1934
Richard Smith081ad4d2017-01-24 19:39:46 +00001935.. option:: -pedantic, --pedantic, -no-pedantic, --no-pedantic
1936
Richard Smith081ad4d2017-01-24 19:39:46 +00001937.. option:: -pedantic-errors, --pedantic-errors
1938
1939OpenCL flags
1940------------
Richard Smith081ad4d2017-01-24 19:39:46 +00001941.. option:: -cl-denorms-are-zero
1942
1943OpenCL only. Allow denormals to be flushed to zero.
1944
Richard Smith081ad4d2017-01-24 19:39:46 +00001945.. option:: -cl-fast-relaxed-math
1946
1947OpenCL only. Sets -cl-finite-math-only and -cl-unsafe-math-optimizations, and defines \_\_FAST\_RELAXED\_MATH\_\_.
1948
Richard Smith081ad4d2017-01-24 19:39:46 +00001949.. option:: -cl-finite-math-only
1950
1951OpenCL only. Allow floating-point optimizations that assume arguments and results are not NaNs or +-Inf.
1952
Richard Smith081ad4d2017-01-24 19:39:46 +00001953.. option:: -cl-fp32-correctly-rounded-divide-sqrt
1954
1955OpenCL only. Specify that single precision floating-point divide and sqrt used in the program source are correctly rounded.
1956
Richard Smith081ad4d2017-01-24 19:39:46 +00001957.. option:: -cl-kernel-arg-info
1958
1959OpenCL only. Generate kernel argument metadata.
1960
Richard Smith081ad4d2017-01-24 19:39:46 +00001961.. option:: -cl-mad-enable
1962
1963OpenCL only. Allow use of less precise MAD computations in the generated binary.
1964
Richard Smith081ad4d2017-01-24 19:39:46 +00001965.. option:: -cl-no-signed-zeros
1966
1967OpenCL only. Allow use of less precise no signed zeros computations in the generated binary.
1968
Richard Smith081ad4d2017-01-24 19:39:46 +00001969.. option:: -cl-opt-disable
1970
1971OpenCL only. This option disables all optimizations. By default optimizations are enabled.
1972
Richard Smith081ad4d2017-01-24 19:39:46 +00001973.. option:: -cl-single-precision-constant
1974
1975OpenCL only. Treat double precision floating-point constant as single precision constant.
1976
Richard Smith081ad4d2017-01-24 19:39:46 +00001977.. option:: -cl-std=<arg>
1978
1979OpenCL language standard to compile for.
1980
Richard Smith081ad4d2017-01-24 19:39:46 +00001981.. option:: -cl-strict-aliasing
1982
1983OpenCL only. This option is added for compatibility with OpenCL 1.0.
1984
Jonas Hahnfelda180fc42018-02-22 17:10:28 +00001985.. option:: -cl-uniform-work-group-size
1986
1987OpenCL only. Defines that the global work-size be a multiple of the work-group size specified to clEnqueueNDRangeKernel
1988
Richard Smith081ad4d2017-01-24 19:39:46 +00001989.. option:: -cl-unsafe-math-optimizations
1990
1991OpenCL only. Allow unsafe floating-point optimizations. Also implies -cl-no-signed-zeros and -cl-mad-enable.
1992
1993Target-dependent compilation options
1994~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Richard Smithc5b2e002017-01-27 02:08:37 +00001995.. option:: -G<size>, -G=<arg>, -msmall-data-threshold=<arg>
1996
1997Put objects of at most <size> bytes into small data section (MIPS / Hexagon)
1998
Richard Smith081ad4d2017-01-24 19:39:46 +00001999.. option:: -m16
2000
Richard Smith081ad4d2017-01-24 19:39:46 +00002001.. option:: -m32
2002
Richard Smith081ad4d2017-01-24 19:39:46 +00002003.. option:: -m64
2004
Richard Smith081ad4d2017-01-24 19:39:46 +00002005.. option:: -mabi=<arg>
2006
Richard Smith081ad4d2017-01-24 19:39:46 +00002007.. option:: -mabicalls, -mno-abicalls
2008
2009Enable SVR4-style position-independent code (Mips only)
2010
Boris Kolpackovb150d242017-08-30 09:15:53 +00002011.. option:: -mabs=<arg>
2012
Richard Smith081ad4d2017-01-24 19:39:46 +00002013.. option:: -malign-double
2014
2015Align doubles to two words in structs (x86 only)
2016
Richard Smith081ad4d2017-01-24 19:39:46 +00002017.. option:: -march=<arg>
2018
Richard Smith081ad4d2017-01-24 19:39:46 +00002019.. option:: -masm=<arg>
2020
Richard Smith081ad4d2017-01-24 19:39:46 +00002021.. option:: -mbackchain, -mno-backchain
2022
2023Link stack frames through backchain on System Z
2024
Richard Smith081ad4d2017-01-24 19:39:46 +00002025.. option:: -mcheck-zero-division, -mno-check-zero-division
2026
Richard Smith081ad4d2017-01-24 19:39:46 +00002027.. option:: -mcmodel=<arg>
2028
Richard Smith081ad4d2017-01-24 19:39:46 +00002029.. option:: -mcompact-branches=<arg>
2030
Richard Smith081ad4d2017-01-24 19:39:46 +00002031.. option:: -mconsole<arg>
2032
Craig Topper287c8012018-01-03 18:29:12 +00002033.. option:: -mcpu=<arg>, -mv4 (equivalent to -mcpu=hexagonv4), -mv5 (equivalent to -mcpu=hexagonv5), -mv55 (equivalent to -mcpu=hexagonv55), -mv60 (equivalent to -mcpu=hexagonv60), -mv62 (equivalent to -mcpu=hexagonv62), -mv65 (equivalent to -mcpu=hexagonv65)
Richard Smith081ad4d2017-01-24 19:39:46 +00002034
Craig Topperd23254a2017-07-20 17:52:48 +00002035.. option:: -mdefault-build-attributes<arg>, -mno-default-build-attributes<arg>
2036
Richard Smith081ad4d2017-01-24 19:39:46 +00002037.. option:: -mdll<arg>
2038
Richard Smith081ad4d2017-01-24 19:39:46 +00002039.. option:: -mdouble-float
2040
Richard Smith081ad4d2017-01-24 19:39:46 +00002041.. option:: -mdsp, -mno-dsp
2042
Richard Smith081ad4d2017-01-24 19:39:46 +00002043.. option:: -mdspr2, -mno-dspr2
2044
Richard Smith081ad4d2017-01-24 19:39:46 +00002045.. option:: -mdynamic-no-pic<arg>
2046
Richard Smith081ad4d2017-01-24 19:39:46 +00002047.. option:: -meabi <arg>
2048
2049Set EABI type, e.g. 4, 5 or gnu (default depends on triple)
2050
Boris Kolpackovb150d242017-08-30 09:15:53 +00002051.. option:: -membedded-data, -mno-embedded-data
2052
2053Place constants in the .rodata section instead of the .sdata section even if they meet the -G <size> threshold (MIPS)
2054
2055.. option:: -mextern-sdata, -mno-extern-sdata
2056
2057Assume that externally defined data is in the small data if it meets the -G <size> threshold (MIPS)
2058
Richard Smith78e23fd2017-04-13 22:39:49 +00002059.. option:: -mfentry
2060
2061Insert calls to fentry at function entry (x86 only)
2062
Richard Smith081ad4d2017-01-24 19:39:46 +00002063.. option:: -mfloat-abi=<arg>
2064
Richard Smith081ad4d2017-01-24 19:39:46 +00002065.. option:: -mfp32
2066
2067Use 32-bit floating point registers (MIPS only)
2068
Richard Smith081ad4d2017-01-24 19:39:46 +00002069.. option:: -mfp64
2070
2071Use 64-bit floating point registers (MIPS only)
2072
Richard Smith081ad4d2017-01-24 19:39:46 +00002073.. option:: -mfpmath=<arg>
2074
Richard Smith081ad4d2017-01-24 19:39:46 +00002075.. option:: -mfpu=<arg>
2076
Richard Smith081ad4d2017-01-24 19:39:46 +00002077.. option:: -mglobal-merge, -mno-global-merge
2078
2079Enable merging of globals
2080
Craig Topperd23254a2017-07-20 17:52:48 +00002081.. option:: -mgpopt, -mno-gpopt
2082
2083Use GP relative accesses for symbols known to be in a small data section (MIPS)
2084
Richard Smith081ad4d2017-01-24 19:39:46 +00002085.. option:: -mhard-float
2086
Richard Smith081ad4d2017-01-24 19:39:46 +00002087.. option:: -mhwdiv=<arg>, --mhwdiv <arg>, --mhwdiv=<arg>
2088
Richard Smith081ad4d2017-01-24 19:39:46 +00002089.. option:: -miamcu, -mno-iamcu
2090
2091Use Intel MCU ABI
2092
Richard Smith081ad4d2017-01-24 19:39:46 +00002093.. option:: -mimplicit-float, -mno-implicit-float
2094
Richard Smith081ad4d2017-01-24 19:39:46 +00002095.. option:: -mimplicit-it=<arg>
2096
Richard Smith081ad4d2017-01-24 19:39:46 +00002097.. option:: -mincremental-linker-compatible, -mno-incremental-linker-compatible
2098
2099(integrated-as) Emit an object file which can be used with an incremental linker
2100
Jonas Hahnfelda180fc42018-02-22 17:10:28 +00002101.. option:: -mindirect-jump=<arg>
2102
2103Change indirect jump instructions to inhibit speculation
2104
Richard Smith78e23fd2017-04-13 22:39:49 +00002105.. option:: -miphoneos-version-min=<arg>, -mios-version-min=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00002106
Richard Smith081ad4d2017-01-24 19:39:46 +00002107.. option:: -mips16
2108
Richard Smith081ad4d2017-01-24 19:39:46 +00002109.. option:: -mkernel
2110
Richard Smith081ad4d2017-01-24 19:39:46 +00002111.. option:: -mldc1-sdc1, -mno-ldc1-sdc1
2112
Boris Kolpackovb150d242017-08-30 09:15:53 +00002113.. option:: -mlocal-sdata, -mno-local-sdata
2114
2115Extend the -G behaviour to object local data (MIPS)
2116
Richard Smith081ad4d2017-01-24 19:39:46 +00002117.. option:: -mlong-calls, -mno-long-calls
2118
2119Generate branches with extended addressability, usually via indirect jumps.
2120
Craig Topperd23254a2017-07-20 17:52:48 +00002121.. option:: -mmacosx-version-min=<arg>, -mmacos-version-min=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00002122
2123Set Mac OS X deployment target
2124
Craig Topperd23254a2017-07-20 17:52:48 +00002125.. option:: -mmadd4, -mno-madd4
2126
2127Enable the generation of 4-operand madd.s, madd.d and related instructions.
2128
2129.. option:: -mmcu=<arg>
2130
Richard Smith081ad4d2017-01-24 19:39:46 +00002131.. option:: -mmicromips, -mno-micromips
2132
Richard Smith081ad4d2017-01-24 19:39:46 +00002133.. option:: -mms-bitfields, -mno-ms-bitfields
2134
2135Set the default structure layout to be compatible with the Microsoft compiler standard
2136
Richard Smith081ad4d2017-01-24 19:39:46 +00002137.. option:: -mmsa, -mno-msa
2138
2139Enable MSA ASE (MIPS only)
2140
Craig Topperd23254a2017-07-20 17:52:48 +00002141.. option:: -mmt, -mno-mt
2142
2143Enable MT ASE (MIPS only)
2144
Richard Smith081ad4d2017-01-24 19:39:46 +00002145.. option:: -mnan=<arg>
2146
Richard Smith081ad4d2017-01-24 19:39:46 +00002147.. option:: -mno-mips16
2148
Richard Smith081ad4d2017-01-24 19:39:46 +00002149.. option:: -momit-leaf-frame-pointer, -mno-omit-leaf-frame-pointer
2150
2151Omit frame pointer setup for leaf functions
2152
Richard Smith081ad4d2017-01-24 19:39:46 +00002153.. option:: -moslib=<arg>
2154
Richard Smith081ad4d2017-01-24 19:39:46 +00002155.. option:: -mpie-copy-relocations, -mno-pie-copy-relocations
2156
2157Use copy relocations support for PIE builds
2158
Craig Topper9a724aa2017-12-11 21:09:19 +00002159.. option:: -mprefer-vector-width=<arg>
2160
2161Specifies preferred vector width for auto-vectorization. Defaults to 'none' which allows target specific decisions.
2162
Richard Smith081ad4d2017-01-24 19:39:46 +00002163.. option:: -mqdsp6-compat
2164
2165Enable hexagon-qdsp6 backward compatibility
2166
Richard Smith081ad4d2017-01-24 19:39:46 +00002167.. option:: -mrecip
2168
Richard Smithb2c82a62017-01-27 01:54:42 +00002169.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00002170.. option:: -mrecip=<arg1>,<arg2>...
Richard Smithb2c82a62017-01-27 01:54:42 +00002171.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00002172
Richard Smith081ad4d2017-01-24 19:39:46 +00002173.. option:: -mred-zone, -mno-red-zone
2174
Richard Smith081ad4d2017-01-24 19:39:46 +00002175.. option:: -mregparm=<arg>
2176
Richard Smith081ad4d2017-01-24 19:39:46 +00002177.. option:: -mrelax-all, -mno-relax-all
2178
2179(integrated-as) Relax all machine instructions
2180
Richard Smith081ad4d2017-01-24 19:39:46 +00002181.. option:: -mrtd, -mno-rtd
2182
2183Make StdCall calling convention the default
2184
Richard Smith081ad4d2017-01-24 19:39:46 +00002185.. option:: -msingle-float
2186
Richard Smith081ad4d2017-01-24 19:39:46 +00002187.. option:: -msoft-float, -mno-soft-float
2188
2189Use software floating point
2190
Richard Smith081ad4d2017-01-24 19:39:46 +00002191.. option:: -mstack-alignment=<arg>
2192
2193Set the stack alignment
2194
Richard Smith081ad4d2017-01-24 19:39:46 +00002195.. option:: -mstack-probe-size=<arg>
2196
2197Set the stack probe size
2198
Hans Wennborgd43f40d2018-02-23 13:47:36 +00002199.. option:: -mstack-arg-probe, -mno-stack-arg-probe
2200
2201Disable stack probes
2202
Richard Smith081ad4d2017-01-24 19:39:46 +00002203.. option:: -mstackrealign, -mno-stackrealign
2204
2205Force realign the stack at entry to every function
2206
Richard Smith081ad4d2017-01-24 19:39:46 +00002207.. option:: -mthread-model <arg>
2208
2209The thread model to use, e.g. posix, single (posix by default)
2210
Richard Smith081ad4d2017-01-24 19:39:46 +00002211.. option:: -mthreads<arg>
2212
Richard Smith081ad4d2017-01-24 19:39:46 +00002213.. option:: -mthumb, -mno-thumb
2214
Richard Smith081ad4d2017-01-24 19:39:46 +00002215.. option:: -mtune=<arg>
2216
Richard Smith78e23fd2017-04-13 22:39:49 +00002217.. option:: -mtvos-version-min=<arg>, -mappletvos-version-min=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00002218
Richard Smith081ad4d2017-01-24 19:39:46 +00002219.. option:: -municode<arg>
2220
Richard Smith081ad4d2017-01-24 19:39:46 +00002221.. option:: -mvx, -mno-vx
2222
Richard Smith081ad4d2017-01-24 19:39:46 +00002223.. option:: -mwarn-nonportable-cfstrings, -mno-warn-nonportable-cfstrings
2224
Richard Smith78e23fd2017-04-13 22:39:49 +00002225.. option:: -mwatchos-version-min=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00002226
Richard Smith081ad4d2017-01-24 19:39:46 +00002227.. option:: -mwindows<arg>
2228
Richard Smith081ad4d2017-01-24 19:39:46 +00002229.. option:: -mx32
2230
Richard Smith081ad4d2017-01-24 19:39:46 +00002231.. option:: -mxgot, -mno-xgot
2232
2233AARCH64
2234-------
Richard Smith081ad4d2017-01-24 19:39:46 +00002235.. option:: -ffixed-x18
2236
2237Reserve the x18 register (AArch64 only)
2238
Richard Smith081ad4d2017-01-24 19:39:46 +00002239.. option:: -mfix-cortex-a53-835769, -mno-fix-cortex-a53-835769
2240
2241Workaround Cortex-A53 erratum 835769 (AArch64 only)
2242
Richard Smith081ad4d2017-01-24 19:39:46 +00002243.. option:: -mgeneral-regs-only
2244
2245Generate code which only uses the general purpose registers (AArch64 only)
2246
2247AMDGPU
2248------
Craig Topper16418662017-11-20 18:07:43 +00002249.. option:: -mxnack, -mno-xnack
2250
2251Enable XNACK (AMDGPU only)
2252
Richard Smith081ad4d2017-01-24 19:39:46 +00002253ARM
2254---
Richard Smith081ad4d2017-01-24 19:39:46 +00002255.. option:: -ffixed-r9
2256
2257Reserve the r9 register (ARM only)
2258
Richard Smith081ad4d2017-01-24 19:39:46 +00002259.. option:: -mcrc
2260
2261Allow use of CRC instructions (ARM only)
2262
Richard Smith081ad4d2017-01-24 19:39:46 +00002263.. option:: -mexecute-only, -mno-execute-only, -mpure-code
2264
2265Disallow generation of data access to code sections (ARM only)
2266
Richard Smith081ad4d2017-01-24 19:39:46 +00002267.. option:: -mno-movt
2268
2269Disallow use of movt/movw pairs (ARM only)
2270
Richard Smith78e23fd2017-04-13 22:39:49 +00002271.. option:: -mno-neg-immediates
2272
2273Disallow converting instructions with negative immediates to their negation or inversion.
2274
Richard Smith081ad4d2017-01-24 19:39:46 +00002275.. option:: -mnocrc
2276
2277Disallow use of CRC instructions (ARM only)
2278
Richard Smith081ad4d2017-01-24 19:39:46 +00002279.. option:: -mrestrict-it, -mno-restrict-it
2280
2281Disallow generation of deprecated IT blocks for ARMv8. It is on by default for ARMv8 Thumb mode.
2282
Craig Topper16418662017-11-20 18:07:43 +00002283.. option:: -mtp=<arg>
2284
2285Read thread pointer from coprocessor register (ARM only)
2286
Richard Smith081ad4d2017-01-24 19:39:46 +00002287.. option:: -munaligned-access, -mno-unaligned-access
2288
2289Allow memory accesses to be unaligned (AArch32/AArch64 only)
2290
2291Hexagon
2292-------
Craig Topper16418662017-11-20 18:07:43 +00002293.. option:: -mieee-rnd-near
2294
2295Hexagon
2296-------
Richard Smith081ad4d2017-01-24 19:39:46 +00002297.. option:: -mhvx, -mno-hvx
2298
2299Enable Hexagon Vector eXtensions
2300
Craig Topper16418662017-11-20 18:07:43 +00002301.. option:: -mhvx-length=<arg>
2302
2303Set Hexagon Vector Length
2304
2305.. program:: clang1
2306.. option:: -mhvx=<arg>
2307.. program:: clang
2308
2309Enable Hexagon Vector eXtensions
Richard Smith081ad4d2017-01-24 19:39:46 +00002310
2311PowerPC
2312-------
Richard Smith78e23fd2017-04-13 22:39:49 +00002313.. option:: -maltivec, -mno-altivec
2314
Richard Smith081ad4d2017-01-24 19:39:46 +00002315.. option:: -mcmpb, -mno-cmpb
2316
Richard Smith081ad4d2017-01-24 19:39:46 +00002317.. option:: -mcrbits, -mno-crbits
2318
Richard Smith081ad4d2017-01-24 19:39:46 +00002319.. option:: -mcrypto, -mno-crypto
2320
Richard Smith081ad4d2017-01-24 19:39:46 +00002321.. option:: -mdirect-move, -mno-direct-move
2322
Richard Smith081ad4d2017-01-24 19:39:46 +00002323.. option:: -mfloat128, -mno-float128
2324
Richard Smith081ad4d2017-01-24 19:39:46 +00002325.. option:: -mfprnd, -mno-fprnd
2326
Richard Smith081ad4d2017-01-24 19:39:46 +00002327.. option:: -mhtm, -mno-htm
2328
Richard Smith081ad4d2017-01-24 19:39:46 +00002329.. option:: -minvariant-function-descriptors, -mno-invariant-function-descriptors
2330
Richard Smith081ad4d2017-01-24 19:39:46 +00002331.. option:: -misel, -mno-isel
2332
Richard Smith081ad4d2017-01-24 19:39:46 +00002333.. option:: -mlongcall, -mno-longcall
2334
Richard Smith081ad4d2017-01-24 19:39:46 +00002335.. option:: -mmfocrf, -mmfcrf, -mno-mfocrf
2336
Richard Smith081ad4d2017-01-24 19:39:46 +00002337.. option:: -mpopcntd, -mno-popcntd
2338
Richard Smith081ad4d2017-01-24 19:39:46 +00002339.. option:: -mpower8-vector, -mno-power8-vector
2340
Richard Smith081ad4d2017-01-24 19:39:46 +00002341.. option:: -mpower9-vector, -mno-power9-vector
2342
Richard Smith081ad4d2017-01-24 19:39:46 +00002343.. option:: -mqpx, -mno-qpx
2344
Richard Smith081ad4d2017-01-24 19:39:46 +00002345.. option:: -mvsx, -mno-vsx
2346
2347WebAssembly
2348-----------
Craig Topper188252d2017-12-11 21:09:16 +00002349.. option:: -mnontrapping-fptoint, -mno-nontrapping-fptoint
2350
Dan Gohmand0c4e1e2018-01-19 17:16:32 +00002351.. option:: -msign-ext, -mno-sign-ext
2352
Richard Smith081ad4d2017-01-24 19:39:46 +00002353.. option:: -msimd128, -mno-simd128
2354
Heejin Ahn8b6af222018-03-02 00:39:16 +00002355.. option:: -mexception-handling, -mno-exception-handling
2356
Richard Smith081ad4d2017-01-24 19:39:46 +00002357X86
2358---
Richard Smith081ad4d2017-01-24 19:39:46 +00002359.. option:: -m3dnow, -mno-3dnow
2360
Richard Smith081ad4d2017-01-24 19:39:46 +00002361.. option:: -m3dnowa, -mno-3dnowa
2362
Richard Smith081ad4d2017-01-24 19:39:46 +00002363.. option:: -madx, -mno-adx
2364
Richard Smith081ad4d2017-01-24 19:39:46 +00002365.. option:: -maes, -mno-aes
2366
Richard Smith081ad4d2017-01-24 19:39:46 +00002367.. option:: -mavx, -mno-avx
2368
Richard Smith081ad4d2017-01-24 19:39:46 +00002369.. option:: -mavx2, -mno-avx2
2370
Craig Topper287c8012018-01-03 18:29:12 +00002371.. option:: -mavx512bitalg, -mno-avx512bitalg
2372
Richard Smith081ad4d2017-01-24 19:39:46 +00002373.. option:: -mavx512bw, -mno-avx512bw
2374
Richard Smith081ad4d2017-01-24 19:39:46 +00002375.. option:: -mavx512cd, -mno-avx512cd
2376
Richard Smith081ad4d2017-01-24 19:39:46 +00002377.. option:: -mavx512dq, -mno-avx512dq
2378
Richard Smith081ad4d2017-01-24 19:39:46 +00002379.. option:: -mavx512er, -mno-avx512er
2380
Richard Smith081ad4d2017-01-24 19:39:46 +00002381.. option:: -mavx512f, -mno-avx512f
2382
Richard Smith081ad4d2017-01-24 19:39:46 +00002383.. option:: -mavx512ifma, -mno-avx512ifma
2384
Richard Smith081ad4d2017-01-24 19:39:46 +00002385.. option:: -mavx512pf, -mno-avx512pf
2386
Richard Smith081ad4d2017-01-24 19:39:46 +00002387.. option:: -mavx512vbmi, -mno-avx512vbmi
2388
Craig Topper287c8012018-01-03 18:29:12 +00002389.. option:: -mavx512vbmi2, -mno-avx512vbmi2
2390
Richard Smith081ad4d2017-01-24 19:39:46 +00002391.. option:: -mavx512vl, -mno-avx512vl
2392
Craig Topper287c8012018-01-03 18:29:12 +00002393.. option:: -mavx512vnni, -mno-avx512vnni
2394
Craig Topperd23254a2017-07-20 17:52:48 +00002395.. option:: -mavx512vpopcntdq, -mno-avx512vpopcntdq
2396
Richard Smith081ad4d2017-01-24 19:39:46 +00002397.. option:: -mbmi, -mno-bmi
2398
Richard Smith081ad4d2017-01-24 19:39:46 +00002399.. option:: -mbmi2, -mno-bmi2
2400
Craig Topper78b47872017-02-08 06:48:58 +00002401.. option:: -mclflushopt, -mno-clflushopt
2402
Craig Topper177a57c2017-02-08 07:57:01 +00002403.. option:: -mclwb, -mno-clwb
2404
Richard Smith78e23fd2017-04-13 22:39:49 +00002405.. option:: -mclzero, -mno-clzero
2406
Richard Smith081ad4d2017-01-24 19:39:46 +00002407.. option:: -mcx16, -mno-cx16
2408
Richard Smith081ad4d2017-01-24 19:39:46 +00002409.. option:: -mf16c, -mno-f16c
2410
Richard Smith081ad4d2017-01-24 19:39:46 +00002411.. option:: -mfma, -mno-fma
2412
Richard Smith081ad4d2017-01-24 19:39:46 +00002413.. option:: -mfma4, -mno-fma4
2414
Richard Smith081ad4d2017-01-24 19:39:46 +00002415.. option:: -mfsgsbase, -mno-fsgsbase
2416
Richard Smith081ad4d2017-01-24 19:39:46 +00002417.. option:: -mfxsr, -mno-fxsr
2418
Craig Topper287c8012018-01-03 18:29:12 +00002419.. option:: -mgfni, -mno-gfni
2420
Craig Topper188252d2017-12-11 21:09:16 +00002421.. option:: -mibt, -mno-ibt
2422
Craig Topperd23254a2017-07-20 17:52:48 +00002423.. option:: -mlwp, -mno-lwp
2424
Richard Smith081ad4d2017-01-24 19:39:46 +00002425.. option:: -mlzcnt, -mno-lzcnt
2426
Richard Smith081ad4d2017-01-24 19:39:46 +00002427.. option:: -mmmx, -mno-mmx
2428
Craig Topper177a57c2017-02-08 07:57:01 +00002429.. option:: -mmovbe, -mno-movbe
2430
Craig Topperb16cb822017-02-08 07:56:42 +00002431.. option:: -mmpx, -mno-mpx
2432
Richard Smith081ad4d2017-01-24 19:39:46 +00002433.. option:: -mmwaitx, -mno-mwaitx
2434
Richard Smith081ad4d2017-01-24 19:39:46 +00002435.. option:: -mpclmul, -mno-pclmul
2436
Richard Smith081ad4d2017-01-24 19:39:46 +00002437.. option:: -mpku, -mno-pku
2438
Richard Smith081ad4d2017-01-24 19:39:46 +00002439.. option:: -mpopcnt, -mno-popcnt
2440
Craig Topperd2bf7b02017-02-08 08:23:40 +00002441.. option:: -mprefetchwt1, -mno-prefetchwt1
2442
Richard Smith081ad4d2017-01-24 19:39:46 +00002443.. option:: -mprfchw, -mno-prfchw
2444
Craig Topper596527b2018-01-23 18:40:15 +00002445.. option:: -mrdpid, -mno-rdpid
2446
Richard Smith081ad4d2017-01-24 19:39:46 +00002447.. option:: -mrdrnd, -mno-rdrnd
2448
Richard Smith081ad4d2017-01-24 19:39:46 +00002449.. option:: -mrdseed, -mno-rdseed
2450
Craig Topper596527b2018-01-23 18:40:15 +00002451.. option:: -mretpoline, -mno-retpoline
2452
2453.. option:: -mretpoline-external-thunk, -mno-retpoline-external-thunk
2454
Richard Smith081ad4d2017-01-24 19:39:46 +00002455.. option:: -mrtm, -mno-rtm
2456
Jonas Hahnfelda180fc42018-02-22 17:10:28 +00002457.. option:: -msahf, -mno-sahf
2458
Craig Topper204ecff2017-02-08 08:23:17 +00002459.. option:: -msgx, -mno-sgx
2460
Richard Smith081ad4d2017-01-24 19:39:46 +00002461.. option:: -msha, -mno-sha
2462
Craig Topper188252d2017-12-11 21:09:16 +00002463.. option:: -mshstk, -mno-shstk
2464
Richard Smith081ad4d2017-01-24 19:39:46 +00002465.. option:: -msse, -mno-sse
2466
Richard Smith081ad4d2017-01-24 19:39:46 +00002467.. option:: -msse2, -mno-sse2
2468
Richard Smith081ad4d2017-01-24 19:39:46 +00002469.. option:: -msse3, -mno-sse3
2470
Richard Smith081ad4d2017-01-24 19:39:46 +00002471.. option:: -msse4.1, -mno-sse4.1
2472
Richard Smithb2c82a62017-01-27 01:54:42 +00002473.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00002474.. option:: -msse4.2, -mno-sse4.2, -msse4
Richard Smithb2c82a62017-01-27 01:54:42 +00002475.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00002476
Richard Smith081ad4d2017-01-24 19:39:46 +00002477.. option:: -msse4a, -mno-sse4a
2478
Richard Smith081ad4d2017-01-24 19:39:46 +00002479.. option:: -mssse3, -mno-ssse3
2480
Richard Smith081ad4d2017-01-24 19:39:46 +00002481.. option:: -mtbm, -mno-tbm
2482
Craig Topper287c8012018-01-03 18:29:12 +00002483.. option:: -mvaes, -mno-vaes
2484
2485.. option:: -mvpclmulqdq, -mno-vpclmulqdq
2486
Gabor Buellaa0520162018-04-11 20:09:09 +00002487.. option:: -mwbnoinvd, -mno-wbnoinvd
2488
Richard Smith081ad4d2017-01-24 19:39:46 +00002489.. option:: -mx87, -m80387, -mno-x87
2490
Richard Smith081ad4d2017-01-24 19:39:46 +00002491.. option:: -mxop, -mno-xop
2492
Richard Smith081ad4d2017-01-24 19:39:46 +00002493.. option:: -mxsave, -mno-xsave
2494
Richard Smith081ad4d2017-01-24 19:39:46 +00002495.. option:: -mxsavec, -mno-xsavec
2496
Richard Smith081ad4d2017-01-24 19:39:46 +00002497.. option:: -mxsaveopt, -mno-xsaveopt
2498
Richard Smith081ad4d2017-01-24 19:39:46 +00002499.. option:: -mxsaves, -mno-xsaves
2500
2501Optimization level
2502~~~~~~~~~~~~~~~~~~
2503
2504Flags controlling how much optimization should be performed.
2505
Richard Smith081ad4d2017-01-24 19:39:46 +00002506.. option:: -O<arg>, -O (equivalent to -O2), --optimize, --optimize=<arg>
2507
Richard Smith081ad4d2017-01-24 19:39:46 +00002508.. option:: -Ofast<arg>
2509
2510Debug information generation
2511~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2512
2513Flags controlling how much and what kind of debug information should be
2514generated.
2515
2516Kind and level of debug information
2517-----------------------------------
Richard Smith081ad4d2017-01-24 19:39:46 +00002518.. option:: -g, --debug, --debug=<arg>
2519
2520Generate source-level debug information
2521
Richard Smith081ad4d2017-01-24 19:39:46 +00002522.. option:: -gdwarf-2
2523
2524Generate source-level debug information with dwarf version 2
2525
Richard Smith081ad4d2017-01-24 19:39:46 +00002526.. option:: -gdwarf-3
2527
2528Generate source-level debug information with dwarf version 3
2529
Richard Smith081ad4d2017-01-24 19:39:46 +00002530.. option:: -gdwarf-4, -gdwarf
2531
2532Generate source-level debug information with dwarf version 4
2533
Richard Smith081ad4d2017-01-24 19:39:46 +00002534.. option:: -gdwarf-5
2535
2536Generate source-level debug information with dwarf version 5
2537
Richard Smith081ad4d2017-01-24 19:39:46 +00002538.. option:: -gfull
2539
Richard Smith081ad4d2017-01-24 19:39:46 +00002540.. option:: -gused
2541
2542Debug level
2543___________
Richard Smith081ad4d2017-01-24 19:39:46 +00002544.. option:: -g0
2545
Richard Smith081ad4d2017-01-24 19:39:46 +00002546.. option:: -g2
2547
Richard Smith081ad4d2017-01-24 19:39:46 +00002548.. option:: -g3
2549
Richard Smith081ad4d2017-01-24 19:39:46 +00002550.. option:: -ggdb0
2551
Richard Smith081ad4d2017-01-24 19:39:46 +00002552.. option:: -ggdb1
2553
Richard Smith081ad4d2017-01-24 19:39:46 +00002554.. option:: -ggdb2
2555
Richard Smith081ad4d2017-01-24 19:39:46 +00002556.. option:: -ggdb3
2557
Richard Smith081ad4d2017-01-24 19:39:46 +00002558.. option:: -gline-tables-only, -g1, -gmlt
2559
2560Emit debug line number tables only
2561
Richard Smith081ad4d2017-01-24 19:39:46 +00002562.. option:: -gmodules
2563
2564Generate debug info with external references to clang modules or precompiled headers
2565
2566Debugger to tune debug information for
2567______________________________________
Richard Smith081ad4d2017-01-24 19:39:46 +00002568.. option:: -ggdb
2569
Richard Smith081ad4d2017-01-24 19:39:46 +00002570.. option:: -glldb
2571
Richard Smith081ad4d2017-01-24 19:39:46 +00002572.. option:: -gsce
2573
2574Debug information flags
2575-----------------------
Richard Smith081ad4d2017-01-24 19:39:46 +00002576.. option:: -gcolumn-info, -gno-column-info
2577
Richard Smith081ad4d2017-01-24 19:39:46 +00002578.. option:: -gdwarf-aranges
2579
Scott Lindera2fbcef2018-02-26 17:32:31 +00002580.. option:: -gembed-source
2581
2582.. option:: -gno-embed-source
2583
Richard Smith081ad4d2017-01-24 19:39:46 +00002584.. option:: -ggnu-pubnames
2585
Richard Smith081ad4d2017-01-24 19:39:46 +00002586.. option:: -grecord-gcc-switches, -gno-record-gcc-switches
2587
Richard Smith081ad4d2017-01-24 19:39:46 +00002588.. option:: -gsplit-dwarf
2589
Richard Smith081ad4d2017-01-24 19:39:46 +00002590.. option:: -gstrict-dwarf, -gno-strict-dwarf
2591
Craig Topperd23254a2017-07-20 17:52:48 +00002592.. option:: -gz
2593
2594DWARF debug sections compression type
2595
2596.. program:: clang1
2597.. option:: -gz=<arg>
2598.. program:: clang
2599
2600DWARF debug sections compression type
2601
Richard Smithc5b2e002017-01-27 02:08:37 +00002602Static analyzer flags
2603=====================
Richard Smith081ad4d2017-01-24 19:39:46 +00002604
Richard Smithc5b2e002017-01-27 02:08:37 +00002605Flags controlling the behavior of the Clang Static Analyzer.
Richard Smith081ad4d2017-01-24 19:39:46 +00002606
Richard Smithc5b2e002017-01-27 02:08:37 +00002607.. option:: -Xanalyzer <arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00002608
Richard Smithc5b2e002017-01-27 02:08:37 +00002609Pass <arg> to the static analyzer
Richard Smith081ad4d2017-01-24 19:39:46 +00002610
2611Fortran compilation flags
2612=========================
2613
2614Flags that will be passed onto the ``gfortran`` compiler when Clang is given
2615a Fortran input.
2616
Richard Smithc5b2e002017-01-27 02:08:37 +00002617.. option:: -A<arg>, --assert <arg>, --assert=<arg>
2618
Richard Smith081ad4d2017-01-24 19:39:46 +00002619.. option:: -A-<arg>
2620
Richard Smith081ad4d2017-01-24 19:39:46 +00002621.. option:: -J<arg>
2622
Richard Smith081ad4d2017-01-24 19:39:46 +00002623.. option:: -cpp
2624
Richard Smith081ad4d2017-01-24 19:39:46 +00002625.. option:: -faggressive-function-elimination, -fno-aggressive-function-elimination
2626
Richard Smith081ad4d2017-01-24 19:39:46 +00002627.. option:: -falign-commons, -fno-align-commons
2628
Richard Smith081ad4d2017-01-24 19:39:46 +00002629.. option:: -fall-intrinsics, -fno-all-intrinsics
2630
Richard Smith081ad4d2017-01-24 19:39:46 +00002631.. option:: -fautomatic, -fno-automatic
2632
Richard Smith081ad4d2017-01-24 19:39:46 +00002633.. option:: -fbackslash, -fno-backslash
2634
Richard Smith081ad4d2017-01-24 19:39:46 +00002635.. option:: -fbacktrace, -fno-backtrace
2636
Richard Smith081ad4d2017-01-24 19:39:46 +00002637.. option:: -fblas-matmul-limit=<arg>
2638
Richard Smith081ad4d2017-01-24 19:39:46 +00002639.. option:: -fbounds-check, -fno-bounds-check
2640
Richard Smith081ad4d2017-01-24 19:39:46 +00002641.. option:: -fcheck-array-temporaries, -fno-check-array-temporaries
2642
Richard Smith081ad4d2017-01-24 19:39:46 +00002643.. option:: -fcheck=<arg>
2644
Richard Smith081ad4d2017-01-24 19:39:46 +00002645.. option:: -fcoarray=<arg>
2646
Richard Smith081ad4d2017-01-24 19:39:46 +00002647.. option:: -fconvert=<arg>
2648
Richard Smith081ad4d2017-01-24 19:39:46 +00002649.. option:: -fcray-pointer, -fno-cray-pointer
2650
Richard Smith081ad4d2017-01-24 19:39:46 +00002651.. option:: -fd-lines-as-code, -fno-d-lines-as-code
2652
Richard Smith081ad4d2017-01-24 19:39:46 +00002653.. option:: -fd-lines-as-comments, -fno-d-lines-as-comments
2654
Richard Smith081ad4d2017-01-24 19:39:46 +00002655.. option:: -fdefault-double-8, -fno-default-double-8
2656
Richard Smith081ad4d2017-01-24 19:39:46 +00002657.. option:: -fdefault-integer-8, -fno-default-integer-8
2658
Richard Smith081ad4d2017-01-24 19:39:46 +00002659.. option:: -fdefault-real-8, -fno-default-real-8
2660
Richard Smith081ad4d2017-01-24 19:39:46 +00002661.. option:: -fdollar-ok, -fno-dollar-ok
2662
Richard Smith081ad4d2017-01-24 19:39:46 +00002663.. option:: -fdump-fortran-optimized, -fno-dump-fortran-optimized
2664
Richard Smith081ad4d2017-01-24 19:39:46 +00002665.. option:: -fdump-fortran-original, -fno-dump-fortran-original
2666
Richard Smith081ad4d2017-01-24 19:39:46 +00002667.. option:: -fdump-parse-tree, -fno-dump-parse-tree
2668
Richard Smith081ad4d2017-01-24 19:39:46 +00002669.. option:: -fexternal-blas, -fno-external-blas
2670
Richard Smith081ad4d2017-01-24 19:39:46 +00002671.. option:: -ff2c, -fno-f2c
2672
Richard Smith081ad4d2017-01-24 19:39:46 +00002673.. option:: -ffixed-form, -fno-fixed-form
2674
Richard Smith081ad4d2017-01-24 19:39:46 +00002675.. option:: -ffixed-line-length-<arg>
2676
Richard Smith081ad4d2017-01-24 19:39:46 +00002677.. option:: -ffpe-trap=<arg>
2678
Richard Smith081ad4d2017-01-24 19:39:46 +00002679.. option:: -ffree-form, -fno-free-form
2680
Richard Smith081ad4d2017-01-24 19:39:46 +00002681.. option:: -ffree-line-length-<arg>
2682
Richard Smith081ad4d2017-01-24 19:39:46 +00002683.. option:: -ffrontend-optimize, -fno-frontend-optimize
2684
Richard Smith081ad4d2017-01-24 19:39:46 +00002685.. option:: -fimplicit-none, -fno-implicit-none
2686
Richard Smith081ad4d2017-01-24 19:39:46 +00002687.. option:: -finit-character=<arg>
2688
Richard Smith081ad4d2017-01-24 19:39:46 +00002689.. option:: -finit-integer=<arg>
2690
Richard Smith081ad4d2017-01-24 19:39:46 +00002691.. option:: -finit-local-zero, -fno-init-local-zero
2692
Richard Smith081ad4d2017-01-24 19:39:46 +00002693.. option:: -finit-logical=<arg>
2694
Richard Smith081ad4d2017-01-24 19:39:46 +00002695.. option:: -finit-real=<arg>
2696
Richard Smith081ad4d2017-01-24 19:39:46 +00002697.. option:: -finteger-4-integer-8, -fno-integer-4-integer-8
2698
Richard Smith081ad4d2017-01-24 19:39:46 +00002699.. option:: -fintrinsic-modules-path, -fno-intrinsic-modules-path
2700
Richard Smith081ad4d2017-01-24 19:39:46 +00002701.. option:: -fmax-array-constructor=<arg>
2702
Richard Smith081ad4d2017-01-24 19:39:46 +00002703.. option:: -fmax-errors=<arg>
2704
Richard Smith081ad4d2017-01-24 19:39:46 +00002705.. option:: -fmax-identifier-length, -fno-max-identifier-length
2706
Richard Smith081ad4d2017-01-24 19:39:46 +00002707.. option:: -fmax-stack-var-size=<arg>
2708
Richard Smith081ad4d2017-01-24 19:39:46 +00002709.. option:: -fmax-subrecord-length=<arg>
2710
Richard Smith081ad4d2017-01-24 19:39:46 +00002711.. option:: -fmodule-private, -fno-module-private
2712
Richard Smith081ad4d2017-01-24 19:39:46 +00002713.. option:: -fpack-derived, -fno-pack-derived
2714
Richard Smith081ad4d2017-01-24 19:39:46 +00002715.. option:: -fprotect-parens, -fno-protect-parens
2716
Richard Smith081ad4d2017-01-24 19:39:46 +00002717.. option:: -frange-check, -fno-range-check
2718
Richard Smith081ad4d2017-01-24 19:39:46 +00002719.. option:: -freal-4-real-10, -fno-real-4-real-10
2720
Richard Smith081ad4d2017-01-24 19:39:46 +00002721.. option:: -freal-4-real-16, -fno-real-4-real-16
2722
Richard Smith081ad4d2017-01-24 19:39:46 +00002723.. option:: -freal-4-real-8, -fno-real-4-real-8
2724
Richard Smith081ad4d2017-01-24 19:39:46 +00002725.. option:: -freal-8-real-10, -fno-real-8-real-10
2726
Richard Smith081ad4d2017-01-24 19:39:46 +00002727.. option:: -freal-8-real-16, -fno-real-8-real-16
2728
Richard Smith081ad4d2017-01-24 19:39:46 +00002729.. option:: -freal-8-real-4, -fno-real-8-real-4
2730
Richard Smith081ad4d2017-01-24 19:39:46 +00002731.. option:: -frealloc-lhs, -fno-realloc-lhs
2732
Richard Smith081ad4d2017-01-24 19:39:46 +00002733.. option:: -frecord-marker=<arg>
2734
Richard Smith081ad4d2017-01-24 19:39:46 +00002735.. option:: -frecursive, -fno-recursive
2736
Richard Smith081ad4d2017-01-24 19:39:46 +00002737.. option:: -frepack-arrays, -fno-repack-arrays
2738
Richard Smith081ad4d2017-01-24 19:39:46 +00002739.. option:: -fsecond-underscore, -fno-second-underscore
2740
Richard Smith081ad4d2017-01-24 19:39:46 +00002741.. option:: -fsign-zero, -fno-sign-zero
2742
Richard Smith081ad4d2017-01-24 19:39:46 +00002743.. option:: -fstack-arrays, -fno-stack-arrays
2744
Richard Smith081ad4d2017-01-24 19:39:46 +00002745.. option:: -funderscoring, -fno-underscoring
2746
Richard Smith081ad4d2017-01-24 19:39:46 +00002747.. option:: -fwhole-file, -fno-whole-file
2748
Richard Smith081ad4d2017-01-24 19:39:46 +00002749.. option:: -nocpp
2750
Richard Smith081ad4d2017-01-24 19:39:46 +00002751.. option:: -static-libgfortran
2752
Richard Smithc5b2e002017-01-27 02:08:37 +00002753Linker flags
2754============
2755Flags that are passed on to the linker
2756
2757.. option:: -L<dir>, --library-directory <arg>, --library-directory=<arg>
2758
2759Add directory to library search path
2760
2761.. option:: -Mach
2762
2763.. option:: -T<script>
2764
2765Specify <script> as linker script
2766
Richard Smith78e23fd2017-04-13 22:39:49 +00002767.. option:: -Tbss<addr>
Richard Smithc5b2e002017-01-27 02:08:37 +00002768
2769Set starting address of BSS to <addr>
2770
Richard Smith78e23fd2017-04-13 22:39:49 +00002771.. option:: -Tdata<addr>
Richard Smithc5b2e002017-01-27 02:08:37 +00002772
2773Set starting address of BSS to <addr>
2774
Richard Smith78e23fd2017-04-13 22:39:49 +00002775.. option:: -Ttext<addr>
Richard Smithc5b2e002017-01-27 02:08:37 +00002776
2777Set starting address of BSS to <addr>
2778
2779.. option:: -Wl,<arg>,<arg2>...
2780
2781Pass the comma separated arguments in <arg> to the linker
2782
2783.. option:: -X
2784
2785.. option:: -Xlinker <arg>, --for-linker <arg>, --for-linker=<arg>
2786
2787Pass <arg> to the linker
2788
2789.. program:: clang1
2790.. option:: -Z
2791.. program:: clang
2792
2793.. option:: -e<arg>, --entry
2794
2795.. option:: -filelist <arg>
2796
2797.. option:: -l<arg>
2798
2799.. option:: -r
2800
2801.. option:: -rpath <arg>
2802
2803.. option:: -s
2804
2805.. option:: -t
2806
2807.. option:: -u<arg>, --force-link <arg>, --force-link=<arg>
2808
2809.. option:: -undef
2810
2811undef all system defines
2812
2813.. option:: -undefined<arg>, --no-undefined
2814
2815.. option:: -z <arg>
2816
2817Pass -z <arg> to the linker
2818