blob: 67c341feffbb6bdaaadfb8f6ce6c2cd0b533800f [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
Vedant Kumar368540f2018-08-23 17:55:03 +000039.. option:: -Qn, -fno-ident
Craig Topper42da9cb2018-04-23 21:41:06 +000040
41Do not emit metadata containing compiler name and version
42
Richard Smith081ad4d2017-01-24 19:39:46 +000043.. option:: -Qunused-arguments
44
45Don't emit warning for unused driver arguments
46
Vedant Kumar368540f2018-08-23 17:55:03 +000047.. option:: -Qy, -fident
Craig Topper42da9cb2018-04-23 21:41:06 +000048
49Emit metadata containing compiler name and version
50
Richard Smith081ad4d2017-01-24 19:39:46 +000051.. option:: -Wa,<arg>,<arg2>...
52
53Pass the comma separated arguments in <arg> to the assembler
54
Richard Smith081ad4d2017-01-24 19:39:46 +000055.. option:: -Wlarge-by-value-copy=<arg>
56
Richard Smith081ad4d2017-01-24 19:39:46 +000057.. option:: -Xarch\_<arg1> <arg2>
58
Fangrui Songd8c97292020-06-18 14:52:39 -070059.. program:: clang1
60.. option:: -Xarch\_device <arg>
61.. program:: clang
62
63Pass <arg> to the CUDA/HIP device compilation
64
65.. program:: clang2
66.. option:: -Xarch\_host <arg>
67.. program:: clang
68
69Pass <arg> to the CUDA/HIP host compilation
70
Richard Smith081ad4d2017-01-24 19:39:46 +000071.. option:: -Xcuda-fatbinary <arg>
72
73Pass <arg> to fatbinary invocation
74
Richard Smith081ad4d2017-01-24 19:39:46 +000075.. option:: -Xcuda-ptxas <arg>
76
77Pass <arg> to the ptxas assembler
78
Boris Kolpackovb150d242017-08-30 09:15:53 +000079.. option:: -Xopenmp-target <arg>
80
81Pass <arg> to the target offloading toolchain.
82
83.. program:: clang1
Jonas Hahnfelda180fc42018-02-22 17:10:28 +000084.. option:: -Xopenmp-target=<triple> <arg>
Boris Kolpackovb150d242017-08-30 09:15:53 +000085.. program:: clang
86
Jonas Hahnfelda180fc42018-02-22 17:10:28 +000087Pass <arg> to the target offloading toolchain identified by <triple>.
Boris Kolpackovb150d242017-08-30 09:15:53 +000088
Richard Smith081ad4d2017-01-24 19:39:46 +000089.. option:: -Z<arg>
90
Richard Smith081ad4d2017-01-24 19:39:46 +000091.. option:: -a<arg>, --profile-blocks
92
Richard Smith081ad4d2017-01-24 19:39:46 +000093.. option:: -all\_load
94
Richard Smith081ad4d2017-01-24 19:39:46 +000095.. option:: -allowable\_client <arg>
96
Richard Smith081ad4d2017-01-24 19:39:46 +000097.. option:: --analyze
98
99Run the static analyzer
100
Richard Smith081ad4d2017-01-24 19:39:46 +0000101.. option:: --analyzer-no-default-checks
102
Richard Smith081ad4d2017-01-24 19:39:46 +0000103.. option:: --analyzer-output<arg>
104
Craig Topper9624beb2020-03-10 11:08:19 -0700105Static analyzer report output format (html\|plist\|plist-multi-file\|plist-html\|sarif\|text).
Richard Smith081ad4d2017-01-24 19:39:46 +0000106
Richard Smith081ad4d2017-01-24 19:39:46 +0000107.. option:: -ansi, --ansi
108
Richard Smith081ad4d2017-01-24 19:39:46 +0000109.. option:: -arch <arg>
110
Richard Smithb2c82a62017-01-27 01:54:42 +0000111.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000112.. option:: -arch\_errors\_fatal
Richard Smithb2c82a62017-01-27 01:54:42 +0000113.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000114
Richard Smithb2c82a62017-01-27 01:54:42 +0000115.. program:: clang2
Richard Smith081ad4d2017-01-24 19:39:46 +0000116.. option:: -arch\_only <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000117.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000118
Richard Smith081ad4d2017-01-24 19:39:46 +0000119.. option:: -arcmt-migrate-emit-errors
120
121Emit ARC errors even if the migrator can fix them
122
Richard Smith081ad4d2017-01-24 19:39:46 +0000123.. option:: -arcmt-migrate-report-output <arg>
124
125Output path for the plist report
126
Craig Topperd23254a2017-07-20 17:52:48 +0000127.. option:: --autocomplete=<arg>
128
Richard Smith081ad4d2017-01-24 19:39:46 +0000129.. option:: -bind\_at\_load
130
Richard Smith081ad4d2017-01-24 19:39:46 +0000131.. option:: -bundle
132
Richard Smithb2c82a62017-01-27 01:54:42 +0000133.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000134.. option:: -bundle\_loader <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000135.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000136
Richard Smith081ad4d2017-01-24 19:39:46 +0000137.. option:: -client\_name<arg>
138
Richard Smith081ad4d2017-01-24 19:39:46 +0000139.. option:: -compatibility\_version<arg>
140
Craig Topper287c8012018-01-03 18:29:12 +0000141.. option:: --config <arg>
142
143Specifies configuration file
144
Richard Smith081ad4d2017-01-24 19:39:46 +0000145.. option:: --constant-cfstrings
146
Richard Smith081ad4d2017-01-24 19:39:46 +0000147.. option:: -coverage, --coverage
148
Richard Smith081ad4d2017-01-24 19:39:46 +0000149.. option:: --cuda-compile-host-device
150
151Compile CUDA code for both host and device (default). Has no effect on non-CUDA compilations.
152
Richard Smith081ad4d2017-01-24 19:39:46 +0000153.. option:: --cuda-device-only
154
155Compile CUDA code for device only
156
Richard Smith081ad4d2017-01-24 19:39:46 +0000157.. option:: --cuda-host-only
158
159Compile CUDA code for host only. Has no effect on non-CUDA compilations.
160
Jonas Hahnfeld06039e82018-04-20 13:26:03 +0000161.. option:: --cuda-include-ptx=<arg>, --no-cuda-include-ptx=<arg>
162
Sylvestre Ledru90f1dfb2019-01-01 12:51:14 +0000163Include PTX for the following GPU architecture (e.g. sm\_35) or 'all'. May be specified more than once.
Jonas Hahnfeld06039e82018-04-20 13:26:03 +0000164
Richard Smith081ad4d2017-01-24 19:39:46 +0000165.. option:: --cuda-noopt-device-debug, --no-cuda-noopt-device-debug
166
167Enable device-side debug info generation. Disables ptxas optimizations.
168
Richard Smith081ad4d2017-01-24 19:39:46 +0000169.. option:: -current\_version<arg>
170
Richard Smith081ad4d2017-01-24 19:39:46 +0000171.. option:: -dead\_strip
172
Richard Smith081ad4d2017-01-24 19:39:46 +0000173.. option:: -dependency-dot <arg>
174
175Filename to write DOT-formatted header dependencies to
176
Richard Smith081ad4d2017-01-24 19:39:46 +0000177.. option:: -dependency-file <arg>
178
179Filename (or -) to write dependency output to
180
Richard Smith081ad4d2017-01-24 19:39:46 +0000181.. option:: -dumpmachine
182
Richard Smith081ad4d2017-01-24 19:39:46 +0000183.. option:: -dumpversion
184
Richard Smith081ad4d2017-01-24 19:39:46 +0000185.. option:: --dyld-prefix=<arg>, --dyld-prefix <arg>
186
Richard Smith081ad4d2017-01-24 19:39:46 +0000187.. option:: -dylib\_file <arg>
188
Richard Smith081ad4d2017-01-24 19:39:46 +0000189.. option:: -dylinker
190
Richard Smithb2c82a62017-01-27 01:54:42 +0000191.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000192.. option:: -dylinker\_install\_name<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000193.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000194
Richard Smith081ad4d2017-01-24 19:39:46 +0000195.. option:: -dynamic
196
Richard Smith081ad4d2017-01-24 19:39:46 +0000197.. option:: -dynamiclib
198
Richard Smith081ad4d2017-01-24 19:39:46 +0000199.. option:: -emit-ast
200
201Emit Clang AST files for source inputs
202
Craig Topper9624beb2020-03-10 11:08:19 -0700203.. option:: -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang
204
205Trivial automatic variable initialization to zero is only here for benchmarks, it'll eventually be removed, and I'm OK with that because I'm only using it to benchmark
206
Richard Smith081ad4d2017-01-24 19:39:46 +0000207.. option:: -exported\_symbols\_list <arg>
208
Richard Smith081ad4d2017-01-24 19:39:46 +0000209.. option:: -faligned-new=<arg>
210
Richard Smith081ad4d2017-01-24 19:39:46 +0000211.. option:: -fcuda-flush-denormals-to-zero, -fno-cuda-flush-denormals-to-zero
212
213Flush denormal floating point values to zero in CUDA device mode.
214
Jonas Hahnfeld06039e82018-04-20 13:26:03 +0000215.. option:: -ffixed-r19
216
Vedant Kumar368540f2018-08-23 17:55:03 +0000217Reserve register r19 (Hexagon only)
Jonas Hahnfeld06039e82018-04-20 13:26:03 +0000218
Richard Smith081ad4d2017-01-24 19:39:46 +0000219.. option:: -fheinous-gnu-extensions
220
Richard Smith081ad4d2017-01-24 19:39:46 +0000221.. option:: -flat\_namespace
222
Richard Smith081ad4d2017-01-24 19:39:46 +0000223.. option:: -fopenmp-targets=<arg1>,<arg2>...
224
225Specify comma-separated list of triples OpenMP offloading targets to be supported
226
Richard Smith081ad4d2017-01-24 19:39:46 +0000227.. option:: -force\_cpusubtype\_ALL
228
Richard Smithb2c82a62017-01-27 01:54:42 +0000229.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000230.. option:: -force\_flat\_namespace
Richard Smithb2c82a62017-01-27 01:54:42 +0000231.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000232
Richard Smithb2c82a62017-01-27 01:54:42 +0000233.. program:: clang2
Richard Smith081ad4d2017-01-24 19:39:46 +0000234.. option:: -force\_load <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000235.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000236
Richard Smith081ad4d2017-01-24 19:39:46 +0000237.. option:: -framework <arg>
238
Richard Smith78e23fd2017-04-13 22:39:49 +0000239.. option:: -frtlib-add-rpath, -fno-rtlib-add-rpath
240
241Add -rpath with architecture-specific resource directory to the linker flags
242
Craig Topper9624beb2020-03-10 11:08:19 -0700243.. option:: -fsanitize-system-blacklist=<arg>
244
245Path to system blacklist file for sanitizers
246
247.. option:: -fsystem-module
248
249Build this module as a system module. Only used with -emit-module
250
Richard Smith081ad4d2017-01-24 19:39:46 +0000251.. option:: --gcc-toolchain=<arg>, -gcc-toolchain <arg>
252
253Use the gcc toolchain at the given directory
254
Richard Smith081ad4d2017-01-24 19:39:46 +0000255.. option:: -gcodeview
256
257Generate CodeView debug information
258
Craig Topper9624beb2020-03-10 11:08:19 -0700259.. option:: -gcodeview-ghash, -gno-codeview-ghash
260
261Emit type record hashes in a .debug$H section
262
263.. option:: -ginline-line-tables, -gno-inline-line-tables
264
265.. option:: --gpu-max-threads-per-block=<arg>
266
267Default max threads per block for kernel launch bounds for HIP
268
Richard Smith081ad4d2017-01-24 19:39:46 +0000269.. option:: -headerpad\_max\_install\_names<arg>
270
Richard Smith081ad4d2017-01-24 19:39:46 +0000271.. option:: -help, --help
272
273Display available options
274
Richard Smith081ad4d2017-01-24 19:39:46 +0000275.. option:: --help-hidden
276
Jonas Hahnfeld06039e82018-04-20 13:26:03 +0000277Display help for hidden options
278
Vedant Kumar368540f2018-08-23 17:55:03 +0000279.. option:: --hip-link
280
281Link clang-offload-bundler bundles for HIP
282
Craig Topper9624beb2020-03-10 11:08:19 -0700283.. option:: -ibuiltininc
284
285Enable builtin #include directories even when -nostdinc is used before or after -ibuiltininc. Using -nobuiltininc after the option disables it
286
Richard Smith081ad4d2017-01-24 19:39:46 +0000287.. option:: -image\_base <arg>
288
Richard Smith081ad4d2017-01-24 19:39:46 +0000289.. option:: -index-header-map
290
291Make the next included directory (-I or -F) an indexer header map
292
Richard Smith081ad4d2017-01-24 19:39:46 +0000293.. option:: -init <arg>
294
Richard Smith081ad4d2017-01-24 19:39:46 +0000295.. option:: -install\_name <arg>
296
Craig Topper9624beb2020-03-10 11:08:19 -0700297.. option:: -interface-stub-version=<arg>
298
Richard Smith081ad4d2017-01-24 19:39:46 +0000299.. option:: -keep\_private\_externs
300
Richard Smith081ad4d2017-01-24 19:39:46 +0000301.. option:: -lazy\_framework <arg>
302
Richard Smithb2c82a62017-01-27 01:54:42 +0000303.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000304.. option:: -lazy\_library <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000305.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000306
Richard Smith081ad4d2017-01-24 19:39:46 +0000307.. option:: -mbig-endian, -EB
308
Craig Topper9624beb2020-03-10 11:08:19 -0700309.. option:: -mbranch-protection=<arg>
310
311Enforce targets of indirect branches and function returns
312
Richard Smith081ad4d2017-01-24 19:39:46 +0000313.. option:: --migrate
314
315Run the migrator
316
Richard Smith78e23fd2017-04-13 22:39:49 +0000317.. option:: -mios-simulator-version-min=<arg>, -miphonesimulator-version-min=<arg>
318
Richard Smith081ad4d2017-01-24 19:39:46 +0000319.. option:: -mlinker-version=<arg>
320
Richard Smith081ad4d2017-01-24 19:39:46 +0000321.. option:: -mlittle-endian, -EL
322
Richard Smith081ad4d2017-01-24 19:39:46 +0000323.. option:: -mllvm <arg>
324
325Additional arguments to forward to LLVM's option processing
326
Richard Smith081ad4d2017-01-24 19:39:46 +0000327.. option:: -module-dependency-dir <arg>
328
329Directory to dump module dependencies to
330
Richard Smith78e23fd2017-04-13 22:39:49 +0000331.. option:: -mtvos-simulator-version-min=<arg>, -mappletvsimulator-version-min=<arg>
332
Richard Smith081ad4d2017-01-24 19:39:46 +0000333.. option:: -multi\_module
334
Richard Smith081ad4d2017-01-24 19:39:46 +0000335.. option:: -multiply\_defined <arg>
336
Richard Smithb2c82a62017-01-27 01:54:42 +0000337.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000338.. option:: -multiply\_defined\_unused <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000339.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000340
Richard Smith78e23fd2017-04-13 22:39:49 +0000341.. option:: -mwatchos-simulator-version-min=<arg>, -mwatchsimulator-version-min=<arg>
342
Richard Smith081ad4d2017-01-24 19:39:46 +0000343.. option:: --no-cuda-version-check
344
345Don't error out if the detected version of the CUDA install is too low for the requested CUDA gpu architecture.
346
Richard Smith081ad4d2017-01-24 19:39:46 +0000347.. option:: -no-integrated-cpp, --no-integrated-cpp
348
Richard Smith081ad4d2017-01-24 19:39:46 +0000349.. option:: -no\_dead\_strip\_inits\_and\_terms
350
Richard Smith081ad4d2017-01-24 19:39:46 +0000351.. option:: -nobuiltininc
352
353Disable builtin #include directories
354
Richard Smith081ad4d2017-01-24 19:39:46 +0000355.. option:: -nodefaultlibs
356
Richard Smith081ad4d2017-01-24 19:39:46 +0000357.. option:: -nofixprebinding
358
Fangrui Songd8c97292020-06-18 14:52:39 -0700359.. option:: -nogpuinc, -nocudainc
360
Craig Topper9624beb2020-03-10 11:08:19 -0700361.. option:: -nogpulib, -nocudalib
362
363Do not link device library for CUDA/HIP device compilation
364
Richard Smith081ad4d2017-01-24 19:39:46 +0000365.. option:: -nolibc
366
Richard Smith081ad4d2017-01-24 19:39:46 +0000367.. option:: -nomultidefs
368
Craig Topperd23254a2017-07-20 17:52:48 +0000369.. option:: -nopie, -no-pie
Richard Smith081ad4d2017-01-24 19:39:46 +0000370
Richard Smith081ad4d2017-01-24 19:39:46 +0000371.. option:: -noprebind
372
Petr Hosek08cb3422019-07-11 19:06:38 +0000373.. option:: -noprofilelib
374
Richard Smith081ad4d2017-01-24 19:39:46 +0000375.. option:: -noseglinkedit
376
Richard Smith081ad4d2017-01-24 19:39:46 +0000377.. option:: -nostartfiles
378
Richard Smith081ad4d2017-01-24 19:39:46 +0000379.. option:: -nostdinc, --no-standard-includes
380
Richard Smithb2c82a62017-01-27 01:54:42 +0000381.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000382.. option:: -nostdinc++
Richard Smithb2c82a62017-01-27 01:54:42 +0000383.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000384
385Disable standard #include directories for the C++ standard library
386
Richard Smith081ad4d2017-01-24 19:39:46 +0000387.. option:: -nostdlib, --no-standard-libraries
388
Boris Kolpackovb150d242017-08-30 09:15:53 +0000389.. program:: clang1
390.. option:: -nostdlib++
391.. program:: clang
392
Richard Smith081ad4d2017-01-24 19:39:46 +0000393.. option:: -nostdlibinc
394
Richard Smith081ad4d2017-01-24 19:39:46 +0000395.. option:: -o<file>, --output <arg>, --output=<arg>
396
397Write output to <file>
398
Richard Smith081ad4d2017-01-24 19:39:46 +0000399.. option:: -objcmt-atomic-property
400
401Make migration to 'atomic' properties
402
Richard Smith081ad4d2017-01-24 19:39:46 +0000403.. option:: -objcmt-migrate-all
404
405Enable migration to modern ObjC
406
Richard Smith081ad4d2017-01-24 19:39:46 +0000407.. option:: -objcmt-migrate-annotation
408
409Enable migration to property and method annotations
410
Richard Smith081ad4d2017-01-24 19:39:46 +0000411.. option:: -objcmt-migrate-designated-init
412
413Enable migration to infer NS\_DESIGNATED\_INITIALIZER for initializer methods
414
Richard Smith081ad4d2017-01-24 19:39:46 +0000415.. option:: -objcmt-migrate-instancetype
416
417Enable migration to infer instancetype for method result type
418
Richard Smith081ad4d2017-01-24 19:39:46 +0000419.. option:: -objcmt-migrate-literals
420
421Enable migration to modern ObjC literals
422
Richard Smith081ad4d2017-01-24 19:39:46 +0000423.. option:: -objcmt-migrate-ns-macros
424
425Enable migration to NS\_ENUM/NS\_OPTIONS macros
426
Richard Smith081ad4d2017-01-24 19:39:46 +0000427.. option:: -objcmt-migrate-property
428
429Enable migration to modern ObjC property
430
Richard Smith081ad4d2017-01-24 19:39:46 +0000431.. option:: -objcmt-migrate-property-dot-syntax
432
433Enable migration of setter/getter messages to property-dot syntax
434
Richard Smith081ad4d2017-01-24 19:39:46 +0000435.. option:: -objcmt-migrate-protocol-conformance
436
437Enable migration to add protocol conformance on classes
438
Richard Smith081ad4d2017-01-24 19:39:46 +0000439.. option:: -objcmt-migrate-readonly-property
440
441Enable migration to modern ObjC readonly property
442
Richard Smith081ad4d2017-01-24 19:39:46 +0000443.. option:: -objcmt-migrate-readwrite-property
444
445Enable migration to modern ObjC readwrite property
446
Richard Smith081ad4d2017-01-24 19:39:46 +0000447.. option:: -objcmt-migrate-subscripting
448
449Enable migration to modern ObjC subscripting
450
Richard Smith081ad4d2017-01-24 19:39:46 +0000451.. option:: -objcmt-ns-nonatomic-iosonly
452
453Enable migration to use NS\_NONATOMIC\_IOSONLY macro for setting property's 'atomic' attribute
454
Richard Smith081ad4d2017-01-24 19:39:46 +0000455.. option:: -objcmt-returns-innerpointer-property
456
457Enable migration to annotate property with NS\_RETURNS\_INNER\_POINTER
458
Richard Smith081ad4d2017-01-24 19:39:46 +0000459.. option:: -objcmt-whitelist-dir-path=<arg>, -objcmt-white-list-dir-path=<arg>
460
461Only modify files with a filename contained in the provided directory path
462
Richard Smith081ad4d2017-01-24 19:39:46 +0000463.. option:: -object
464
Fangrui Songd8c97292020-06-18 14:52:39 -0700465.. option:: --offload-arch=<arg>, --cuda-gpu-arch=<arg>, --no-offload-arch=<arg>
466
467CUDA/HIP offloading device architecture (e.g. sm\_35, gfx906). May be specified more than once.
468
Richard Smith081ad4d2017-01-24 19:39:46 +0000469.. option:: -p, --profile
470
Richard Smith081ad4d2017-01-24 19:39:46 +0000471.. option:: -pagezero\_size<arg>
472
Richard Smith081ad4d2017-01-24 19:39:46 +0000473.. option:: -pg
474
475Enable mcount instrumentation
476
Richard Smith081ad4d2017-01-24 19:39:46 +0000477.. option:: -pie
478
Richard Smith081ad4d2017-01-24 19:39:46 +0000479.. option:: -pipe, --pipe
480
481Use pipes between commands, when possible
482
Richard Smith081ad4d2017-01-24 19:39:46 +0000483.. option:: -prebind
484
Richard Smithb2c82a62017-01-27 01:54:42 +0000485.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000486.. option:: -prebind\_all\_twolevel\_modules
Richard Smithb2c82a62017-01-27 01:54:42 +0000487.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000488
Richard Smith081ad4d2017-01-24 19:39:46 +0000489.. option:: -preload
490
Richard Smith081ad4d2017-01-24 19:39:46 +0000491.. option:: --print-diagnostic-categories
492
Vedant Kumar368540f2018-08-23 17:55:03 +0000493.. option:: -print-effective-triple, --print-effective-triple
494
495Print the effective target triple
496
Richard Smith081ad4d2017-01-24 19:39:46 +0000497.. option:: -print-file-name=<file>, --print-file-name=<file>, --print-file-name <arg>
498
499Print the full library path of <file>
500
Richard Smith081ad4d2017-01-24 19:39:46 +0000501.. option:: -print-ivar-layout
502
503Enable Objective-C Ivar layout bitmap print trace
504
Richard Smith081ad4d2017-01-24 19:39:46 +0000505.. option:: -print-libgcc-file-name, --print-libgcc-file-name
506
507Print the library path for the currently used compiler runtime library ("libgcc.a" or "libclang\_rt.builtins.\*.a")
508
Richard Smith081ad4d2017-01-24 19:39:46 +0000509.. option:: -print-multi-directory, --print-multi-directory
510
Richard Smith081ad4d2017-01-24 19:39:46 +0000511.. option:: -print-multi-lib, --print-multi-lib
512
Richard Smith081ad4d2017-01-24 19:39:46 +0000513.. option:: -print-prog-name=<name>, --print-prog-name=<name>, --print-prog-name <arg>
514
515Print the full program path of <name>
516
Richard Smith78e23fd2017-04-13 22:39:49 +0000517.. option:: -print-resource-dir, --print-resource-dir
518
519Print the resource directory pathname
520
Richard Smith081ad4d2017-01-24 19:39:46 +0000521.. option:: -print-search-dirs, --print-search-dirs
522
523Print the paths used for finding libraries and programs
524
Vedant Kumar368540f2018-08-23 17:55:03 +0000525.. option:: -print-target-triple, --print-target-triple
526
527Print the normalized target triple
528
Fangrui Songd8c97292020-06-18 14:52:39 -0700529.. option:: -print-targets, --print-targets
530
531Print the registered targets
532
Richard Smith081ad4d2017-01-24 19:39:46 +0000533.. option:: -private\_bundle
534
Richard Smith081ad4d2017-01-24 19:39:46 +0000535.. option:: -pthread, -no-pthread
536
537Support POSIX threads in generated code
538
Richard Smith081ad4d2017-01-24 19:39:46 +0000539.. option:: -pthreads
540
Richard Smith081ad4d2017-01-24 19:39:46 +0000541.. option:: -rdynamic
542
Richard Smith081ad4d2017-01-24 19:39:46 +0000543.. option:: -read\_only\_relocs <arg>
544
Richard Smith081ad4d2017-01-24 19:39:46 +0000545.. option:: -relocatable-pch, --relocatable-pch
546
547Whether to build a relocatable precompiled header
548
Richard Smith081ad4d2017-01-24 19:39:46 +0000549.. option:: -remap
550
Richard Smith081ad4d2017-01-24 19:39:46 +0000551.. option:: -rewrite-legacy-objc
552
553Rewrite Legacy Objective-C source to C++
554
Richard Smith081ad4d2017-01-24 19:39:46 +0000555.. option:: -rtlib=<arg>, --rtlib=<arg>, --rtlib <arg>
556
557Compiler runtime library to use
558
Richard Smith081ad4d2017-01-24 19:39:46 +0000559.. option:: -save-stats=<arg>, --save-stats=<arg>, -save-stats (equivalent to -save-stats=cwd), --save-stats (equivalent to -save-stats=cwd)
560
561Save llvm statistics.
562
Richard Smith081ad4d2017-01-24 19:39:46 +0000563.. option:: -save-temps=<arg>, --save-temps=<arg>, -save-temps (equivalent to -save-temps=cwd), --save-temps (equivalent to -save-temps=cwd)
564
565Save intermediate compilation results.
566
Richard Smith081ad4d2017-01-24 19:39:46 +0000567.. option:: -sectalign <arg1> <arg2> <arg3>
568
Richard Smith081ad4d2017-01-24 19:39:46 +0000569.. option:: -sectcreate <arg1> <arg2> <arg3>
570
Richard Smith081ad4d2017-01-24 19:39:46 +0000571.. option:: -sectobjectsymbols <arg1> <arg2>
572
Richard Smith081ad4d2017-01-24 19:39:46 +0000573.. option:: -sectorder <arg1> <arg2> <arg3>
574
Richard Smith081ad4d2017-01-24 19:39:46 +0000575.. option:: -seg1addr<arg>
576
Richard Smith081ad4d2017-01-24 19:39:46 +0000577.. option:: -seg\_addr\_table <arg>
578
Richard Smithb2c82a62017-01-27 01:54:42 +0000579.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000580.. option:: -seg\_addr\_table\_filename <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000581.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000582
Richard Smith081ad4d2017-01-24 19:39:46 +0000583.. option:: -segaddr <arg1> <arg2>
584
Richard Smith081ad4d2017-01-24 19:39:46 +0000585.. option:: -segcreate <arg1> <arg2> <arg3>
586
Richard Smith081ad4d2017-01-24 19:39:46 +0000587.. option:: -seglinkedit
588
Richard Smith081ad4d2017-01-24 19:39:46 +0000589.. option:: -segprot <arg1> <arg2> <arg3>
590
Richard Smith081ad4d2017-01-24 19:39:46 +0000591.. option:: -segs\_read\_<arg>
592
Richard Smithb2c82a62017-01-27 01:54:42 +0000593.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000594.. option:: -segs\_read\_only\_addr <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000595.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000596
Richard Smithb2c82a62017-01-27 01:54:42 +0000597.. program:: clang2
Richard Smith081ad4d2017-01-24 19:39:46 +0000598.. option:: -segs\_read\_write\_addr <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000599.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000600
Richard Smith081ad4d2017-01-24 19:39:46 +0000601.. option:: -serialize-diagnostics <arg>, --serialize-diagnostics <arg>
602
603Serialize compiler diagnostics to a file
604
Richard Smith081ad4d2017-01-24 19:39:46 +0000605.. option:: -shared, --shared
606
Richard Smith081ad4d2017-01-24 19:39:46 +0000607.. option:: -shared-libgcc
608
Craig Topper16418662017-11-20 18:07:43 +0000609.. option:: -shared-libsan, -shared-libasan
610
Vedant Kumar368540f2018-08-23 17:55:03 +0000611Dynamically link the sanitizer runtime
612
Richard Smith081ad4d2017-01-24 19:39:46 +0000613.. option:: -single\_module
614
Richard Smith081ad4d2017-01-24 19:39:46 +0000615.. option:: -specs=<arg>, --specs=<arg>
616
Richard Smith081ad4d2017-01-24 19:39:46 +0000617.. option:: -static, --static
618
Richard Smith081ad4d2017-01-24 19:39:46 +0000619.. option:: -static-libgcc
620
Craig Topper16418662017-11-20 18:07:43 +0000621.. option:: -static-libsan
622
Vedant Kumar368540f2018-08-23 17:55:03 +0000623Statically link the sanitizer runtime
624
Richard Smith081ad4d2017-01-24 19:39:46 +0000625.. option:: -static-libstdc++
626
Craig Topper9624beb2020-03-10 11:08:19 -0700627.. option:: -static-openmp
628
629Use the static host OpenMP runtime while linking.
630
631.. option:: -static-pie
632
Richard Smith081ad4d2017-01-24 19:39:46 +0000633.. option:: -std-default=<arg>
634
Richard Smith081ad4d2017-01-24 19:39:46 +0000635.. option:: -stdlib=<arg>, --stdlib=<arg>, --stdlib <arg>
636
637C++ standard library to use
638
Richard Smith081ad4d2017-01-24 19:39:46 +0000639.. option:: -sub\_library<arg>
640
Richard Smithb2c82a62017-01-27 01:54:42 +0000641.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000642.. option:: -sub\_umbrella<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000643.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000644
Richard Smith081ad4d2017-01-24 19:39:46 +0000645.. option:: --sysroot=<arg>, --sysroot <arg>
646
Richard Smith081ad4d2017-01-24 19:39:46 +0000647.. option:: --target-help
648
Richard Smith081ad4d2017-01-24 19:39:46 +0000649.. option:: --target=<arg>, -target <arg>
650
651Generate code for the given target
652
Richard Smith081ad4d2017-01-24 19:39:46 +0000653.. option:: -time
654
655Time individual commands
656
Richard Smith081ad4d2017-01-24 19:39:46 +0000657.. option:: -traditional, --traditional
658
Richard Smith081ad4d2017-01-24 19:39:46 +0000659.. option:: -traditional-cpp, --traditional-cpp
660
661Enable some traditional CPP emulation
662
Richard Smith081ad4d2017-01-24 19:39:46 +0000663.. option:: -twolevel\_namespace
664
Richard Smithb2c82a62017-01-27 01:54:42 +0000665.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000666.. option:: -twolevel\_namespace\_hints
Richard Smithb2c82a62017-01-27 01:54:42 +0000667.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000668
Richard Smith081ad4d2017-01-24 19:39:46 +0000669.. option:: -umbrella <arg>
670
Richard Smith081ad4d2017-01-24 19:39:46 +0000671.. option:: -unexported\_symbols\_list <arg>
672
Craig Topper9624beb2020-03-10 11:08:19 -0700673.. option:: -unwindlib=<arg>, --unwindlib=<arg>
674
675Unwind library to use
676
Richard Smith081ad4d2017-01-24 19:39:46 +0000677.. option:: -v, --verbose
678
679Show commands to run and use verbose output
680
Richard Smith081ad4d2017-01-24 19:39:46 +0000681.. option:: --verify-debug-info
682
683Verify the binary representation of debug output
684
Richard Smith081ad4d2017-01-24 19:39:46 +0000685.. option:: --version
686
Craig Topper16418662017-11-20 18:07:43 +0000687Print version information
688
Richard Smith081ad4d2017-01-24 19:39:46 +0000689.. option:: -w, --no-warnings
690
691Suppress all warnings
692
Richard Smith081ad4d2017-01-24 19:39:46 +0000693.. option:: -weak-l<arg>
694
Richard Smith081ad4d2017-01-24 19:39:46 +0000695.. option:: -weak\_framework <arg>
696
Richard Smithb2c82a62017-01-27 01:54:42 +0000697.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000698.. option:: -weak\_library <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000699.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000700
Richard Smithb2c82a62017-01-27 01:54:42 +0000701.. program:: clang2
Richard Smith081ad4d2017-01-24 19:39:46 +0000702.. option:: -weak\_reference\_mismatches <arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000703.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000704
Richard Smith081ad4d2017-01-24 19:39:46 +0000705.. option:: -whatsloaded
706
Richard Smith081ad4d2017-01-24 19:39:46 +0000707.. option:: -whyload
708
Richard Smith081ad4d2017-01-24 19:39:46 +0000709.. option:: -working-directory<arg>, -working-directory=<arg>
710
711Resolve file paths relative to the specified directory
712
Richard Smith081ad4d2017-01-24 19:39:46 +0000713.. option:: -x<language>, --language <arg>, --language=<arg>
714
715Treat subsequent input files as having type <language>
716
Richard Smith081ad4d2017-01-24 19:39:46 +0000717.. option:: -y<arg>
718
719Actions
720=======
721The action to perform on the input.
722
Richard Smith081ad4d2017-01-24 19:39:46 +0000723.. option:: -E, --preprocess
724
725Only run the preprocessor
726
Richard Smith081ad4d2017-01-24 19:39:46 +0000727.. option:: -S, --assemble
728
729Only run preprocess and compilation steps
730
Richard Smithc5b2e002017-01-27 02:08:37 +0000731.. option:: -c, --compile
732
733Only run preprocess, compile, and assemble steps
734
Craig Topper9624beb2020-03-10 11:08:19 -0700735.. option:: -emit-interface-stubs
736
737Generate Inteface Stub Files.
738
Richard Smith081ad4d2017-01-24 19:39:46 +0000739.. option:: -emit-llvm
740
741Use the LLVM representation for assembler and object files
742
Craig Topper9624beb2020-03-10 11:08:19 -0700743.. option:: -emit-merged-ifs
744
745Generate Interface Stub Files, emit merged text not binary.
746
Richard Smith081ad4d2017-01-24 19:39:46 +0000747.. option:: -fsyntax-only
748
Richard Smith081ad4d2017-01-24 19:39:46 +0000749.. option:: -module-file-info
750
751Provide information about a particular module file
752
Richard Smith081ad4d2017-01-24 19:39:46 +0000753.. option:: --precompile
754
755Only precompile the input
756
Richard Smith081ad4d2017-01-24 19:39:46 +0000757.. option:: -rewrite-objc
758
759Rewrite Objective-C source to C++
760
Richard Smith081ad4d2017-01-24 19:39:46 +0000761.. option:: -verify-pch
762
763Load and verify that a pre-compiled header file is not stale
764
765Compilation flags
766=================
767
768Flags controlling the behavior of Clang during compilation. These flags have
769no effect during actions that do not perform compilation.
770
Richard Smithc5b2e002017-01-27 02:08:37 +0000771.. option:: -Xassembler <arg>
Richard Smith081ad4d2017-01-24 19:39:46 +0000772
Richard Smithc5b2e002017-01-27 02:08:37 +0000773Pass <arg> to the assembler
Richard Smith081ad4d2017-01-24 19:39:46 +0000774
Richard Smith081ad4d2017-01-24 19:39:46 +0000775.. option:: -Xclang <arg>
776
777Pass <arg> to the clang compiler
778
Boris Kolpackovb150d242017-08-30 09:15:53 +0000779.. option:: -fclang-abi-compat=<version>
780
781Attempt to match the ABI of Clang <version>
782
Richard Smith081ad4d2017-01-24 19:39:46 +0000783.. option:: -fcomment-block-commands=<arg>,<arg2>...
784
785Treat each comma separated argument in <arg> as a documentation comment block command
786
Vedant Kumar368540f2018-08-23 17:55:03 +0000787.. option:: -fcomplete-member-pointers, -fno-complete-member-pointers
788
789Require member pointer base types to be complete if they would be significant under the Microsoft ABI
790
791.. option:: -fcrash-diagnostics-dir=<arg>
792
Richard Smith081ad4d2017-01-24 19:39:46 +0000793.. option:: -fdeclspec, -fno-declspec
794
795Allow \_\_declspec as a keyword
796
Richard Smith081ad4d2017-01-24 19:39:46 +0000797.. option:: -fdepfile-entry=<arg>
798
Richard Smith081ad4d2017-01-24 19:39:46 +0000799.. option:: -fdiagnostics-fixit-info, -fno-diagnostics-fixit-info
800
Richard Smith081ad4d2017-01-24 19:39:46 +0000801.. option:: -fdiagnostics-format=<arg>
802
Richard Smith081ad4d2017-01-24 19:39:46 +0000803.. option:: -fdiagnostics-parseable-fixits
804
805Print fix-its in machine parseable form
806
Richard Smith081ad4d2017-01-24 19:39:46 +0000807.. option:: -fdiagnostics-print-source-range-info
808
809Print source range spans in numeric form
810
Richard Smith081ad4d2017-01-24 19:39:46 +0000811.. option:: -fdiagnostics-show-category=<arg>
812
Jonas Hahnfelda180fc42018-02-22 17:10:28 +0000813.. option:: -fdiscard-value-names, -fno-discard-value-names
814
815Discard value names in LLVM IR
816
Richard Smith081ad4d2017-01-24 19:39:46 +0000817.. option:: -fexperimental-new-pass-manager, -fno-experimental-new-pass-manager
818
819Enables an experimental new pass manager in LLVM.
820
Craig Topper16418662017-11-20 18:07:43 +0000821.. option:: -ffine-grained-bitfield-accesses, -fno-fine-grained-bitfield-accesses
822
Vedant Kumar368540f2018-08-23 17:55:03 +0000823Use separate accesses for consecutive bitfield runs with legal widths and alignments.
Craig Topper16418662017-11-20 18:07:43 +0000824
Fangrui Songd8c97292020-06-18 14:52:39 -0700825.. option:: -fglobal-isel, -fexperimental-isel, -fno-global-isel
826
827Enables the global instruction selector
828
Richard Smith081ad4d2017-01-24 19:39:46 +0000829.. option:: -finline-functions, -fno-inline-functions
830
831Inline suitable functions
832
Richard Smith081ad4d2017-01-24 19:39:46 +0000833.. option:: -finline-hint-functions
834
835Inline functions which are (explicitly or implicitly) marked inline
836
Richard Smith081ad4d2017-01-24 19:39:46 +0000837.. option:: -fno-crash-diagnostics
838
Richard Smith78e23fd2017-04-13 22:39:49 +0000839Disable auto-generation of preprocessed source files and a script for reproduction during a clang crash
840
Richard Smith081ad4d2017-01-24 19:39:46 +0000841.. option:: -fno-sanitize-blacklist
842
843Don't use blacklist file for sanitizers
844
Richard Smith081ad4d2017-01-24 19:39:46 +0000845.. option:: -fparse-all-comments
846
Craig Topper9624beb2020-03-10 11:08:19 -0700847.. option:: -frecord-command-line, -fno-record-command-line, -frecord-gcc-switches
Scott Linderde6beb02018-12-14 15:38:15 +0000848
Richard Smith081ad4d2017-01-24 19:39:46 +0000849.. option:: -fsanitize-address-field-padding=<arg>
850
851Level of field padding for AddressSanitizer
852
Craig Topperd23254a2017-07-20 17:52:48 +0000853.. option:: -fsanitize-address-globals-dead-stripping
854
855Enable linker dead stripping of globals in AddressSanitizer
856
Filipe Cabecinhas0eb50082018-11-02 17:29:04 +0000857.. option:: -fsanitize-address-poison-custom-array-cookie, -fno-sanitize-address-poison-custom-array-cookie
Jonas Hahnfelda180fc42018-02-22 17:10:28 +0000858
Craig Topper9624beb2020-03-10 11:08:19 -0700859Enable poisoning array cookies when using custom operator new\[\] in AddressSanitizer
Jonas Hahnfelda180fc42018-02-22 17:10:28 +0000860
Richard Smith081ad4d2017-01-24 19:39:46 +0000861.. option:: -fsanitize-address-use-after-scope, -fno-sanitize-address-use-after-scope
862
863Enable use-after-scope detection in AddressSanitizer
864
Craig Topper9624beb2020-03-10 11:08:19 -0700865.. option:: -fsanitize-address-use-odr-indicator, -fno-sanitize-address-use-odr-indicator
866
867Enable ODR indicator globals to avoid false ODR violation reports in partially sanitized programs at the cost of an increase in binary size
868
Richard Smith081ad4d2017-01-24 19:39:46 +0000869.. option:: -fsanitize-blacklist=<arg>
870
871Path to blacklist file for sanitizers
872
Craig Topper9624beb2020-03-10 11:08:19 -0700873.. option:: -fsanitize-cfi-canonical-jump-tables, -fno-sanitize-cfi-canonical-jump-tables
874
875Make the jump table addresses canonical in the symbol table
876
Richard Smith081ad4d2017-01-24 19:39:46 +0000877.. option:: -fsanitize-cfi-cross-dso, -fno-sanitize-cfi-cross-dso
878
879Enable control flow integrity (CFI) checks for cross-DSO calls.
880
Vlad Tsyrklevich634c6012017-10-31 22:39:44 +0000881.. option:: -fsanitize-cfi-icall-generalize-pointers
882
Craig Topper16418662017-11-20 18:07:43 +0000883Generalize pointers in CFI indirect call type signature checks
Vlad Tsyrklevich634c6012017-10-31 22:39:44 +0000884
Fangrui Song2a4317b2020-06-19 22:22:47 -0700885.. option:: -fsanitize-coverage-allowlist=<arg>
Fangrui Songd8c97292020-06-18 14:52:39 -0700886
Fangrui Song2a4317b2020-06-19 22:22:47 -0700887Restrict sanitizer coverage instrumentation exclusively to modules and functions that match the provided special case list, except the blocked ones
Fangrui Songd8c97292020-06-18 14:52:39 -0700888
Fangrui Song2a4317b2020-06-19 22:22:47 -0700889.. option:: -fsanitize-coverage-blocklist=<arg>
Fangrui Songd8c97292020-06-18 14:52:39 -0700890
Fangrui Song2a4317b2020-06-19 22:22:47 -0700891Disable sanitizer coverage instrumentation for modules and functions that match the provided special case list, even the allowed ones
Fangrui Songd8c97292020-06-18 14:52:39 -0700892
Richard Smith081ad4d2017-01-24 19:39:46 +0000893.. option:: -fsanitize-coverage=<arg1>,<arg2>..., -fno-sanitize-coverage=<arg1>,<arg2>...
894
895Specify the type of coverage instrumentation for Sanitizers
896
Craig Topper9624beb2020-03-10 11:08:19 -0700897.. option:: -fsanitize-hwaddress-abi=<arg>
898
899Select the HWAddressSanitizer ABI to target (interceptor or platform, default interceptor). This option is currently unused.
900
901.. option:: -fsanitize-link-c++-runtime, -fno-sanitize-link-c++-runtime
902
903.. option:: -fsanitize-link-runtime, -fno-sanitize-link-runtime
Richard Smith081ad4d2017-01-24 19:39:46 +0000904
Richard Smith081ad4d2017-01-24 19:39:46 +0000905.. option:: -fsanitize-memory-track-origins, -fno-sanitize-memory-track-origins
906
907Enable origins tracking in MemorySanitizer
908
Richard Smithb2c82a62017-01-27 01:54:42 +0000909.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +0000910.. option:: -fsanitize-memory-track-origins=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +0000911.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +0000912
913Enable origins tracking in MemorySanitizer
914
Craig Topper16418662017-11-20 18:07:43 +0000915.. option:: -fsanitize-memory-use-after-dtor, -fno-sanitize-memory-use-after-dtor
Richard Smith081ad4d2017-01-24 19:39:46 +0000916
917Enable use-after-destroy detection in MemorySanitizer
918
Boris Kolpackovb150d242017-08-30 09:15:53 +0000919.. option:: -fsanitize-minimal-runtime, -fno-sanitize-minimal-runtime
920
Fangrui Songd8c97292020-06-18 14:52:39 -0700921.. option:: -fsanitize-recover=<arg1>,<arg2>..., -fno-sanitize-recover=<arg1>,<arg2>..., -fsanitize-recover (equivalent to -fsanitize-recover=all)
Richard Smith081ad4d2017-01-24 19:39:46 +0000922
923Enable recovery for specified sanitizers
924
Richard Smith081ad4d2017-01-24 19:39:46 +0000925.. option:: -fsanitize-stats, -fno-sanitize-stats
926
927Enable sanitizer statistics gathering.
928
Richard Smith081ad4d2017-01-24 19:39:46 +0000929.. option:: -fsanitize-thread-atomics, -fno-sanitize-thread-atomics
930
931Enable atomic operations instrumentation in ThreadSanitizer (default)
932
Richard Smith081ad4d2017-01-24 19:39:46 +0000933.. option:: -fsanitize-thread-func-entry-exit, -fno-sanitize-thread-func-entry-exit
934
935Enable function entry/exit instrumentation in ThreadSanitizer (default)
936
Richard Smith081ad4d2017-01-24 19:39:46 +0000937.. option:: -fsanitize-thread-memory-access, -fno-sanitize-thread-memory-access
938
939Enable memory access instrumentation in ThreadSanitizer (default)
940
Fangrui Songd8c97292020-06-18 14:52:39 -0700941.. option:: -fsanitize-trap=<arg1>,<arg2>..., -fno-sanitize-trap=<arg1>,<arg2>..., -fsanitize-trap (equivalent to -fsanitize-trap=all), -fsanitize-undefined-trap-on-error (equivalent to -fsanitize-trap=undefined)
Richard Smith081ad4d2017-01-24 19:39:46 +0000942
943Enable trapping for specified sanitizers
944
Richard Smith081ad4d2017-01-24 19:39:46 +0000945.. option:: -fsanitize-undefined-strip-path-components=<number>
946
947Strip (or keep only, if negative) a given number of path components when emitting check metadata.
948
Richard Smith081ad4d2017-01-24 19:39:46 +0000949.. option:: -fsanitize=<check>,<arg2>..., -fno-sanitize=<arg1>,<arg2>...
950
951Turn on runtime checks for various forms of undefined or suspicious behavior. See user manual for available checks
952
Vedant Kumar368540f2018-08-23 17:55:03 +0000953.. option:: -moutline, -mno-outline
954
955Enable function outlining (AArch64 only)
956
Richard Smith081ad4d2017-01-24 19:39:46 +0000957.. option:: --param <arg>, --param=<arg>
958
Craig Topper9624beb2020-03-10 11:08:19 -0700959.. option:: -print-supported-cpus, --print-supported-cpus, -mcpu=?, -mtune=?
960
961Print supported cpu models for the given target (if target is not specified, it will print the supported cpus for the default target)
962
Richard Smith081ad4d2017-01-24 19:39:46 +0000963.. option:: -std=<arg>, --std=<arg>, --std <arg>
964
965Language standard to compile for
966
Richard Smithc5b2e002017-01-27 02:08:37 +0000967Preprocessor flags
968~~~~~~~~~~~~~~~~~~
969
970Flags controlling the behavior of the Clang preprocessor.
971
972.. option:: -C, --comments
973
974Include comments in preprocessed output
975
976.. option:: -CC, --comments-in-macros
977
978Include comments from within macros in preprocessed output
979
980.. option:: -D<macro>=<value>, --define-macro <arg>, --define-macro=<arg>
981
982Define <macro> to <value> (or 1 if <value> omitted)
983
984.. option:: -H, --trace-includes
985
986Show header includes and nesting depth
987
988.. option:: -P, --no-line-commands
989
990Disable linemarker output in -E mode
991
992.. option:: -U<macro>, --undefine-macro <arg>, --undefine-macro=<arg>
993
994Undefine macro <macro>
995
996.. option:: -Wp,<arg>,<arg2>...
997
998Pass the comma separated arguments in <arg> to the preprocessor
999
1000.. option:: -Xpreprocessor <arg>
1001
1002Pass <arg> to the preprocessor
1003
Craig Topper9624beb2020-03-10 11:08:19 -07001004.. option:: -fmacro-prefix-map=<arg>
1005
1006remap file source paths in predefined preprocessor macros
1007
Richard Smith081ad4d2017-01-24 19:39:46 +00001008Include path management
Richard Smithc5b2e002017-01-27 02:08:37 +00001009-----------------------
Richard Smith081ad4d2017-01-24 19:39:46 +00001010
1011Flags controlling how ``#include``\s are resolved to files.
1012
Richard Smithc5b2e002017-01-27 02:08:37 +00001013.. option:: -I<dir>, --include-directory <arg>, --include-directory=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00001014
1015Add directory to include search path
1016
Richard Smith081ad4d2017-01-24 19:39:46 +00001017.. option:: -I-, --include-barrier
1018
Richard Smithc5b2e002017-01-27 02:08:37 +00001019Restrict all prior -I flags to double-quoted inclusion and remove current directory from include path
1020
Jonas Hahnfelda180fc42018-02-22 17:10:28 +00001021.. option:: --cuda-path-ignore-env
1022
1023Ignore environment variables to detect CUDA installation
1024
Richard Smith081ad4d2017-01-24 19:39:46 +00001025.. option:: --cuda-path=<arg>
1026
1027CUDA installation path
1028
Richard Smith081ad4d2017-01-24 19:39:46 +00001029.. option:: -cxx-isystem<directory>
1030
1031Add directory to the C++ SYSTEM include search path
1032
Richard Smith081ad4d2017-01-24 19:39:46 +00001033.. option:: -fbuild-session-file=<file>
1034
1035Use the last modification time of <file> as the build session timestamp
1036
Richard Smith081ad4d2017-01-24 19:39:46 +00001037.. option:: -fbuild-session-timestamp=<time since Epoch in seconds>
1038
1039Time when the current build session started
1040
Boris Kolpackovb150d242017-08-30 09:15:53 +00001041.. option:: -fmodule-file=\[<name>=\]<file>
1042
1043Specify the mapping of module name to precompiled module file, or load a module file if name is omitted.
1044
Richard Smith081ad4d2017-01-24 19:39:46 +00001045.. option:: -fmodules-cache-path=<directory>
1046
1047Specify the module cache path
1048
Richard Smith081ad4d2017-01-24 19:39:46 +00001049.. option:: -fmodules-disable-diagnostic-validation
1050
1051Disable validation of the diagnostic options when loading the module
1052
Richard Smith081ad4d2017-01-24 19:39:46 +00001053.. option:: -fmodules-prune-after=<seconds>
1054
1055Specify the interval (in seconds) after which a module file will be considered unused
1056
Richard Smith081ad4d2017-01-24 19:39:46 +00001057.. option:: -fmodules-prune-interval=<seconds>
1058
1059Specify the interval (in seconds) between attempts to prune the module cache
1060
Richard Smith081ad4d2017-01-24 19:39:46 +00001061.. option:: -fmodules-user-build-path <directory>
1062
1063Specify the module user build path
1064
Richard Smith081ad4d2017-01-24 19:39:46 +00001065.. option:: -fmodules-validate-once-per-build-session
1066
1067Don't verify input files for the modules if the module has been successfully validated or loaded during this build session
1068
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00001069.. option:: -fmodules-validate-system-headers, -fno-modules-validate-system-headers
Richard Smith081ad4d2017-01-24 19:39:46 +00001070
1071Validate the system headers that a module depends on when loading the module
1072
Richard Smith081ad4d2017-01-24 19:39:46 +00001073.. option:: -fprebuilt-module-path=<directory>
1074
1075Specify the prebuilt module path
1076
Richard Smith081ad4d2017-01-24 19:39:46 +00001077.. option:: -idirafter<arg>, --include-directory-after <arg>, --include-directory-after=<arg>
1078
1079Add directory to AFTER include search path
1080
Richard Smith081ad4d2017-01-24 19:39:46 +00001081.. option:: -iframework<arg>
1082
1083Add directory to SYSTEM framework search path
1084
Richard Smith78e23fd2017-04-13 22:39:49 +00001085.. option:: -iframeworkwithsysroot<directory>
1086
1087Add directory to SYSTEM framework search path, absolute paths are relative to -isysroot
1088
Richard Smith081ad4d2017-01-24 19:39:46 +00001089.. option:: -imacros<file>, --imacros<file>, --imacros=<arg>
1090
1091Include macros from file before parsing
1092
Richard Smith081ad4d2017-01-24 19:39:46 +00001093.. option:: -include<file>, --include<file>, --include=<arg>
1094
1095Include file before parsing
1096
Richard Smith081ad4d2017-01-24 19:39:46 +00001097.. option:: -include-pch <file>
1098
1099Include precompiled header file
1100
Richard Smith081ad4d2017-01-24 19:39:46 +00001101.. option:: -iprefix<dir>, --include-prefix <arg>, --include-prefix=<arg>
1102
1103Set the -iwithprefix/-iwithprefixbefore prefix
1104
Richard Smith081ad4d2017-01-24 19:39:46 +00001105.. option:: -iquote<directory>
1106
1107Add directory to QUOTE include search path
1108
Richard Smith081ad4d2017-01-24 19:39:46 +00001109.. option:: -isysroot<dir>
1110
1111Set the system root directory (usually /)
1112
Richard Smith081ad4d2017-01-24 19:39:46 +00001113.. option:: -isystem<directory>
1114
1115Add directory to SYSTEM include search path
1116
Richard Smith081ad4d2017-01-24 19:39:46 +00001117.. option:: -isystem-after<directory>
1118
1119Add directory to end of the SYSTEM include search path
1120
Richard Smith081ad4d2017-01-24 19:39:46 +00001121.. option:: -ivfsoverlay<arg>
1122
1123Overlay the virtual filesystem described by file over the real file system
1124
Richard Smith081ad4d2017-01-24 19:39:46 +00001125.. option:: -iwithprefix<dir>, --include-with-prefix <arg>, --include-with-prefix-after <arg>, --include-with-prefix-after=<arg>, --include-with-prefix=<arg>
1126
1127Set directory to SYSTEM include search path with prefix
1128
Richard Smith081ad4d2017-01-24 19:39:46 +00001129.. option:: -iwithprefixbefore<dir>, --include-with-prefix-before <arg>, --include-with-prefix-before=<arg>
1130
1131Set directory to include search path with prefix
1132
Richard Smith081ad4d2017-01-24 19:39:46 +00001133.. option:: -iwithsysroot<directory>
1134
1135Add directory to SYSTEM include search path, absolute paths are relative to -isysroot
1136
Craig Topper9624beb2020-03-10 11:08:19 -07001137.. option:: --libomptarget-nvptx-path=<arg>
1138
1139Path to libomptarget-nvptx libraries
1140
Richard Smith081ad4d2017-01-24 19:39:46 +00001141.. option:: --ptxas-path=<arg>
1142
1143Path to ptxas (used for compiling CUDA code)
1144
Fangrui Songd8c97292020-06-18 14:52:39 -07001145.. option:: --rocm-path=<arg>
1146
1147ROCm installation path, used for finding and automatically linking required bitcode libraries.
1148
Craig Topper9624beb2020-03-10 11:08:19 -07001149.. program:: clang1
1150.. option:: -stdlib++-isystem<directory>
1151.. program:: clang
1152
1153Use directory as the C++ standard library include path
1154
Richard Smith081ad4d2017-01-24 19:39:46 +00001155.. option:: --system-header-prefix=<prefix>, --no-system-header-prefix=<prefix>, --system-header-prefix <arg>
1156
1157Treat all #include paths starting with <prefix> as including a system header.
1158
1159Dependency file generation
Richard Smithc5b2e002017-01-27 02:08:37 +00001160--------------------------
Richard Smith081ad4d2017-01-24 19:39:46 +00001161
1162Flags controlling generation of a dependency file for ``make``-like build
1163systems.
1164
Richard Smith081ad4d2017-01-24 19:39:46 +00001165.. option:: -M, --dependencies
1166
1167Like -MD, but also implies -E and writes to stdout by default
1168
Richard Smith081ad4d2017-01-24 19:39:46 +00001169.. option:: -MD, --write-dependencies
1170
1171Write a depfile containing user and system headers
1172
Richard Smith081ad4d2017-01-24 19:39:46 +00001173.. option:: -MF<file>
1174
1175Write depfile output from -MMD, -MD, -MM, or -M to <file>
1176
Richard Smith081ad4d2017-01-24 19:39:46 +00001177.. option:: -MG, --print-missing-file-dependencies
1178
1179Add missing headers to depfile
1180
Richard Smith081ad4d2017-01-24 19:39:46 +00001181.. option:: -MJ<arg>
1182
1183Write a compilation database entry per input
1184
Richard Smith081ad4d2017-01-24 19:39:46 +00001185.. option:: -MM, --user-dependencies
1186
1187Like -MMD, but also implies -E and writes to stdout by default
1188
Richard Smith081ad4d2017-01-24 19:39:46 +00001189.. option:: -MMD, --write-user-dependencies
1190
1191Write a depfile containing user headers
1192
Richard Smith081ad4d2017-01-24 19:39:46 +00001193.. option:: -MP
1194
1195Create phony target for each dependency (other than main file)
1196
Richard Smith081ad4d2017-01-24 19:39:46 +00001197.. option:: -MQ<arg>
1198
1199Specify name of main file output to quote in depfile
1200
Richard Smith081ad4d2017-01-24 19:39:46 +00001201.. option:: -MT<arg>
1202
1203Specify name of main file output in depfile
1204
Richard Smith081ad4d2017-01-24 19:39:46 +00001205.. option:: -MV
1206
1207Use NMake/Jom format for the depfile
1208
1209Dumping preprocessor state
Richard Smithc5b2e002017-01-27 02:08:37 +00001210--------------------------
Richard Smith081ad4d2017-01-24 19:39:46 +00001211
1212Flags allowing the state of the preprocessor to be dumped in various ways.
1213
Richard Smith081ad4d2017-01-24 19:39:46 +00001214.. option:: -d
1215
Richard Smithb2c82a62017-01-27 01:54:42 +00001216.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001217.. option:: -d<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001218.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001219
Richard Smith081ad4d2017-01-24 19:39:46 +00001220.. option:: -dD
1221
1222Print macro definitions in -E mode in addition to normal output
1223
Richard Smith081ad4d2017-01-24 19:39:46 +00001224.. option:: -dI
1225
1226Print include directives in -E mode in addition to normal output
1227
Richard Smith081ad4d2017-01-24 19:39:46 +00001228.. option:: -dM
1229
1230Print macro definitions in -E mode instead of normal output
1231
1232Diagnostic flags
1233~~~~~~~~~~~~~~~~
1234
1235Flags controlling which warnings, errors, and remarks Clang will generate.
1236See the :doc:`full list of warning and remark flags <DiagnosticsReference>`.
1237
Richard Smith081ad4d2017-01-24 19:39:46 +00001238.. option:: -R<remark>
1239
1240Enable the specified remark
1241
Richard Smith081ad4d2017-01-24 19:39:46 +00001242.. option:: -Rpass-analysis=<arg>
1243
1244Report transformation analysis from optimization passes whose name matches the given POSIX regular expression
1245
Richard Smith081ad4d2017-01-24 19:39:46 +00001246.. option:: -Rpass-missed=<arg>
1247
1248Report missed transformations by optimization passes whose name matches the given POSIX regular expression
1249
Richard Smith081ad4d2017-01-24 19:39:46 +00001250.. option:: -Rpass=<arg>
1251
1252Report transformations performed by optimization passes whose name matches the given POSIX regular expression
1253
Richard Smith081ad4d2017-01-24 19:39:46 +00001254.. option:: -W<warning>, --extra-warnings, --warn-<arg>, --warn-=<arg>
1255
1256Enable the specified warning
1257
Richard Smith081ad4d2017-01-24 19:39:46 +00001258.. option:: -Wdeprecated, -Wno-deprecated
1259
Richard Smithc5b2e002017-01-27 02:08:37 +00001260Enable warnings for deprecated constructs and define \_\_DEPRECATED
Richard Smith081ad4d2017-01-24 19:39:46 +00001261
Richard Smith081ad4d2017-01-24 19:39:46 +00001262.. option:: -Wnonportable-cfstrings<arg>, -Wno-nonportable-cfstrings<arg>
1263
Richard Smith081ad4d2017-01-24 19:39:46 +00001264Target-independent compilation options
1265~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Richard Smith081ad4d2017-01-24 19:39:46 +00001266.. option:: -Wframe-larger-than=<arg>
1267
Richard Smith081ad4d2017-01-24 19:39:46 +00001268.. option:: -fPIC, -fno-PIC
1269
Richard Smith081ad4d2017-01-24 19:39:46 +00001270.. option:: -fPIE, -fno-PIE
1271
Vedant Kumar368540f2018-08-23 17:55:03 +00001272.. option:: -faddrsig, -fno-addrsig
1273
1274Emit an address-significance table
1275
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00001276.. option:: -falign-functions, -fno-align-functions
1277
1278.. program:: clang1
1279.. option:: -falign-functions=<arg>
1280.. program:: clang
1281
Richard Smithb2c82a62017-01-27 01:54:42 +00001282.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001283.. option:: -faligned-allocation, -faligned-new, -fno-aligned-allocation
Richard Smithb2c82a62017-01-27 01:54:42 +00001284.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001285
1286Enable C++17 aligned allocation functions
1287
Craig Topperd23254a2017-07-20 17:52:48 +00001288.. option:: -fallow-editor-placeholders, -fno-allow-editor-placeholders
1289
1290Treat editor placeholders as valid source code
1291
Richard Smith081ad4d2017-01-24 19:39:46 +00001292.. option:: -fallow-unsupported
1293
Richard Smith78e23fd2017-04-13 22:39:49 +00001294.. option:: -faltivec, -fno-altivec
Richard Smith081ad4d2017-01-24 19:39:46 +00001295
Richard Smith081ad4d2017-01-24 19:39:46 +00001296.. option:: -fansi-escape-codes
1297
1298Use ANSI escape codes for diagnostics
1299
Richard Smith081ad4d2017-01-24 19:39:46 +00001300.. option:: -fapple-kext, -findirect-virtual-calls, -fterminated-vtables
1301
1302Use Apple's kernel extensions ABI
1303
Craig Topper9624beb2020-03-10 11:08:19 -07001304.. option:: -fapple-link-rtlib
1305
1306Force linking the clang builtins runtime library
1307
Richard Smith081ad4d2017-01-24 19:39:46 +00001308.. option:: -fapple-pragma-pack, -fno-apple-pragma-pack
1309
1310Enable Apple gcc-compatible #pragma pack handling
1311
Richard Smith081ad4d2017-01-24 19:39:46 +00001312.. option:: -fapplication-extension, -fno-application-extension
1313
1314Restrict code to those available for App Extensions
1315
Richard Smith081ad4d2017-01-24 19:39:46 +00001316.. option:: -fasm, -fno-asm
1317
Richard Smith081ad4d2017-01-24 19:39:46 +00001318.. option:: -fasm-blocks, -fno-asm-blocks
1319
Richard Smith081ad4d2017-01-24 19:39:46 +00001320.. option:: -fassociative-math, -fno-associative-math
1321
Richard Smith081ad4d2017-01-24 19:39:46 +00001322.. option:: -fassume-sane-operator-new, -fno-assume-sane-operator-new
1323
Richard Smith081ad4d2017-01-24 19:39:46 +00001324.. option:: -fast
1325
Richard Smith081ad4d2017-01-24 19:39:46 +00001326.. option:: -fastcp
1327
Richard Smith081ad4d2017-01-24 19:39:46 +00001328.. option:: -fastf
1329
Richard Smith081ad4d2017-01-24 19:39:46 +00001330.. option:: -fasynchronous-unwind-tables, -fno-asynchronous-unwind-tables
1331
Richard Smith081ad4d2017-01-24 19:39:46 +00001332.. option:: -fautolink, -fno-autolink
1333
Fangrui Songd8c97292020-06-18 14:52:39 -07001334.. option:: -fbasic-block-sections=<arg>
Sriraman Tallame0bca462020-06-01 23:17:29 -07001335
1336Generate labels for each basic block or place each basic block or a subset of basic blocks in its own section.
1337
Richard Smith081ad4d2017-01-24 19:39:46 +00001338.. option:: -fblocks, -fno-blocks
1339
1340Enable the 'blocks' language feature
1341
Richard Smith081ad4d2017-01-24 19:39:46 +00001342.. option:: -fbootclasspath=<arg>, --bootclasspath <arg>, --bootclasspath=<arg>
1343
Richard Smith081ad4d2017-01-24 19:39:46 +00001344.. option:: -fborland-extensions, -fno-borland-extensions
1345
1346Accept non-standard constructs supported by the Borland compiler
1347
Richard Smith081ad4d2017-01-24 19:39:46 +00001348.. option:: -fbracket-depth=<arg>
1349
Richard Smith081ad4d2017-01-24 19:39:46 +00001350.. option:: -fbuiltin, -fno-builtin
1351
Richard Smith081ad4d2017-01-24 19:39:46 +00001352.. option:: -fbuiltin-module-map
1353
1354Load the clang builtins module map file.
1355
Vedant Kumar368540f2018-08-23 17:55:03 +00001356.. option:: -fc++-static-destructors, -fno-c++-static-destructors
1357
Richard Smith081ad4d2017-01-24 19:39:46 +00001358.. option:: -fcaret-diagnostics, -fno-caret-diagnostics
1359
Craig Topper596527b2018-01-23 18:40:15 +00001360.. option:: -fcf-protection=<arg>, -fcf-protection (equivalent to -fcf-protection=full)
1361
1362Instrument control-flow architecture protection. Options: return, branch, full, none.
1363
Craig Topper9624beb2020-03-10 11:08:19 -07001364.. option:: -fcf-runtime-abi=<arg>
1365
Vedant Kumar368540f2018-08-23 17:55:03 +00001366.. option:: -fchar8\_t, -fno-char8\_t
1367
1368Enable C++ builtin type char8\_t
1369
Richard Smith081ad4d2017-01-24 19:39:46 +00001370.. option:: -fclasspath=<arg>, --CLASSPATH <arg>, --CLASSPATH=<arg>, --classpath <arg>, --classpath=<arg>
1371
Richard Smith081ad4d2017-01-24 19:39:46 +00001372.. option:: -fcolor-diagnostics, -fno-color-diagnostics
1373
Fangrui Songd8c97292020-06-18 14:52:39 -07001374Enable colors in diagnostics
Richard Smith081ad4d2017-01-24 19:39:46 +00001375
Richard Smith081ad4d2017-01-24 19:39:46 +00001376.. option:: -fcommon, -fno-common
1377
Craig Topper9624beb2020-03-10 11:08:19 -07001378Place uninitialized global variables in a common block
Sjoerd Meijer3d9a0442020-03-09 19:25:24 +00001379
Richard Smith081ad4d2017-01-24 19:39:46 +00001380.. option:: -fcompile-resource=<arg>, --resource <arg>, --resource=<arg>
1381
Richard Smith081ad4d2017-01-24 19:39:46 +00001382.. option:: -fconstant-cfstrings, -fno-constant-cfstrings
1383
Richard Smith081ad4d2017-01-24 19:39:46 +00001384.. option:: -fconstant-string-class=<arg>
1385
Richard Smith081ad4d2017-01-24 19:39:46 +00001386.. option:: -fconstexpr-backtrace-limit=<arg>
1387
Richard Smith081ad4d2017-01-24 19:39:46 +00001388.. option:: -fconstexpr-depth=<arg>
1389
Richard Smith081ad4d2017-01-24 19:39:46 +00001390.. option:: -fconstexpr-steps=<arg>
1391
Craig Topper9624beb2020-03-10 11:08:19 -07001392.. option:: -fconvergent-functions
1393
1394Assume functions may be convergent
1395
Richard Smith081ad4d2017-01-24 19:39:46 +00001396.. option:: -fcoroutines-ts, -fno-coroutines-ts
1397
1398Enable support for the C++ Coroutines TS
1399
Richard Smith081ad4d2017-01-24 19:39:46 +00001400.. option:: -fcoverage-mapping, -fno-coverage-mapping
1401
1402Generate coverage mapping to enable code coverage analysis
1403
Richard Smith081ad4d2017-01-24 19:39:46 +00001404.. option:: -fcreate-profile
1405
Craig Topper9624beb2020-03-10 11:08:19 -07001406.. option:: -fcs-profile-generate
1407
1408Generate instrumented code to collect context sensitive execution counts into default.profraw (overridden by LLVM\_PROFILE\_FILE env var)
1409
1410.. program:: clang1
1411.. option:: -fcs-profile-generate=<directory>
1412.. program:: clang
1413
1414Generate instrumented code to collect context sensitive execution counts into <directory>/default.profraw (overridden by LLVM\_PROFILE\_FILE env var)
1415
Fangrui Songd8c97292020-06-18 14:52:39 -07001416.. option:: -fcuda-approx-transcendentals, -fno-cuda-approx-transcendentals
1417
1418Use approximate transcendental functions
1419
1420.. option:: -fcuda-short-ptr, -fno-cuda-short-ptr
1421
1422Use 32-bit pointers for accessing const/local/shared address spaces
1423
Richard Smith081ad4d2017-01-24 19:39:46 +00001424.. option:: -fcxx-exceptions, -fno-cxx-exceptions
1425
1426Enable C++ exceptions
1427
Richard Smith081ad4d2017-01-24 19:39:46 +00001428.. option:: -fcxx-modules, -fno-cxx-modules
1429
Richard Smith081ad4d2017-01-24 19:39:46 +00001430.. option:: -fdata-sections, -fno-data-sections
1431
Craig Topper9624beb2020-03-10 11:08:19 -07001432Place each data in its own section
1433
1434.. option:: -fdebug-compilation-dir <arg>, -fdebug-compilation-dir=<arg>
1435
1436The compilation directory to embed in the debug info.
1437
1438.. option:: -fdebug-default-version=<arg>
1439
1440Default DWARF version to use, if a -g option caused DWARF debug info to be produced
Richard Smith081ad4d2017-01-24 19:39:46 +00001441
Richard Smith081ad4d2017-01-24 19:39:46 +00001442.. option:: -fdebug-info-for-profiling, -fno-debug-info-for-profiling
1443
Fangrui Songd8c97292020-06-18 14:52:39 -07001444Emit extra debug info to make sample profile more accurate
Richard Smith081ad4d2017-01-24 19:39:46 +00001445
Richard Smith78e23fd2017-04-13 22:39:49 +00001446.. option:: -fdebug-macro, -fno-debug-macro
1447
1448Emit macro debug information
1449
Richard Smith081ad4d2017-01-24 19:39:46 +00001450.. option:: -fdebug-pass-arguments
1451
Richard Smith081ad4d2017-01-24 19:39:46 +00001452.. option:: -fdebug-pass-structure
1453
Richard Smith081ad4d2017-01-24 19:39:46 +00001454.. option:: -fdebug-prefix-map=<arg>
1455
1456remap file source paths in debug info
1457
Craig Topper9624beb2020-03-10 11:08:19 -07001458.. option:: -fdebug-ranges-base-address, -fno-debug-ranges-base-address
1459
Fangrui Songd8c97292020-06-18 14:52:39 -07001460Use DWARF base address selection entries in .debug\_ranges
Craig Topper9624beb2020-03-10 11:08:19 -07001461
Richard Smith081ad4d2017-01-24 19:39:46 +00001462.. option:: -fdebug-types-section, -fno-debug-types-section
1463
1464Place debug types in their own section (ELF Only)
1465
Richard Smith081ad4d2017-01-24 19:39:46 +00001466.. option:: -fdelayed-template-parsing, -fno-delayed-template-parsing
1467
1468Parse templated function definitions at the end of the translation unit
1469
Vedant Kumar368540f2018-08-23 17:55:03 +00001470.. option:: -fdelete-null-pointer-checks, -fno-delete-null-pointer-checks
1471
Fangrui Songd8c97292020-06-18 14:52:39 -07001472Treat usage of null pointers as undefined behavior (default)
Vedant Kumar368540f2018-08-23 17:55:03 +00001473
Richard Smith081ad4d2017-01-24 19:39:46 +00001474.. option:: -fdenormal-fp-math=<arg>
1475
Richard Smith081ad4d2017-01-24 19:39:46 +00001476.. option:: -fdiagnostics-absolute-paths
1477
1478Print absolute paths in diagnostics
1479
Richard Smith081ad4d2017-01-24 19:39:46 +00001480.. option:: -fdiagnostics-color, -fno-diagnostics-color
1481
Richard Smithb2c82a62017-01-27 01:54:42 +00001482.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001483.. option:: -fdiagnostics-color=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001484.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001485
Craig Topperd23254a2017-07-20 17:52:48 +00001486.. option:: -fdiagnostics-hotness-threshold=<number>
1487
1488Prevent optimization remarks from being output if they do not have at least this profile count
1489
Richard Smith081ad4d2017-01-24 19:39:46 +00001490.. option:: -fdiagnostics-show-hotness, -fno-diagnostics-show-hotness
1491
1492Enable profile hotness information in diagnostic line
1493
Richard Smith081ad4d2017-01-24 19:39:46 +00001494.. option:: -fdiagnostics-show-note-include-stack, -fno-diagnostics-show-note-include-stack
1495
1496Display include stacks for diagnostic notes
1497
Richard Smith081ad4d2017-01-24 19:39:46 +00001498.. option:: -fdiagnostics-show-option, -fno-diagnostics-show-option
1499
1500Print option name with mappable diagnostics
1501
Richard Smith081ad4d2017-01-24 19:39:46 +00001502.. option:: -fdiagnostics-show-template-tree
1503
1504Print a template comparison tree for differing templates
1505
Vedant Kumar368540f2018-08-23 17:55:03 +00001506.. option:: -fdigraphs, -fno-digraphs
1507
1508Enable alternative token representations '<:', ':>', '<%', '%>', '%:', '%:%:' (default)
1509
Richard Smith081ad4d2017-01-24 19:39:46 +00001510.. option:: -fdollars-in-identifiers, -fno-dollars-in-identifiers
1511
1512Allow '$' in identifiers
1513
Craig Topper16418662017-11-20 18:07:43 +00001514.. option:: -fdouble-square-bracket-attributes, -fno-double-square-bracket-attributes
1515
1516Enable '\[\[\]\]' attributes in all C and C++ language modes
1517
Richard Smith081ad4d2017-01-24 19:39:46 +00001518.. option:: -fdwarf-directory-asm, -fno-dwarf-directory-asm
1519
Craig Topper188252d2017-12-11 21:09:16 +00001520.. option:: -fdwarf-exceptions
1521
1522Use DWARF style exceptions
1523
Richard Smith081ad4d2017-01-24 19:39:46 +00001524.. option:: -felide-constructors, -fno-elide-constructors
1525
Richard Smith081ad4d2017-01-24 19:39:46 +00001526.. option:: -feliminate-unused-debug-symbols, -fno-eliminate-unused-debug-symbols
1527
Richard Smith081ad4d2017-01-24 19:39:46 +00001528.. option:: -fembed-bitcode=<option>, -fembed-bitcode (equivalent to -fembed-bitcode=all), -fembed-bitcode-marker (equivalent to -fembed-bitcode=marker)
1529
1530Embed LLVM bitcode (option: off, all, bitcode, marker)
1531
Richard Smith081ad4d2017-01-24 19:39:46 +00001532.. option:: -femit-all-decls
1533
1534Emit all declarations, even if unused
1535
Richard Smith081ad4d2017-01-24 19:39:46 +00001536.. option:: -femulated-tls, -fno-emulated-tls
1537
1538Use emutls functions to access thread\_local variables
1539
Fangrui Songd8c97292020-06-18 14:52:39 -07001540.. option:: -fenable-matrix
1541
1542Enable matrix data type and related builtin functions
1543
Richard Smith081ad4d2017-01-24 19:39:46 +00001544.. option:: -fencoding=<arg>, --encoding <arg>, --encoding=<arg>
1545
Richard Smith081ad4d2017-01-24 19:39:46 +00001546.. option:: -ferror-limit=<arg>
1547
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00001548.. option:: -fescaping-block-tail-calls, -fno-escaping-block-tail-calls
1549
Richard Smith081ad4d2017-01-24 19:39:46 +00001550.. option:: -fexceptions, -fno-exceptions
1551
1552Enable support for exception handling
1553
Richard Smith081ad4d2017-01-24 19:39:46 +00001554.. option:: -fexec-charset=<arg>
1555
Craig Topper9624beb2020-03-10 11:08:19 -07001556.. option:: -fexperimental-new-constant-interpreter
1557
1558Enable the experimental new constant interpreter
1559
Fangrui Songd8c97292020-06-18 14:52:39 -07001560.. option:: -fexperimental-relative-c++-abi-vtables, -fno-experimental-relative-c++-abi-vtables
1561
1562Use the experimental C++ class ABI for classes with virtual tables
1563
Richard Smith081ad4d2017-01-24 19:39:46 +00001564.. option:: -fextdirs=<arg>, --extdirs <arg>, --extdirs=<arg>
1565
Richard Smith081ad4d2017-01-24 19:39:46 +00001566.. option:: -ffast-math, -fno-fast-math
1567
1568Allow aggressive, lossy floating-point optimizations
1569
Craig Topper9624beb2020-03-10 11:08:19 -07001570.. option:: -ffile-prefix-map=<arg>
1571
1572remap file source paths in debug info and predefined preprocessor macros
1573
Richard Smith081ad4d2017-01-24 19:39:46 +00001574.. option:: -ffinite-math-only, -fno-finite-math-only
1575
Vedant Kumar368540f2018-08-23 17:55:03 +00001576.. option:: -ffixed-point, -fno-fixed-point
1577
1578Enable fixed point types
1579
Richard Smith081ad4d2017-01-24 19:39:46 +00001580.. option:: -ffor-scope, -fno-for-scope
1581
Craig Topper9624beb2020-03-10 11:08:19 -07001582.. option:: -fforce-dwarf-frame, -fno-force-dwarf-frame
1583
1584Always emit a debug frame section
1585
Vedant Kumar368540f2018-08-23 17:55:03 +00001586.. option:: -fforce-emit-vtables, -fno-force-emit-vtables
1587
1588Emits more virtual tables to improve devirtualization
1589
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00001590.. option:: -fforce-enable-int128, -fno-force-enable-int128
1591
1592Enable support for int128\_t type
1593
Richard Smith081ad4d2017-01-24 19:39:46 +00001594.. option:: -ffp-contract=<arg>
1595
Craig Topper9624beb2020-03-10 11:08:19 -07001596Form fused FP ops (e.g. FMAs): fast (everywhere) \| on (according to FP\_CONTRACT pragma) \| off (never fuse). Default is 'fast' for CUDA/HIP and 'on' otherwise.
1597
1598.. option:: -ffp-exception-behavior=<arg>
1599
1600Specifies the exception behavior of floating-point operations.
1601
1602.. option:: -ffp-model=<arg>
1603
1604Controls the semantics of floating-point calculations.
Richard Smith081ad4d2017-01-24 19:39:46 +00001605
Richard Smith081ad4d2017-01-24 19:39:46 +00001606.. option:: -ffreestanding
1607
1608Assert that the compilation takes place in a freestanding environment
1609
Richard Smith081ad4d2017-01-24 19:39:46 +00001610.. option:: -ffunction-sections, -fno-function-sections
1611
Craig Topper9624beb2020-03-10 11:08:19 -07001612Place each function in its own section
Richard Smith081ad4d2017-01-24 19:39:46 +00001613
Richard Smith081ad4d2017-01-24 19:39:46 +00001614.. option:: -fgnu-inline-asm, -fno-gnu-inline-asm
1615
Richard Smith081ad4d2017-01-24 19:39:46 +00001616.. option:: -fgnu-keywords, -fno-gnu-keywords
1617
1618Allow GNU-extension keywords regardless of language standard
1619
Richard Smith081ad4d2017-01-24 19:39:46 +00001620.. option:: -fgnu-runtime
1621
1622Generate output compatible with the standard GNU Objective-C runtime
1623
Richard Smith081ad4d2017-01-24 19:39:46 +00001624.. option:: -fgnu89-inline, -fno-gnu89-inline
1625
1626Use the gnu89 inline semantics
1627
Craig Topper9624beb2020-03-10 11:08:19 -07001628.. option:: -fgnuc-version=<arg>
1629
1630Sets various macros to claim compatibility with the given GCC version (default is 4.2.1)
1631
Fangrui Songd8c97292020-06-18 14:52:39 -07001632.. option:: -fgpu-allow-device-init, -fno-gpu-allow-device-init
1633
1634Allow device side init function in HIP
1635
1636.. option:: -fgpu-rdc, -fcuda-rdc, -fno-gpu-rdc
1637
1638Generate relocatable device code, also known as separate compilation mode
1639
1640.. option:: -fhip-new-launch-api, -fno-hip-new-launch-api
1641
1642Use new kernel launching API for HIP
1643
Richard Smith081ad4d2017-01-24 19:39:46 +00001644.. option:: -fhonor-infinities, -fhonor-infinites, -fno-honor-infinities
1645
Richard Smith081ad4d2017-01-24 19:39:46 +00001646.. option:: -fhonor-nans, -fno-honor-nans
1647
Richard Smith081ad4d2017-01-24 19:39:46 +00001648.. option:: -fhosted
1649
Craig Topper9624beb2020-03-10 11:08:19 -07001650.. option:: -fignore-exceptions
1651
1652Enable support for ignoring exception handling constructs
1653
Richard Smith081ad4d2017-01-24 19:39:46 +00001654.. option:: -fimplicit-module-maps, -fmodule-maps, -fno-implicit-module-maps
1655
1656Implicitly search the file system for module map files.
1657
Richard Smith081ad4d2017-01-24 19:39:46 +00001658.. option:: -fimplicit-modules, -fno-implicit-modules
1659
Richard Smith081ad4d2017-01-24 19:39:46 +00001660.. option:: -finput-charset=<arg>
1661
Craig Topper188252d2017-12-11 21:09:16 +00001662.. option:: -finstrument-function-entry-bare
1663
1664Instrument function entry only, after inlining, without arguments to the instrumentation call
1665
Richard Smith081ad4d2017-01-24 19:39:46 +00001666.. option:: -finstrument-functions
1667
1668Generate calls to instrument function entry and exit
1669
Craig Topper16418662017-11-20 18:07:43 +00001670.. option:: -finstrument-functions-after-inlining
1671
1672Like -finstrument-functions, but insert the calls after inlining
1673
Richard Smith081ad4d2017-01-24 19:39:46 +00001674.. option:: -fintegrated-as, -fno-integrated-as, -integrated-as
1675
1676Enable the integrated assembler
1677
Craig Topper9624beb2020-03-10 11:08:19 -07001678.. option:: -fintegrated-cc1, -fno-integrated-cc1
1679
1680Run cc1 in-process
1681
Richard Smith081ad4d2017-01-24 19:39:46 +00001682.. option:: -fjump-tables, -fno-jump-tables
1683
Fangrui Songd8c97292020-06-18 14:52:39 -07001684Use jump tables for lowering switches
Vedant Kumar368540f2018-08-23 17:55:03 +00001685
Fangrui Songd8c97292020-06-18 14:52:39 -07001686.. option:: -fkeep-static-consts, -fno-keep-static-consts
1687
1688Keep static const variables if unused
Vedant Kumar368540f2018-08-23 17:55:03 +00001689
Craig Topper9624beb2020-03-10 11:08:19 -07001690.. option:: -flax-vector-conversions=<arg>, -flax-vector-conversions (equivalent to -flax-vector-conversions=integer), -fno-lax-vector-conversions (equivalent to -flax-vector-conversions=none)
1691
1692Enable implicit vector bit-casts
Richard Smith081ad4d2017-01-24 19:39:46 +00001693
Richard Smith081ad4d2017-01-24 19:39:46 +00001694.. option:: -flimited-precision=<arg>
1695
Richard Smith081ad4d2017-01-24 19:39:46 +00001696.. option:: -flto, -fno-lto
1697
1698Enable LTO in 'full' mode
1699
Richard Smith081ad4d2017-01-24 19:39:46 +00001700.. option:: -flto-jobs=<arg>
1701
1702Controls the backend parallelism of -flto=thin (default of 0 means the number of threads will be derived from the number of CPUs detected)
1703
Richard Smithb2c82a62017-01-27 01:54:42 +00001704.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001705.. option:: -flto=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001706.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001707
1708Set LTO mode to either 'full' or 'thin'
1709
Richard Smith081ad4d2017-01-24 19:39:46 +00001710.. option:: -fmacro-backtrace-limit=<arg>
1711
Richard Smith081ad4d2017-01-24 19:39:46 +00001712.. option:: -fmath-errno, -fno-math-errno
1713
1714Require math functions to indicate errors by setting errno
1715
Craig Topper9624beb2020-03-10 11:08:19 -07001716.. option:: -fmax-tokens=<arg>
1717
1718Max total number of preprocessed tokens for -Wmax-tokens.
1719
Richard Smith081ad4d2017-01-24 19:39:46 +00001720.. option:: -fmax-type-align=<arg>
1721
1722Specify the maximum alignment to enforce on pointers lacking an explicit alignment
1723
Richard Smith081ad4d2017-01-24 19:39:46 +00001724.. option:: -fmerge-all-constants, -fno-merge-all-constants
1725
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00001726Allow merging of constants
1727
Richard Smith081ad4d2017-01-24 19:39:46 +00001728.. option:: -fmessage-length=<arg>
1729
Fangrui Songd8c97292020-06-18 14:52:39 -07001730Format message diagnostics so that they fit within N columns
1731
Richard Smith081ad4d2017-01-24 19:39:46 +00001732.. option:: -fmodule-file-deps, -fno-module-file-deps
1733
Richard Smith081ad4d2017-01-24 19:39:46 +00001734.. option:: -fmodule-map-file=<file>
1735
1736Load this module map file
1737
Richard Smith081ad4d2017-01-24 19:39:46 +00001738.. option:: -fmodule-name=<name>, -fmodule-implementation-of <arg>, -fmodule-name <arg>
1739
1740Specify the name of the module to build
1741
Richard Smith081ad4d2017-01-24 19:39:46 +00001742.. option:: -fmodules, -fno-modules
1743
1744Enable the 'modules' language feature
1745
Richard Smith081ad4d2017-01-24 19:39:46 +00001746.. option:: -fmodules-decluse, -fno-modules-decluse
1747
1748Require declaration of modules used within a module
1749
Richard Smith081ad4d2017-01-24 19:39:46 +00001750.. option:: -fmodules-ignore-macro=<arg>
1751
1752Ignore the definition of the given macro when building and loading modules
1753
Richard Smith081ad4d2017-01-24 19:39:46 +00001754.. option:: -fmodules-search-all, -fno-modules-search-all
1755
1756Search even non-imported modules to resolve references
1757
Richard Smith081ad4d2017-01-24 19:39:46 +00001758.. option:: -fmodules-strict-decluse
1759
1760Like -fmodules-decluse but requires all headers to be in modules
1761
Richard Smith081ad4d2017-01-24 19:39:46 +00001762.. option:: -fmodules-ts
1763
1764Enable support for the C++ Modules TS
1765
Craig Topper9624beb2020-03-10 11:08:19 -07001766.. option:: -fmodules-validate-input-files-content
1767
1768Validate PCM input files based on content if mtime differs
1769
Richard Smith081ad4d2017-01-24 19:39:46 +00001770.. option:: -fms-compatibility, -fno-ms-compatibility
1771
1772Enable full Microsoft Visual C++ compatibility
1773
Richard Smith081ad4d2017-01-24 19:39:46 +00001774.. option:: -fms-compatibility-version=<arg>
1775
1776Dot-separated value representing the Microsoft compiler version number to report in \_MSC\_VER (0 = don't define it (default))
1777
Richard Smith081ad4d2017-01-24 19:39:46 +00001778.. option:: -fms-extensions, -fno-ms-extensions
1779
1780Accept some non-standard constructs supported by the Microsoft compiler
1781
Richard Smith081ad4d2017-01-24 19:39:46 +00001782.. option:: -fms-memptr-rep=<arg>
1783
Craig Topper9624beb2020-03-10 11:08:19 -07001784.. option:: -fms-volatile
Richard Smith081ad4d2017-01-24 19:39:46 +00001785
Richard Smith081ad4d2017-01-24 19:39:46 +00001786.. option:: -fmsc-version=<arg>
1787
1788Microsoft compiler version number to report in \_MSC\_VER (0 = don't define it (default))
1789
Richard Smith081ad4d2017-01-24 19:39:46 +00001790.. option:: -fmudflap
1791
Richard Smith081ad4d2017-01-24 19:39:46 +00001792.. option:: -fmudflapth
1793
Richard Smith081ad4d2017-01-24 19:39:46 +00001794.. option:: -fnested-functions
1795
Richard Smith081ad4d2017-01-24 19:39:46 +00001796.. option:: -fnew-alignment=<align>, -fnew-alignment <arg>
1797
1798Specifies the largest alignment guaranteed by '::operator new(size\_t)'
1799
Richard Smith081ad4d2017-01-24 19:39:46 +00001800.. option:: -fnext-runtime
1801
Fangrui Songd8c97292020-06-18 14:52:39 -07001802.. option:: -fno-access-control, -fno-no-access-control
1803
Richard Smith081ad4d2017-01-24 19:39:46 +00001804.. option:: -fno-builtin-<arg>
1805
1806Disable implicit builtin knowledge of a specific function
1807
Richard Smith081ad4d2017-01-24 19:39:46 +00001808.. option:: -fno-elide-type
1809
1810Do not elide types when printing diagnostics
1811
Richard Smith081ad4d2017-01-24 19:39:46 +00001812.. option:: -fno-max-type-align
1813
Richard Smith081ad4d2017-01-24 19:39:46 +00001814.. option:: -fno-operator-names
1815
1816Do not treat C++ operator name keywords as synonyms for operators
1817
Richard Smith081ad4d2017-01-24 19:39:46 +00001818.. option:: -fno-strict-modules-decluse
1819
Craig Topper9624beb2020-03-10 11:08:19 -07001820.. option:: -fno-temp-file
1821
1822Directly create compilation output files. This may lead to incorrect incremental builds if the compiler crashes
1823
Richard Smith081ad4d2017-01-24 19:39:46 +00001824.. option:: -fno-working-directory
1825
Craig Topper9624beb2020-03-10 11:08:19 -07001826.. option:: -fno\_modules-validate-input-files-content
1827
1828.. program:: clang1
1829.. option:: -fno\_pch-validate-input-files-content
1830.. program:: clang
1831
1832.. option:: -fnostack-clash-protection
1833
1834Disable stack clash protection
1835
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00001836.. option:: -fnoxray-link-deps
1837
Richard Smith081ad4d2017-01-24 19:39:46 +00001838.. option:: -fobjc-abi-version=<arg>
1839
Richard Smith081ad4d2017-01-24 19:39:46 +00001840.. option:: -fobjc-arc, -fno-objc-arc
1841
1842Synthesize retain and release calls for Objective-C pointers
1843
Richard Smith081ad4d2017-01-24 19:39:46 +00001844.. option:: -fobjc-arc-exceptions, -fno-objc-arc-exceptions
1845
1846Use EH-safe code when synthesizing retains and releases in -fobjc-arc
1847
Craig Topper9624beb2020-03-10 11:08:19 -07001848.. option:: -fobjc-convert-messages-to-runtime-calls, -fno-objc-convert-messages-to-runtime-calls
1849
Richard Smith081ad4d2017-01-24 19:39:46 +00001850.. option:: -fobjc-exceptions, -fno-objc-exceptions
1851
1852Enable Objective-C exceptions
1853
Richard Smith081ad4d2017-01-24 19:39:46 +00001854.. option:: -fobjc-infer-related-result-type, -fno-objc-infer-related-result-type
1855
Richard Smith081ad4d2017-01-24 19:39:46 +00001856.. option:: -fobjc-legacy-dispatch, -fno-objc-legacy-dispatch
1857
Richard Smith081ad4d2017-01-24 19:39:46 +00001858.. option:: -fobjc-link-runtime
1859
Richard Smith081ad4d2017-01-24 19:39:46 +00001860.. option:: -fobjc-nonfragile-abi, -fno-objc-nonfragile-abi
1861
Richard Smith081ad4d2017-01-24 19:39:46 +00001862.. option:: -fobjc-nonfragile-abi-version=<arg>
1863
Richard Smith081ad4d2017-01-24 19:39:46 +00001864.. option:: -fobjc-runtime=<arg>
1865
1866Specify the target Objective-C runtime kind and version
1867
Richard Smith081ad4d2017-01-24 19:39:46 +00001868.. option:: -fobjc-sender-dependent-dispatch
1869
Richard Smith081ad4d2017-01-24 19:39:46 +00001870.. option:: -fobjc-weak, -fno-objc-weak
1871
1872Enable ARC-style weak references in Objective-C
1873
Richard Smith081ad4d2017-01-24 19:39:46 +00001874.. option:: -fomit-frame-pointer, -fno-omit-frame-pointer
1875
Richard Smith081ad4d2017-01-24 19:39:46 +00001876.. option:: -fopenmp, -fno-openmp
1877
Jonas Hahnfelda180fc42018-02-22 17:10:28 +00001878Parse OpenMP pragmas and generate parallel code.
Boris Kolpackovb150d242017-08-30 09:15:53 +00001879
Craig Topper287c8012018-01-03 18:29:12 +00001880.. option:: -fopenmp-simd, -fno-openmp-simd
1881
1882Emit OpenMP code only for SIMD-based constructs.
1883
Richard Smith081ad4d2017-01-24 19:39:46 +00001884.. option:: -fopenmp-version=<arg>
1885
Richard Smithb2c82a62017-01-27 01:54:42 +00001886.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001887.. option:: -fopenmp=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001888.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001889
Richard Smith081ad4d2017-01-24 19:39:46 +00001890.. option:: -foperator-arrow-depth=<arg>
1891
Francis Visoiu Mistrih3bd7cbb2019-12-04 10:19:41 -08001892.. option:: -foptimization-record-file=<file>
Richard Smith081ad4d2017-01-24 19:39:46 +00001893
Craig Topper9624beb2020-03-10 11:08:19 -07001894Specify the output name of the file containing the optimization remarks. Implies -fsave-optimization-record. On Darwin platforms, this cannot be used with multiple -arch <arch> options.
Francis Visoiu Mistrih3bd7cbb2019-12-04 10:19:41 -08001895
1896.. option:: -foptimization-record-passes=<regex>
1897
1898Only include passes which match a specified regular expression in the generated optimization record (by default, include all passes)
Richard Smith081ad4d2017-01-24 19:39:46 +00001899
Richard Smith081ad4d2017-01-24 19:39:46 +00001900.. option:: -foptimize-sibling-calls, -fno-optimize-sibling-calls
1901
Craig Topper9624beb2020-03-10 11:08:19 -07001902.. option:: -forder-file-instrumentation
1903
1904Generate instrumented code to collect order file into default.profraw file (overridden by '=' form of option or LLVM\_PROFILE\_FILE env var)
1905
Richard Smith081ad4d2017-01-24 19:39:46 +00001906.. option:: -foutput-class-dir=<arg>, --output-class-directory <arg>, --output-class-directory=<arg>
1907
Richard Smith081ad4d2017-01-24 19:39:46 +00001908.. option:: -fpack-struct, -fno-pack-struct
1909
Richard Smithb2c82a62017-01-27 01:54:42 +00001910.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001911.. option:: -fpack-struct=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001912.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001913
1914Specify the default maximum struct packing alignment
1915
Richard Smith081ad4d2017-01-24 19:39:46 +00001916.. option:: -fpascal-strings, -fno-pascal-strings, -mpascal-strings
1917
1918Recognize and construct Pascal-style string literals
1919
Craig Topper9624beb2020-03-10 11:08:19 -07001920.. option:: -fpass-plugin=<dsopath>
1921
1922Load pass plugin from a dynamic shared object file (only with new pass manager).
1923
1924.. option:: -fpatchable-function-entry=<N,M>
1925
1926Generate M NOPs before function entry and N-M NOPs after function entry
1927
Richard Smith081ad4d2017-01-24 19:39:46 +00001928.. option:: -fpcc-struct-return
1929
1930Override the default ABI to return all structs on the stack
1931
Richard Smith081ad4d2017-01-24 19:39:46 +00001932.. option:: -fpch-preprocess
1933
Craig Topper9624beb2020-03-10 11:08:19 -07001934.. option:: -fpch-validate-input-files-content
1935
1936Validate PCH input files based on content if mtime differs
1937
Richard Smith081ad4d2017-01-24 19:39:46 +00001938.. option:: -fpic, -fno-pic
1939
Richard Smith081ad4d2017-01-24 19:39:46 +00001940.. option:: -fpie, -fno-pie
1941
Craig Topper16418662017-11-20 18:07:43 +00001942.. option:: -fplt, -fno-plt
1943
Richard Smith081ad4d2017-01-24 19:39:46 +00001944.. option:: -fplugin=<dsopath>
1945
1946Load the named plugin (dynamic shared object)
1947
Richard Smith081ad4d2017-01-24 19:39:46 +00001948.. option:: -fpreserve-as-comments, -fno-preserve-as-comments
1949
Richard Smith081ad4d2017-01-24 19:39:46 +00001950.. option:: -fprofile-arcs, -fno-profile-arcs
1951
Richard Smith081ad4d2017-01-24 19:39:46 +00001952.. option:: -fprofile-dir=<arg>
1953
Craig Topper9624beb2020-03-10 11:08:19 -07001954.. option:: -fprofile-exclude-files=<arg>
1955
1956Instrument only functions from files where names don't match all the regexes separated by a semi-colon
1957
1958.. option:: -fprofile-filter-files=<arg>
1959
1960Instrument only functions from files where names match any regex separated by a semi-colon
1961
Richard Smith081ad4d2017-01-24 19:39:46 +00001962.. option:: -fprofile-generate, -fno-profile-generate
1963
1964Generate instrumented code to collect execution counts into default.profraw (overridden by LLVM\_PROFILE\_FILE env var)
1965
Richard Smithb2c82a62017-01-27 01:54:42 +00001966.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001967.. option:: -fprofile-generate=<directory>
Richard Smithb2c82a62017-01-27 01:54:42 +00001968.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001969
1970Generate instrumented code to collect execution counts into <directory>/default.profraw (overridden by LLVM\_PROFILE\_FILE env var)
1971
Richard Smith081ad4d2017-01-24 19:39:46 +00001972.. option:: -fprofile-instr-generate, -fno-profile-instr-generate
1973
1974Generate instrumented code to collect execution counts into default.profraw file (overridden by '=' form of option or LLVM\_PROFILE\_FILE env var)
1975
Richard Smithb2c82a62017-01-27 01:54:42 +00001976.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001977.. option:: -fprofile-instr-generate=<file>
Richard Smithb2c82a62017-01-27 01:54:42 +00001978.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001979
1980Generate instrumented code to collect execution counts into <file> (overridden by LLVM\_PROFILE\_FILE env var)
1981
Richard Smith081ad4d2017-01-24 19:39:46 +00001982.. option:: -fprofile-instr-use, -fno-profile-instr-use, -fprofile-use
1983
Richard Smithb2c82a62017-01-27 01:54:42 +00001984.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00001985.. option:: -fprofile-instr-use=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00001986.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00001987
1988Use instrumentation data for profile-guided optimization
1989
Craig Topper9624beb2020-03-10 11:08:19 -07001990.. option:: -fprofile-remapping-file=<file>, -fprofile-remapping-file <arg>
1991
1992Use the remappings described in <file> to match the profile data against names in the program
1993
Boris Kolpackovb150d242017-08-30 09:15:53 +00001994.. option:: -fprofile-sample-accurate, -fauto-profile-accurate, -fno-profile-sample-accurate
1995
1996Specifies that the sample profile is accurate. If the sample
1997 profile is accurate, callsites without profile samples are marked
1998 as cold. Otherwise, treat callsites without profile samples as if
1999 we have no profile
2000
Richard Smith78e23fd2017-04-13 22:39:49 +00002001.. option:: -fprofile-sample-use, -fauto-profile, -fno-profile-sample-use
2002
2003.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00002004.. option:: -fprofile-sample-use=<arg>, -fauto-profile=<arg>
Richard Smith78e23fd2017-04-13 22:39:49 +00002005.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00002006
2007Enable sample-based profile guided optimizations
2008
Richard Smithb2c82a62017-01-27 01:54:42 +00002009.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00002010.. option:: -fprofile-use=<pathname>
Richard Smithb2c82a62017-01-27 01:54:42 +00002011.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00002012
2013Use instrumentation data for profile-guided optimization. If pathname is a directory, it reads from <pathname>/default.profdata. Otherwise, it reads from file <pathname>.
2014
Richard Smith081ad4d2017-01-24 19:39:46 +00002015.. option:: -freciprocal-math, -fno-reciprocal-math
2016
2017Allow division operations to be reassociated
2018
Richard Smith081ad4d2017-01-24 19:39:46 +00002019.. option:: -freg-struct-return
2020
2021Override the default ABI to return small structs in registers
2022
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00002023.. option:: -fregister-global-dtors-with-atexit, -fno-register-global-dtors-with-atexit
2024
2025Use atexit or \_\_cxa\_atexit to register global destructors
2026
Richard Smith081ad4d2017-01-24 19:39:46 +00002027.. option:: -frelaxed-template-template-args, -fno-relaxed-template-template-args
2028
2029Enable C++17 relaxed template template argument matching
2030
Richard Smith081ad4d2017-01-24 19:39:46 +00002031.. option:: -freroll-loops, -fno-reroll-loops
2032
2033Turn on loop reroller
2034
Richard Smith081ad4d2017-01-24 19:39:46 +00002035.. option:: -fretain-comments-from-system-headers
2036
Craig Topperd23254a2017-07-20 17:52:48 +00002037.. option:: -frewrite-imports, -fno-rewrite-imports
2038
Richard Smith081ad4d2017-01-24 19:39:46 +00002039.. option:: -frewrite-includes, -fno-rewrite-includes
2040
Richard Smith081ad4d2017-01-24 19:39:46 +00002041.. option:: -frewrite-map-file <arg>
2042
Richard Smithb2c82a62017-01-27 01:54:42 +00002043.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00002044.. option:: -frewrite-map-file=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00002045.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00002046
Richard Smith081ad4d2017-01-24 19:39:46 +00002047.. option:: -fropi, -fno-ropi
2048
Fangrui Songd8c97292020-06-18 14:52:39 -07002049Generate read-only position independent code (ARM only)
2050
Craig Topper9624beb2020-03-10 11:08:19 -07002051.. option:: -frounding-math, -fno-rounding-math
2052
Richard Smith081ad4d2017-01-24 19:39:46 +00002053.. option:: -frtti, -fno-rtti
2054
Fangrui Songd8c97292020-06-18 14:52:39 -07002055.. option:: -frtti-data, -fno-rtti-data
2056
Richard Smith081ad4d2017-01-24 19:39:46 +00002057.. option:: -frwpi, -fno-rwpi
2058
Fangrui Songd8c97292020-06-18 14:52:39 -07002059Generate read-write position independent code (ARM only)
2060
Richard Smith081ad4d2017-01-24 19:39:46 +00002061.. option:: -fsave-optimization-record, -fno-save-optimization-record
2062
2063Generate a YAML optimization record file
2064
Francis Visoiu Mistrih3bd7cbb2019-12-04 10:19:41 -08002065.. program:: clang1
2066.. option:: -fsave-optimization-record=<format>
2067.. program:: clang
2068
Craig Topper9624beb2020-03-10 11:08:19 -07002069Generate an optimization record file in a specific format
Francis Visoiu Mistrih3bd7cbb2019-12-04 10:19:41 -08002070
Craig Topper188252d2017-12-11 21:09:16 +00002071.. option:: -fseh-exceptions
2072
2073Use SEH style exceptions
2074
Craig Topper9624beb2020-03-10 11:08:19 -07002075.. option:: -fsemantic-interposition, -fno-semantic-interposition
2076
Richard Smith081ad4d2017-01-24 19:39:46 +00002077.. option:: -fshort-enums, -fno-short-enums
2078
2079Allocate to an enum type only as many bytes as it needs for the declared range of possible values
2080
Richard Smith081ad4d2017-01-24 19:39:46 +00002081.. option:: -fshort-wchar, -fno-short-wchar
2082
2083Force wchar\_t to be a short unsigned int
2084
Richard Smith081ad4d2017-01-24 19:39:46 +00002085.. option:: -fshow-column, -fno-show-column
2086
Richard Smith081ad4d2017-01-24 19:39:46 +00002087.. option:: -fshow-overloads=<arg>
2088
2089Which overload candidates to show when overload resolution fails: best\|all; defaults to all
2090
Richard Smith081ad4d2017-01-24 19:39:46 +00002091.. option:: -fshow-source-location, -fno-show-source-location
2092
Richard Smith081ad4d2017-01-24 19:39:46 +00002093.. option:: -fsignaling-math, -fno-signaling-math
2094
Richard Smith081ad4d2017-01-24 19:39:46 +00002095.. option:: -fsigned-bitfields
2096
Richard Smith081ad4d2017-01-24 19:39:46 +00002097.. option:: -fsigned-char, -fno-signed-char, --signed-char
2098
Fangrui Songd8c97292020-06-18 14:52:39 -07002099char is signed
2100
Richard Smith081ad4d2017-01-24 19:39:46 +00002101.. option:: -fsigned-zeros, -fno-signed-zeros
2102
Richard Smith081ad4d2017-01-24 19:39:46 +00002103.. option:: -fsized-deallocation, -fno-sized-deallocation
2104
2105Enable C++14 sized global deallocation functions
2106
Richard Smith081ad4d2017-01-24 19:39:46 +00002107.. option:: -fsjlj-exceptions
2108
2109Use SjLj style exceptions
2110
Richard Smith081ad4d2017-01-24 19:39:46 +00002111.. option:: -fslp-vectorize, -fno-slp-vectorize, -ftree-slp-vectorize
2112
2113Enable the superword-level parallelism vectorization passes
2114
Richard Smith081ad4d2017-01-24 19:39:46 +00002115.. option:: -fspell-checking, -fno-spell-checking
2116
Richard Smith081ad4d2017-01-24 19:39:46 +00002117.. option:: -fspell-checking-limit=<arg>
2118
Richard Smith081ad4d2017-01-24 19:39:46 +00002119.. option:: -fsplit-dwarf-inlining, -fno-split-dwarf-inlining
2120
Jonas Hahnfelda180fc42018-02-22 17:10:28 +00002121Provide 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 +00002122
Craig Topper9624beb2020-03-10 11:08:19 -07002123.. option:: -fsplit-lto-unit, -fno-split-lto-unit
2124
Fangrui Songd8c97292020-06-18 14:52:39 -07002125Enables splitting of the LTO unit
Craig Topper9624beb2020-03-10 11:08:19 -07002126
Richard Smith081ad4d2017-01-24 19:39:46 +00002127.. option:: -fsplit-stack
2128
Craig Topper9624beb2020-03-10 11:08:19 -07002129.. option:: -fstack-clash-protection
2130
2131Enable stack clash protection
2132
Richard Smith081ad4d2017-01-24 19:39:46 +00002133.. option:: -fstack-protector, -fno-stack-protector
2134
Craig Topper9624beb2020-03-10 11:08:19 -07002135Enable stack protectors for some functions vulnerable to stack smashing. This uses a loose heuristic which considers functions vulnerable if they contain a char (or 8bit integer) array or constant sized calls to alloca, which are of greater size than ssp-buffer-size (default: 8 bytes). All variable sized calls to alloca are considered vulnerable
Richard Smith081ad4d2017-01-24 19:39:46 +00002136
Richard Smith081ad4d2017-01-24 19:39:46 +00002137.. option:: -fstack-protector-all
2138
Craig Topper9624beb2020-03-10 11:08:19 -07002139Enable stack protectors for all functions
Richard Smith081ad4d2017-01-24 19:39:46 +00002140
Richard Smith081ad4d2017-01-24 19:39:46 +00002141.. option:: -fstack-protector-strong
2142
Craig Topper9624beb2020-03-10 11:08:19 -07002143Enable stack protectors for some functions vulnerable to stack smashing. Compared to -fstack-protector, this uses a stronger heuristic that includes functions containing arrays of any size (and any type), as well as any calls to alloca or the taking of an address from a local variable
Richard Smith081ad4d2017-01-24 19:39:46 +00002144
Craig Topper596527b2018-01-23 18:40:15 +00002145.. option:: -fstack-size-section, -fno-stack-size-section
2146
2147Emit section containing metadata on function stack sizes
2148
Richard Smith081ad4d2017-01-24 19:39:46 +00002149.. option:: -fstandalone-debug, -fno-limit-debug-info, -fno-standalone-debug
2150
2151Emit full debug info for all types used by the program
2152
Richard Smith081ad4d2017-01-24 19:39:46 +00002153.. option:: -fstrict-aliasing, -fno-strict-aliasing
2154
Richard Smith081ad4d2017-01-24 19:39:46 +00002155.. option:: -fstrict-enums, -fno-strict-enums
2156
2157Enable optimizations based on the strict definition of an enum's value range
2158
Vedant Kumar368540f2018-08-23 17:55:03 +00002159.. option:: -fstrict-float-cast-overflow, -fno-strict-float-cast-overflow
2160
2161Assume that overflowing float-to-int casts are undefined (default)
2162
Richard Smith081ad4d2017-01-24 19:39:46 +00002163.. option:: -fstrict-overflow, -fno-strict-overflow
2164
Richard Smith081ad4d2017-01-24 19:39:46 +00002165.. option:: -fstrict-return, -fno-strict-return
2166
Richard Smith081ad4d2017-01-24 19:39:46 +00002167.. option:: -fstrict-vtable-pointers, -fno-strict-vtable-pointers
2168
2169Enable optimizations based on the strict rules for overwriting polymorphic C++ objects
2170
Richard Smith081ad4d2017-01-24 19:39:46 +00002171.. option:: -fstruct-path-tbaa, -fno-struct-path-tbaa
2172
Craig Topper9624beb2020-03-10 11:08:19 -07002173.. option:: -fsymbol-partition=<arg>
2174
Richard Smith081ad4d2017-01-24 19:39:46 +00002175.. option:: -ftabstop=<arg>
2176
Richard Smith081ad4d2017-01-24 19:39:46 +00002177.. option:: -ftemplate-backtrace-limit=<arg>
2178
Richard Smith081ad4d2017-01-24 19:39:46 +00002179.. option:: -ftemplate-depth-<arg>
2180
Richard Smith081ad4d2017-01-24 19:39:46 +00002181.. option:: -ftemplate-depth=<arg>
2182
Fangrui Songd8c97292020-06-18 14:52:39 -07002183.. option:: -ftest-coverage, -fno-test-coverage
Richard Smith081ad4d2017-01-24 19:39:46 +00002184
Craig Topper9624beb2020-03-10 11:08:19 -07002185.. option:: -fthin-link-bitcode=<arg>
2186
2187Write minimized bitcode to <file> for the ThinLTO thin link only
2188
Richard Smith081ad4d2017-01-24 19:39:46 +00002189.. option:: -fthinlto-index=<arg>
2190
2191Perform ThinLTO importing using provided function summary index
2192
Richard Smith081ad4d2017-01-24 19:39:46 +00002193.. option:: -fthreadsafe-statics, -fno-threadsafe-statics
2194
Richard Smith081ad4d2017-01-24 19:39:46 +00002195.. option:: -ftime-report
2196
Anton Afanasyev4fdcabf2019-07-24 14:55:40 +00002197.. option:: -ftime-trace
2198
Craig Topper9624beb2020-03-10 11:08:19 -07002199
2200Turn on time profiler. Generates JSON file based on output filename. Results
2201can be analyzed with chrome://tracing or `Speedscope App
2202<https://www.speedscope.app>`_ for flamegraph visualization.
Anton Afanasyev4fdcabf2019-07-24 14:55:40 +00002203
2204.. option:: -ftime-trace-granularity=<arg>
2205
2206Minimum time granularity (in microseconds) traced by time profiler
2207
Richard Smith081ad4d2017-01-24 19:39:46 +00002208.. option:: -ftls-model=<arg>
2209
Richard Smith081ad4d2017-01-24 19:39:46 +00002210.. option:: -ftrap-function=<arg>
2211
2212Issue call to specified function rather than a trap instruction
2213
Richard Smith081ad4d2017-01-24 19:39:46 +00002214.. option:: -ftrapping-math, -fno-trapping-math
2215
Richard Smith081ad4d2017-01-24 19:39:46 +00002216.. option:: -ftrapv
2217
2218Trap on integer overflow
2219
Richard Smith081ad4d2017-01-24 19:39:46 +00002220.. option:: -ftrapv-handler <arg>
2221
Richard Smithb2c82a62017-01-27 01:54:42 +00002222.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00002223.. option:: -ftrapv-handler=<function name>
Richard Smithb2c82a62017-01-27 01:54:42 +00002224.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00002225
2226Specify the function to be called on overflow
2227
Richard Smith081ad4d2017-01-24 19:39:46 +00002228.. option:: -ftrigraphs, -fno-trigraphs, -trigraphs, --trigraphs
2229
2230Process trigraph sequences
2231
Fangrui Songd8c97292020-06-18 14:52:39 -07002232.. option:: -ftrivial-auto-var-init-stop-after=<arg>
2233
2234Stop initializing trivial automatic stack variables after the specified number of instances
2235
Craig Topper9624beb2020-03-10 11:08:19 -07002236.. option:: -ftrivial-auto-var-init=<arg>
2237
2238Initialize trivial automatic stack variables: uninitialized (default) \| pattern
2239
Fangrui Songd8c97292020-06-18 14:52:39 -07002240.. option:: -funique-basic-block-section-names, -fno-unique-basic-block-section-names
Richard Smith081ad4d2017-01-24 19:39:46 +00002241
Fangrui Songd8c97292020-06-18 14:52:39 -07002242Use unique names for basic block sections (ELF Only)
2243
2244.. option:: -funique-internal-linkage-names, -fno-unique-internal-linkage-names
2245
2246Uniqueify Internal Linkage Symbol Names by appending the MD5 hash of the module path
2247
2248.. option:: -funique-section-names, -fno-unique-section-names
Richard Smith081ad4d2017-01-24 19:39:46 +00002249
Richard Smith081ad4d2017-01-24 19:39:46 +00002250.. option:: -funit-at-a-time, -fno-unit-at-a-time
2251
Richard Smith081ad4d2017-01-24 19:39:46 +00002252.. option:: -funroll-loops, -fno-unroll-loops
2253
2254Turn on loop unroller
2255
Richard Smith081ad4d2017-01-24 19:39:46 +00002256.. option:: -funsafe-math-optimizations, -fno-unsafe-math-optimizations
2257
Richard Smith081ad4d2017-01-24 19:39:46 +00002258.. option:: -funsigned-bitfields
2259
Richard Smith081ad4d2017-01-24 19:39:46 +00002260.. option:: -funsigned-char, -fno-unsigned-char, --unsigned-char
2261
Richard Smith081ad4d2017-01-24 19:39:46 +00002262.. option:: -funwind-tables, -fno-unwind-tables
2263
Richard Smith081ad4d2017-01-24 19:39:46 +00002264.. option:: -fuse-cxa-atexit, -fno-use-cxa-atexit
2265
Richard Smith081ad4d2017-01-24 19:39:46 +00002266.. option:: -fuse-init-array, -fno-use-init-array
2267
Richard Smith081ad4d2017-01-24 19:39:46 +00002268.. option:: -fuse-ld=<arg>
2269
Richard Smith081ad4d2017-01-24 19:39:46 +00002270.. option:: -fuse-line-directives, -fno-use-line-directives
2271
Fangrui Songd8c97292020-06-18 14:52:39 -07002272Use #line in preprocessed output
2273
Craig Topper9624beb2020-03-10 11:08:19 -07002274.. option:: -fvalidate-ast-input-files-content
2275
2276Compute and store the hash of input files used to build an AST. Files with mismatching mtime's are considered valid if both contents is identical
2277
Richard Smith081ad4d2017-01-24 19:39:46 +00002278.. option:: -fveclib=<arg>
2279
2280Use the given vector functions library
2281
Richard Smith081ad4d2017-01-24 19:39:46 +00002282.. option:: -fvectorize, -fno-vectorize, -ftree-vectorize
2283
2284Enable the loop vectorization passes
2285
Craig Topper9624beb2020-03-10 11:08:19 -07002286.. option:: -fverbose-asm, -dA, -fno-verbose-asm
2287
Fangrui Songd8c97292020-06-18 14:52:39 -07002288Generate verbose assembly output
2289
2290.. option:: -fvirtual-function-elimination, -fno-virtual-function-elimination
Craig Topper9624beb2020-03-10 11:08:19 -07002291
2292Enables dead virtual function elimination optimization. Requires -flto=full
2293
2294.. option:: -fvisibility-global-new-delete-hidden
2295
2296Give global C++ operator new and delete declarations hidden visibility
Richard Smith081ad4d2017-01-24 19:39:46 +00002297
Richard Smith081ad4d2017-01-24 19:39:46 +00002298.. option:: -fvisibility-inlines-hidden
2299
Fangrui Songdf81b972018-07-19 22:45:41 +00002300Give inline C++ member functions hidden visibility by default
Richard Smith081ad4d2017-01-24 19:39:46 +00002301
Richard Smith081ad4d2017-01-24 19:39:46 +00002302.. option:: -fvisibility-ms-compat
2303
2304Give global types 'default' visibility and global functions and variables 'hidden' visibility by default
2305
Richard Smith081ad4d2017-01-24 19:39:46 +00002306.. option:: -fvisibility=<arg>
2307
2308Set the default symbol visibility for all global declarations
2309
Craig Topper9624beb2020-03-10 11:08:19 -07002310.. option:: -fwasm-exceptions
2311
2312Use WebAssembly style exceptions
2313
Richard Smith081ad4d2017-01-24 19:39:46 +00002314.. option:: -fwhole-program-vtables, -fno-whole-program-vtables
2315
2316Enables whole-program vtable optimization. Requires -flto
2317
Richard Smith081ad4d2017-01-24 19:39:46 +00002318.. option:: -fwrapv, -fno-wrapv
2319
2320Treat signed integer overflow as two's complement
2321
Richard Smith081ad4d2017-01-24 19:39:46 +00002322.. option:: -fwritable-strings
2323
2324Store string literals as writable data
2325
Craig Topper188252d2017-12-11 21:09:16 +00002326.. option:: -fxray-always-emit-customevents, -fno-xray-always-emit-customevents
2327
Fangrui Songd8c97292020-06-18 14:52:39 -07002328Always emit \_\_xray\_customevent(...) calls even if the containing function is not always instrumented
Craig Topper188252d2017-12-11 21:09:16 +00002329
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00002330.. option:: -fxray-always-emit-typedevents, -fno-xray-always-emit-typedevents
2331
Fangrui Songd8c97292020-06-18 14:52:39 -07002332Always emit \_\_xray\_typedevent(...) calls even if the containing function is not always instrumented
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00002333
Richard Smith78e23fd2017-04-13 22:39:49 +00002334.. option:: -fxray-always-instrument=<arg>
2335
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00002336DEPRECATED: Filename defining the whitelist for imbuing the 'always instrument' XRay attribute.
2337
2338.. option:: -fxray-attr-list=<arg>
2339
2340Filename defining the list of functions/types for imbuing XRay attributes.
Richard Smith78e23fd2017-04-13 22:39:49 +00002341
Fangrui Songd8c97292020-06-18 14:52:39 -07002342.. option:: -fxray-function-index, -fno-xray-function-index
2343
Craig Topper9624beb2020-03-10 11:08:19 -07002344.. option:: -fxray-ignore-loops, -fno-xray-ignore-loops
2345
2346Don't instrument functions with loops unless they also meet the minimum function size
2347
Richard Smith081ad4d2017-01-24 19:39:46 +00002348.. option:: -fxray-instruction-threshold<arg>
2349
Richard Smithb2c82a62017-01-27 01:54:42 +00002350.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00002351.. option:: -fxray-instruction-threshold=<arg>
Richard Smithb2c82a62017-01-27 01:54:42 +00002352.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00002353
2354Sets the minimum function size to instrument with XRay
2355
Richard Smith081ad4d2017-01-24 19:39:46 +00002356.. option:: -fxray-instrument, -fno-xray-instrument
2357
2358Generate XRay instrumentation sleds on function entry and exit
2359
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00002360.. option:: -fxray-instrumentation-bundle=<arg>
2361
Craig Topper9624beb2020-03-10 11:08:19 -07002362Select which XRay instrumentation points to emit. Options: all, none, function-entry, function-exit, function, custom. Default is 'all'. 'function' includes both 'function-entry' and 'function-exit'.
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00002363
2364.. option:: -fxray-link-deps
2365
2366Tells clang to add the link dependencies for XRay.
2367
2368.. option:: -fxray-modes=<arg>
2369
2370List of modes to link in by default into XRay instrumented binaries.
2371
Richard Smith78e23fd2017-04-13 22:39:49 +00002372.. option:: -fxray-never-instrument=<arg>
2373
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00002374DEPRECATED: Filename defining the whitelist for imbuing the 'never instrument' XRay attribute.
Richard Smith78e23fd2017-04-13 22:39:49 +00002375
Richard Smith081ad4d2017-01-24 19:39:46 +00002376.. option:: -fzero-initialized-in-bss, -fno-zero-initialized-in-bss
2377
Richard Smith081ad4d2017-01-24 19:39:46 +00002378.. option:: -fzvector, -fno-zvector, -mzvector
2379
2380Enable System z vector language extension
2381
Richard Smith081ad4d2017-01-24 19:39:46 +00002382.. option:: -pedantic, --pedantic, -no-pedantic, --no-pedantic
2383
Richard Smith081ad4d2017-01-24 19:39:46 +00002384.. option:: -pedantic-errors, --pedantic-errors
2385
2386OpenCL flags
2387------------
Richard Smith081ad4d2017-01-24 19:39:46 +00002388.. option:: -cl-denorms-are-zero
2389
2390OpenCL only. Allow denormals to be flushed to zero.
2391
Richard Smith081ad4d2017-01-24 19:39:46 +00002392.. option:: -cl-fast-relaxed-math
2393
2394OpenCL only. Sets -cl-finite-math-only and -cl-unsafe-math-optimizations, and defines \_\_FAST\_RELAXED\_MATH\_\_.
2395
Richard Smith081ad4d2017-01-24 19:39:46 +00002396.. option:: -cl-finite-math-only
2397
2398OpenCL only. Allow floating-point optimizations that assume arguments and results are not NaNs or +-Inf.
2399
Richard Smith081ad4d2017-01-24 19:39:46 +00002400.. option:: -cl-fp32-correctly-rounded-divide-sqrt
2401
2402OpenCL only. Specify that single precision floating-point divide and sqrt used in the program source are correctly rounded.
2403
Richard Smith081ad4d2017-01-24 19:39:46 +00002404.. option:: -cl-kernel-arg-info
2405
2406OpenCL only. Generate kernel argument metadata.
2407
Richard Smith081ad4d2017-01-24 19:39:46 +00002408.. option:: -cl-mad-enable
2409
2410OpenCL only. Allow use of less precise MAD computations in the generated binary.
2411
Richard Smith081ad4d2017-01-24 19:39:46 +00002412.. option:: -cl-no-signed-zeros
2413
2414OpenCL only. Allow use of less precise no signed zeros computations in the generated binary.
2415
Richard Smith081ad4d2017-01-24 19:39:46 +00002416.. option:: -cl-opt-disable
2417
2418OpenCL only. This option disables all optimizations. By default optimizations are enabled.
2419
Richard Smith081ad4d2017-01-24 19:39:46 +00002420.. option:: -cl-single-precision-constant
2421
2422OpenCL only. Treat double precision floating-point constant as single precision constant.
2423
Richard Smith081ad4d2017-01-24 19:39:46 +00002424.. option:: -cl-std=<arg>
2425
2426OpenCL language standard to compile for.
2427
Richard Smith081ad4d2017-01-24 19:39:46 +00002428.. option:: -cl-strict-aliasing
2429
2430OpenCL only. This option is added for compatibility with OpenCL 1.0.
2431
Jonas Hahnfelda180fc42018-02-22 17:10:28 +00002432.. option:: -cl-uniform-work-group-size
2433
2434OpenCL only. Defines that the global work-size be a multiple of the work-group size specified to clEnqueueNDRangeKernel
2435
Richard Smith081ad4d2017-01-24 19:39:46 +00002436.. option:: -cl-unsafe-math-optimizations
2437
2438OpenCL only. Allow unsafe floating-point optimizations. Also implies -cl-no-signed-zeros and -cl-mad-enable.
2439
Craig Topper9624beb2020-03-10 11:08:19 -07002440SYCL flags
2441----------
2442.. option:: -fsycl, -fno-sycl
2443
2444Enable SYCL kernels compilation for device
2445
2446.. option:: -sycl-std=<arg>
2447
2448SYCL language standard to compile for.
2449
Richard Smith081ad4d2017-01-24 19:39:46 +00002450Target-dependent compilation options
2451~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fangrui Songd8c97292020-06-18 14:52:39 -07002452.. option:: -G<size>, -G=<arg>, -msmall-data-limit=<arg>, -msmall-data-threshold=<arg>
Richard Smithc5b2e002017-01-27 02:08:37 +00002453
Fangrui Songd8c97292020-06-18 14:52:39 -07002454Put objects of at most <size> bytes into small data section (MIPS / Hexagon)
Richard Smithc5b2e002017-01-27 02:08:37 +00002455
Craig Topper9624beb2020-03-10 11:08:19 -07002456.. option:: -ffixed-x1
2457
Fangrui Songd8c97292020-06-18 14:52:39 -07002458Reserve the x1 register (AArch64/RISC-V only)
Craig Topper9624beb2020-03-10 11:08:19 -07002459
2460.. option:: -ffixed-x10
2461
Fangrui Songd8c97292020-06-18 14:52:39 -07002462Reserve the x10 register (AArch64/RISC-V only)
Craig Topper9624beb2020-03-10 11:08:19 -07002463
2464.. option:: -ffixed-x11
2465
Fangrui Songd8c97292020-06-18 14:52:39 -07002466Reserve the x11 register (AArch64/RISC-V only)
Craig Topper9624beb2020-03-10 11:08:19 -07002467
2468.. option:: -ffixed-x12
2469
Fangrui Songd8c97292020-06-18 14:52:39 -07002470Reserve the x12 register (AArch64/RISC-V only)
Craig Topper9624beb2020-03-10 11:08:19 -07002471
2472.. option:: -ffixed-x13
2473
Fangrui Songd8c97292020-06-18 14:52:39 -07002474Reserve the x13 register (AArch64/RISC-V only)
Craig Topper9624beb2020-03-10 11:08:19 -07002475
2476.. option:: -ffixed-x14
2477
Fangrui Songd8c97292020-06-18 14:52:39 -07002478Reserve the x14 register (AArch64/RISC-V only)
Craig Topper9624beb2020-03-10 11:08:19 -07002479
2480.. option:: -ffixed-x15
2481
Fangrui Songd8c97292020-06-18 14:52:39 -07002482Reserve the x15 register (AArch64/RISC-V only)
Craig Topper9624beb2020-03-10 11:08:19 -07002483
2484.. option:: -ffixed-x16
2485
Fangrui Songd8c97292020-06-18 14:52:39 -07002486Reserve the x16 register (AArch64/RISC-V only)
Craig Topper9624beb2020-03-10 11:08:19 -07002487
2488.. option:: -ffixed-x17
2489
Fangrui Songd8c97292020-06-18 14:52:39 -07002490Reserve the x17 register (AArch64/RISC-V only)
Craig Topper9624beb2020-03-10 11:08:19 -07002491
2492.. option:: -ffixed-x18
2493
Fangrui Songd8c97292020-06-18 14:52:39 -07002494Reserve the x18 register (AArch64/RISC-V only)
Craig Topper9624beb2020-03-10 11:08:19 -07002495
2496.. option:: -ffixed-x19
2497
Fangrui Songd8c97292020-06-18 14:52:39 -07002498Reserve the x19 register (AArch64/RISC-V only)
Craig Topper9624beb2020-03-10 11:08:19 -07002499
2500.. option:: -ffixed-x2
2501
Fangrui Songd8c97292020-06-18 14:52:39 -07002502Reserve the x2 register (AArch64/RISC-V only)
Craig Topper9624beb2020-03-10 11:08:19 -07002503
2504.. option:: -ffixed-x20
2505
Fangrui Songd8c97292020-06-18 14:52:39 -07002506Reserve the x20 register (AArch64/RISC-V only)
Craig Topper9624beb2020-03-10 11:08:19 -07002507
2508.. option:: -ffixed-x21
2509
Fangrui Songd8c97292020-06-18 14:52:39 -07002510Reserve the x21 register (AArch64/RISC-V only)
Craig Topper9624beb2020-03-10 11:08:19 -07002511
2512.. option:: -ffixed-x22
2513
Fangrui Songd8c97292020-06-18 14:52:39 -07002514Reserve the x22 register (AArch64/RISC-V only)
Craig Topper9624beb2020-03-10 11:08:19 -07002515
2516.. option:: -ffixed-x23
2517
Fangrui Songd8c97292020-06-18 14:52:39 -07002518Reserve the x23 register (AArch64/RISC-V only)
Craig Topper9624beb2020-03-10 11:08:19 -07002519
2520.. option:: -ffixed-x24
2521
Fangrui Songd8c97292020-06-18 14:52:39 -07002522Reserve the x24 register (AArch64/RISC-V only)
Craig Topper9624beb2020-03-10 11:08:19 -07002523
2524.. option:: -ffixed-x25
2525
Fangrui Songd8c97292020-06-18 14:52:39 -07002526Reserve the x25 register (AArch64/RISC-V only)
Craig Topper9624beb2020-03-10 11:08:19 -07002527
2528.. option:: -ffixed-x26
2529
Fangrui Songd8c97292020-06-18 14:52:39 -07002530Reserve the x26 register (AArch64/RISC-V only)
Craig Topper9624beb2020-03-10 11:08:19 -07002531
2532.. option:: -ffixed-x27
2533
Fangrui Songd8c97292020-06-18 14:52:39 -07002534Reserve the x27 register (AArch64/RISC-V only)
Craig Topper9624beb2020-03-10 11:08:19 -07002535
2536.. option:: -ffixed-x28
2537
Fangrui Songd8c97292020-06-18 14:52:39 -07002538Reserve the x28 register (AArch64/RISC-V only)
Craig Topper9624beb2020-03-10 11:08:19 -07002539
2540.. option:: -ffixed-x29
2541
Fangrui Songd8c97292020-06-18 14:52:39 -07002542Reserve the x29 register (AArch64/RISC-V only)
Craig Topper9624beb2020-03-10 11:08:19 -07002543
2544.. option:: -ffixed-x3
2545
Fangrui Songd8c97292020-06-18 14:52:39 -07002546Reserve the x3 register (AArch64/RISC-V only)
Craig Topper9624beb2020-03-10 11:08:19 -07002547
2548.. option:: -ffixed-x30
2549
Fangrui Songd8c97292020-06-18 14:52:39 -07002550Reserve the x30 register (AArch64/RISC-V only)
Craig Topper9624beb2020-03-10 11:08:19 -07002551
2552.. option:: -ffixed-x31
2553
Fangrui Songd8c97292020-06-18 14:52:39 -07002554Reserve the x31 register (AArch64/RISC-V only)
Craig Topper9624beb2020-03-10 11:08:19 -07002555
2556.. option:: -ffixed-x4
2557
Fangrui Songd8c97292020-06-18 14:52:39 -07002558Reserve the x4 register (AArch64/RISC-V only)
Craig Topper9624beb2020-03-10 11:08:19 -07002559
2560.. option:: -ffixed-x5
2561
Fangrui Songd8c97292020-06-18 14:52:39 -07002562Reserve the x5 register (AArch64/RISC-V only)
Craig Topper9624beb2020-03-10 11:08:19 -07002563
2564.. option:: -ffixed-x6
2565
Fangrui Songd8c97292020-06-18 14:52:39 -07002566Reserve the x6 register (AArch64/RISC-V only)
Craig Topper9624beb2020-03-10 11:08:19 -07002567
2568.. option:: -ffixed-x7
2569
Fangrui Songd8c97292020-06-18 14:52:39 -07002570Reserve the x7 register (AArch64/RISC-V only)
Craig Topper9624beb2020-03-10 11:08:19 -07002571
2572.. option:: -ffixed-x8
2573
Fangrui Songd8c97292020-06-18 14:52:39 -07002574Reserve the x8 register (AArch64/RISC-V only)
Craig Topper9624beb2020-03-10 11:08:19 -07002575
2576.. option:: -ffixed-x9
2577
Fangrui Songd8c97292020-06-18 14:52:39 -07002578Reserve the x9 register (AArch64/RISC-V only)
Craig Topper9624beb2020-03-10 11:08:19 -07002579
Richard Smith081ad4d2017-01-24 19:39:46 +00002580.. option:: -m16
2581
Richard Smith081ad4d2017-01-24 19:39:46 +00002582.. option:: -m32
2583
Richard Smith081ad4d2017-01-24 19:39:46 +00002584.. option:: -m64
2585
Richard Smith081ad4d2017-01-24 19:39:46 +00002586.. option:: -mabi=<arg>
2587
Fangrui Songd8c97292020-06-18 14:52:39 -07002588.. option:: -maix-struct-return
2589
2590Return all structs in memory (PPC32 only)
2591
Craig Topper9624beb2020-03-10 11:08:19 -07002592.. option:: -malign-branch-boundary=<arg>
2593
2594Specify the boundary's size to align branches
2595
Craig Topper9624beb2020-03-10 11:08:19 -07002596.. option:: -malign-branch=<arg1>,<arg2>...
2597
2598Specify types of branches to align
2599
Richard Smith081ad4d2017-01-24 19:39:46 +00002600.. option:: -malign-double
2601
2602Align doubles to two words in structs (x86 only)
2603
Richard Smith081ad4d2017-01-24 19:39:46 +00002604.. option:: -march=<arg>
2605
Richard Smith081ad4d2017-01-24 19:39:46 +00002606.. option:: -masm=<arg>
2607
Richard Smith081ad4d2017-01-24 19:39:46 +00002608.. option:: -mbackchain, -mno-backchain
2609
2610Link stack frames through backchain on System Z
2611
Craig Topper9624beb2020-03-10 11:08:19 -07002612.. option:: -mbranches-within-32B-boundaries
2613
2614Align selected branches (fused, jcc, jmp) within 32-byte boundary
2615
2616.. option:: -mcmodel=<arg>, -mcmodel=medany (equivalent to -mcmodel=medium), -mcmodel=medlow (equivalent to -mcmodel=small)
Richard Smith081ad4d2017-01-24 19:39:46 +00002617
Richard Smith081ad4d2017-01-24 19:39:46 +00002618.. option:: -mconsole<arg>
2619
Craig Topper9624beb2020-03-10 11:08:19 -07002620.. program:: clang1
2621.. option:: -mcpu=<arg>, -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), -mv66 (equivalent to -mcpu=hexagonv66), -mv67 (equivalent to -mcpu=hexagonv67), -mv67t (equivalent to -mcpu=hexagonv67t)
2622.. program:: clang
Ziang Wande94ac92019-06-25 23:57:14 +00002623
Vedant Kumar368540f2018-08-23 17:55:03 +00002624.. option:: -mcrc, -mno-crc
2625
2626Allow use of CRC instructions (ARM/Mips only)
2627
Craig Topperd23254a2017-07-20 17:52:48 +00002628.. option:: -mdefault-build-attributes<arg>, -mno-default-build-attributes<arg>
2629
Richard Smith081ad4d2017-01-24 19:39:46 +00002630.. option:: -mdll<arg>
2631
Fangrui Songd8c97292020-06-18 14:52:39 -07002632.. option:: -mdouble=<arg>
2633
2634Force double to be 32 bits or 64 bits
2635
Richard Smith081ad4d2017-01-24 19:39:46 +00002636.. option:: -mdynamic-no-pic<arg>
2637
Richard Smith081ad4d2017-01-24 19:39:46 +00002638.. option:: -meabi <arg>
2639
2640Set EABI type, e.g. 4, 5 or gnu (default depends on triple)
2641
Fangrui Songd8c97292020-06-18 14:52:39 -07002642.. option:: -menable-experimental-extensions
2643
2644Enable use of experimental RISC-V extensions.
2645
Richard Smith78e23fd2017-04-13 22:39:49 +00002646.. option:: -mfentry
2647
Jonas Paulsson81aa62a2019-09-20 13:13:50 +00002648Insert calls to fentry at function entry (x86/SystemZ only)
Richard Smith78e23fd2017-04-13 22:39:49 +00002649
Richard Smith081ad4d2017-01-24 19:39:46 +00002650.. option:: -mfloat-abi=<arg>
2651
Richard Smith081ad4d2017-01-24 19:39:46 +00002652.. option:: -mfpmath=<arg>
2653
Richard Smith081ad4d2017-01-24 19:39:46 +00002654.. option:: -mfpu=<arg>
2655
Richard Smith081ad4d2017-01-24 19:39:46 +00002656.. option:: -mglobal-merge, -mno-global-merge
2657
2658Enable merging of globals
2659
Richard Smith081ad4d2017-01-24 19:39:46 +00002660.. option:: -mhard-float
2661
Richard Smith081ad4d2017-01-24 19:39:46 +00002662.. option:: -mhwdiv=<arg>, --mhwdiv <arg>, --mhwdiv=<arg>
2663
Craig Topper9624beb2020-03-10 11:08:19 -07002664.. option:: -mhwmult=<arg>
2665
Richard Smith081ad4d2017-01-24 19:39:46 +00002666.. option:: -miamcu, -mno-iamcu
2667
2668Use Intel MCU ABI
2669
Richard Smith081ad4d2017-01-24 19:39:46 +00002670.. option:: -mimplicit-float, -mno-implicit-float
2671
Richard Smith081ad4d2017-01-24 19:39:46 +00002672.. option:: -mimplicit-it=<arg>
2673
Richard Smith081ad4d2017-01-24 19:39:46 +00002674.. option:: -mincremental-linker-compatible, -mno-incremental-linker-compatible
2675
2676(integrated-as) Emit an object file which can be used with an incremental linker
2677
Richard Smith78e23fd2017-04-13 22:39:49 +00002678.. option:: -miphoneos-version-min=<arg>, -mios-version-min=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00002679
Richard Smith081ad4d2017-01-24 19:39:46 +00002680.. option:: -mkernel
2681
Richard Smith081ad4d2017-01-24 19:39:46 +00002682.. option:: -mlong-calls, -mno-long-calls
2683
2684Generate branches with extended addressability, usually via indirect jumps.
2685
Scott Constable5b519cf2020-04-02 21:59:47 -07002686.. option:: -mlvi-cfi, -mno-lvi-cfi
2687
2688Enable only control-flow mitigations for Load Value Injection (LVI)
2689
Fangrui Songd8c97292020-06-18 14:52:39 -07002690.. option:: -mlvi-hardening, -mno-lvi-hardening
2691
2692Enable all mitigations for Load Value Injection (LVI)
2693
Craig Topperd23254a2017-07-20 17:52:48 +00002694.. option:: -mmacosx-version-min=<arg>, -mmacos-version-min=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00002695
Craig Topper9624beb2020-03-10 11:08:19 -07002696Set Mac OS X deployment target
Richard Smith081ad4d2017-01-24 19:39:46 +00002697
Craig Topperd23254a2017-07-20 17:52:48 +00002698.. option:: -mmcu=<arg>
2699
Richard Smith081ad4d2017-01-24 19:39:46 +00002700.. option:: -mms-bitfields, -mno-ms-bitfields
2701
2702Set the default structure layout to be compatible with the Microsoft compiler standard
2703
Craig Topper9624beb2020-03-10 11:08:19 -07002704.. option:: -mnop-mcount
2705
2706Generate mcount/\_\_fentry\_\_ calls as nops. To activate they need to be patched in.
2707
Richard Smith081ad4d2017-01-24 19:39:46 +00002708.. option:: -momit-leaf-frame-pointer, -mno-omit-leaf-frame-pointer
2709
2710Omit frame pointer setup for leaf functions
2711
Richard Smith081ad4d2017-01-24 19:39:46 +00002712.. option:: -moslib=<arg>
2713
Craig Topper9624beb2020-03-10 11:08:19 -07002714.. option:: -mpacked-stack, -mno-packed-stack
2715
2716Use packed stack layout (SystemZ only).
2717
Fangrui Songd8c97292020-06-18 14:52:39 -07002718.. option:: -mpad-max-prefix-size=<arg>
2719
2720Specify maximum number of prefixes to use for padding
2721
Richard Smith081ad4d2017-01-24 19:39:46 +00002722.. option:: -mpie-copy-relocations, -mno-pie-copy-relocations
2723
2724Use copy relocations support for PIE builds
2725
Craig Topper9a724aa2017-12-11 21:09:19 +00002726.. option:: -mprefer-vector-width=<arg>
2727
2728Specifies preferred vector width for auto-vectorization. Defaults to 'none' which allows target specific decisions.
2729
Richard Smith081ad4d2017-01-24 19:39:46 +00002730.. option:: -mqdsp6-compat
2731
2732Enable hexagon-qdsp6 backward compatibility
2733
Richard Smith081ad4d2017-01-24 19:39:46 +00002734.. option:: -mrecip
2735
Richard Smithb2c82a62017-01-27 01:54:42 +00002736.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00002737.. option:: -mrecip=<arg1>,<arg2>...
Richard Smithb2c82a62017-01-27 01:54:42 +00002738.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00002739
Craig Topper9624beb2020-03-10 11:08:19 -07002740.. option:: -mrecord-mcount
2741
2742Generate a \_\_mcount\_loc section entry for each \_\_fentry\_\_ call.
2743
Richard Smith081ad4d2017-01-24 19:39:46 +00002744.. option:: -mred-zone, -mno-red-zone
2745
Richard Smith081ad4d2017-01-24 19:39:46 +00002746.. option:: -mregparm=<arg>
2747
Richard Smith081ad4d2017-01-24 19:39:46 +00002748.. option:: -mrelax-all, -mno-relax-all
2749
2750(integrated-as) Relax all machine instructions
2751
Vedant Kumar368540f2018-08-23 17:55:03 +00002752.. option:: -mretpoline, -mno-retpoline
2753
Richard Smith081ad4d2017-01-24 19:39:46 +00002754.. option:: -mrtd, -mno-rtd
2755
2756Make StdCall calling convention the default
2757
Vedant Kumar368540f2018-08-23 17:55:03 +00002758.. option:: -msign-return-address=<arg>
2759
2760Select return address signing scope
Richard Smith081ad4d2017-01-24 19:39:46 +00002761
Richard Smith081ad4d2017-01-24 19:39:46 +00002762.. option:: -msoft-float, -mno-soft-float
2763
2764Use software floating point
2765
Craig Topper9624beb2020-03-10 11:08:19 -07002766.. option:: -mspeculative-load-hardening, -mno-speculative-load-hardening
2767
Richard Smith081ad4d2017-01-24 19:39:46 +00002768.. option:: -mstack-alignment=<arg>
2769
2770Set the stack alignment
2771
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00002772.. option:: -mstack-arg-probe, -mno-stack-arg-probe
2773
2774Enable stack probes
2775
Richard Smith081ad4d2017-01-24 19:39:46 +00002776.. option:: -mstack-probe-size=<arg>
2777
2778Set the stack probe size
2779
Richard Smith081ad4d2017-01-24 19:39:46 +00002780.. option:: -mstackrealign, -mno-stackrealign
2781
2782Force realign the stack at entry to every function
2783
Fangrui Songd8c97292020-06-18 14:52:39 -07002784.. option:: -msvr4-struct-return
2785
2786Return small structs in registers (PPC32 only)
2787
Richard Smith081ad4d2017-01-24 19:39:46 +00002788.. option:: -mthread-model <arg>
2789
2790The thread model to use, e.g. posix, single (posix by default)
2791
Richard Smith081ad4d2017-01-24 19:39:46 +00002792.. option:: -mthreads<arg>
2793
Richard Smith081ad4d2017-01-24 19:39:46 +00002794.. option:: -mthumb, -mno-thumb
2795
Craig Topper9624beb2020-03-10 11:08:19 -07002796.. option:: -mtls-direct-seg-refs, -mno-tls-direct-seg-refs
Richard Smith081ad4d2017-01-24 19:39:46 +00002797
Craig Topper9624beb2020-03-10 11:08:19 -07002798Enable direct TLS access through segment registers (default)
2799
2800.. option:: -mtls-size=<arg>
2801
2802Specify bit size of immediate TLS offsets (AArch64 ELF only): 12 (for 4KB) \| 24 (for 16MB, default) \| 32 (for 4GB) \| 48 (for 256TB, needs -mcmodel=large)
2803
2804.. program:: clang1
2805.. option:: -mtune=<arg>
2806.. program:: clang
Ziang Wande94ac92019-06-25 23:57:14 +00002807
Sjoerd Meijer35cf2f42020-04-22 08:49:02 +01002808Accepted for compatibility with GCC. Currently has no effect.
2809
Richard Smith78e23fd2017-04-13 22:39:49 +00002810.. option:: -mtvos-version-min=<arg>, -mappletvos-version-min=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00002811
Richard Smith081ad4d2017-01-24 19:39:46 +00002812.. option:: -municode<arg>
2813
Richard Smith081ad4d2017-01-24 19:39:46 +00002814.. option:: -mvx, -mno-vx
2815
Richard Smith081ad4d2017-01-24 19:39:46 +00002816.. option:: -mwarn-nonportable-cfstrings, -mno-warn-nonportable-cfstrings
2817
Richard Smith78e23fd2017-04-13 22:39:49 +00002818.. option:: -mwatchos-version-min=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00002819
Craig Topper9624beb2020-03-10 11:08:19 -07002820.. option:: -mwavefrontsize64, -mno-wavefrontsize64
2821
2822Wavefront size 64 is used
2823
Richard Smith081ad4d2017-01-24 19:39:46 +00002824.. option:: -mwindows<arg>
2825
Richard Smith081ad4d2017-01-24 19:39:46 +00002826.. option:: -mx32
2827
Richard Smith081ad4d2017-01-24 19:39:46 +00002828AARCH64
2829-------
Tri Vo28e7e602018-09-25 16:48:40 +00002830.. option:: -fcall-saved-x10
2831
2832Make the x10 register call-saved (AArch64 only)
2833
2834.. option:: -fcall-saved-x11
2835
2836Make the x11 register call-saved (AArch64 only)
2837
2838.. option:: -fcall-saved-x12
2839
2840Make the x12 register call-saved (AArch64 only)
2841
2842.. option:: -fcall-saved-x13
2843
2844Make the x13 register call-saved (AArch64 only)
2845
2846.. option:: -fcall-saved-x14
2847
2848Make the x14 register call-saved (AArch64 only)
2849
2850.. option:: -fcall-saved-x15
2851
2852Make the x15 register call-saved (AArch64 only)
2853
2854.. option:: -fcall-saved-x18
2855
2856Make the x18 register call-saved (AArch64 only)
2857
Craig Topper9624beb2020-03-10 11:08:19 -07002858.. option:: -fcall-saved-x8
2859
2860Make the x8 register call-saved (AArch64 only)
2861
2862.. option:: -fcall-saved-x9
2863
2864Make the x9 register call-saved (AArch64 only)
2865
Richard Smith081ad4d2017-01-24 19:39:46 +00002866.. option:: -mfix-cortex-a53-835769, -mno-fix-cortex-a53-835769
2867
2868Workaround Cortex-A53 erratum 835769 (AArch64 only)
2869
Richard Smith081ad4d2017-01-24 19:39:46 +00002870.. option:: -mgeneral-regs-only
2871
2872Generate code which only uses the general purpose registers (AArch64 only)
2873
2874AMDGPU
2875------
Craig Topper9624beb2020-03-10 11:08:19 -07002876.. option:: -mcode-object-v3, -mno-code-object-v3
2877
2878Enable code object v3 (AMDGPU only)
2879
Stanislav Mekhanoshin91792f12019-05-13 23:15:59 +00002880.. option:: -mcumode, -mno-cumode
2881
Craig Topper9624beb2020-03-10 11:08:19 -07002882CU wavefront execution mode is used (AMDGPU only)
Stanislav Mekhanoshin91792f12019-05-13 23:15:59 +00002883
Craig Topper9624beb2020-03-10 11:08:19 -07002884.. option:: -msram-ecc, -mno-sram-ecc
Stanislav Mekhanoshin8a8131a2019-06-13 23:47:59 +00002885
Craig Topper9624beb2020-03-10 11:08:19 -07002886Enable SRAM ECC (AMDGPU only)
Stanislav Mekhanoshin8a8131a2019-06-13 23:47:59 +00002887
Craig Topper16418662017-11-20 18:07:43 +00002888.. option:: -mxnack, -mno-xnack
2889
2890Enable XNACK (AMDGPU only)
2891
Richard Smith081ad4d2017-01-24 19:39:46 +00002892ARM
2893---
Craig Topper9624beb2020-03-10 11:08:19 -07002894.. option:: -fAAPCSBitfieldLoad
2895
2896Follows the AAPCS standard that all volatile bit-field write generates at least one load. (ARM only).
2897
Richard Smith081ad4d2017-01-24 19:39:46 +00002898.. option:: -ffixed-r9
2899
2900Reserve the r9 register (ARM only)
2901
Craig Topper9624beb2020-03-10 11:08:19 -07002902.. option:: -mcmse
Momchil Velikovac215352020-01-29 10:38:10 +00002903
Craig Topper9624beb2020-03-10 11:08:19 -07002904Allow use of CMSE (Armv8-M Security Extensions)
Momchil Velikovac215352020-01-29 10:38:10 +00002905
Richard Smith081ad4d2017-01-24 19:39:46 +00002906.. option:: -mexecute-only, -mno-execute-only, -mpure-code
2907
2908Disallow generation of data access to code sections (ARM only)
2909
Richard Smith081ad4d2017-01-24 19:39:46 +00002910.. option:: -mno-movt
2911
2912Disallow use of movt/movw pairs (ARM only)
2913
Richard Smith78e23fd2017-04-13 22:39:49 +00002914.. option:: -mno-neg-immediates
2915
2916Disallow converting instructions with negative immediates to their negation or inversion.
2917
Richard Smith081ad4d2017-01-24 19:39:46 +00002918.. option:: -mnocrc
2919
2920Disallow use of CRC instructions (ARM only)
2921
Richard Smith081ad4d2017-01-24 19:39:46 +00002922.. option:: -mrestrict-it, -mno-restrict-it
2923
2924Disallow generation of deprecated IT blocks for ARMv8. It is on by default for ARMv8 Thumb mode.
2925
Craig Topper16418662017-11-20 18:07:43 +00002926.. option:: -mtp=<arg>
2927
Craig Topper9624beb2020-03-10 11:08:19 -07002928Thread pointer access method (AArch32/AArch64 only)
Craig Topper16418662017-11-20 18:07:43 +00002929
Richard Smith081ad4d2017-01-24 19:39:46 +00002930.. option:: -munaligned-access, -mno-unaligned-access
2931
2932Allow memory accesses to be unaligned (AArch32/AArch64 only)
2933
2934Hexagon
2935-------
Craig Topper16418662017-11-20 18:07:43 +00002936.. option:: -mieee-rnd-near
2937
Vedant Kumar368540f2018-08-23 17:55:03 +00002938.. option:: -mmemops, -mno-memops
2939
2940Enable generation of memop instructions
2941
2942.. option:: -mnvj, -mno-nvj
2943
2944Enable generation of new-value jumps
2945
2946.. option:: -mnvs, -mno-nvs
2947
2948Enable generation of new-value stores
2949
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00002950.. option:: -mpackets, -mno-packets
2951
2952Enable generation of instruction packets
2953
Craig Topper16418662017-11-20 18:07:43 +00002954Hexagon
2955-------
Richard Smith081ad4d2017-01-24 19:39:46 +00002956.. option:: -mhvx, -mno-hvx
2957
2958Enable Hexagon Vector eXtensions
2959
Craig Topper16418662017-11-20 18:07:43 +00002960.. option:: -mhvx-length=<arg>
2961
2962Set Hexagon Vector Length
2963
2964.. program:: clang1
2965.. option:: -mhvx=<arg>
2966.. program:: clang
2967
2968Enable Hexagon Vector eXtensions
Richard Smith081ad4d2017-01-24 19:39:46 +00002969
Vedant Kumar368540f2018-08-23 17:55:03 +00002970MIPS
2971----
2972.. option:: -mabicalls, -mno-abicalls
2973
2974Enable SVR4-style position-independent code (Mips only)
2975
2976.. option:: -mabs=<arg>
2977
2978.. option:: -mcheck-zero-division, -mno-check-zero-division
2979
2980.. option:: -mcompact-branches=<arg>
2981
2982.. option:: -mdouble-float
2983
2984.. option:: -mdsp, -mno-dsp
2985
2986.. option:: -mdspr2, -mno-dspr2
2987
2988.. option:: -membedded-data, -mno-embedded-data
2989
2990Place constants in the .rodata section instead of the .sdata section even if they meet the -G <size> threshold (MIPS)
2991
2992.. option:: -mextern-sdata, -mno-extern-sdata
2993
2994Assume that externally defined data is in the small data if it meets the -G <size> threshold (MIPS)
2995
2996.. option:: -mfp32
2997
2998Use 32-bit floating point registers (MIPS only)
2999
3000.. option:: -mfp64
3001
3002Use 64-bit floating point registers (MIPS only)
3003
3004.. option:: -mginv, -mno-ginv
3005
3006.. option:: -mgpopt, -mno-gpopt
3007
3008Use GP relative accesses for symbols known to be in a small data section (MIPS)
3009
3010.. option:: -mindirect-jump=<arg>
3011
3012Change indirect jump instructions to inhibit speculation
3013
3014.. option:: -mips16
3015
3016.. option:: -mldc1-sdc1, -mno-ldc1-sdc1
3017
3018.. option:: -mlocal-sdata, -mno-local-sdata
3019
3020Extend the -G behaviour to object local data (MIPS)
3021
3022.. option:: -mmadd4, -mno-madd4
3023
3024Enable the generation of 4-operand madd.s, madd.d and related instructions.
3025
3026.. option:: -mmicromips, -mno-micromips
3027
3028.. option:: -mmsa, -mno-msa
3029
3030Enable MSA ASE (MIPS only)
3031
3032.. option:: -mmt, -mno-mt
3033
3034Enable MT ASE (MIPS only)
3035
3036.. option:: -mnan=<arg>
3037
3038.. option:: -mno-mips16
3039
3040.. option:: -msingle-float
3041
3042.. option:: -mvirt, -mno-virt
3043
3044.. option:: -mxgot, -mno-xgot
3045
Richard Smith081ad4d2017-01-24 19:39:46 +00003046PowerPC
3047-------
Richard Smith78e23fd2017-04-13 22:39:49 +00003048.. option:: -maltivec, -mno-altivec
3049
Richard Smith081ad4d2017-01-24 19:39:46 +00003050.. option:: -mcmpb, -mno-cmpb
3051
Richard Smith081ad4d2017-01-24 19:39:46 +00003052.. option:: -mcrbits, -mno-crbits
3053
Richard Smith081ad4d2017-01-24 19:39:46 +00003054.. option:: -mcrypto, -mno-crypto
3055
Richard Smith081ad4d2017-01-24 19:39:46 +00003056.. option:: -mdirect-move, -mno-direct-move
3057
Richard Smith081ad4d2017-01-24 19:39:46 +00003058.. option:: -mfloat128, -mno-float128
3059
Richard Smith081ad4d2017-01-24 19:39:46 +00003060.. option:: -mfprnd, -mno-fprnd
3061
Richard Smith081ad4d2017-01-24 19:39:46 +00003062.. option:: -mhtm, -mno-htm
3063
Richard Smith081ad4d2017-01-24 19:39:46 +00003064.. option:: -minvariant-function-descriptors, -mno-invariant-function-descriptors
3065
Richard Smith081ad4d2017-01-24 19:39:46 +00003066.. option:: -misel, -mno-isel
3067
Richard Smith081ad4d2017-01-24 19:39:46 +00003068.. option:: -mlongcall, -mno-longcall
3069
Richard Smith081ad4d2017-01-24 19:39:46 +00003070.. option:: -mmfocrf, -mmfcrf, -mno-mfocrf
3071
Fangrui Songd8c97292020-06-18 14:52:39 -07003072.. option:: -mpcrel, -mno-pcrel
3073
Richard Smith081ad4d2017-01-24 19:39:46 +00003074.. option:: -mpopcntd, -mno-popcntd
3075
Fangrui Songd8c97292020-06-18 14:52:39 -07003076.. option:: -mpower10-vector, -mno-power10-vector
3077
Richard Smith081ad4d2017-01-24 19:39:46 +00003078.. option:: -mpower8-vector, -mno-power8-vector
3079
Richard Smith081ad4d2017-01-24 19:39:46 +00003080.. option:: -mpower9-vector, -mno-power9-vector
3081
Richard Smith081ad4d2017-01-24 19:39:46 +00003082.. option:: -mqpx, -mno-qpx
3083
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00003084.. option:: -msecure-plt
3085
Craig Topper9624beb2020-03-10 11:08:19 -07003086.. option:: -mspe, -mno-spe
3087
Richard Smith081ad4d2017-01-24 19:39:46 +00003088.. option:: -mvsx, -mno-vsx
3089
3090WebAssembly
3091-----------
Craig Topper9624beb2020-03-10 11:08:19 -07003092.. option:: -matomics, -mno-atomics
3093
3094.. option:: -mbulk-memory, -mno-bulk-memory
3095
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00003096.. option:: -mexception-handling, -mno-exception-handling
3097
Craig Topper9624beb2020-03-10 11:08:19 -07003098.. option:: -mmultivalue, -mno-multivalue
3099
3100.. option:: -mmutable-globals, -mno-mutable-globals
3101
Craig Topper188252d2017-12-11 21:09:16 +00003102.. option:: -mnontrapping-fptoint, -mno-nontrapping-fptoint
3103
Craig Topper9624beb2020-03-10 11:08:19 -07003104.. option:: -mreference-types, -mno-reference-types
3105
Dan Gohmand0c4e1e2018-01-19 17:16:32 +00003106.. option:: -msign-ext, -mno-sign-ext
3107
Richard Smith081ad4d2017-01-24 19:39:46 +00003108.. option:: -msimd128, -mno-simd128
3109
Craig Topper9624beb2020-03-10 11:08:19 -07003110.. option:: -mtail-call, -mno-tail-call
3111
3112.. option:: -munimplemented-simd128, -mno-unimplemented-simd128
3113
Fangrui Songd8c97292020-06-18 14:52:39 -07003114WebAssembly Driver
3115------------------
Dan Gohmand4964372020-04-21 10:35:10 -07003116.. option:: -mexec-model=<arg>
3117
Fangrui Songd8c97292020-06-18 14:52:39 -07003118Execution model (WebAssembly only)
Dan Gohmand4964372020-04-21 10:35:10 -07003119
Richard Smith081ad4d2017-01-24 19:39:46 +00003120X86
3121---
Richard Smith081ad4d2017-01-24 19:39:46 +00003122.. option:: -m3dnow, -mno-3dnow
3123
Richard Smith081ad4d2017-01-24 19:39:46 +00003124.. option:: -m3dnowa, -mno-3dnowa
3125
Richard Smith081ad4d2017-01-24 19:39:46 +00003126.. option:: -madx, -mno-adx
3127
Richard Smith081ad4d2017-01-24 19:39:46 +00003128.. option:: -maes, -mno-aes
3129
Richard Smith081ad4d2017-01-24 19:39:46 +00003130.. option:: -mavx, -mno-avx
3131
Richard Smith081ad4d2017-01-24 19:39:46 +00003132.. option:: -mavx2, -mno-avx2
3133
Luo, Yuanke844f6622019-05-06 08:25:11 +00003134.. option:: -mavx512bf16, -mno-avx512bf16
3135
Craig Topper9624beb2020-03-10 11:08:19 -07003136.. option:: -mavx512bitalg, -mno-avx512bitalg
3137
Richard Smith081ad4d2017-01-24 19:39:46 +00003138.. option:: -mavx512bw, -mno-avx512bw
3139
Richard Smith081ad4d2017-01-24 19:39:46 +00003140.. option:: -mavx512cd, -mno-avx512cd
3141
Richard Smith081ad4d2017-01-24 19:39:46 +00003142.. option:: -mavx512dq, -mno-avx512dq
3143
Richard Smith081ad4d2017-01-24 19:39:46 +00003144.. option:: -mavx512er, -mno-avx512er
3145
Richard Smith081ad4d2017-01-24 19:39:46 +00003146.. option:: -mavx512f, -mno-avx512f
3147
Richard Smith081ad4d2017-01-24 19:39:46 +00003148.. option:: -mavx512ifma, -mno-avx512ifma
3149
Richard Smith081ad4d2017-01-24 19:39:46 +00003150.. option:: -mavx512pf, -mno-avx512pf
3151
Richard Smith081ad4d2017-01-24 19:39:46 +00003152.. option:: -mavx512vbmi, -mno-avx512vbmi
3153
Craig Topper287c8012018-01-03 18:29:12 +00003154.. option:: -mavx512vbmi2, -mno-avx512vbmi2
3155
Richard Smith081ad4d2017-01-24 19:39:46 +00003156.. option:: -mavx512vl, -mno-avx512vl
3157
Craig Topper287c8012018-01-03 18:29:12 +00003158.. option:: -mavx512vnni, -mno-avx512vnni
3159
Pengfei Wangcc3629d2019-05-31 06:09:35 +00003160.. option:: -mavx512vp2intersect, -mno-avx512vp2intersect
3161
Craig Topperd23254a2017-07-20 17:52:48 +00003162.. option:: -mavx512vpopcntdq, -mno-avx512vpopcntdq
3163
Richard Smith081ad4d2017-01-24 19:39:46 +00003164.. option:: -mbmi, -mno-bmi
3165
Richard Smith081ad4d2017-01-24 19:39:46 +00003166.. option:: -mbmi2, -mno-bmi2
3167
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00003168.. option:: -mcldemote, -mno-cldemote
3169
Craig Topper78b47872017-02-08 06:48:58 +00003170.. option:: -mclflushopt, -mno-clflushopt
3171
Craig Topper177a57c2017-02-08 07:57:01 +00003172.. option:: -mclwb, -mno-clwb
3173
Richard Smith78e23fd2017-04-13 22:39:49 +00003174.. option:: -mclzero, -mno-clzero
3175
Richard Smith081ad4d2017-01-24 19:39:46 +00003176.. option:: -mcx16, -mno-cx16
3177
Pengfei Wang3a29f7c2019-06-06 08:28:42 +00003178.. option:: -menqcmd, -mno-enqcmd
3179
Richard Smith081ad4d2017-01-24 19:39:46 +00003180.. option:: -mf16c, -mno-f16c
3181
Richard Smith081ad4d2017-01-24 19:39:46 +00003182.. option:: -mfma, -mno-fma
3183
Richard Smith081ad4d2017-01-24 19:39:46 +00003184.. option:: -mfma4, -mno-fma4
3185
Richard Smith081ad4d2017-01-24 19:39:46 +00003186.. option:: -mfsgsbase, -mno-fsgsbase
3187
Richard Smith081ad4d2017-01-24 19:39:46 +00003188.. option:: -mfxsr, -mno-fxsr
3189
Craig Topper287c8012018-01-03 18:29:12 +00003190.. option:: -mgfni, -mno-gfni
3191
Vedant Kumar368540f2018-08-23 17:55:03 +00003192.. option:: -minvpcid, -mno-invpcid
3193
Craig Topperd23254a2017-07-20 17:52:48 +00003194.. option:: -mlwp, -mno-lwp
3195
Richard Smith081ad4d2017-01-24 19:39:46 +00003196.. option:: -mlzcnt, -mno-lzcnt
3197
Richard Smith081ad4d2017-01-24 19:39:46 +00003198.. option:: -mmmx, -mno-mmx
3199
Craig Topper177a57c2017-02-08 07:57:01 +00003200.. option:: -mmovbe, -mno-movbe
3201
Gabor Buellaa51e0c22018-05-01 10:05:42 +00003202.. option:: -mmovdir64b, -mno-movdir64b
3203
Vedant Kumar368540f2018-08-23 17:55:03 +00003204.. option:: -mmovdiri, -mno-movdiri
3205
Richard Smith081ad4d2017-01-24 19:39:46 +00003206.. option:: -mmwaitx, -mno-mwaitx
3207
Richard Smith081ad4d2017-01-24 19:39:46 +00003208.. option:: -mpclmul, -mno-pclmul
3209
Vedant Kumar368540f2018-08-23 17:55:03 +00003210.. option:: -mpconfig, -mno-pconfig
3211
Richard Smith081ad4d2017-01-24 19:39:46 +00003212.. option:: -mpku, -mno-pku
3213
Richard Smith081ad4d2017-01-24 19:39:46 +00003214.. option:: -mpopcnt, -mno-popcnt
3215
Craig Topperd2bf7b02017-02-08 08:23:40 +00003216.. option:: -mprefetchwt1, -mno-prefetchwt1
3217
Richard Smith081ad4d2017-01-24 19:39:46 +00003218.. option:: -mprfchw, -mno-prfchw
3219
Vedant Kumar368540f2018-08-23 17:55:03 +00003220.. option:: -mptwrite, -mno-ptwrite
3221
Craig Topper596527b2018-01-23 18:40:15 +00003222.. option:: -mrdpid, -mno-rdpid
3223
Richard Smith081ad4d2017-01-24 19:39:46 +00003224.. option:: -mrdrnd, -mno-rdrnd
3225
Richard Smith081ad4d2017-01-24 19:39:46 +00003226.. option:: -mrdseed, -mno-rdseed
3227
Craig Topper596527b2018-01-23 18:40:15 +00003228.. option:: -mretpoline-external-thunk, -mno-retpoline-external-thunk
3229
Richard Smith081ad4d2017-01-24 19:39:46 +00003230.. option:: -mrtm, -mno-rtm
3231
Jonas Hahnfelda180fc42018-02-22 17:10:28 +00003232.. option:: -msahf, -mno-sahf
3233
WangTianQingd08fadd2020-04-02 16:15:34 +08003234.. option:: -mserialize, -mno-serialize
3235
Craig Topper204ecff2017-02-08 08:23:17 +00003236.. option:: -msgx, -mno-sgx
3237
Richard Smith081ad4d2017-01-24 19:39:46 +00003238.. option:: -msha, -mno-sha
3239
Craig Topper188252d2017-12-11 21:09:16 +00003240.. option:: -mshstk, -mno-shstk
3241
Richard Smith081ad4d2017-01-24 19:39:46 +00003242.. option:: -msse, -mno-sse
3243
Richard Smith081ad4d2017-01-24 19:39:46 +00003244.. option:: -msse2, -mno-sse2
3245
Richard Smith081ad4d2017-01-24 19:39:46 +00003246.. option:: -msse3, -mno-sse3
3247
Richard Smith081ad4d2017-01-24 19:39:46 +00003248.. option:: -msse4.1, -mno-sse4.1
3249
Richard Smithb2c82a62017-01-27 01:54:42 +00003250.. program:: clang1
Richard Smith081ad4d2017-01-24 19:39:46 +00003251.. option:: -msse4.2, -mno-sse4.2, -msse4
Richard Smithb2c82a62017-01-27 01:54:42 +00003252.. program:: clang
Richard Smith081ad4d2017-01-24 19:39:46 +00003253
Richard Smith081ad4d2017-01-24 19:39:46 +00003254.. option:: -msse4a, -mno-sse4a
3255
Richard Smith081ad4d2017-01-24 19:39:46 +00003256.. option:: -mssse3, -mno-ssse3
3257
Richard Smith081ad4d2017-01-24 19:39:46 +00003258.. option:: -mtbm, -mno-tbm
3259
WangTianQinga3dc9492020-04-09 13:15:42 +08003260.. option:: -mtsxldtrk, -mno-tsxldtrk
3261
Craig Topper287c8012018-01-03 18:29:12 +00003262.. option:: -mvaes, -mno-vaes
3263
3264.. option:: -mvpclmulqdq, -mno-vpclmulqdq
3265
Craig Topper9624beb2020-03-10 11:08:19 -07003266.. option:: -mvzeroupper, -mno-vzeroupper
3267
Craig Topper42da9cb2018-04-23 21:41:06 +00003268.. option:: -mwaitpkg, -mno-waitpkg
3269
Gabor Buellaa0520162018-04-11 20:09:09 +00003270.. option:: -mwbnoinvd, -mno-wbnoinvd
3271
Richard Smith081ad4d2017-01-24 19:39:46 +00003272.. option:: -mx87, -m80387, -mno-x87
3273
Richard Smith081ad4d2017-01-24 19:39:46 +00003274.. option:: -mxop, -mno-xop
3275
Richard Smith081ad4d2017-01-24 19:39:46 +00003276.. option:: -mxsave, -mno-xsave
3277
Richard Smith081ad4d2017-01-24 19:39:46 +00003278.. option:: -mxsavec, -mno-xsavec
3279
Richard Smith081ad4d2017-01-24 19:39:46 +00003280.. option:: -mxsaveopt, -mno-xsaveopt
3281
Richard Smith081ad4d2017-01-24 19:39:46 +00003282.. option:: -mxsaves, -mno-xsaves
3283
Vedant Kumar368540f2018-08-23 17:55:03 +00003284RISCV
3285-----
3286.. option:: -mrelax, -mno-relax
3287
3288Enable linker relaxation
3289
Craig Topper9624beb2020-03-10 11:08:19 -07003290.. option:: -msave-restore, -mno-save-restore
3291
3292Enable using library calls for save and restore
3293
3294Long double flags
3295-----------------
3296Selects the long double implementation
3297
3298.. option:: -mlong-double-128
3299
3300Force long double to be 128 bits
3301
3302.. option:: -mlong-double-64
3303
3304Force long double to be 64 bits
3305
3306.. option:: -mlong-double-80
3307
3308Force long double to be 80 bits, padded to 128 bits for storage
3309
Richard Smith081ad4d2017-01-24 19:39:46 +00003310Optimization level
3311~~~~~~~~~~~~~~~~~~
3312
3313Flags controlling how much optimization should be performed.
3314
Fangrui Songd8c97292020-06-18 14:52:39 -07003315.. option:: -O<arg>, -O (equivalent to -O1), --optimize, --optimize=<arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00003316
Richard Smith081ad4d2017-01-24 19:39:46 +00003317.. option:: -Ofast<arg>
3318
3319Debug information generation
3320~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3321
3322Flags controlling how much and what kind of debug information should be
3323generated.
3324
3325Kind and level of debug information
3326-----------------------------------
Richard Smith081ad4d2017-01-24 19:39:46 +00003327.. option:: -g, --debug, --debug=<arg>
3328
3329Generate source-level debug information
3330
Craig Topper9624beb2020-03-10 11:08:19 -07003331.. option:: -gdwarf
3332
3333Generate source-level debug information with the default dwarf version
3334
Richard Smith081ad4d2017-01-24 19:39:46 +00003335.. option:: -gdwarf-2
3336
3337Generate source-level debug information with dwarf version 2
3338
Richard Smith081ad4d2017-01-24 19:39:46 +00003339.. option:: -gdwarf-3
3340
3341Generate source-level debug information with dwarf version 3
3342
Craig Topper9624beb2020-03-10 11:08:19 -07003343.. option:: -gdwarf-4
Richard Smith081ad4d2017-01-24 19:39:46 +00003344
3345Generate source-level debug information with dwarf version 4
3346
Richard Smith081ad4d2017-01-24 19:39:46 +00003347.. option:: -gdwarf-5
3348
3349Generate source-level debug information with dwarf version 5
3350
Richard Smith081ad4d2017-01-24 19:39:46 +00003351.. option:: -gfull
3352
Richard Smith081ad4d2017-01-24 19:39:46 +00003353.. option:: -gused
3354
3355Debug level
3356___________
Richard Smith081ad4d2017-01-24 19:39:46 +00003357.. option:: -g0
3358
Richard Smith081ad4d2017-01-24 19:39:46 +00003359.. option:: -g2
3360
Richard Smith081ad4d2017-01-24 19:39:46 +00003361.. option:: -g3
3362
Richard Smith081ad4d2017-01-24 19:39:46 +00003363.. option:: -ggdb0
3364
Richard Smith081ad4d2017-01-24 19:39:46 +00003365.. option:: -ggdb1
3366
Richard Smith081ad4d2017-01-24 19:39:46 +00003367.. option:: -ggdb2
3368
Richard Smith081ad4d2017-01-24 19:39:46 +00003369.. option:: -ggdb3
3370
Craig Topper9624beb2020-03-10 11:08:19 -07003371.. option:: -gline-directives-only
3372
3373Emit debug line info directives only
3374
Richard Smith081ad4d2017-01-24 19:39:46 +00003375.. option:: -gline-tables-only, -g1, -gmlt
3376
3377Emit debug line number tables only
3378
Richard Smith081ad4d2017-01-24 19:39:46 +00003379.. option:: -gmodules
3380
3381Generate debug info with external references to clang modules or precompiled headers
3382
3383Debugger to tune debug information for
3384______________________________________
Richard Smith081ad4d2017-01-24 19:39:46 +00003385.. option:: -ggdb
3386
Richard Smith081ad4d2017-01-24 19:39:46 +00003387.. option:: -glldb
3388
Richard Smith081ad4d2017-01-24 19:39:46 +00003389.. option:: -gsce
3390
3391Debug information flags
3392-----------------------
Richard Smith081ad4d2017-01-24 19:39:46 +00003393.. option:: -gcolumn-info, -gno-column-info
3394
Richard Smith081ad4d2017-01-24 19:39:46 +00003395.. option:: -gdwarf-aranges
3396
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00003397.. option:: -gembed-source, -gno-embed-source
Scott Lindera2fbcef2018-02-26 17:32:31 +00003398
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00003399Embed source text in DWARF debug sections
Scott Lindera2fbcef2018-02-26 17:32:31 +00003400
Vedant Kumar368540f2018-08-23 17:55:03 +00003401.. option:: -ggnu-pubnames, -gno-gnu-pubnames
3402
3403.. option:: -gpubnames, -gno-pubnames
Richard Smith081ad4d2017-01-24 19:39:46 +00003404
Craig Topper9624beb2020-03-10 11:08:19 -07003405.. option:: -grecord-command-line, -gno-record-command-line, -grecord-gcc-switches
Richard Smith081ad4d2017-01-24 19:39:46 +00003406
Richard Smith081ad4d2017-01-24 19:39:46 +00003407.. option:: -gsplit-dwarf
3408
Craig Topper9624beb2020-03-10 11:08:19 -07003409.. program:: clang1
3410.. option:: -gsplit-dwarf=<arg>
3411.. program:: clang
3412
3413Set DWARF fission mode to either 'split' or 'single'
3414
Richard Smith081ad4d2017-01-24 19:39:46 +00003415.. option:: -gstrict-dwarf, -gno-strict-dwarf
3416
Craig Topperd23254a2017-07-20 17:52:48 +00003417.. option:: -gz
3418
3419DWARF debug sections compression type
3420
3421.. program:: clang1
3422.. option:: -gz=<arg>
3423.. program:: clang
3424
3425DWARF debug sections compression type
3426
Richard Smithc5b2e002017-01-27 02:08:37 +00003427Static analyzer flags
3428=====================
Richard Smith081ad4d2017-01-24 19:39:46 +00003429
Richard Smithc5b2e002017-01-27 02:08:37 +00003430Flags controlling the behavior of the Clang Static Analyzer.
Richard Smith081ad4d2017-01-24 19:39:46 +00003431
Richard Smithc5b2e002017-01-27 02:08:37 +00003432.. option:: -Xanalyzer <arg>
Richard Smith081ad4d2017-01-24 19:39:46 +00003433
Richard Smithc5b2e002017-01-27 02:08:37 +00003434Pass <arg> to the static analyzer
Richard Smith081ad4d2017-01-24 19:39:46 +00003435
3436Fortran compilation flags
3437=========================
3438
3439Flags that will be passed onto the ``gfortran`` compiler when Clang is given
3440a Fortran input.
3441
Richard Smithc5b2e002017-01-27 02:08:37 +00003442.. option:: -A<arg>, --assert <arg>, --assert=<arg>
3443
Richard Smith081ad4d2017-01-24 19:39:46 +00003444.. option:: -A-<arg>
3445
Richard Smith081ad4d2017-01-24 19:39:46 +00003446.. option:: -J<arg>
3447
Richard Smith081ad4d2017-01-24 19:39:46 +00003448.. option:: -cpp
3449
Richard Smith081ad4d2017-01-24 19:39:46 +00003450.. option:: -faggressive-function-elimination, -fno-aggressive-function-elimination
3451
Richard Smith081ad4d2017-01-24 19:39:46 +00003452.. option:: -falign-commons, -fno-align-commons
3453
Richard Smith081ad4d2017-01-24 19:39:46 +00003454.. option:: -fall-intrinsics, -fno-all-intrinsics
3455
Richard Smith081ad4d2017-01-24 19:39:46 +00003456.. option:: -fautomatic, -fno-automatic
3457
Richard Smith081ad4d2017-01-24 19:39:46 +00003458.. option:: -fbackslash, -fno-backslash
3459
Richard Smith081ad4d2017-01-24 19:39:46 +00003460.. option:: -fbacktrace, -fno-backtrace
3461
Richard Smith081ad4d2017-01-24 19:39:46 +00003462.. option:: -fblas-matmul-limit=<arg>
3463
Richard Smith081ad4d2017-01-24 19:39:46 +00003464.. option:: -fbounds-check, -fno-bounds-check
3465
Richard Smith081ad4d2017-01-24 19:39:46 +00003466.. option:: -fcheck-array-temporaries, -fno-check-array-temporaries
3467
Richard Smith081ad4d2017-01-24 19:39:46 +00003468.. option:: -fcheck=<arg>
3469
Richard Smith081ad4d2017-01-24 19:39:46 +00003470.. option:: -fcoarray=<arg>
3471
Richard Smith081ad4d2017-01-24 19:39:46 +00003472.. option:: -fconvert=<arg>
3473
Richard Smith081ad4d2017-01-24 19:39:46 +00003474.. option:: -fcray-pointer, -fno-cray-pointer
3475
Richard Smith081ad4d2017-01-24 19:39:46 +00003476.. option:: -fd-lines-as-code, -fno-d-lines-as-code
3477
Richard Smith081ad4d2017-01-24 19:39:46 +00003478.. option:: -fd-lines-as-comments, -fno-d-lines-as-comments
3479
Richard Smith081ad4d2017-01-24 19:39:46 +00003480.. option:: -fdefault-double-8, -fno-default-double-8
3481
Richard Smith081ad4d2017-01-24 19:39:46 +00003482.. option:: -fdefault-integer-8, -fno-default-integer-8
3483
Richard Smith081ad4d2017-01-24 19:39:46 +00003484.. option:: -fdefault-real-8, -fno-default-real-8
3485
Richard Smith081ad4d2017-01-24 19:39:46 +00003486.. option:: -fdollar-ok, -fno-dollar-ok
3487
Richard Smith081ad4d2017-01-24 19:39:46 +00003488.. option:: -fdump-fortran-optimized, -fno-dump-fortran-optimized
3489
Richard Smith081ad4d2017-01-24 19:39:46 +00003490.. option:: -fdump-fortran-original, -fno-dump-fortran-original
3491
Richard Smith081ad4d2017-01-24 19:39:46 +00003492.. option:: -fdump-parse-tree, -fno-dump-parse-tree
3493
Richard Smith081ad4d2017-01-24 19:39:46 +00003494.. option:: -fexternal-blas, -fno-external-blas
3495
Richard Smith081ad4d2017-01-24 19:39:46 +00003496.. option:: -ff2c, -fno-f2c
3497
Richard Smith081ad4d2017-01-24 19:39:46 +00003498.. option:: -ffixed-form, -fno-fixed-form
3499
Richard Smith081ad4d2017-01-24 19:39:46 +00003500.. option:: -ffixed-line-length-<arg>
3501
Richard Smith081ad4d2017-01-24 19:39:46 +00003502.. option:: -ffpe-trap=<arg>
3503
Richard Smith081ad4d2017-01-24 19:39:46 +00003504.. option:: -ffree-form, -fno-free-form
3505
Richard Smith081ad4d2017-01-24 19:39:46 +00003506.. option:: -ffree-line-length-<arg>
3507
Richard Smith081ad4d2017-01-24 19:39:46 +00003508.. option:: -ffrontend-optimize, -fno-frontend-optimize
3509
Richard Smith081ad4d2017-01-24 19:39:46 +00003510.. option:: -fimplicit-none, -fno-implicit-none
3511
Richard Smith081ad4d2017-01-24 19:39:46 +00003512.. option:: -finit-character=<arg>
3513
Richard Smith081ad4d2017-01-24 19:39:46 +00003514.. option:: -finit-integer=<arg>
3515
Richard Smith081ad4d2017-01-24 19:39:46 +00003516.. option:: -finit-local-zero, -fno-init-local-zero
3517
Richard Smith081ad4d2017-01-24 19:39:46 +00003518.. option:: -finit-logical=<arg>
3519
Richard Smith081ad4d2017-01-24 19:39:46 +00003520.. option:: -finit-real=<arg>
3521
Richard Smith081ad4d2017-01-24 19:39:46 +00003522.. option:: -finteger-4-integer-8, -fno-integer-4-integer-8
3523
Richard Smith081ad4d2017-01-24 19:39:46 +00003524.. option:: -fintrinsic-modules-path, -fno-intrinsic-modules-path
3525
Richard Smith081ad4d2017-01-24 19:39:46 +00003526.. option:: -fmax-array-constructor=<arg>
3527
Richard Smith081ad4d2017-01-24 19:39:46 +00003528.. option:: -fmax-errors=<arg>
3529
Richard Smith081ad4d2017-01-24 19:39:46 +00003530.. option:: -fmax-identifier-length, -fno-max-identifier-length
3531
Richard Smith081ad4d2017-01-24 19:39:46 +00003532.. option:: -fmax-stack-var-size=<arg>
3533
Richard Smith081ad4d2017-01-24 19:39:46 +00003534.. option:: -fmax-subrecord-length=<arg>
3535
Richard Smith081ad4d2017-01-24 19:39:46 +00003536.. option:: -fmodule-private, -fno-module-private
3537
Richard Smith081ad4d2017-01-24 19:39:46 +00003538.. option:: -fpack-derived, -fno-pack-derived
3539
Richard Smith081ad4d2017-01-24 19:39:46 +00003540.. option:: -fprotect-parens, -fno-protect-parens
3541
Richard Smith081ad4d2017-01-24 19:39:46 +00003542.. option:: -frange-check, -fno-range-check
3543
Richard Smith081ad4d2017-01-24 19:39:46 +00003544.. option:: -freal-4-real-10, -fno-real-4-real-10
3545
Richard Smith081ad4d2017-01-24 19:39:46 +00003546.. option:: -freal-4-real-16, -fno-real-4-real-16
3547
Richard Smith081ad4d2017-01-24 19:39:46 +00003548.. option:: -freal-4-real-8, -fno-real-4-real-8
3549
Richard Smith081ad4d2017-01-24 19:39:46 +00003550.. option:: -freal-8-real-10, -fno-real-8-real-10
3551
Richard Smith081ad4d2017-01-24 19:39:46 +00003552.. option:: -freal-8-real-16, -fno-real-8-real-16
3553
Richard Smith081ad4d2017-01-24 19:39:46 +00003554.. option:: -freal-8-real-4, -fno-real-8-real-4
3555
Richard Smith081ad4d2017-01-24 19:39:46 +00003556.. option:: -frealloc-lhs, -fno-realloc-lhs
3557
Richard Smith081ad4d2017-01-24 19:39:46 +00003558.. option:: -frecord-marker=<arg>
3559
Richard Smith081ad4d2017-01-24 19:39:46 +00003560.. option:: -frecursive, -fno-recursive
3561
Richard Smith081ad4d2017-01-24 19:39:46 +00003562.. option:: -frepack-arrays, -fno-repack-arrays
3563
Richard Smith081ad4d2017-01-24 19:39:46 +00003564.. option:: -fsecond-underscore, -fno-second-underscore
3565
Richard Smith081ad4d2017-01-24 19:39:46 +00003566.. option:: -fsign-zero, -fno-sign-zero
3567
Richard Smith081ad4d2017-01-24 19:39:46 +00003568.. option:: -fstack-arrays, -fno-stack-arrays
3569
Richard Smith081ad4d2017-01-24 19:39:46 +00003570.. option:: -funderscoring, -fno-underscoring
3571
Richard Smith081ad4d2017-01-24 19:39:46 +00003572.. option:: -fwhole-file, -fno-whole-file
3573
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00003574.. option:: -imultilib <arg>
3575
Richard Smith081ad4d2017-01-24 19:39:46 +00003576.. option:: -nocpp
3577
Richard Smith081ad4d2017-01-24 19:39:46 +00003578.. option:: -static-libgfortran
3579
Richard Smithc5b2e002017-01-27 02:08:37 +00003580Linker flags
3581============
3582Flags that are passed on to the linker
3583
3584.. option:: -L<dir>, --library-directory <arg>, --library-directory=<arg>
3585
3586Add directory to library search path
3587
3588.. option:: -Mach
3589
3590.. option:: -T<script>
3591
3592Specify <script> as linker script
3593
Richard Smith78e23fd2017-04-13 22:39:49 +00003594.. option:: -Tbss<addr>
Richard Smithc5b2e002017-01-27 02:08:37 +00003595
3596Set starting address of BSS to <addr>
3597
Richard Smith78e23fd2017-04-13 22:39:49 +00003598.. option:: -Tdata<addr>
Richard Smithc5b2e002017-01-27 02:08:37 +00003599
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00003600Set starting address of DATA to <addr>
Richard Smithc5b2e002017-01-27 02:08:37 +00003601
Richard Smith78e23fd2017-04-13 22:39:49 +00003602.. option:: -Ttext<addr>
Richard Smithc5b2e002017-01-27 02:08:37 +00003603
Jonas Hahnfeld06039e82018-04-20 13:26:03 +00003604Set starting address of TEXT to <addr>
Richard Smithc5b2e002017-01-27 02:08:37 +00003605
3606.. option:: -Wl,<arg>,<arg2>...
3607
3608Pass the comma separated arguments in <arg> to the linker
3609
3610.. option:: -X
3611
3612.. option:: -Xlinker <arg>, --for-linker <arg>, --for-linker=<arg>
3613
3614Pass <arg> to the linker
3615
3616.. program:: clang1
3617.. option:: -Z
3618.. program:: clang
3619
3620.. option:: -e<arg>, --entry
3621
3622.. option:: -filelist <arg>
3623
Vedant Kumar368540f2018-08-23 17:55:03 +00003624.. option:: --hip-device-lib-path=<arg>
3625
Fangrui Songd8c97292020-06-18 14:52:39 -07003626HIP device library path. Alternative to rocm-path.
Vedant Kumar368540f2018-08-23 17:55:03 +00003627
3628.. option:: --hip-device-lib=<arg>
3629
3630HIP device library
3631
Richard Smithc5b2e002017-01-27 02:08:37 +00003632.. option:: -l<arg>
3633
3634.. option:: -r
3635
3636.. option:: -rpath <arg>
3637
3638.. option:: -s
3639
3640.. option:: -t
3641
3642.. option:: -u<arg>, --force-link <arg>, --force-link=<arg>
3643
3644.. option:: -undef
3645
3646undef all system defines
3647
3648.. option:: -undefined<arg>, --no-undefined
3649
3650.. option:: -z <arg>
3651
3652Pass -z <arg> to the linker
3653