1..
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
21.. option:: -B<dir>, --prefix <arg>, --prefix=<arg>
22
23Add <dir> to search path for binaries and object files used implicitly
24
25.. option:: -F<arg>
26
27Add directory to framework include search path
28
29.. option:: -ObjC
30
31Treat source input files as Objective-C inputs
32
33.. program:: clang1
34.. option:: -ObjC++
35.. program:: clang
36
37Treat source input files as Objective-C++ inputs
38
39.. option:: -Qn, -fno-ident
40
41Do not emit metadata containing compiler name and version
42
43.. option:: -Qunused-arguments
44
45Don't emit warning for unused driver arguments
46
47.. option:: -Qy, -fident
48
49Emit metadata containing compiler name and version
50
51.. option:: -Wa,<arg>,<arg2>...
52
53Pass the comma separated arguments in <arg> to the assembler
54
55.. option:: -Wlarge-by-value-copy=<arg>
56
57.. option:: -Xarch\_<arg1> <arg2>
58
59.. option:: -Xcuda-fatbinary <arg>
60
61Pass <arg> to fatbinary invocation
62
63.. option:: -Xcuda-ptxas <arg>
64
65Pass <arg> to the ptxas assembler
66
67.. option:: -Xopenmp-target <arg>
68
69Pass <arg> to the target offloading toolchain.
70
71.. program:: clang1
72.. option:: -Xopenmp-target=<triple> <arg>
73.. program:: clang
74
75Pass <arg> to the target offloading toolchain identified by <triple>.
76
77.. option:: -Z<arg>
78
79.. option:: -a<arg>, --profile-blocks
80
81.. option:: -all\_load
82
83.. option:: -allowable\_client <arg>
84
85.. option:: --analyze
86
87Run the static analyzer
88
89.. option:: --analyze-auto
90
91.. option:: --analyzer-no-default-checks
92
93.. option:: --analyzer-output<arg>
94
95Static analyzer report output format (html\|plist\|plist-multi-file\|plist-html\|text).
96
97.. option:: -ansi, --ansi
98
99.. option:: -arch <arg>
100
101.. program:: clang1
102.. option:: -arch\_errors\_fatal
103.. program:: clang
104
105.. program:: clang2
106.. option:: -arch\_only <arg>
107.. program:: clang
108
109.. option:: -arcmt-migrate-emit-errors
110
111Emit ARC errors even if the migrator can fix them
112
113.. option:: -arcmt-migrate-report-output <arg>
114
115Output path for the plist report
116
117.. option:: --autocomplete=<arg>
118
119.. option:: -bind\_at\_load
120
121.. option:: -bundle
122
123.. program:: clang1
124.. option:: -bundle\_loader <arg>
125.. program:: clang
126
127.. option:: -cfguard
128
129Emit tables required for Windows Control Flow Guard.
130
131.. option:: -client\_name<arg>
132
133.. option:: -compatibility\_version<arg>
134
135.. option:: --config <arg>
136
137Specifies configuration file
138
139.. option:: --constant-cfstrings
140
141.. option:: -coverage, --coverage
142
143.. option:: --cuda-compile-host-device
144
145Compile CUDA code for both host and device (default).  Has no effect on non-CUDA compilations.
146
147.. option:: --cuda-device-only
148
149Compile CUDA code for device only
150
151.. option:: --cuda-gpu-arch=<arg>, --no-cuda-gpu-arch=<arg>
152
153CUDA GPU architecture (e.g. sm\_35).  May be specified more than once.
154
155.. option:: --cuda-host-only
156
157Compile CUDA code for host only.  Has no effect on non-CUDA compilations.
158
159.. option:: --cuda-include-ptx=<arg>, --no-cuda-include-ptx=<arg>
160
161Include PTX for the following GPU architecture (e.g. sm\_35) or 'all'. May be specified more than once.
162
163.. option:: --cuda-noopt-device-debug, --no-cuda-noopt-device-debug
164
165Enable device-side debug info generation. Disables ptxas optimizations.
166
167.. option:: -current\_version<arg>
168
169.. option:: -dead\_strip
170
171.. option:: -dependency-dot <arg>
172
173Filename to write DOT-formatted header dependencies to
174
175.. option:: -dependency-file <arg>
176
177Filename (or -) to write dependency output to
178
179.. option:: -dumpmachine
180
181.. option:: -dumpversion
182
183.. option:: --dyld-prefix=<arg>, --dyld-prefix <arg>
184
185.. option:: -dylib\_file <arg>
186
187.. option:: -dylinker
188
189.. program:: clang1
190.. option:: -dylinker\_install\_name<arg>
191.. program:: clang
192
193.. option:: -dynamic
194
195.. option:: -dynamiclib
196
197.. option:: -emit-ast
198
199Emit Clang AST files for source inputs
200
201.. option:: -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang<arg>
202
203Trivial 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
204
205.. option:: -exported\_symbols\_list <arg>
206
207.. option:: -faligned-new=<arg>
208
209.. option:: -fcuda-approx-transcendentals, -fno-cuda-approx-transcendentals
210
211Use approximate transcendental functions
212
213.. option:: -fcuda-flush-denormals-to-zero, -fno-cuda-flush-denormals-to-zero
214
215Flush denormal floating point values to zero in CUDA device mode.
216
217.. option:: -fcuda-short-ptr, -fno-cuda-short-ptr
218
219Use 32-bit pointers for accessing const/local/shared address spaces.
220
221.. option:: -ffixed-r19
222
223Reserve register r19 (Hexagon only)
224
225.. option:: -fgpu-rdc, -fcuda-rdc, -fno-gpu-rdc
226
227Generate relocatable device code, also known as separate compilation mode.
228
229.. option:: -fheinous-gnu-extensions
230
231.. option:: -flat\_namespace
232
233.. option:: -fopenmp-targets=<arg1>,<arg2>...
234
235Specify comma-separated list of triples OpenMP offloading targets to be supported
236
237.. option:: -force\_cpusubtype\_ALL
238
239.. program:: clang1
240.. option:: -force\_flat\_namespace
241.. program:: clang
242
243.. program:: clang2
244.. option:: -force\_load <arg>
245.. program:: clang
246
247.. option:: -framework <arg>
248
249.. option:: -frtlib-add-rpath, -fno-rtlib-add-rpath
250
251Add -rpath with architecture-specific resource directory to the linker flags
252
253.. option:: --gcc-toolchain=<arg>, -gcc-toolchain <arg>
254
255Use the gcc toolchain at the given directory
256
257.. option:: -gcodeview
258
259Generate CodeView debug information
260
261.. option:: -gcodeview-ghash, -gno-codeview-ghash
262
263Emit type record hashes in a .debug$H section
264
265.. option:: -headerpad\_max\_install\_names<arg>
266
267.. option:: -help, --help
268
269Display available options
270
271.. option:: --help-hidden
272
273Display help for hidden options
274
275.. option:: --hip-link
276
277Link clang-offload-bundler bundles for HIP
278
279.. option:: -image\_base <arg>
280
281.. option:: -index-header-map
282
283Make the next included directory (-I or -F) an indexer header map
284
285.. option:: -init <arg>
286
287.. option:: -install\_name <arg>
288
289.. option:: -interface-stub-version=<arg>
290
291.. option:: -keep\_private\_externs
292
293.. option:: -lazy\_framework <arg>
294
295.. program:: clang1
296.. option:: -lazy\_library <arg>
297.. program:: clang
298
299.. option:: -mbig-endian, -EB
300
301.. option:: -mbranch-protection=<arg>
302
303Enforce targets of indirect branches and function returns
304
305.. option:: --migrate
306
307Run the migrator
308
309.. option:: -mios-simulator-version-min=<arg>, -miphonesimulator-version-min=<arg>
310
311.. option:: -mlinker-version=<arg>
312
313.. option:: -mlittle-endian, -EL
314
315.. option:: -mllvm <arg>
316
317Additional arguments to forward to LLVM's option processing
318
319.. option:: -module-dependency-dir <arg>
320
321Directory to dump module dependencies to
322
323.. option:: -mtvos-simulator-version-min=<arg>, -mappletvsimulator-version-min=<arg>
324
325.. option:: -multi\_module
326
327.. option:: -multiply\_defined <arg>
328
329.. program:: clang1
330.. option:: -multiply\_defined\_unused <arg>
331.. program:: clang
332
333.. option:: -mwatchos-simulator-version-min=<arg>, -mwatchsimulator-version-min=<arg>
334
335.. option:: --no-cuda-version-check
336
337Don't error out if the detected version of the CUDA install is too low for the requested CUDA gpu architecture.
338
339.. option:: -no-integrated-cpp, --no-integrated-cpp
340
341.. option:: -no\_dead\_strip\_inits\_and\_terms
342
343.. option:: -nobuiltininc
344
345Disable builtin #include directories
346
347.. option:: -nocudainc
348
349.. option:: -nocudalib
350
351.. option:: -nodefaultlibs
352
353.. option:: -nofixprebinding
354
355.. option:: -nolibc
356
357.. option:: -nomultidefs
358
359.. option:: -nopie, -no-pie
360
361.. option:: -noprebind
362
363.. option:: -noprofilelib
364
365.. option:: -noseglinkedit
366
367.. option:: -nostartfiles
368
369.. option:: -nostdinc, --no-standard-includes
370
371.. program:: clang1
372.. option:: -nostdinc++
373.. program:: clang
374
375Disable standard #include directories for the C++ standard library
376
377.. option:: -nostdlib, --no-standard-libraries
378
379.. program:: clang1
380.. option:: -nostdlib++
381.. program:: clang
382
383.. option:: -nostdlibinc
384
385.. option:: -o<file>, --output <arg>, --output=<arg>
386
387Write output to <file>
388
389.. option:: -objcmt-atomic-property
390
391Make migration to 'atomic' properties
392
393.. option:: -objcmt-migrate-all
394
395Enable migration to modern ObjC
396
397.. option:: -objcmt-migrate-annotation
398
399Enable migration to property and method annotations
400
401.. option:: -objcmt-migrate-designated-init
402
403Enable migration to infer NS\_DESIGNATED\_INITIALIZER for initializer methods
404
405.. option:: -objcmt-migrate-instancetype
406
407Enable migration to infer instancetype for method result type
408
409.. option:: -objcmt-migrate-literals
410
411Enable migration to modern ObjC literals
412
413.. option:: -objcmt-migrate-ns-macros
414
415Enable migration to NS\_ENUM/NS\_OPTIONS macros
416
417.. option:: -objcmt-migrate-property
418
419Enable migration to modern ObjC property
420
421.. option:: -objcmt-migrate-property-dot-syntax
422
423Enable migration of setter/getter messages to property-dot syntax
424
425.. option:: -objcmt-migrate-protocol-conformance
426
427Enable migration to add protocol conformance on classes
428
429.. option:: -objcmt-migrate-readonly-property
430
431Enable migration to modern ObjC readonly property
432
433.. option:: -objcmt-migrate-readwrite-property
434
435Enable migration to modern ObjC readwrite property
436
437.. option:: -objcmt-migrate-subscripting
438
439Enable migration to modern ObjC subscripting
440
441.. option:: -objcmt-ns-nonatomic-iosonly
442
443Enable migration to use NS\_NONATOMIC\_IOSONLY macro for setting property's 'atomic' attribute
444
445.. option:: -objcmt-returns-innerpointer-property
446
447Enable migration to annotate property with NS\_RETURNS\_INNER\_POINTER
448
449.. option:: -objcmt-whitelist-dir-path=<arg>, -objcmt-white-list-dir-path=<arg>
450
451Only modify files with a filename contained in the provided directory path
452
453.. option:: -object
454
455.. option:: -p, --profile
456
457.. option:: -pagezero\_size<arg>
458
459.. option:: -pg
460
461Enable mcount instrumentation
462
463.. option:: -pie
464
465.. option:: -pipe, --pipe
466
467Use pipes between commands, when possible
468
469.. option:: -prebind
470
471.. program:: clang1
472.. option:: -prebind\_all\_twolevel\_modules
473.. program:: clang
474
475.. option:: -preload
476
477.. option:: --print-diagnostic-categories
478
479.. option:: -print-effective-triple, --print-effective-triple
480
481Print the effective target triple
482
483.. option:: -print-file-name=<file>, --print-file-name=<file>, --print-file-name <arg>
484
485Print the full library path of <file>
486
487.. option:: -print-ivar-layout
488
489Enable Objective-C Ivar layout bitmap print trace
490
491.. option:: -print-libgcc-file-name, --print-libgcc-file-name
492
493Print the library path for the currently used compiler runtime library ("libgcc.a" or "libclang\_rt.builtins.\*.a")
494
495.. option:: -print-multi-directory, --print-multi-directory
496
497.. option:: -print-multi-lib, --print-multi-lib
498
499.. option:: -print-prog-name=<name>, --print-prog-name=<name>, --print-prog-name <arg>
500
501Print the full program path of <name>
502
503.. option:: -print-resource-dir, --print-resource-dir
504
505Print the resource directory pathname
506
507.. option:: -print-search-dirs, --print-search-dirs
508
509Print the paths used for finding libraries and programs
510
511.. option:: -print-target-triple, --print-target-triple
512
513Print the normalized target triple
514
515.. option:: -private\_bundle
516
517.. option:: -pthread, -no-pthread
518
519Support POSIX threads in generated code
520
521.. option:: -pthreads
522
523.. option:: -rdynamic
524
525.. option:: -read\_only\_relocs <arg>
526
527.. option:: -relocatable-pch, --relocatable-pch
528
529Whether to build a relocatable precompiled header
530
531.. option:: -remap
532
533.. option:: -rewrite-legacy-objc
534
535Rewrite Legacy Objective-C source to C++
536
537.. option:: -rtlib=<arg>, --rtlib=<arg>, --rtlib <arg>
538
539Compiler runtime library to use
540
541.. option:: -save-stats=<arg>, --save-stats=<arg>, -save-stats (equivalent to -save-stats=cwd), --save-stats (equivalent to -save-stats=cwd)
542
543Save llvm statistics.
544
545.. option:: -save-temps=<arg>, --save-temps=<arg>, -save-temps (equivalent to -save-temps=cwd), --save-temps (equivalent to -save-temps=cwd)
546
547Save intermediate compilation results.
548
549.. option:: -sectalign <arg1> <arg2> <arg3>
550
551.. option:: -sectcreate <arg1> <arg2> <arg3>
552
553.. option:: -sectobjectsymbols <arg1> <arg2>
554
555.. option:: -sectorder <arg1> <arg2> <arg3>
556
557.. option:: -seg1addr<arg>
558
559.. option:: -seg\_addr\_table <arg>
560
561.. program:: clang1
562.. option:: -seg\_addr\_table\_filename <arg>
563.. program:: clang
564
565.. option:: -segaddr <arg1> <arg2>
566
567.. option:: -segcreate <arg1> <arg2> <arg3>
568
569.. option:: -seglinkedit
570
571.. option:: -segprot <arg1> <arg2> <arg3>
572
573.. option:: -segs\_read\_<arg>
574
575.. program:: clang1
576.. option:: -segs\_read\_only\_addr <arg>
577.. program:: clang
578
579.. program:: clang2
580.. option:: -segs\_read\_write\_addr <arg>
581.. program:: clang
582
583.. option:: -serialize-diagnostics <arg>, --serialize-diagnostics <arg>
584
585Serialize compiler diagnostics to a file
586
587.. option:: -shared, --shared
588
589.. option:: -shared-libgcc
590
591.. option:: -shared-libsan, -shared-libasan
592
593Dynamically link the sanitizer runtime
594
595.. option:: -single\_module
596
597.. option:: -specs=<arg>, --specs=<arg>
598
599.. option:: -static, --static
600
601.. option:: -static-libgcc
602
603.. option:: -static-libsan
604
605Statically link the sanitizer runtime
606
607.. option:: -static-libstdc++
608
609.. option:: -static-pie
610
611.. option:: -std-default=<arg>
612
613.. option:: -stdlib=<arg>, --stdlib=<arg>, --stdlib <arg>
614
615C++ standard library to use
616
617.. option:: -sub\_library<arg>
618
619.. program:: clang1
620.. option:: -sub\_umbrella<arg>
621.. program:: clang
622
623.. option:: --sysroot=<arg>, --sysroot <arg>
624
625.. option:: --target-help
626
627.. option:: --target=<arg>, -target <arg>
628
629Generate code for the given target
630
631.. option:: -time
632
633Time individual commands
634
635.. option:: -traditional, --traditional
636
637.. option:: -traditional-cpp, --traditional-cpp
638
639Enable some traditional CPP emulation
640
641.. option:: -twolevel\_namespace
642
643.. program:: clang1
644.. option:: -twolevel\_namespace\_hints
645.. program:: clang
646
647.. option:: -umbrella <arg>
648
649.. option:: -unexported\_symbols\_list <arg>
650
651.. option:: -unwindlib=<arg>, --unwindlib=<arg>
652
653Unwind library to use
654
655.. option:: -v, --verbose
656
657Show commands to run and use verbose output
658
659.. option:: --verify-debug-info
660
661Verify the binary representation of debug output
662
663.. option:: --version
664
665Print version information
666
667.. option:: -w, --no-warnings
668
669Suppress all warnings
670
671.. option:: -weak-l<arg>
672
673.. option:: -weak\_framework <arg>
674
675.. program:: clang1
676.. option:: -weak\_library <arg>
677.. program:: clang
678
679.. program:: clang2
680.. option:: -weak\_reference\_mismatches <arg>
681.. program:: clang
682
683.. option:: -whatsloaded
684
685.. option:: -whyload
686
687.. option:: -working-directory<arg>, -working-directory=<arg>
688
689Resolve file paths relative to the specified directory
690
691.. option:: -x<language>, --language <arg>, --language=<arg>
692
693Treat subsequent input files as having type <language>
694
695.. option:: -y<arg>
696
697Actions
698=======
699The action to perform on the input.
700
701.. option:: -E, --preprocess
702
703Only run the preprocessor
704
705.. option:: -S, --assemble
706
707Only run preprocess and compilation steps
708
709.. option:: -c, --compile
710
711Only run preprocess, compile, and assemble steps
712
713.. option:: -emit-interface-stubs
714
715Generate Inteface Stub Files.
716
717.. option:: -emit-llvm
718
719Use the LLVM representation for assembler and object files
720
721.. option:: -fsyntax-only
722
723.. option:: -module-file-info
724
725Provide information about a particular module file
726
727.. option:: --precompile
728
729Only precompile the input
730
731.. option:: -rewrite-objc
732
733Rewrite Objective-C source to C++
734
735.. option:: -verify-pch
736
737Load and verify that a pre-compiled header file is not stale
738
739Compilation flags
740=================
741
742Flags controlling the behavior of Clang during compilation. These flags have
743no effect during actions that do not perform compilation.
744
745.. option:: -Xassembler <arg>
746
747Pass <arg> to the assembler
748
749.. option:: -Xclang <arg>
750
751Pass <arg> to the clang compiler
752
753.. option:: -fclang-abi-compat=<version>
754
755Attempt to match the ABI of Clang <version>
756
757.. option:: -fcomment-block-commands=<arg>,<arg2>...
758
759Treat each comma separated argument in <arg> as a documentation comment block command
760
761.. option:: -fcomplete-member-pointers, -fno-complete-member-pointers
762
763Require member pointer base types to be complete if they would be significant under the Microsoft ABI
764
765.. option:: -fcrash-diagnostics-dir=<arg>
766
767.. option:: -fdeclspec, -fno-declspec
768
769Allow \_\_declspec as a keyword
770
771.. option:: -fdepfile-entry=<arg>
772
773.. option:: -fdiagnostics-fixit-info, -fno-diagnostics-fixit-info
774
775.. option:: -fdiagnostics-format=<arg>
776
777.. option:: -fdiagnostics-parseable-fixits
778
779Print fix-its in machine parseable form
780
781.. option:: -fdiagnostics-print-source-range-info
782
783Print source range spans in numeric form
784
785.. option:: -fdiagnostics-show-category=<arg>
786
787.. option:: -fdiscard-value-names, -fno-discard-value-names
788
789Discard value names in LLVM IR
790
791.. option:: -fexperimental-isel, -fno-experimental-isel
792
793Enables the experimental global instruction selector
794
795.. option:: -fexperimental-new-pass-manager, -fno-experimental-new-pass-manager
796
797Enables an experimental new pass manager in LLVM.
798
799.. option:: -ffine-grained-bitfield-accesses, -fno-fine-grained-bitfield-accesses
800
801Use separate accesses for consecutive bitfield runs with legal widths and alignments.
802
803.. option:: -finline-functions, -fno-inline-functions
804
805Inline suitable functions
806
807.. option:: -finline-hint-functions
808
809Inline functions which are (explicitly or implicitly) marked inline
810
811.. option:: -fno-crash-diagnostics
812
813Disable auto-generation of preprocessed source files and a script for reproduction during a clang crash
814
815.. option:: -fno-sanitize-blacklist
816
817Don't use blacklist file for sanitizers
818
819.. option:: -fparse-all-comments
820
821.. option:: -frecord-command-line, -fno-record-command-line, -frecord-gcc-switches
822
823.. option:: -fsanitize-address-field-padding=<arg>
824
825Level of field padding for AddressSanitizer
826
827.. option:: -fsanitize-address-globals-dead-stripping
828
829Enable linker dead stripping of globals in AddressSanitizer
830
831.. option:: -fsanitize-address-poison-custom-array-cookie, -fno-sanitize-address-poison-custom-array-cookie
832
833Enable poisoning array cookies when using custom operator new\[\] in AddressSanitizer
834
835.. option:: -fsanitize-address-use-after-scope, -fno-sanitize-address-use-after-scope
836
837Enable use-after-scope detection in AddressSanitizer
838
839.. option:: -fsanitize-address-use-odr-indicator, -fno-sanitize-address-use-odr-indicator
840
841Enable ODR indicator globals to avoid false ODR violation reports in partially sanitized programs at the cost of an increase in binary size
842
843.. option:: -fsanitize-blacklist=<arg>
844
845Path to blacklist file for sanitizers
846
847.. option:: -fsanitize-cfi-cross-dso, -fno-sanitize-cfi-cross-dso
848
849Enable control flow integrity (CFI) checks for cross-DSO calls.
850
851.. option:: -fsanitize-cfi-icall-generalize-pointers
852
853Generalize pointers in CFI indirect call type signature checks
854
855.. option:: -fsanitize-coverage=<arg1>,<arg2>..., -fno-sanitize-coverage=<arg1>,<arg2>...
856
857Specify the type of coverage instrumentation for Sanitizers
858
859.. option:: -fsanitize-hwaddress-abi=<arg>
860
861Select the HWAddressSanitizer ABI to target (interceptor or platform, default interceptor)
862
863.. option:: -fsanitize-link-c++-runtime
864
865.. option:: -fsanitize-memory-track-origins, -fno-sanitize-memory-track-origins
866
867Enable origins tracking in MemorySanitizer
868
869.. program:: clang1
870.. option:: -fsanitize-memory-track-origins=<arg>
871.. program:: clang
872
873Enable origins tracking in MemorySanitizer
874
875.. option:: -fsanitize-memory-use-after-dtor, -fno-sanitize-memory-use-after-dtor
876
877Enable use-after-destroy detection in MemorySanitizer
878
879.. option:: -fsanitize-minimal-runtime, -fno-sanitize-minimal-runtime
880
881.. option:: -fsanitize-recover, -fno-sanitize-recover
882
883.. program:: clang1
884.. option:: -fsanitize-recover=<arg1>,<arg2>..., -fno-sanitize-recover=<arg1>,<arg2>...
885.. program:: clang
886
887Enable recovery for specified sanitizers
888
889.. option:: -fsanitize-stats, -fno-sanitize-stats
890
891Enable sanitizer statistics gathering.
892
893.. option:: -fsanitize-thread-atomics, -fno-sanitize-thread-atomics
894
895Enable atomic operations instrumentation in ThreadSanitizer (default)
896
897.. option:: -fsanitize-thread-func-entry-exit, -fno-sanitize-thread-func-entry-exit
898
899Enable function entry/exit instrumentation in ThreadSanitizer (default)
900
901.. option:: -fsanitize-thread-memory-access, -fno-sanitize-thread-memory-access
902
903Enable memory access instrumentation in ThreadSanitizer (default)
904
905.. option:: -fsanitize-trap=<arg1>,<arg2>..., -fno-sanitize-trap=<arg1>,<arg2>...
906
907Enable trapping for specified sanitizers
908
909.. option:: -fsanitize-undefined-strip-path-components=<number>
910
911Strip (or keep only, if negative) a given number of path components when emitting check metadata.
912
913.. option:: -fsanitize-undefined-trap-on-error, -fno-sanitize-undefined-trap-on-error
914
915.. option:: -fsanitize=<check>,<arg2>..., -fno-sanitize=<arg1>,<arg2>...
916
917Turn on runtime checks for various forms of undefined or suspicious behavior. See user manual for available checks
918
919.. option:: -moutline, -mno-outline
920
921Enable function outlining (AArch64 only)
922
923.. option:: --param <arg>, --param=<arg>
924
925.. option:: -print-supported-cpus, --print-supported-cpus, -mcpu=?, -mtune=?
926
927Print supported cpu models for the given target (if target is not specified, it will print the supported cpus for the default target)
928
929.. option:: -std=<arg>, --std=<arg>, --std <arg>
930
931Language standard to compile for
932
933Preprocessor flags
934~~~~~~~~~~~~~~~~~~
935
936Flags controlling the behavior of the Clang preprocessor.
937
938.. option:: -C, --comments
939
940Include comments in preprocessed output
941
942.. option:: -CC, --comments-in-macros
943
944Include comments from within macros in preprocessed output
945
946.. option:: -D<macro>=<value>, --define-macro <arg>, --define-macro=<arg>
947
948Define <macro> to <value> (or 1 if <value> omitted)
949
950.. option:: -H, --trace-includes
951
952Show header includes and nesting depth
953
954.. option:: -P, --no-line-commands
955
956Disable linemarker output in -E mode
957
958.. option:: -U<macro>, --undefine-macro <arg>, --undefine-macro=<arg>
959
960Undefine macro <macro>
961
962.. option:: -Wp,<arg>,<arg2>...
963
964Pass the comma separated arguments in <arg> to the preprocessor
965
966.. option:: -Xpreprocessor <arg>
967
968Pass <arg> to the preprocessor
969
970Include path management
971-----------------------
972
973Flags controlling how ``#include``\s are resolved to files.
974
975.. option:: -I<dir>, --include-directory <arg>, --include-directory=<arg>
976
977Add directory to include search path
978
979.. option:: -I-, --include-barrier
980
981Restrict all prior -I flags to double-quoted inclusion and remove current directory from include path
982
983.. option:: --cuda-path-ignore-env
984
985Ignore environment variables to detect CUDA installation
986
987.. option:: --cuda-path=<arg>
988
989CUDA installation path
990
991.. option:: -cxx-isystem<directory>
992
993Add directory to the C++ SYSTEM include search path
994
995.. option:: -fbuild-session-file=<file>
996
997Use the last modification time of <file> as the build session timestamp
998
999.. option:: -fbuild-session-timestamp=<time since Epoch in seconds>
1000
1001Time when the current build session started
1002
1003.. option:: -fmodule-file=\[<name>=\]<file>
1004
1005Specify the mapping of module name to precompiled module file, or load a module file if name is omitted.
1006
1007.. option:: -fmodules-cache-path=<directory>
1008
1009Specify the module cache path
1010
1011.. option:: -fmodules-disable-diagnostic-validation
1012
1013Disable validation of the diagnostic options when loading the module
1014
1015.. option:: -fmodules-prune-after=<seconds>
1016
1017Specify the interval (in seconds) after which a module file will be considered unused
1018
1019.. option:: -fmodules-prune-interval=<seconds>
1020
1021Specify the interval (in seconds) between attempts to prune the module cache
1022
1023.. option:: -fmodules-user-build-path <directory>
1024
1025Specify the module user build path
1026
1027.. option:: -fmodules-validate-once-per-build-session
1028
1029Don't verify input files for the modules if the module has been successfully validated or loaded during this build session
1030
1031.. option:: -fmodules-validate-system-headers, -fno-modules-validate-system-headers
1032
1033Validate the system headers that a module depends on when loading the module
1034
1035.. option:: -fprebuilt-module-path=<directory>
1036
1037Specify the prebuilt module path
1038
1039.. option:: -idirafter<arg>, --include-directory-after <arg>, --include-directory-after=<arg>
1040
1041Add directory to AFTER include search path
1042
1043.. option:: -iframework<arg>
1044
1045Add directory to SYSTEM framework search path
1046
1047.. option:: -iframeworkwithsysroot<directory>
1048
1049Add directory to SYSTEM framework search path, absolute paths are relative to -isysroot
1050
1051.. option:: -imacros<file>, --imacros<file>, --imacros=<arg>
1052
1053Include macros from file before parsing
1054
1055.. option:: -include<file>, --include<file>, --include=<arg>
1056
1057Include file before parsing
1058
1059.. option:: -include-pch <file>
1060
1061Include precompiled header file
1062
1063.. option:: -iprefix<dir>, --include-prefix <arg>, --include-prefix=<arg>
1064
1065Set the -iwithprefix/-iwithprefixbefore prefix
1066
1067.. option:: -iquote<directory>
1068
1069Add directory to QUOTE include search path
1070
1071.. option:: -isysroot<dir>
1072
1073Set the system root directory (usually /)
1074
1075.. option:: -isystem<directory>
1076
1077Add directory to SYSTEM include search path
1078
1079.. option:: -isystem-after<directory>
1080
1081Add directory to end of the SYSTEM include search path
1082
1083.. option:: -ivfsoverlay<arg>
1084
1085Overlay the virtual filesystem described by file over the real file system
1086
1087.. option:: -iwithprefix<dir>, --include-with-prefix <arg>, --include-with-prefix-after <arg>, --include-with-prefix-after=<arg>, --include-with-prefix=<arg>
1088
1089Set directory to SYSTEM include search path with prefix
1090
1091.. option:: -iwithprefixbefore<dir>, --include-with-prefix-before <arg>, --include-with-prefix-before=<arg>
1092
1093Set directory to include search path with prefix
1094
1095.. option:: -iwithsysroot<directory>
1096
1097Add directory to SYSTEM include search path, absolute paths are relative to -isysroot
1098
1099.. option:: --libomptarget-nvptx-path=<arg>
1100
1101Path to libomptarget-nvptx libraries
1102
1103.. option:: --ptxas-path=<arg>
1104
1105Path to ptxas (used for compiling CUDA code)
1106
1107.. option:: --system-header-prefix=<prefix>, --no-system-header-prefix=<prefix>, --system-header-prefix <arg>
1108
1109Treat all #include paths starting with <prefix> as including a system header.
1110
1111Dependency file generation
1112--------------------------
1113
1114Flags controlling generation of a dependency file for ``make``-like build
1115systems.
1116
1117.. option:: -M, --dependencies
1118
1119Like -MD, but also implies -E and writes to stdout by default
1120
1121.. option:: -MD, --write-dependencies
1122
1123Write a depfile containing user and system headers
1124
1125.. option:: -MF<file>
1126
1127Write depfile output from -MMD, -MD, -MM, or -M to <file>
1128
1129.. option:: -MG, --print-missing-file-dependencies
1130
1131Add missing headers to depfile
1132
1133.. option:: -MJ<arg>
1134
1135Write a compilation database entry per input
1136
1137.. option:: -MM, --user-dependencies
1138
1139Like -MMD, but also implies -E and writes to stdout by default
1140
1141.. option:: -MMD, --write-user-dependencies
1142
1143Write a depfile containing user headers
1144
1145.. option:: -MP
1146
1147Create phony target for each dependency (other than main file)
1148
1149.. option:: -MQ<arg>
1150
1151Specify name of main file output to quote in depfile
1152
1153.. option:: -MT<arg>
1154
1155Specify name of main file output in depfile
1156
1157.. option:: -MV
1158
1159Use NMake/Jom format for the depfile
1160
1161Dumping preprocessor state
1162--------------------------
1163
1164Flags allowing the state of the preprocessor to be dumped in various ways.
1165
1166.. option:: -d
1167
1168.. program:: clang1
1169.. option:: -d<arg>
1170.. program:: clang
1171
1172.. option:: -dA
1173
1174.. option:: -dD
1175
1176Print macro definitions in -E mode in addition to normal output
1177
1178.. option:: -dI
1179
1180Print include directives in -E mode in addition to normal output
1181
1182.. option:: -dM
1183
1184Print macro definitions in -E mode instead of normal output
1185
1186Diagnostic flags
1187~~~~~~~~~~~~~~~~
1188
1189Flags controlling which warnings, errors, and remarks Clang will generate.
1190See the :doc:`full list of warning and remark flags <DiagnosticsReference>`.
1191
1192.. option:: -R<remark>
1193
1194Enable the specified remark
1195
1196.. option:: -Rpass-analysis=<arg>
1197
1198Report transformation analysis from optimization passes whose name matches the given POSIX regular expression
1199
1200.. option:: -Rpass-missed=<arg>
1201
1202Report missed transformations by optimization passes whose name matches the given POSIX regular expression
1203
1204.. option:: -Rpass=<arg>
1205
1206Report transformations performed by optimization passes whose name matches the given POSIX regular expression
1207
1208.. option:: -W<warning>, --extra-warnings, --warn-<arg>, --warn-=<arg>
1209
1210Enable the specified warning
1211
1212.. option:: -Wdeprecated, -Wno-deprecated
1213
1214Enable warnings for deprecated constructs and define \_\_DEPRECATED
1215
1216.. option:: -Wnonportable-cfstrings<arg>, -Wno-nonportable-cfstrings<arg>
1217
1218Target-independent compilation options
1219~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1220.. option:: -Wframe-larger-than=<arg>
1221
1222.. option:: -fPIC, -fno-PIC
1223
1224.. option:: -fPIE, -fno-PIE
1225
1226.. option:: -faccess-control, -fno-access-control
1227
1228.. option:: -faddrsig, -fno-addrsig
1229
1230Emit an address-significance table
1231
1232.. option:: -falign-functions, -fno-align-functions
1233
1234.. program:: clang1
1235.. option:: -falign-functions=<arg>
1236.. program:: clang
1237
1238.. program:: clang1
1239.. option:: -faligned-allocation, -faligned-new, -fno-aligned-allocation
1240.. program:: clang
1241
1242Enable C++17 aligned allocation functions
1243
1244.. option:: -fallow-editor-placeholders, -fno-allow-editor-placeholders
1245
1246Treat editor placeholders as valid source code
1247
1248.. option:: -fallow-unsupported
1249
1250.. option:: -faltivec, -fno-altivec
1251
1252.. option:: -fansi-escape-codes
1253
1254Use ANSI escape codes for diagnostics
1255
1256.. option:: -fapple-kext, -findirect-virtual-calls, -fterminated-vtables
1257
1258Use Apple's kernel extensions ABI
1259
1260.. option:: -fapple-link-rtlib
1261
1262Force linking the clang builtins runtime library
1263
1264.. option:: -fapple-pragma-pack, -fno-apple-pragma-pack
1265
1266Enable Apple gcc-compatible #pragma pack handling
1267
1268.. option:: -fapplication-extension, -fno-application-extension
1269
1270Restrict code to those available for App Extensions
1271
1272.. option:: -fasm, -fno-asm
1273
1274.. option:: -fasm-blocks, -fno-asm-blocks
1275
1276.. option:: -fassociative-math, -fno-associative-math
1277
1278.. option:: -fassume-sane-operator-new, -fno-assume-sane-operator-new
1279
1280.. option:: -fast
1281
1282.. option:: -fastcp
1283
1284.. option:: -fastf
1285
1286.. option:: -fasynchronous-unwind-tables, -fno-asynchronous-unwind-tables
1287
1288.. option:: -fautolink, -fno-autolink
1289
1290.. option:: -fblocks, -fno-blocks
1291
1292Enable the 'blocks' language feature
1293
1294.. option:: -fbootclasspath=<arg>, --bootclasspath <arg>, --bootclasspath=<arg>
1295
1296.. option:: -fborland-extensions, -fno-borland-extensions
1297
1298Accept non-standard constructs supported by the Borland compiler
1299
1300.. option:: -fbracket-depth=<arg>
1301
1302.. option:: -fbuiltin, -fno-builtin
1303
1304.. option:: -fbuiltin-module-map
1305
1306Load the clang builtins module map file.
1307
1308.. option:: -fc++-static-destructors, -fno-c++-static-destructors
1309
1310Enable C++ static destructor registration (the default)
1311
1312.. option:: -fcaret-diagnostics, -fno-caret-diagnostics
1313
1314.. option:: -fcf-protection=<arg>, -fcf-protection (equivalent to -fcf-protection=full)
1315
1316Instrument control-flow architecture protection. Options: return, branch, full, none.
1317
1318.. option:: -fcf-runtime-abi=<arg>
1319
1320.. option:: -fchar8\_t, -fno-char8\_t
1321
1322Enable C++ builtin type char8\_t
1323
1324.. option:: -fclasspath=<arg>, --CLASSPATH <arg>, --CLASSPATH=<arg>, --classpath <arg>, --classpath=<arg>
1325
1326.. option:: -fcolor-diagnostics, -fno-color-diagnostics
1327
1328Use colors in diagnostics
1329
1330.. option:: -fcommon, -fno-common
1331
1332.. option:: -fcompile-resource=<arg>, --resource <arg>, --resource=<arg>
1333
1334.. option:: -fconstant-cfstrings, -fno-constant-cfstrings
1335
1336.. option:: -fconstant-string-class=<arg>
1337
1338.. option:: -fconstexpr-backtrace-limit=<arg>
1339
1340.. option:: -fconstexpr-depth=<arg>
1341
1342.. option:: -fconstexpr-steps=<arg>
1343
1344.. option:: -fcoroutines-ts, -fno-coroutines-ts
1345
1346Enable support for the C++ Coroutines TS
1347
1348.. option:: -fcoverage-mapping, -fno-coverage-mapping
1349
1350Generate coverage mapping to enable code coverage analysis
1351
1352.. option:: -fcreate-profile
1353
1354.. option:: -fcs-profile-generate
1355
1356Generate instrumented code to collect context sensitive execution counts into default.profraw (overridden by LLVM\_PROFILE\_FILE env var)
1357
1358.. program:: clang1
1359.. option:: -fcs-profile-generate=<directory>
1360.. program:: clang
1361
1362Generate instrumented code to collect context sensitive execution counts into <directory>/default.profraw (overridden by LLVM\_PROFILE\_FILE env var)
1363
1364.. option:: -fcxx-exceptions, -fno-cxx-exceptions
1365
1366Enable C++ exceptions
1367
1368.. option:: -fcxx-modules, -fno-cxx-modules
1369
1370.. option:: -fdata-sections, -fno-data-sections
1371
1372Place each data in its own section (ELF Only)
1373
1374.. option:: -fdebug-compilation-dir <arg>
1375
1376The compilation directory to embed in the debug info.
1377
1378.. option:: -fdebug-info-for-profiling, -fno-debug-info-for-profiling
1379
1380Emit extra debug info to make sample profile more accurate.
1381
1382.. option:: -fdebug-macro, -fno-debug-macro
1383
1384Emit macro debug information
1385
1386.. option:: -fdebug-pass-arguments
1387
1388.. option:: -fdebug-pass-structure
1389
1390.. option:: -fdebug-prefix-map=<arg>
1391
1392remap file source paths in debug info
1393
1394.. option:: -fdebug-ranges-base-address, -fno-debug-ranges-base-address
1395
1396Use DWARF base address selection entries in debug\_ranges
1397
1398.. option:: -fdebug-types-section, -fno-debug-types-section
1399
1400Place debug types in their own section (ELF Only)
1401
1402.. option:: -fdelayed-template-parsing, -fno-delayed-template-parsing
1403
1404Parse templated function definitions at the end of the translation unit
1405
1406.. option:: -fdelete-null-pointer-checks, -fno-delete-null-pointer-checks
1407
1408Treat usage of null pointers as undefined behavior.
1409
1410.. option:: -fdenormal-fp-math=<arg>
1411
1412.. option:: -fdiagnostics-absolute-paths
1413
1414Print absolute paths in diagnostics
1415
1416.. option:: -fdiagnostics-color, -fno-diagnostics-color
1417
1418.. program:: clang1
1419.. option:: -fdiagnostics-color=<arg>
1420.. program:: clang
1421
1422.. option:: -fdiagnostics-hotness-threshold=<number>
1423
1424Prevent optimization remarks from being output if they do not have at least this profile count
1425
1426.. option:: -fdiagnostics-show-hotness, -fno-diagnostics-show-hotness
1427
1428Enable profile hotness information in diagnostic line
1429
1430.. option:: -fdiagnostics-show-note-include-stack, -fno-diagnostics-show-note-include-stack
1431
1432Display include stacks for diagnostic notes
1433
1434.. option:: -fdiagnostics-show-option, -fno-diagnostics-show-option
1435
1436Print option name with mappable diagnostics
1437
1438.. option:: -fdiagnostics-show-template-tree
1439
1440Print a template comparison tree for differing templates
1441
1442.. option:: -fdigraphs, -fno-digraphs
1443
1444Enable alternative token representations '<:', ':>', '<%', '%>', '%:', '%:%:' (default)
1445
1446.. option:: -fdollars-in-identifiers, -fno-dollars-in-identifiers
1447
1448Allow '$' in identifiers
1449
1450.. option:: -fdouble-square-bracket-attributes, -fno-double-square-bracket-attributes
1451
1452Enable '\[\[\]\]' attributes in all C and C++ language modes
1453
1454.. option:: -fdwarf-directory-asm, -fno-dwarf-directory-asm
1455
1456.. option:: -fdwarf-exceptions
1457
1458Use DWARF style exceptions
1459
1460.. option:: -felide-constructors, -fno-elide-constructors
1461
1462.. option:: -feliminate-unused-debug-symbols, -fno-eliminate-unused-debug-symbols
1463
1464.. option:: -fembed-bitcode=<option>, -fembed-bitcode (equivalent to -fembed-bitcode=all), -fembed-bitcode-marker (equivalent to -fembed-bitcode=marker)
1465
1466Embed LLVM bitcode (option: off, all, bitcode, marker)
1467
1468.. option:: -femit-all-decls
1469
1470Emit all declarations, even if unused
1471
1472.. option:: -femulated-tls, -fno-emulated-tls
1473
1474Use emutls functions to access thread\_local variables
1475
1476.. option:: -fencoding=<arg>, --encoding <arg>, --encoding=<arg>
1477
1478.. option:: -ferror-limit=<arg>
1479
1480.. option:: -fescaping-block-tail-calls, -fno-escaping-block-tail-calls
1481
1482.. option:: -fexceptions, -fno-exceptions
1483
1484Enable support for exception handling
1485
1486.. option:: -fexec-charset=<arg>
1487
1488.. option:: -fextdirs=<arg>, --extdirs <arg>, --extdirs=<arg>
1489
1490.. option:: -ffast-math, -fno-fast-math
1491
1492Allow aggressive, lossy floating-point optimizations
1493
1494.. option:: -ffinite-math-only, -fno-finite-math-only
1495
1496.. option:: -ffixed-point, -fno-fixed-point
1497
1498Enable fixed point types
1499
1500.. option:: -ffor-scope, -fno-for-scope
1501
1502.. option:: -fforce-emit-vtables, -fno-force-emit-vtables
1503
1504Emits more virtual tables to improve devirtualization
1505
1506.. option:: -fforce-enable-int128, -fno-force-enable-int128
1507
1508Enable support for int128\_t type
1509
1510.. option:: -ffp-contract=<arg>
1511
1512Form fused FP ops (e.g. FMAs): fast (everywhere) \| on (according to FP\_CONTRACT pragma, default) \| off (never fuse)
1513
1514.. option:: -ffreestanding
1515
1516Assert that the compilation takes place in a freestanding environment
1517
1518.. option:: -ffunction-sections, -fno-function-sections
1519
1520Place each function in its own section (ELF Only)
1521
1522.. option:: -fgnu-inline-asm, -fno-gnu-inline-asm
1523
1524.. option:: -fgnu-keywords, -fno-gnu-keywords
1525
1526Allow GNU-extension keywords regardless of language standard
1527
1528.. option:: -fgnu-runtime
1529
1530Generate output compatible with the standard GNU Objective-C runtime
1531
1532.. option:: -fgnu89-inline, -fno-gnu89-inline
1533
1534Use the gnu89 inline semantics
1535
1536.. option:: -fhonor-infinities, -fhonor-infinites, -fno-honor-infinities
1537
1538.. option:: -fhonor-nans, -fno-honor-nans
1539
1540.. option:: -fhosted
1541
1542.. option:: -fimplicit-module-maps, -fmodule-maps, -fno-implicit-module-maps
1543
1544Implicitly search the file system for module map files.
1545
1546.. option:: -fimplicit-modules, -fno-implicit-modules
1547
1548.. option:: -finput-charset=<arg>
1549
1550.. option:: -finstrument-function-entry-bare
1551
1552Instrument function entry only, after inlining, without arguments to the instrumentation call
1553
1554.. option:: -finstrument-functions
1555
1556Generate calls to instrument function entry and exit
1557
1558.. option:: -finstrument-functions-after-inlining
1559
1560Like -finstrument-functions, but insert the calls after inlining
1561
1562.. option:: -fintegrated-as, -fno-integrated-as, -integrated-as
1563
1564Enable the integrated assembler
1565
1566.. option:: -fjump-tables, -fno-jump-tables
1567
1568.. option:: -fkeep-static-consts
1569
1570Keep static const variables even if unused
1571
1572.. option:: -flax-vector-conversions, -fno-lax-vector-conversions
1573
1574.. option:: -flimited-precision=<arg>
1575
1576.. option:: -flto, -fno-lto
1577
1578Enable LTO in 'full' mode
1579
1580.. option:: -flto-jobs=<arg>
1581
1582Controls the backend parallelism of -flto=thin (default of 0 means the number of threads will be derived from the number of CPUs detected)
1583
1584.. program:: clang1
1585.. option:: -flto=<arg>
1586.. program:: clang
1587
1588Set LTO mode to either 'full' or 'thin'
1589
1590.. option:: -fmacro-backtrace-limit=<arg>
1591
1592.. option:: -fmath-errno, -fno-math-errno
1593
1594Require math functions to indicate errors by setting errno
1595
1596.. option:: -fmax-type-align=<arg>
1597
1598Specify the maximum alignment to enforce on pointers lacking an explicit alignment
1599
1600.. option:: -fmerge-all-constants, -fno-merge-all-constants
1601
1602Allow merging of constants
1603
1604.. option:: -fmessage-length=<arg>
1605
1606.. option:: -fmodule-file-deps, -fno-module-file-deps
1607
1608.. option:: -fmodule-map-file=<file>
1609
1610Load this module map file
1611
1612.. option:: -fmodule-name=<name>, -fmodule-implementation-of <arg>, -fmodule-name <arg>
1613
1614Specify the name of the module to build
1615
1616.. option:: -fmodules, -fno-modules
1617
1618Enable the 'modules' language feature
1619
1620.. option:: -fmodules-decluse, -fno-modules-decluse
1621
1622Require declaration of modules used within a module
1623
1624.. option:: -fmodules-ignore-macro=<arg>
1625
1626Ignore the definition of the given macro when building and loading modules
1627
1628.. option:: -fmodules-search-all, -fno-modules-search-all
1629
1630Search even non-imported modules to resolve references
1631
1632.. option:: -fmodules-strict-decluse
1633
1634Like -fmodules-decluse but requires all headers to be in modules
1635
1636.. option:: -fmodules-ts
1637
1638Enable support for the C++ Modules TS
1639
1640.. option:: -fms-compatibility, -fno-ms-compatibility
1641
1642Enable full Microsoft Visual C++ compatibility
1643
1644.. option:: -fms-compatibility-version=<arg>
1645
1646Dot-separated value representing the Microsoft compiler version number to report in \_MSC\_VER (0 = don't define it (default))
1647
1648.. option:: -fms-extensions, -fno-ms-extensions
1649
1650Accept some non-standard constructs supported by the Microsoft compiler
1651
1652.. option:: -fms-memptr-rep=<arg>
1653
1654.. option:: -fms-volatile<arg>
1655
1656.. option:: -fmsc-version=<arg>
1657
1658Microsoft compiler version number to report in \_MSC\_VER (0 = don't define it (default))
1659
1660.. option:: -fmudflap
1661
1662.. option:: -fmudflapth
1663
1664.. option:: -fnested-functions
1665
1666.. option:: -fnew-alignment=<align>, -fnew-alignment <arg>
1667
1668Specifies the largest alignment guaranteed by '::operator new(size\_t)'
1669
1670.. option:: -fnext-runtime
1671
1672.. option:: -fno-builtin-<arg>
1673
1674Disable implicit builtin knowledge of a specific function
1675
1676.. option:: -fno-elide-type
1677
1678Do not elide types when printing diagnostics
1679
1680.. option:: -fno-max-type-align
1681
1682.. option:: -fno-operator-names
1683
1684Do not treat C++ operator name keywords as synonyms for operators
1685
1686.. option:: -fno-rtti-data
1687
1688Control emission of RTTI data
1689
1690.. option:: -fno-strict-modules-decluse
1691
1692.. option:: -fno-working-directory
1693
1694.. option:: -fnoxray-link-deps
1695
1696.. option:: -fobjc-abi-version=<arg>
1697
1698.. option:: -fobjc-arc, -fno-objc-arc
1699
1700Synthesize retain and release calls for Objective-C pointers
1701
1702.. option:: -fobjc-arc-exceptions, -fno-objc-arc-exceptions
1703
1704Use EH-safe code when synthesizing retains and releases in -fobjc-arc
1705
1706.. option:: -fobjc-convert-messages-to-runtime-calls, -fno-objc-convert-messages-to-runtime-calls
1707
1708.. option:: -fobjc-exceptions, -fno-objc-exceptions
1709
1710Enable Objective-C exceptions
1711
1712.. option:: -fobjc-infer-related-result-type, -fno-objc-infer-related-result-type
1713
1714.. option:: -fobjc-legacy-dispatch, -fno-objc-legacy-dispatch
1715
1716.. option:: -fobjc-link-runtime
1717
1718.. option:: -fobjc-nonfragile-abi, -fno-objc-nonfragile-abi
1719
1720.. option:: -fobjc-nonfragile-abi-version=<arg>
1721
1722.. option:: -fobjc-runtime=<arg>
1723
1724Specify the target Objective-C runtime kind and version
1725
1726.. option:: -fobjc-sender-dependent-dispatch
1727
1728.. option:: -fobjc-weak, -fno-objc-weak
1729
1730Enable ARC-style weak references in Objective-C
1731
1732.. option:: -fomit-frame-pointer, -fno-omit-frame-pointer
1733
1734.. option:: -fopenmp, -fno-openmp
1735
1736Parse OpenMP pragmas and generate parallel code.
1737
1738.. option:: -fopenmp-simd, -fno-openmp-simd
1739
1740Emit OpenMP code only for SIMD-based constructs.
1741
1742.. option:: -fopenmp-version=<arg>
1743
1744.. program:: clang1
1745.. option:: -fopenmp=<arg>
1746.. program:: clang
1747
1748.. option:: -foperator-arrow-depth=<arg>
1749
1750.. option:: -foptimization-record-file=<arg>
1751
1752Specify the file name of any generated YAML optimization record
1753
1754.. option:: -foptimization-record-passes=<arg>
1755
1756Only include passes which match a specified regular expression in the generated optimization record (by default, include all passes)
1757
1758.. option:: -foptimize-sibling-calls, -fno-optimize-sibling-calls
1759
1760.. option:: -forder-file-instrumentation
1761
1762Generate instrumented code to collect order file into default.profraw file (overridden by '=' form of option or LLVM\_PROFILE\_FILE env var)
1763
1764.. option:: -foutput-class-dir=<arg>, --output-class-directory <arg>, --output-class-directory=<arg>
1765
1766.. option:: -fpack-struct, -fno-pack-struct
1767
1768.. program:: clang1
1769.. option:: -fpack-struct=<arg>
1770.. program:: clang
1771
1772Specify the default maximum struct packing alignment
1773
1774.. option:: -fpascal-strings, -fno-pascal-strings, -mpascal-strings
1775
1776Recognize and construct Pascal-style string literals
1777
1778.. option:: -fpass-plugin=<dsopath>
1779
1780Load pass plugin from a dynamic shared object file (only with new pass manager).
1781
1782.. option:: -fpcc-struct-return
1783
1784Override the default ABI to return all structs on the stack
1785
1786.. option:: -fpch-preprocess
1787
1788.. option:: -fpic, -fno-pic
1789
1790.. option:: -fpie, -fno-pie
1791
1792.. option:: -fplt, -fno-plt
1793
1794Use the PLT to make function calls
1795
1796.. option:: -fplugin=<dsopath>
1797
1798Load the named plugin (dynamic shared object)
1799
1800.. option:: -fpreserve-as-comments, -fno-preserve-as-comments
1801
1802.. option:: -fprofile-arcs, -fno-profile-arcs
1803
1804.. option:: -fprofile-dir=<arg>
1805
1806.. option:: -fprofile-exclude-files=<arg>
1807
1808Instrument only functions from files where names don't match all the regexes separated by a semi-colon
1809
1810.. option:: -fprofile-filter-files=<arg>
1811
1812Instrument only functions from files where names match any regex separated by a semi-colon
1813
1814.. option:: -fprofile-generate, -fno-profile-generate
1815
1816Generate instrumented code to collect execution counts into default.profraw (overridden by LLVM\_PROFILE\_FILE env var)
1817
1818.. program:: clang1
1819.. option:: -fprofile-generate=<directory>
1820.. program:: clang
1821
1822Generate instrumented code to collect execution counts into <directory>/default.profraw (overridden by LLVM\_PROFILE\_FILE env var)
1823
1824.. option:: -fprofile-instr-generate, -fno-profile-instr-generate
1825
1826Generate instrumented code to collect execution counts into default.profraw file (overridden by '=' form of option or LLVM\_PROFILE\_FILE env var)
1827
1828.. program:: clang1
1829.. option:: -fprofile-instr-generate=<file>
1830.. program:: clang
1831
1832Generate instrumented code to collect execution counts into <file> (overridden by LLVM\_PROFILE\_FILE env var)
1833
1834.. option:: -fprofile-instr-use, -fno-profile-instr-use, -fprofile-use
1835
1836.. program:: clang1
1837.. option:: -fprofile-instr-use=<arg>
1838.. program:: clang
1839
1840Use instrumentation data for profile-guided optimization
1841
1842.. option:: -fprofile-remapping-file=<file>, -fprofile-remapping-file <arg>
1843
1844Use the remappings described in <file> to match the profile data against names in the program
1845
1846.. option:: -fprofile-sample-accurate, -fauto-profile-accurate, -fno-profile-sample-accurate
1847
1848Specifies that the sample profile is accurate. If the sample
1849               profile is accurate, callsites without profile samples are marked
1850               as cold. Otherwise, treat callsites without profile samples as if
1851               we have no profile
1852
1853.. option:: -fprofile-sample-use, -fauto-profile, -fno-profile-sample-use
1854
1855.. program:: clang1
1856.. option:: -fprofile-sample-use=<arg>, -fauto-profile=<arg>
1857.. program:: clang
1858
1859Enable sample-based profile guided optimizations
1860
1861.. program:: clang1
1862.. option:: -fprofile-use=<pathname>
1863.. program:: clang
1864
1865Use instrumentation data for profile-guided optimization. If pathname is a directory, it reads from <pathname>/default.profdata. Otherwise, it reads from file <pathname>.
1866
1867.. option:: -freciprocal-math, -fno-reciprocal-math
1868
1869Allow division operations to be reassociated
1870
1871.. option:: -freg-struct-return
1872
1873Override the default ABI to return small structs in registers
1874
1875.. option:: -fregister-global-dtors-with-atexit, -fno-register-global-dtors-with-atexit
1876
1877Use atexit or \_\_cxa\_atexit to register global destructors
1878
1879.. option:: -frelaxed-template-template-args, -fno-relaxed-template-template-args
1880
1881Enable C++17 relaxed template template argument matching
1882
1883.. option:: -freroll-loops, -fno-reroll-loops
1884
1885Turn on loop reroller
1886
1887.. option:: -fretain-comments-from-system-headers
1888
1889.. option:: -frewrite-imports, -fno-rewrite-imports
1890
1891.. option:: -frewrite-includes, -fno-rewrite-includes
1892
1893.. option:: -frewrite-map-file <arg>
1894
1895.. program:: clang1
1896.. option:: -frewrite-map-file=<arg>
1897.. program:: clang
1898
1899.. option:: -fropi, -fno-ropi
1900
1901.. option:: -frtti, -fno-rtti
1902
1903.. option:: -frwpi, -fno-rwpi
1904
1905.. option:: -fsave-optimization-record, -fno-save-optimization-record
1906
1907Generate a YAML optimization record file
1908
1909.. program:: clang1
1910.. option:: -fsave-optimization-record=<arg>
1911.. program:: clang
1912
1913Generate an optimization record file in a specific format (default: YAML)
1914
1915.. option:: -fseh-exceptions
1916
1917Use SEH style exceptions
1918
1919.. option:: -fshort-enums, -fno-short-enums
1920
1921Allocate to an enum type only as many bytes as it needs for the declared range of possible values
1922
1923.. option:: -fshort-wchar, -fno-short-wchar
1924
1925Force wchar\_t to be a short unsigned int
1926
1927.. option:: -fshow-column, -fno-show-column
1928
1929.. option:: -fshow-overloads=<arg>
1930
1931Which overload candidates to show when overload resolution fails: best\|all; defaults to all
1932
1933.. option:: -fshow-source-location, -fno-show-source-location
1934
1935.. option:: -fsignaling-math, -fno-signaling-math
1936
1937.. option:: -fsigned-bitfields
1938
1939.. option:: -fsigned-char, -fno-signed-char, --signed-char
1940
1941.. option:: -fsigned-zeros, -fno-signed-zeros
1942
1943.. option:: -fsized-deallocation, -fno-sized-deallocation
1944
1945Enable C++14 sized global deallocation functions
1946
1947.. option:: -fsjlj-exceptions
1948
1949Use SjLj style exceptions
1950
1951.. option:: -fslp-vectorize, -fno-slp-vectorize, -ftree-slp-vectorize
1952
1953Enable the superword-level parallelism vectorization passes
1954
1955.. option:: -fspell-checking, -fno-spell-checking
1956
1957.. option:: -fspell-checking-limit=<arg>
1958
1959.. option:: -fsplit-dwarf-inlining, -fno-split-dwarf-inlining
1960
1961Provide minimal debug info in the object/executable to facilitate online symbolication/stack traces in the absence of .dwo/.dwp files when using Split DWARF
1962
1963.. option:: -fsplit-lto-unit, -fno-split-lto-unit
1964
1965Enables splitting of the LTO unit.
1966
1967.. option:: -fsplit-stack
1968
1969.. option:: -fstack-protector, -fno-stack-protector
1970
1971Enable 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
1972
1973.. option:: -fstack-protector-all
1974
1975Enable stack protectors for all functions
1976
1977.. option:: -fstack-protector-strong
1978
1979Enable 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
1980
1981.. option:: -fstack-size-section, -fno-stack-size-section
1982
1983Emit section containing metadata on function stack sizes
1984
1985.. option:: -fstandalone-debug, -fno-limit-debug-info, -fno-standalone-debug
1986
1987Emit full debug info for all types used by the program
1988
1989.. option:: -fstrict-aliasing, -fno-strict-aliasing
1990
1991.. option:: -fstrict-enums, -fno-strict-enums
1992
1993Enable optimizations based on the strict definition of an enum's value range
1994
1995.. option:: -fstrict-float-cast-overflow, -fno-strict-float-cast-overflow
1996
1997Assume that overflowing float-to-int casts are undefined (default)
1998
1999.. option:: -fstrict-overflow, -fno-strict-overflow
2000
2001.. option:: -fstrict-return, -fno-strict-return
2002
2003Always treat control flow paths that fall off the end of a non-void function as unreachable
2004
2005.. option:: -fstrict-vtable-pointers, -fno-strict-vtable-pointers
2006
2007Enable optimizations based on the strict rules for overwriting polymorphic C++ objects
2008
2009.. option:: -fstruct-path-tbaa, -fno-struct-path-tbaa
2010
2011.. option:: -fsymbol-partition=<arg>
2012
2013.. option:: -ftabstop=<arg>
2014
2015.. option:: -ftemplate-backtrace-limit=<arg>
2016
2017.. option:: -ftemplate-depth-<arg>
2018
2019.. option:: -ftemplate-depth=<arg>
2020
2021.. option:: -ftest-coverage
2022
2023.. option:: -fthinlto-index=<arg>
2024
2025Perform ThinLTO importing using provided function summary index
2026
2027.. option:: -fthreadsafe-statics, -fno-threadsafe-statics
2028
2029.. option:: -ftime-report
2030
2031.. option:: -ftime-trace
2032
2033.. option:: -ftls-model=<arg>
2034
2035.. option:: -ftrap-function=<arg>
2036
2037Issue call to specified function rather than a trap instruction
2038
2039.. option:: -ftrapping-math, -fno-trapping-math
2040
2041.. option:: -ftrapv
2042
2043Trap on integer overflow
2044
2045.. option:: -ftrapv-handler <arg>
2046
2047.. program:: clang1
2048.. option:: -ftrapv-handler=<function name>
2049.. program:: clang
2050
2051Specify the function to be called on overflow
2052
2053.. option:: -ftrigraphs, -fno-trigraphs, -trigraphs, --trigraphs
2054
2055Process trigraph sequences
2056
2057.. option:: -ftrivial-auto-var-init=<arg>
2058
2059Initialize trivial automatic stack variables: uninitialized (default) \| pattern
2060
2061.. option:: -funique-section-names, -fno-unique-section-names
2062
2063Use unique names for text and data sections (ELF Only)
2064
2065.. option:: -funit-at-a-time, -fno-unit-at-a-time
2066
2067.. option:: -funroll-loops, -fno-unroll-loops
2068
2069Turn on loop unroller
2070
2071.. option:: -funsafe-math-optimizations, -fno-unsafe-math-optimizations
2072
2073.. option:: -funsigned-bitfields
2074
2075.. option:: -funsigned-char, -fno-unsigned-char, --unsigned-char
2076
2077.. option:: -funwind-tables, -fno-unwind-tables
2078
2079.. option:: -fuse-cxa-atexit, -fno-use-cxa-atexit
2080
2081.. option:: -fuse-init-array, -fno-use-init-array
2082
2083Use .init\_array instead of .ctors
2084
2085.. option:: -fuse-ld=<arg>
2086
2087.. option:: -fuse-line-directives, -fno-use-line-directives
2088
2089.. option:: -fveclib=<arg>
2090
2091Use the given vector functions library
2092
2093.. option:: -fvectorize, -fno-vectorize, -ftree-vectorize
2094
2095Enable the loop vectorization passes
2096
2097.. option:: -fverbose-asm, -fno-verbose-asm
2098
2099.. option:: -fvisibility-global-new-delete-hidden
2100
2101Give global C++ operator new and delete declarations hidden visibility
2102
2103.. option:: -fvisibility-inlines-hidden
2104
2105Give inline C++ member functions hidden visibility by default
2106
2107.. option:: -fvisibility-ms-compat
2108
2109Give global types 'default' visibility and global functions and variables 'hidden' visibility by default
2110
2111.. option:: -fvisibility=<arg>
2112
2113Set the default symbol visibility for all global declarations
2114
2115.. option:: -fwhole-program-vtables, -fno-whole-program-vtables
2116
2117Enables whole-program vtable optimization. Requires -flto
2118
2119.. option:: -fwrapv, -fno-wrapv
2120
2121Treat signed integer overflow as two's complement
2122
2123.. option:: -fwritable-strings
2124
2125Store string literals as writable data
2126
2127.. option:: -fxray-always-emit-customevents, -fno-xray-always-emit-customevents
2128
2129Determine whether to always emit \_\_xray\_customevent(...) calls even if the function it appears in is not always instrumented.
2130
2131.. option:: -fxray-always-emit-typedevents, -fno-xray-always-emit-typedevents
2132
2133Determine whether to always emit \_\_xray\_typedevent(...) calls even if the function it appears in is not always instrumented.
2134
2135.. option:: -fxray-always-instrument=<arg>
2136
2137DEPRECATED: Filename defining the whitelist for imbuing the 'always instrument' XRay attribute.
2138
2139.. option:: -fxray-attr-list=<arg>
2140
2141Filename defining the list of functions/types for imbuing XRay attributes.
2142
2143.. option:: -fxray-instruction-threshold<arg>
2144
2145.. program:: clang1
2146.. option:: -fxray-instruction-threshold=<arg>
2147.. program:: clang
2148
2149Sets the minimum function size to instrument with XRay
2150
2151.. option:: -fxray-instrument, -fno-xray-instrument
2152
2153Generate XRay instrumentation sleds on function entry and exit
2154
2155.. option:: -fxray-instrumentation-bundle=<arg>
2156
2157Select which XRay instrumentation points to emit. Options: all, none, function, custom. Default is 'all'.
2158
2159.. option:: -fxray-link-deps
2160
2161Tells clang to add the link dependencies for XRay.
2162
2163.. option:: -fxray-modes=<arg>
2164
2165List of modes to link in by default into XRay instrumented binaries.
2166
2167.. option:: -fxray-never-instrument=<arg>
2168
2169DEPRECATED: Filename defining the whitelist for imbuing the 'never instrument' XRay attribute.
2170
2171.. option:: -fzero-initialized-in-bss, -fno-zero-initialized-in-bss
2172
2173.. option:: -fzvector, -fno-zvector, -mzvector
2174
2175Enable System z vector language extension
2176
2177.. option:: -mlong-double-128
2178
2179Force long double to be 128 bits
2180
2181.. option:: -mlong-double-64
2182
2183Force long double to be 64 bits
2184
2185.. option:: -pedantic, --pedantic, -no-pedantic, --no-pedantic
2186
2187.. option:: -pedantic-errors, --pedantic-errors
2188
2189OpenCL flags
2190------------
2191.. option:: -cl-denorms-are-zero
2192
2193OpenCL only. Allow denormals to be flushed to zero.
2194
2195.. option:: -cl-fast-relaxed-math
2196
2197OpenCL only. Sets -cl-finite-math-only and -cl-unsafe-math-optimizations, and defines \_\_FAST\_RELAXED\_MATH\_\_.
2198
2199.. option:: -cl-finite-math-only
2200
2201OpenCL only. Allow floating-point optimizations that assume arguments and results are not NaNs or +-Inf.
2202
2203.. option:: -cl-fp32-correctly-rounded-divide-sqrt
2204
2205OpenCL only. Specify that single precision floating-point divide and sqrt used in the program source are correctly rounded.
2206
2207.. option:: -cl-kernel-arg-info
2208
2209OpenCL only. Generate kernel argument metadata.
2210
2211.. option:: -cl-mad-enable
2212
2213OpenCL only. Allow use of less precise MAD computations in the generated binary.
2214
2215.. option:: -cl-no-signed-zeros
2216
2217OpenCL only. Allow use of less precise no signed zeros computations in the generated binary.
2218
2219.. option:: -cl-opt-disable
2220
2221OpenCL only. This option disables all optimizations. By default optimizations are enabled.
2222
2223.. option:: -cl-single-precision-constant
2224
2225OpenCL only. Treat double precision floating-point constant as single precision constant.
2226
2227.. option:: -cl-std=<arg>
2228
2229OpenCL language standard to compile for.
2230
2231.. option:: -cl-strict-aliasing
2232
2233OpenCL only. This option is added for compatibility with OpenCL 1.0.
2234
2235.. option:: -cl-uniform-work-group-size
2236
2237OpenCL only. Defines that the global work-size be a multiple of the work-group size specified to clEnqueueNDRangeKernel
2238
2239.. option:: -cl-unsafe-math-optimizations
2240
2241OpenCL only. Allow unsafe floating-point optimizations.  Also implies -cl-no-signed-zeros and -cl-mad-enable.
2242
2243Target-dependent compilation options
2244~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2245.. option:: -G<size>, -G=<arg>, -msmall-data-threshold=<arg>
2246
2247Put objects of at most <size> bytes into small data section (MIPS / Hexagon)
2248
2249.. option:: -m16
2250
2251.. option:: -m32
2252
2253.. option:: -m64
2254
2255.. option:: -mabi=<arg>
2256
2257.. option:: -malign-double
2258
2259Align doubles to two words in structs (x86 only)
2260
2261.. option:: -march=<arg>
2262
2263.. option:: -masm=<arg>
2264
2265.. option:: -mbackchain, -mno-backchain
2266
2267Link stack frames through backchain on System Z
2268
2269.. option:: -mcmodel=<arg>
2270
2271.. option:: -mconsole<arg>
2272
2273.. program:: clang1
2274.. 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)
2275.. program:: clang
2276
2277.. option:: -mcrc, -mno-crc
2278
2279Allow use of CRC instructions (ARM/Mips only)
2280
2281.. option:: -mdefault-build-attributes<arg>, -mno-default-build-attributes<arg>
2282
2283.. option:: -mdll<arg>
2284
2285.. option:: -mdynamic-no-pic<arg>
2286
2287.. option:: -meabi <arg>
2288
2289Set EABI type, e.g. 4, 5 or gnu (default depends on triple)
2290
2291.. option:: -mfentry
2292
2293Insert calls to fentry at function entry (x86 only)
2294
2295.. option:: -mfloat-abi=<arg>
2296
2297.. option:: -mfpmath=<arg>
2298
2299.. option:: -mfpu=<arg>
2300
2301.. option:: -mglobal-merge, -mno-global-merge
2302
2303Enable merging of globals
2304
2305.. option:: -mhard-float
2306
2307.. option:: -mhwdiv=<arg>, --mhwdiv <arg>, --mhwdiv=<arg>
2308
2309.. option:: -mhwmult=<arg>
2310
2311.. option:: -miamcu, -mno-iamcu
2312
2313Use Intel MCU ABI
2314
2315.. option:: -mimplicit-float, -mno-implicit-float
2316
2317.. option:: -mimplicit-it=<arg>
2318
2319.. option:: -mincremental-linker-compatible, -mno-incremental-linker-compatible
2320
2321(integrated-as) Emit an object file which can be used with an incremental linker
2322
2323.. option:: -miphoneos-version-min=<arg>, -mios-version-min=<arg>
2324
2325.. option:: -mkernel
2326
2327.. option:: -mlong-calls, -mno-long-calls
2328
2329Generate branches with extended addressability, usually via indirect jumps.
2330
2331.. option:: -mmacosx-version-min=<arg>, -mmacos-version-min=<arg>
2332
2333Set Mac OS X deployment target
2334
2335.. option:: -mmcu=<arg>
2336
2337.. option:: -mms-bitfields, -mno-ms-bitfields
2338
2339Set the default structure layout to be compatible with the Microsoft compiler standard
2340
2341.. option:: -momit-leaf-frame-pointer, -mno-omit-leaf-frame-pointer
2342
2343Omit frame pointer setup for leaf functions
2344
2345.. option:: -moslib=<arg>
2346
2347.. option:: -mpie-copy-relocations, -mno-pie-copy-relocations
2348
2349Use copy relocations support for PIE builds
2350
2351.. option:: -mprefer-vector-width=<arg>
2352
2353Specifies preferred vector width for auto-vectorization. Defaults to 'none' which allows target specific decisions.
2354
2355.. option:: -mqdsp6-compat
2356
2357Enable hexagon-qdsp6 backward compatibility
2358
2359.. option:: -mrecip
2360
2361.. program:: clang1
2362.. option:: -mrecip=<arg1>,<arg2>...
2363.. program:: clang
2364
2365.. option:: -mred-zone, -mno-red-zone
2366
2367.. option:: -mregparm=<arg>
2368
2369.. option:: -mrelax-all, -mno-relax-all
2370
2371(integrated-as) Relax all machine instructions
2372
2373.. option:: -mretpoline, -mno-retpoline
2374
2375.. option:: -mrtd, -mno-rtd
2376
2377Make StdCall calling convention the default
2378
2379.. option:: -msign-return-address=<arg>
2380
2381Select return address signing scope
2382
2383.. option:: -msoft-float, -mno-soft-float
2384
2385Use software floating point
2386
2387.. option:: -mspeculative-load-hardening, -mno-speculative-load-hardening
2388
2389.. option:: -mstack-alignment=<arg>
2390
2391Set the stack alignment
2392
2393.. option:: -mstack-arg-probe, -mno-stack-arg-probe
2394
2395Enable stack probes
2396
2397.. option:: -mstack-probe-size=<arg>
2398
2399Set the stack probe size
2400
2401.. option:: -mstackrealign, -mno-stackrealign
2402
2403Force realign the stack at entry to every function
2404
2405.. option:: -mthread-model <arg>
2406
2407The thread model to use, e.g. posix, single (posix by default)
2408
2409.. option:: -mthreads<arg>
2410
2411.. option:: -mthumb, -mno-thumb
2412
2413.. option:: -mtls-direct-seg-refs, -mno-tls-direct-seg-refs
2414
2415Enable direct TLS access through segment registers (default)
2416
2417.. program:: clang1
2418.. option:: -mtune=<arg>
2419.. program:: clang
2420
2421.. option:: -mtvos-version-min=<arg>, -mappletvos-version-min=<arg>
2422
2423.. option:: -municode<arg>
2424
2425.. option:: -mvx, -mno-vx
2426
2427.. option:: -mwarn-nonportable-cfstrings, -mno-warn-nonportable-cfstrings
2428
2429.. option:: -mwatchos-version-min=<arg>
2430
2431.. option:: -mwavefrontsize64, -mno-wavefrontsize64
2432
2433Wavefront size 64 is used
2434
2435.. option:: -mwindows<arg>
2436
2437.. option:: -mx32
2438
2439AARCH64
2440-------
2441.. option:: -fcall-saved-x10
2442
2443Make the x10 register call-saved (AArch64 only)
2444
2445.. option:: -fcall-saved-x11
2446
2447Make the x11 register call-saved (AArch64 only)
2448
2449.. option:: -fcall-saved-x12
2450
2451Make the x12 register call-saved (AArch64 only)
2452
2453.. option:: -fcall-saved-x13
2454
2455Make the x13 register call-saved (AArch64 only)
2456
2457.. option:: -fcall-saved-x14
2458
2459Make the x14 register call-saved (AArch64 only)
2460
2461.. option:: -fcall-saved-x15
2462
2463Make the x15 register call-saved (AArch64 only)
2464
2465.. option:: -fcall-saved-x18
2466
2467Make the x18 register call-saved (AArch64 only)
2468
2469.. option:: -fcall-saved-x8
2470
2471Make the x8 register call-saved (AArch64 only)
2472
2473.. option:: -fcall-saved-x9
2474
2475Make the x9 register call-saved (AArch64 only)
2476
2477.. option:: -ffixed-x1
2478
2479Reserve the 1 register (AArch64 only)
2480
2481.. option:: -ffixed-x10
2482
2483Reserve the 10 register (AArch64 only)
2484
2485.. option:: -ffixed-x11
2486
2487Reserve the 11 register (AArch64 only)
2488
2489.. option:: -ffixed-x12
2490
2491Reserve the 12 register (AArch64 only)
2492
2493.. option:: -ffixed-x13
2494
2495Reserve the 13 register (AArch64 only)
2496
2497.. option:: -ffixed-x14
2498
2499Reserve the 14 register (AArch64 only)
2500
2501.. option:: -ffixed-x15
2502
2503Reserve the 15 register (AArch64 only)
2504
2505.. option:: -ffixed-x18
2506
2507Reserve the 18 register (AArch64 only)
2508
2509.. option:: -ffixed-x2
2510
2511Reserve the 2 register (AArch64 only)
2512
2513.. option:: -ffixed-x20
2514
2515Reserve the 20 register (AArch64 only)
2516
2517.. option:: -ffixed-x21
2518
2519Reserve the 21 register (AArch64 only)
2520
2521.. option:: -ffixed-x22
2522
2523Reserve the 22 register (AArch64 only)
2524
2525.. option:: -ffixed-x23
2526
2527Reserve the 23 register (AArch64 only)
2528
2529.. option:: -ffixed-x24
2530
2531Reserve the 24 register (AArch64 only)
2532
2533.. option:: -ffixed-x25
2534
2535Reserve the 25 register (AArch64 only)
2536
2537.. option:: -ffixed-x26
2538
2539Reserve the 26 register (AArch64 only)
2540
2541.. option:: -ffixed-x27
2542
2543Reserve the 27 register (AArch64 only)
2544
2545.. option:: -ffixed-x28
2546
2547Reserve the 28 register (AArch64 only)
2548
2549.. option:: -ffixed-x3
2550
2551Reserve the 3 register (AArch64 only)
2552
2553.. option:: -ffixed-x4
2554
2555Reserve the 4 register (AArch64 only)
2556
2557.. option:: -ffixed-x5
2558
2559Reserve the 5 register (AArch64 only)
2560
2561.. option:: -ffixed-x6
2562
2563Reserve the 6 register (AArch64 only)
2564
2565.. option:: -ffixed-x7
2566
2567Reserve the 7 register (AArch64 only)
2568
2569.. option:: -ffixed-x9
2570
2571Reserve the 9 register (AArch64 only)
2572
2573.. option:: -mfix-cortex-a53-835769, -mno-fix-cortex-a53-835769
2574
2575Workaround Cortex-A53 erratum 835769 (AArch64 only)
2576
2577.. option:: -mgeneral-regs-only
2578
2579Generate code which only uses the general purpose registers (AArch64 only)
2580
2581AMDGPU
2582------
2583.. option:: -mcode-object-v3, -mno-code-object-v3
2584
2585Enable code object v3 (AMDGPU only)
2586
2587.. option:: -mcumode, -mno-cumode
2588
2589CU wavefront execution mode is used (AMDGPU only)
2590
2591.. option:: -msram-ecc, -mno-sram-ecc
2592
2593Enable SRAM ECC (AMDGPU only)
2594
2595.. option:: -mxnack, -mno-xnack
2596
2597Enable XNACK (AMDGPU only)
2598
2599ARM
2600---
2601.. option:: -ffixed-r9
2602
2603Reserve the r9 register (ARM only)
2604
2605.. option:: -mcmse
2606
2607Allow use of CMSE (Armv8-M Security Extensions)
2608
2609.. option:: -mexecute-only, -mno-execute-only, -mpure-code
2610
2611Disallow generation of data access to code sections (ARM only)
2612
2613.. option:: -mno-movt
2614
2615Disallow use of movt/movw pairs (ARM only)
2616
2617.. option:: -mno-neg-immediates
2618
2619Disallow converting instructions with negative immediates to their negation or inversion.
2620
2621.. option:: -mnocrc
2622
2623Disallow use of CRC instructions (ARM only)
2624
2625.. option:: -mrestrict-it, -mno-restrict-it
2626
2627Disallow generation of deprecated IT blocks for ARMv8. It is on by default for ARMv8 Thumb mode.
2628
2629.. option:: -mtp=<arg>
2630
2631Thread pointer access method (AArch32/AArch64 only)
2632
2633.. option:: -munaligned-access, -mno-unaligned-access
2634
2635Allow memory accesses to be unaligned (AArch32/AArch64 only)
2636
2637Hexagon
2638-------
2639.. option:: -mieee-rnd-near
2640
2641.. option:: -mmemops, -mno-memops
2642
2643Enable generation of memop instructions
2644
2645.. option:: -mnvj, -mno-nvj
2646
2647Enable generation of new-value jumps
2648
2649.. option:: -mnvs, -mno-nvs
2650
2651Enable generation of new-value stores
2652
2653.. option:: -mpackets, -mno-packets
2654
2655Enable generation of instruction packets
2656
2657Hexagon
2658-------
2659.. option:: -mhvx, -mno-hvx
2660
2661Enable Hexagon Vector eXtensions
2662
2663.. option:: -mhvx-length=<arg>
2664
2665Set Hexagon Vector Length
2666
2667.. program:: clang1
2668.. option:: -mhvx=<arg>
2669.. program:: clang
2670
2671Enable Hexagon Vector eXtensions
2672
2673MIPS
2674----
2675.. option:: -mabicalls, -mno-abicalls
2676
2677Enable SVR4-style position-independent code (Mips only)
2678
2679.. option:: -mabs=<arg>
2680
2681.. option:: -mcheck-zero-division, -mno-check-zero-division
2682
2683.. option:: -mcompact-branches=<arg>
2684
2685.. option:: -mdouble-float
2686
2687.. option:: -mdsp, -mno-dsp
2688
2689.. option:: -mdspr2, -mno-dspr2
2690
2691.. option:: -membedded-data, -mno-embedded-data
2692
2693Place constants in the .rodata section instead of the .sdata section even if they meet the -G <size> threshold (MIPS)
2694
2695.. option:: -mextern-sdata, -mno-extern-sdata
2696
2697Assume that externally defined data is in the small data if it meets the -G <size> threshold (MIPS)
2698
2699.. option:: -mfp32
2700
2701Use 32-bit floating point registers (MIPS only)
2702
2703.. option:: -mfp64
2704
2705Use 64-bit floating point registers (MIPS only)
2706
2707.. option:: -mginv, -mno-ginv
2708
2709.. option:: -mgpopt, -mno-gpopt
2710
2711Use GP relative accesses for symbols known to be in a small data section (MIPS)
2712
2713.. option:: -mindirect-jump=<arg>
2714
2715Change indirect jump instructions to inhibit speculation
2716
2717.. option:: -mips16
2718
2719.. option:: -mldc1-sdc1, -mno-ldc1-sdc1
2720
2721.. option:: -mlocal-sdata, -mno-local-sdata
2722
2723Extend the -G behaviour to object local data (MIPS)
2724
2725.. option:: -mmadd4, -mno-madd4
2726
2727Enable the generation of 4-operand madd.s, madd.d and related instructions.
2728
2729.. option:: -mmicromips, -mno-micromips
2730
2731.. option:: -mmsa, -mno-msa
2732
2733Enable MSA ASE (MIPS only)
2734
2735.. option:: -mmt, -mno-mt
2736
2737Enable MT ASE (MIPS only)
2738
2739.. option:: -mnan=<arg>
2740
2741.. option:: -mno-mips16
2742
2743.. option:: -msingle-float
2744
2745.. option:: -mvirt, -mno-virt
2746
2747.. option:: -mxgot, -mno-xgot
2748
2749PowerPC
2750-------
2751.. option:: -maltivec, -mno-altivec
2752
2753.. option:: -mcmpb, -mno-cmpb
2754
2755.. option:: -mcrbits, -mno-crbits
2756
2757.. option:: -mcrypto, -mno-crypto
2758
2759.. option:: -mdirect-move, -mno-direct-move
2760
2761.. option:: -mfloat128, -mno-float128
2762
2763.. option:: -mfprnd, -mno-fprnd
2764
2765.. option:: -mhtm, -mno-htm
2766
2767.. option:: -minvariant-function-descriptors, -mno-invariant-function-descriptors
2768
2769.. option:: -misel, -mno-isel
2770
2771.. option:: -mlongcall, -mno-longcall
2772
2773.. option:: -mmfocrf, -mmfcrf, -mno-mfocrf
2774
2775.. option:: -mpopcntd, -mno-popcntd
2776
2777.. option:: -mpower8-vector, -mno-power8-vector
2778
2779.. option:: -mpower9-vector, -mno-power9-vector
2780
2781.. option:: -mqpx, -mno-qpx
2782
2783.. option:: -msecure-plt
2784
2785.. option:: -mvsx, -mno-vsx
2786
2787WebAssembly
2788-----------
2789.. option:: -matomics, -mno-atomics
2790
2791.. option:: -mbulk-memory, -mno-bulk-memory
2792
2793.. option:: -mexception-handling, -mno-exception-handling
2794
2795.. option:: -mmultivalue, -mno-multivalue
2796
2797.. option:: -mmutable-globals, -mno-mutable-globals
2798
2799.. option:: -mnontrapping-fptoint, -mno-nontrapping-fptoint
2800
2801.. option:: -msign-ext, -mno-sign-ext
2802
2803.. option:: -msimd128, -mno-simd128
2804
2805.. option:: -mtail-call, -mno-tail-call
2806
2807.. option:: -munimplemented-simd128, -mno-unimplemented-simd128
2808
2809X86
2810---
2811.. option:: -m3dnow, -mno-3dnow
2812
2813.. option:: -m3dnowa, -mno-3dnowa
2814
2815.. option:: -madx, -mno-adx
2816
2817.. option:: -maes, -mno-aes
2818
2819.. option:: -mavx, -mno-avx
2820
2821.. option:: -mavx2, -mno-avx2
2822
2823.. option:: -mavx512bf16, -mno-avx512bf16
2824
2825.. option:: -mavx512bitalg, -mno-avx512bitalg
2826
2827.. option:: -mavx512bw, -mno-avx512bw
2828
2829.. option:: -mavx512cd, -mno-avx512cd
2830
2831.. option:: -mavx512dq, -mno-avx512dq
2832
2833.. option:: -mavx512er, -mno-avx512er
2834
2835.. option:: -mavx512f, -mno-avx512f
2836
2837.. option:: -mavx512ifma, -mno-avx512ifma
2838
2839.. option:: -mavx512pf, -mno-avx512pf
2840
2841.. option:: -mavx512vbmi, -mno-avx512vbmi
2842
2843.. option:: -mavx512vbmi2, -mno-avx512vbmi2
2844
2845.. option:: -mavx512vl, -mno-avx512vl
2846
2847.. option:: -mavx512vnni, -mno-avx512vnni
2848
2849.. option:: -mavx512vp2intersect, -mno-avx512vp2intersect
2850
2851.. option:: -mavx512vpopcntdq, -mno-avx512vpopcntdq
2852
2853.. option:: -mbmi, -mno-bmi
2854
2855.. option:: -mbmi2, -mno-bmi2
2856
2857.. option:: -mcldemote, -mno-cldemote
2858
2859.. option:: -mclflushopt, -mno-clflushopt
2860
2861.. option:: -mclwb, -mno-clwb
2862
2863.. option:: -mclzero, -mno-clzero
2864
2865.. option:: -mcx16, -mno-cx16
2866
2867.. option:: -menqcmd, -mno-enqcmd
2868
2869.. option:: -mf16c, -mno-f16c
2870
2871.. option:: -mfma, -mno-fma
2872
2873.. option:: -mfma4, -mno-fma4
2874
2875.. option:: -mfsgsbase, -mno-fsgsbase
2876
2877.. option:: -mfxsr, -mno-fxsr
2878
2879.. option:: -mgfni, -mno-gfni
2880
2881.. option:: -minvpcid, -mno-invpcid
2882
2883.. option:: -mlwp, -mno-lwp
2884
2885.. option:: -mlzcnt, -mno-lzcnt
2886
2887.. option:: -mmmx, -mno-mmx
2888
2889.. option:: -mmovbe, -mno-movbe
2890
2891.. option:: -mmovdir64b, -mno-movdir64b
2892
2893.. option:: -mmovdiri, -mno-movdiri
2894
2895.. option:: -mmpx, -mno-mpx
2896
2897.. option:: -mmwaitx, -mno-mwaitx
2898
2899.. option:: -mpclmul, -mno-pclmul
2900
2901.. option:: -mpconfig, -mno-pconfig
2902
2903.. option:: -mpku, -mno-pku
2904
2905.. option:: -mpopcnt, -mno-popcnt
2906
2907.. option:: -mprefetchwt1, -mno-prefetchwt1
2908
2909.. option:: -mprfchw, -mno-prfchw
2910
2911.. option:: -mptwrite, -mno-ptwrite
2912
2913.. option:: -mrdpid, -mno-rdpid
2914
2915.. option:: -mrdrnd, -mno-rdrnd
2916
2917.. option:: -mrdseed, -mno-rdseed
2918
2919.. option:: -mretpoline-external-thunk, -mno-retpoline-external-thunk
2920
2921.. option:: -mrtm, -mno-rtm
2922
2923.. option:: -msahf, -mno-sahf
2924
2925.. option:: -msgx, -mno-sgx
2926
2927.. option:: -msha, -mno-sha
2928
2929.. option:: -mshstk, -mno-shstk
2930
2931.. option:: -msse, -mno-sse
2932
2933.. option:: -msse2, -mno-sse2
2934
2935.. option:: -msse3, -mno-sse3
2936
2937.. option:: -msse4.1, -mno-sse4.1
2938
2939.. program:: clang1
2940.. option:: -msse4.2, -mno-sse4.2, -msse4
2941.. program:: clang
2942
2943.. option:: -msse4a, -mno-sse4a
2944
2945.. option:: -mssse3, -mno-ssse3
2946
2947.. option:: -mtbm, -mno-tbm
2948
2949.. option:: -mvaes, -mno-vaes
2950
2951.. option:: -mvpclmulqdq, -mno-vpclmulqdq
2952
2953.. option:: -mwaitpkg, -mno-waitpkg
2954
2955.. option:: -mwbnoinvd, -mno-wbnoinvd
2956
2957.. option:: -mx87, -m80387, -mno-x87
2958
2959.. option:: -mxop, -mno-xop
2960
2961.. option:: -mxsave, -mno-xsave
2962
2963.. option:: -mxsavec, -mno-xsavec
2964
2965.. option:: -mxsaveopt, -mno-xsaveopt
2966
2967.. option:: -mxsaves, -mno-xsaves
2968
2969RISCV
2970-----
2971.. option:: -mrelax, -mno-relax
2972
2973Enable linker relaxation
2974
2975.. option:: -msave-restore, -mno-save-restore
2976
2977Enable using library calls for save and restore
2978
2979Optimization level
2980~~~~~~~~~~~~~~~~~~
2981
2982Flags controlling how much optimization should be performed.
2983
2984.. option:: -O<arg>, -O (equivalent to -O2), --optimize, --optimize=<arg>
2985
2986.. option:: -Ofast<arg>
2987
2988Debug information generation
2989~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2990
2991Flags controlling how much and what kind of debug information should be
2992generated.
2993
2994Kind and level of debug information
2995-----------------------------------
2996.. option:: -g, --debug, --debug=<arg>
2997
2998Generate source-level debug information
2999
3000.. option:: -gdwarf-2
3001
3002Generate source-level debug information with dwarf version 2
3003
3004.. option:: -gdwarf-3
3005
3006Generate source-level debug information with dwarf version 3
3007
3008.. option:: -gdwarf-4, -gdwarf
3009
3010Generate source-level debug information with dwarf version 4
3011
3012.. option:: -gdwarf-5
3013
3014Generate source-level debug information with dwarf version 5
3015
3016.. option:: -gfull
3017
3018.. option:: -gused
3019
3020Debug level
3021___________
3022.. option:: -g0
3023
3024.. option:: -g2
3025
3026.. option:: -g3
3027
3028.. option:: -ggdb0
3029
3030.. option:: -ggdb1
3031
3032.. option:: -ggdb2
3033
3034.. option:: -ggdb3
3035
3036.. option:: -gline-directives-only
3037
3038Emit debug line info directives only
3039
3040.. option:: -gline-tables-only, -g1, -gmlt
3041
3042Emit debug line number tables only
3043
3044.. option:: -gmodules
3045
3046Generate debug info with external references to clang modules or precompiled headers
3047
3048Debugger to tune debug information for
3049______________________________________
3050.. option:: -ggdb
3051
3052.. option:: -glldb
3053
3054.. option:: -gsce
3055
3056Debug information flags
3057-----------------------
3058.. option:: -gcolumn-info, -gno-column-info
3059
3060.. option:: -gdwarf-aranges
3061
3062.. option:: -gembed-source, -gno-embed-source
3063
3064Embed source text in DWARF debug sections
3065
3066.. option:: -ggnu-pubnames, -gno-gnu-pubnames
3067
3068.. option:: -gpubnames, -gno-pubnames
3069
3070.. option:: -grecord-command-line, -gno-record-command-line, -grecord-gcc-switches
3071
3072.. option:: -gsplit-dwarf
3073
3074.. program:: clang1
3075.. option:: -gsplit-dwarf=<arg>
3076.. program:: clang
3077
3078Set DWARF fission mode to either 'split' or 'single'
3079
3080.. option:: -gstrict-dwarf, -gno-strict-dwarf
3081
3082.. option:: -gz
3083
3084DWARF debug sections compression type
3085
3086.. program:: clang1
3087.. option:: -gz=<arg>
3088.. program:: clang
3089
3090DWARF debug sections compression type
3091
3092Static analyzer flags
3093=====================
3094
3095Flags controlling the behavior of the Clang Static Analyzer.
3096
3097.. option:: -Xanalyzer <arg>
3098
3099Pass <arg> to the static analyzer
3100
3101Fortran compilation flags
3102=========================
3103
3104Flags that will be passed onto the ``gfortran`` compiler when Clang is given
3105a Fortran input.
3106
3107.. option:: -A<arg>, --assert <arg>, --assert=<arg>
3108
3109.. option:: -A-<arg>
3110
3111.. option:: -J<arg>
3112
3113.. option:: -cpp
3114
3115.. option:: -faggressive-function-elimination, -fno-aggressive-function-elimination
3116
3117.. option:: -falign-commons, -fno-align-commons
3118
3119.. option:: -fall-intrinsics, -fno-all-intrinsics
3120
3121.. option:: -fautomatic, -fno-automatic
3122
3123.. option:: -fbackslash, -fno-backslash
3124
3125.. option:: -fbacktrace, -fno-backtrace
3126
3127.. option:: -fblas-matmul-limit=<arg>
3128
3129.. option:: -fbounds-check, -fno-bounds-check
3130
3131.. option:: -fcheck-array-temporaries, -fno-check-array-temporaries
3132
3133.. option:: -fcheck=<arg>
3134
3135.. option:: -fcoarray=<arg>
3136
3137.. option:: -fconvert=<arg>
3138
3139.. option:: -fcray-pointer, -fno-cray-pointer
3140
3141.. option:: -fd-lines-as-code, -fno-d-lines-as-code
3142
3143.. option:: -fd-lines-as-comments, -fno-d-lines-as-comments
3144
3145.. option:: -fdefault-double-8, -fno-default-double-8
3146
3147.. option:: -fdefault-integer-8, -fno-default-integer-8
3148
3149.. option:: -fdefault-real-8, -fno-default-real-8
3150
3151.. option:: -fdollar-ok, -fno-dollar-ok
3152
3153.. option:: -fdump-fortran-optimized, -fno-dump-fortran-optimized
3154
3155.. option:: -fdump-fortran-original, -fno-dump-fortran-original
3156
3157.. option:: -fdump-parse-tree, -fno-dump-parse-tree
3158
3159.. option:: -fexternal-blas, -fno-external-blas
3160
3161.. option:: -ff2c, -fno-f2c
3162
3163.. option:: -ffixed-form, -fno-fixed-form
3164
3165.. option:: -ffixed-line-length-<arg>
3166
3167.. option:: -ffpe-trap=<arg>
3168
3169.. option:: -ffree-form, -fno-free-form
3170
3171.. option:: -ffree-line-length-<arg>
3172
3173.. option:: -ffrontend-optimize, -fno-frontend-optimize
3174
3175.. option:: -fimplicit-none, -fno-implicit-none
3176
3177.. option:: -finit-character=<arg>
3178
3179.. option:: -finit-integer=<arg>
3180
3181.. option:: -finit-local-zero, -fno-init-local-zero
3182
3183.. option:: -finit-logical=<arg>
3184
3185.. option:: -finit-real=<arg>
3186
3187.. option:: -finteger-4-integer-8, -fno-integer-4-integer-8
3188
3189.. option:: -fintrinsic-modules-path, -fno-intrinsic-modules-path
3190
3191.. option:: -fmax-array-constructor=<arg>
3192
3193.. option:: -fmax-errors=<arg>
3194
3195.. option:: -fmax-identifier-length, -fno-max-identifier-length
3196
3197.. option:: -fmax-stack-var-size=<arg>
3198
3199.. option:: -fmax-subrecord-length=<arg>
3200
3201.. option:: -fmodule-private, -fno-module-private
3202
3203.. option:: -fpack-derived, -fno-pack-derived
3204
3205.. option:: -fprotect-parens, -fno-protect-parens
3206
3207.. option:: -frange-check, -fno-range-check
3208
3209.. option:: -freal-4-real-10, -fno-real-4-real-10
3210
3211.. option:: -freal-4-real-16, -fno-real-4-real-16
3212
3213.. option:: -freal-4-real-8, -fno-real-4-real-8
3214
3215.. option:: -freal-8-real-10, -fno-real-8-real-10
3216
3217.. option:: -freal-8-real-16, -fno-real-8-real-16
3218
3219.. option:: -freal-8-real-4, -fno-real-8-real-4
3220
3221.. option:: -frealloc-lhs, -fno-realloc-lhs
3222
3223.. option:: -frecord-marker=<arg>
3224
3225.. option:: -frecursive, -fno-recursive
3226
3227.. option:: -frepack-arrays, -fno-repack-arrays
3228
3229.. option:: -fsecond-underscore, -fno-second-underscore
3230
3231.. option:: -fsign-zero, -fno-sign-zero
3232
3233.. option:: -fstack-arrays, -fno-stack-arrays
3234
3235.. option:: -funderscoring, -fno-underscoring
3236
3237.. option:: -fwhole-file, -fno-whole-file
3238
3239.. option:: -imultilib <arg>
3240
3241.. option:: -nocpp
3242
3243.. option:: -static-libgfortran
3244
3245Linker flags
3246============
3247Flags that are passed on to the linker
3248
3249.. option:: -L<dir>, --library-directory <arg>, --library-directory=<arg>
3250
3251Add directory to library search path
3252
3253.. option:: -Mach
3254
3255.. option:: -T<script>
3256
3257Specify <script> as linker script
3258
3259.. option:: -Tbss<addr>
3260
3261Set starting address of BSS to <addr>
3262
3263.. option:: -Tdata<addr>
3264
3265Set starting address of DATA to <addr>
3266
3267.. option:: -Ttext<addr>
3268
3269Set starting address of TEXT to <addr>
3270
3271.. option:: -Wl,<arg>,<arg2>...
3272
3273Pass the comma separated arguments in <arg> to the linker
3274
3275.. option:: -X
3276
3277.. option:: -Xlinker <arg>, --for-linker <arg>, --for-linker=<arg>
3278
3279Pass <arg> to the linker
3280
3281.. program:: clang1
3282.. option:: -Z
3283.. program:: clang
3284
3285.. option:: -e<arg>, --entry
3286
3287.. option:: -filelist <arg>
3288
3289.. option:: --hip-device-lib-path=<arg>
3290
3291HIP device library path
3292
3293.. option:: --hip-device-lib=<arg>
3294
3295HIP device library
3296
3297.. option:: -l<arg>
3298
3299.. option:: -r
3300
3301.. option:: -rpath <arg>
3302
3303.. option:: -s
3304
3305.. option:: -t
3306
3307.. option:: -u<arg>, --force-link <arg>, --force-link=<arg>
3308
3309.. option:: -undef
3310
3311undef all system defines
3312
3313.. option:: -undefined<arg>, --no-undefined
3314
3315.. option:: -z <arg>
3316
3317Pass -z <arg> to the linker
3318
3319