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:: -Qunused-arguments
40
41Don't emit warning for unused driver arguments
42
43.. option:: -Wa,<arg>,<arg2>...
44
45Pass the comma separated arguments in <arg> to the assembler
46
47.. option:: -Wlarge-by-value-copy=<arg>
48
49.. option:: -Xarch\_<arg1> <arg2>
50
51.. option:: -Xcuda-fatbinary <arg>
52
53Pass <arg> to fatbinary invocation
54
55.. option:: -Xcuda-ptxas <arg>
56
57Pass <arg> to the ptxas assembler
58
59.. option:: -Z<arg>
60
61.. option:: -a<arg>, --profile-blocks
62
63.. option:: -all\_load
64
65.. option:: -allowable\_client <arg>
66
67.. option:: --analyze
68
69Run the static analyzer
70
71.. option:: --analyze-auto
72
73.. option:: --analyzer-no-default-checks
74
75.. option:: --analyzer-output<arg>
76
77Static analyzer report output format (html\|plist\|plist-multi-file\|plist-html\|text).
78
79.. option:: -ansi, --ansi
80
81.. option:: -arch <arg>
82
83.. program:: clang1
84.. option:: -arch\_errors\_fatal
85.. program:: clang
86
87.. program:: clang2
88.. option:: -arch\_only <arg>
89.. program:: clang
90
91.. option:: -arcmt-migrate-emit-errors
92
93Emit ARC errors even if the migrator can fix them
94
95.. option:: -arcmt-migrate-report-output <arg>
96
97Output path for the plist report
98
99.. option:: --autocomplete=<arg>
100
101.. option:: -bind\_at\_load
102
103.. option:: -bundle
104
105.. program:: clang1
106.. option:: -bundle\_loader <arg>
107.. program:: clang
108
109.. option:: -client\_name<arg>
110
111.. option:: -compatibility\_version<arg>
112
113.. option:: --constant-cfstrings
114
115.. option:: -coverage, --coverage
116
117.. option:: --cuda-compile-host-device
118
119Compile CUDA code for both host and device (default).  Has no effect on non-CUDA compilations.
120
121.. option:: --cuda-device-only
122
123Compile CUDA code for device only
124
125.. option:: --cuda-gpu-arch=<arg>, --no-cuda-gpu-arch=<arg>
126
127CUDA GPU architecture (e.g. sm\_35).  May be specified more than once.
128
129.. option:: --cuda-host-only
130
131Compile CUDA code for host only.  Has no effect on non-CUDA compilations.
132
133.. option:: --cuda-noopt-device-debug, --no-cuda-noopt-device-debug
134
135Enable device-side debug info generation. Disables ptxas optimizations.
136
137.. option:: -current\_version<arg>
138
139.. option:: -dead\_strip
140
141.. option:: -dependency-dot <arg>
142
143Filename to write DOT-formatted header dependencies to
144
145.. option:: -dependency-file <arg>
146
147Filename (or -) to write dependency output to
148
149.. option:: -dumpmachine
150
151.. option:: -dumpversion
152
153.. option:: --dyld-prefix=<arg>, --dyld-prefix <arg>
154
155.. option:: -dylib\_file <arg>
156
157.. option:: -dylinker
158
159.. program:: clang1
160.. option:: -dylinker\_install\_name<arg>
161.. program:: clang
162
163.. option:: -dynamic
164
165.. option:: -dynamiclib
166
167.. option:: -emit-ast
168
169Emit Clang AST files for source inputs
170
171.. option:: -exported\_symbols\_list <arg>
172
173.. option:: -faligned-new=<arg>
174
175.. option:: -fcuda-approx-transcendentals, -fno-cuda-approx-transcendentals
176
177Use approximate transcendental functions
178
179.. option:: -fcuda-flush-denormals-to-zero, -fno-cuda-flush-denormals-to-zero
180
181Flush denormal floating point values to zero in CUDA device mode.
182
183.. option:: -fheinous-gnu-extensions
184
185.. option:: -flat\_namespace
186
187.. option:: -fopenmp-targets=<arg1>,<arg2>...
188
189Specify comma-separated list of triples OpenMP offloading targets to be supported
190
191.. option:: -force\_cpusubtype\_ALL
192
193.. program:: clang1
194.. option:: -force\_flat\_namespace
195.. program:: clang
196
197.. program:: clang2
198.. option:: -force\_load <arg>
199.. program:: clang
200
201.. option:: -framework <arg>
202
203.. option:: -frtlib-add-rpath, -fno-rtlib-add-rpath
204
205Add -rpath with architecture-specific resource directory to the linker flags
206
207.. option:: --gcc-toolchain=<arg>, -gcc-toolchain <arg>
208
209Use the gcc toolchain at the given directory
210
211.. option:: -gcodeview
212
213Generate CodeView debug information
214
215.. option:: -headerpad\_max\_install\_names<arg>
216
217.. option:: -help, --help
218
219Display available options
220
221.. option:: --help-hidden
222
223.. option:: -image\_base <arg>
224
225.. option:: -index-header-map
226
227Make the next included directory (-I or -F) an indexer header map
228
229.. option:: -init <arg>
230
231.. option:: -install\_name <arg>
232
233.. option:: -keep\_private\_externs
234
235.. option:: -lazy\_framework <arg>
236
237.. program:: clang1
238.. option:: -lazy\_library <arg>
239.. program:: clang
240
241.. option:: -mbig-endian, -EB
242
243.. option:: --migrate
244
245Run the migrator
246
247.. option:: -mios-simulator-version-min=<arg>, -miphonesimulator-version-min=<arg>
248
249.. option:: -mlinker-version=<arg>
250
251.. option:: -mlittle-endian, -EL
252
253.. option:: -mllvm <arg>
254
255Additional arguments to forward to LLVM's option processing
256
257.. option:: -module-dependency-dir <arg>
258
259Directory to dump module dependencies to
260
261.. option:: -mtvos-simulator-version-min=<arg>, -mappletvsimulator-version-min=<arg>
262
263.. option:: -multi\_module
264
265.. option:: -multiply\_defined <arg>
266
267.. program:: clang1
268.. option:: -multiply\_defined\_unused <arg>
269.. program:: clang
270
271.. option:: -mwatchos-simulator-version-min=<arg>, -mwatchsimulator-version-min=<arg>
272
273.. option:: --no-cuda-version-check
274
275Don't error out if the detected version of the CUDA install is too low for the requested CUDA gpu architecture.
276
277.. option:: -no-integrated-cpp, --no-integrated-cpp
278
279.. option:: -no\_dead\_strip\_inits\_and\_terms
280
281.. option:: -nobuiltininc
282
283Disable builtin #include directories
284
285.. option:: -nocudainc
286
287.. option:: -nocudalib
288
289.. option:: -nodefaultlibs
290
291.. option:: -nofixprebinding
292
293.. option:: -nolibc
294
295.. option:: -nomultidefs
296
297.. option:: -nopie, -no-pie
298
299.. option:: -noprebind
300
301.. option:: -noseglinkedit
302
303.. option:: -nostartfiles
304
305.. option:: -nostdinc, --no-standard-includes
306
307.. program:: clang1
308.. option:: -nostdinc++
309.. program:: clang
310
311Disable standard #include directories for the C++ standard library
312
313.. option:: -nostdlib, --no-standard-libraries
314
315.. option:: -nostdlibinc
316
317.. option:: -o<file>, --output <arg>, --output=<arg>
318
319Write output to <file>
320
321.. option:: -objcmt-atomic-property
322
323Make migration to 'atomic' properties
324
325.. option:: -objcmt-migrate-all
326
327Enable migration to modern ObjC
328
329.. option:: -objcmt-migrate-annotation
330
331Enable migration to property and method annotations
332
333.. option:: -objcmt-migrate-designated-init
334
335Enable migration to infer NS\_DESIGNATED\_INITIALIZER for initializer methods
336
337.. option:: -objcmt-migrate-instancetype
338
339Enable migration to infer instancetype for method result type
340
341.. option:: -objcmt-migrate-literals
342
343Enable migration to modern ObjC literals
344
345.. option:: -objcmt-migrate-ns-macros
346
347Enable migration to NS\_ENUM/NS\_OPTIONS macros
348
349.. option:: -objcmt-migrate-property
350
351Enable migration to modern ObjC property
352
353.. option:: -objcmt-migrate-property-dot-syntax
354
355Enable migration of setter/getter messages to property-dot syntax
356
357.. option:: -objcmt-migrate-protocol-conformance
358
359Enable migration to add protocol conformance on classes
360
361.. option:: -objcmt-migrate-readonly-property
362
363Enable migration to modern ObjC readonly property
364
365.. option:: -objcmt-migrate-readwrite-property
366
367Enable migration to modern ObjC readwrite property
368
369.. option:: -objcmt-migrate-subscripting
370
371Enable migration to modern ObjC subscripting
372
373.. option:: -objcmt-ns-nonatomic-iosonly
374
375Enable migration to use NS\_NONATOMIC\_IOSONLY macro for setting property's 'atomic' attribute
376
377.. option:: -objcmt-returns-innerpointer-property
378
379Enable migration to annotate property with NS\_RETURNS\_INNER\_POINTER
380
381.. option:: -objcmt-whitelist-dir-path=<arg>, -objcmt-white-list-dir-path=<arg>
382
383Only modify files with a filename contained in the provided directory path
384
385.. option:: -object
386
387.. option:: -p, --profile
388
389.. option:: -pagezero\_size<arg>
390
391.. option:: -pg
392
393Enable mcount instrumentation
394
395.. option:: -pie
396
397.. option:: -pipe, --pipe
398
399Use pipes between commands, when possible
400
401.. option:: -prebind
402
403.. program:: clang1
404.. option:: -prebind\_all\_twolevel\_modules
405.. program:: clang
406
407.. option:: -preload
408
409.. option:: --print-diagnostic-categories
410
411.. option:: -print-file-name=<file>, --print-file-name=<file>, --print-file-name <arg>
412
413Print the full library path of <file>
414
415.. option:: -print-ivar-layout
416
417Enable Objective-C Ivar layout bitmap print trace
418
419.. option:: -print-libgcc-file-name, --print-libgcc-file-name
420
421Print the library path for the currently used compiler runtime library ("libgcc.a" or "libclang\_rt.builtins.\*.a")
422
423.. option:: -print-multi-directory, --print-multi-directory
424
425.. option:: -print-multi-lib, --print-multi-lib
426
427.. option:: -print-prog-name=<name>, --print-prog-name=<name>, --print-prog-name <arg>
428
429Print the full program path of <name>
430
431.. option:: -print-resource-dir, --print-resource-dir
432
433Print the resource directory pathname
434
435.. option:: -print-search-dirs, --print-search-dirs
436
437Print the paths used for finding libraries and programs
438
439.. option:: -private\_bundle
440
441.. option:: -pthread, -no-pthread
442
443Support POSIX threads in generated code
444
445.. option:: -pthreads
446
447.. option:: -rdynamic
448
449.. option:: -read\_only\_relocs <arg>
450
451.. option:: -relocatable-pch, --relocatable-pch
452
453Whether to build a relocatable precompiled header
454
455.. option:: -remap
456
457.. option:: -rewrite-legacy-objc
458
459Rewrite Legacy Objective-C source to C++
460
461.. option:: -rtlib=<arg>, --rtlib=<arg>, --rtlib <arg>
462
463Compiler runtime library to use
464
465.. option:: -save-stats=<arg>, --save-stats=<arg>, -save-stats (equivalent to -save-stats=cwd), --save-stats (equivalent to -save-stats=cwd)
466
467Save llvm statistics.
468
469.. option:: -save-temps=<arg>, --save-temps=<arg>, -save-temps (equivalent to -save-temps=cwd), --save-temps (equivalent to -save-temps=cwd)
470
471Save intermediate compilation results.
472
473.. option:: -sectalign <arg1> <arg2> <arg3>
474
475.. option:: -sectcreate <arg1> <arg2> <arg3>
476
477.. option:: -sectobjectsymbols <arg1> <arg2>
478
479.. option:: -sectorder <arg1> <arg2> <arg3>
480
481.. option:: -seg1addr<arg>
482
483.. option:: -seg\_addr\_table <arg>
484
485.. program:: clang1
486.. option:: -seg\_addr\_table\_filename <arg>
487.. program:: clang
488
489.. option:: -segaddr <arg1> <arg2>
490
491.. option:: -segcreate <arg1> <arg2> <arg3>
492
493.. option:: -seglinkedit
494
495.. option:: -segprot <arg1> <arg2> <arg3>
496
497.. option:: -segs\_read\_<arg>
498
499.. program:: clang1
500.. option:: -segs\_read\_only\_addr <arg>
501.. program:: clang
502
503.. program:: clang2
504.. option:: -segs\_read\_write\_addr <arg>
505.. program:: clang
506
507.. option:: -serialize-diagnostics <arg>, --serialize-diagnostics <arg>
508
509Serialize compiler diagnostics to a file
510
511.. option:: -shared, --shared
512
513.. option:: -shared-libasan
514
515.. option:: -shared-libgcc
516
517.. option:: -single\_module
518
519.. option:: -specs=<arg>, --specs=<arg>
520
521.. option:: -static, --static
522
523.. option:: -static-libgcc
524
525.. option:: -static-libstdc++
526
527.. option:: -std-default=<arg>
528
529.. option:: -stdlib=<arg>, --stdlib=<arg>, --stdlib <arg>
530
531C++ standard library to use
532
533.. option:: -sub\_library<arg>
534
535.. program:: clang1
536.. option:: -sub\_umbrella<arg>
537.. program:: clang
538
539.. option:: --sysroot=<arg>, --sysroot <arg>
540
541.. option:: --target-help
542
543.. option:: --target=<arg>, -target <arg>
544
545Generate code for the given target
546
547.. option:: -time
548
549Time individual commands
550
551.. option:: -traditional, --traditional
552
553.. option:: -traditional-cpp, --traditional-cpp
554
555Enable some traditional CPP emulation
556
557.. option:: -twolevel\_namespace
558
559.. program:: clang1
560.. option:: -twolevel\_namespace\_hints
561.. program:: clang
562
563.. option:: -umbrella <arg>
564
565.. option:: -unexported\_symbols\_list <arg>
566
567.. option:: -v, --verbose
568
569Show commands to run and use verbose output
570
571.. option:: --verify-debug-info
572
573Verify the binary representation of debug output
574
575.. option:: --version
576
577.. option:: -w, --no-warnings
578
579Suppress all warnings
580
581.. option:: -weak-l<arg>
582
583.. option:: -weak\_framework <arg>
584
585.. program:: clang1
586.. option:: -weak\_library <arg>
587.. program:: clang
588
589.. program:: clang2
590.. option:: -weak\_reference\_mismatches <arg>
591.. program:: clang
592
593.. option:: -whatsloaded
594
595.. option:: -whyload
596
597.. option:: -working-directory<arg>, -working-directory=<arg>
598
599Resolve file paths relative to the specified directory
600
601.. option:: -x<language>, --language <arg>, --language=<arg>
602
603Treat subsequent input files as having type <language>
604
605.. option:: -y<arg>
606
607Actions
608=======
609The action to perform on the input.
610
611.. option:: -E, --preprocess
612
613Only run the preprocessor
614
615.. option:: -S, --assemble
616
617Only run preprocess and compilation steps
618
619.. option:: -c, --compile
620
621Only run preprocess, compile, and assemble steps
622
623.. option:: -emit-llvm
624
625Use the LLVM representation for assembler and object files
626
627.. option:: -fsyntax-only
628
629.. option:: -module-file-info
630
631Provide information about a particular module file
632
633.. option:: --precompile
634
635Only precompile the input
636
637.. option:: -rewrite-objc
638
639Rewrite Objective-C source to C++
640
641.. option:: -verify-pch
642
643Load and verify that a pre-compiled header file is not stale
644
645Compilation flags
646=================
647
648Flags controlling the behavior of Clang during compilation. These flags have
649no effect during actions that do not perform compilation.
650
651.. option:: -Xassembler <arg>
652
653Pass <arg> to the assembler
654
655.. option:: -Xclang <arg>
656
657Pass <arg> to the clang compiler
658
659.. option:: -fcomment-block-commands=<arg>,<arg2>...
660
661Treat each comma separated argument in <arg> as a documentation comment block command
662
663.. option:: -fdeclspec, -fno-declspec
664
665Allow \_\_declspec as a keyword
666
667.. option:: -fdepfile-entry=<arg>
668
669.. option:: -fdiagnostics-fixit-info, -fno-diagnostics-fixit-info
670
671.. option:: -fdiagnostics-format=<arg>
672
673.. option:: -fdiagnostics-parseable-fixits
674
675Print fix-its in machine parseable form
676
677.. option:: -fdiagnostics-print-source-range-info
678
679Print source range spans in numeric form
680
681.. option:: -fdiagnostics-show-category=<arg>
682
683.. option:: -fexperimental-new-pass-manager, -fno-experimental-new-pass-manager
684
685Enables an experimental new pass manager in LLVM.
686
687.. option:: -finline-functions, -fno-inline-functions
688
689Inline suitable functions
690
691.. option:: -finline-hint-functions
692
693Inline functions which are (explicitly or implicitly) marked inline
694
695.. option:: -fno-crash-diagnostics
696
697Disable auto-generation of preprocessed source files and a script for reproduction during a clang crash
698
699.. option:: -fno-sanitize-blacklist
700
701Don't use blacklist file for sanitizers
702
703.. option:: -fparse-all-comments
704
705.. option:: -fsanitize-address-field-padding=<arg>
706
707Level of field padding for AddressSanitizer
708
709.. option:: -fsanitize-address-globals-dead-stripping
710
711Enable linker dead stripping of globals in AddressSanitizer
712
713.. option:: -fsanitize-address-use-after-scope, -fno-sanitize-address-use-after-scope
714
715Enable use-after-scope detection in AddressSanitizer
716
717.. option:: -fsanitize-blacklist=<arg>
718
719Path to blacklist file for sanitizers
720
721.. option:: -fsanitize-cfi-cross-dso, -fno-sanitize-cfi-cross-dso
722
723Enable control flow integrity (CFI) checks for cross-DSO calls.
724
725.. option:: -fsanitize-coverage=<arg1>,<arg2>..., -fno-sanitize-coverage=<arg1>,<arg2>...
726
727Specify the type of coverage instrumentation for Sanitizers
728
729.. option:: -fsanitize-link-c++-runtime
730
731.. option:: -fsanitize-memory-track-origins, -fno-sanitize-memory-track-origins
732
733Enable origins tracking in MemorySanitizer
734
735.. program:: clang1
736.. option:: -fsanitize-memory-track-origins=<arg>
737.. program:: clang
738
739Enable origins tracking in MemorySanitizer
740
741.. option:: -fsanitize-memory-use-after-dtor
742
743Enable use-after-destroy detection in MemorySanitizer
744
745.. option:: -fsanitize-recover, -fno-sanitize-recover
746
747.. program:: clang1
748.. option:: -fsanitize-recover=<arg1>,<arg2>..., -fno-sanitize-recover=<arg1>,<arg2>...
749.. program:: clang
750
751Enable recovery for specified sanitizers
752
753.. option:: -fsanitize-stats, -fno-sanitize-stats
754
755Enable sanitizer statistics gathering.
756
757.. option:: -fsanitize-thread-atomics, -fno-sanitize-thread-atomics
758
759Enable atomic operations instrumentation in ThreadSanitizer (default)
760
761.. option:: -fsanitize-thread-func-entry-exit, -fno-sanitize-thread-func-entry-exit
762
763Enable function entry/exit instrumentation in ThreadSanitizer (default)
764
765.. option:: -fsanitize-thread-memory-access, -fno-sanitize-thread-memory-access
766
767Enable memory access instrumentation in ThreadSanitizer (default)
768
769.. option:: -fsanitize-trap=<arg1>,<arg2>..., -fno-sanitize-trap=<arg1>,<arg2>...
770
771Enable trapping for specified sanitizers
772
773.. option:: -fsanitize-undefined-strip-path-components=<number>
774
775Strip (or keep only, if negative) a given number of path components when emitting check metadata.
776
777.. option:: -fsanitize-undefined-trap-on-error, -fno-sanitize-undefined-trap-on-error
778
779.. option:: -fsanitize=<check>,<arg2>..., -fno-sanitize=<arg1>,<arg2>...
780
781Turn on runtime checks for various forms of undefined or suspicious behavior. See user manual for available checks
782
783.. option:: --param <arg>, --param=<arg>
784
785.. option:: -std=<arg>, --std=<arg>, --std <arg>
786
787Language standard to compile for
788
789Preprocessor flags
790~~~~~~~~~~~~~~~~~~
791
792Flags controlling the behavior of the Clang preprocessor.
793
794.. option:: -C, --comments
795
796Include comments in preprocessed output
797
798.. option:: -CC, --comments-in-macros
799
800Include comments from within macros in preprocessed output
801
802.. option:: -D<macro>=<value>, --define-macro <arg>, --define-macro=<arg>
803
804Define <macro> to <value> (or 1 if <value> omitted)
805
806.. option:: -H, --trace-includes
807
808Show header includes and nesting depth
809
810.. option:: -P, --no-line-commands
811
812Disable linemarker output in -E mode
813
814.. option:: -U<macro>, --undefine-macro <arg>, --undefine-macro=<arg>
815
816Undefine macro <macro>
817
818.. option:: -Wp,<arg>,<arg2>...
819
820Pass the comma separated arguments in <arg> to the preprocessor
821
822.. option:: -Xpreprocessor <arg>
823
824Pass <arg> to the preprocessor
825
826Include path management
827-----------------------
828
829Flags controlling how ``#include``\s are resolved to files.
830
831.. option:: -I<dir>, --include-directory <arg>, --include-directory=<arg>
832
833Add directory to include search path
834
835.. option:: -I-, --include-barrier
836
837Restrict all prior -I flags to double-quoted inclusion and remove current directory from include path
838
839.. option:: --cuda-path=<arg>
840
841CUDA installation path
842
843.. option:: -cxx-isystem<directory>
844
845Add directory to the C++ SYSTEM include search path
846
847.. option:: -fbuild-session-file=<file>
848
849Use the last modification time of <file> as the build session timestamp
850
851.. option:: -fbuild-session-timestamp=<time since Epoch in seconds>
852
853Time when the current build session started
854
855.. option:: -fmodules-cache-path=<directory>
856
857Specify the module cache path
858
859.. option:: -fmodules-disable-diagnostic-validation
860
861Disable validation of the diagnostic options when loading the module
862
863.. option:: -fmodules-prune-after=<seconds>
864
865Specify the interval (in seconds) after which a module file will be considered unused
866
867.. option:: -fmodules-prune-interval=<seconds>
868
869Specify the interval (in seconds) between attempts to prune the module cache
870
871.. option:: -fmodules-user-build-path <directory>
872
873Specify the module user build path
874
875.. option:: -fmodules-validate-once-per-build-session
876
877Don't verify input files for the modules if the module has been successfully validated or loaded during this build session
878
879.. option:: -fmodules-validate-system-headers
880
881Validate the system headers that a module depends on when loading the module
882
883.. option:: -fprebuilt-module-path=<directory>
884
885Specify the prebuilt module path
886
887.. option:: -i<arg>
888
889.. option:: -idirafter<arg>, --include-directory-after <arg>, --include-directory-after=<arg>
890
891Add directory to AFTER include search path
892
893.. option:: -iframework<arg>
894
895Add directory to SYSTEM framework search path
896
897.. option:: -iframeworkwithsysroot<directory>
898
899Add directory to SYSTEM framework search path, absolute paths are relative to -isysroot
900
901.. option:: -imacros<file>, --imacros<file>, --imacros=<arg>
902
903Include macros from file before parsing
904
905.. option:: -include<file>, --include<file>, --include=<arg>
906
907Include file before parsing
908
909.. option:: -include-pch <file>
910
911Include precompiled header file
912
913.. option:: -iprefix<dir>, --include-prefix <arg>, --include-prefix=<arg>
914
915Set the -iwithprefix/-iwithprefixbefore prefix
916
917.. option:: -iquote<directory>
918
919Add directory to QUOTE include search path
920
921.. option:: -isysroot<dir>
922
923Set the system root directory (usually /)
924
925.. option:: -isystem<directory>
926
927Add directory to SYSTEM include search path
928
929.. option:: -isystem-after<directory>
930
931Add directory to end of the SYSTEM include search path
932
933.. option:: -ivfsoverlay<arg>
934
935Overlay the virtual filesystem described by file over the real file system
936
937.. option:: -iwithprefix<dir>, --include-with-prefix <arg>, --include-with-prefix-after <arg>, --include-with-prefix-after=<arg>, --include-with-prefix=<arg>
938
939Set directory to SYSTEM include search path with prefix
940
941.. option:: -iwithprefixbefore<dir>, --include-with-prefix-before <arg>, --include-with-prefix-before=<arg>
942
943Set directory to include search path with prefix
944
945.. option:: -iwithsysroot<directory>
946
947Add directory to SYSTEM include search path, absolute paths are relative to -isysroot
948
949.. option:: --ptxas-path=<arg>
950
951Path to ptxas (used for compiling CUDA code)
952
953.. option:: --system-header-prefix=<prefix>, --no-system-header-prefix=<prefix>, --system-header-prefix <arg>
954
955Treat all #include paths starting with <prefix> as including a system header.
956
957Dependency file generation
958--------------------------
959
960Flags controlling generation of a dependency file for ``make``-like build
961systems.
962
963.. option:: -M, --dependencies
964
965Like -MD, but also implies -E and writes to stdout by default
966
967.. option:: -MD, --write-dependencies
968
969Write a depfile containing user and system headers
970
971.. option:: -MF<file>
972
973Write depfile output from -MMD, -MD, -MM, or -M to <file>
974
975.. option:: -MG, --print-missing-file-dependencies
976
977Add missing headers to depfile
978
979.. option:: -MJ<arg>
980
981Write a compilation database entry per input
982
983.. option:: -MM, --user-dependencies
984
985Like -MMD, but also implies -E and writes to stdout by default
986
987.. option:: -MMD, --write-user-dependencies
988
989Write a depfile containing user headers
990
991.. option:: -MP
992
993Create phony target for each dependency (other than main file)
994
995.. option:: -MQ<arg>
996
997Specify name of main file output to quote in depfile
998
999.. option:: -MT<arg>
1000
1001Specify name of main file output in depfile
1002
1003.. option:: -MV
1004
1005Use NMake/Jom format for the depfile
1006
1007Dumping preprocessor state
1008--------------------------
1009
1010Flags allowing the state of the preprocessor to be dumped in various ways.
1011
1012.. option:: -d
1013
1014.. program:: clang1
1015.. option:: -d<arg>
1016.. program:: clang
1017
1018.. option:: -dA
1019
1020.. option:: -dD
1021
1022Print macro definitions in -E mode in addition to normal output
1023
1024.. option:: -dI
1025
1026Print include directives in -E mode in addition to normal output
1027
1028.. option:: -dM
1029
1030Print macro definitions in -E mode instead of normal output
1031
1032Diagnostic flags
1033~~~~~~~~~~~~~~~~
1034
1035Flags controlling which warnings, errors, and remarks Clang will generate.
1036See the :doc:`full list of warning and remark flags <DiagnosticsReference>`.
1037
1038.. option:: -R<remark>
1039
1040Enable the specified remark
1041
1042.. option:: -Rpass-analysis=<arg>
1043
1044Report transformation analysis from optimization passes whose name matches the given POSIX regular expression
1045
1046.. option:: -Rpass-missed=<arg>
1047
1048Report missed transformations by optimization passes whose name matches the given POSIX regular expression
1049
1050.. option:: -Rpass=<arg>
1051
1052Report transformations performed by optimization passes whose name matches the given POSIX regular expression
1053
1054.. option:: -W<warning>, --extra-warnings, --warn-<arg>, --warn-=<arg>
1055
1056Enable the specified warning
1057
1058.. option:: -Wdeprecated, -Wno-deprecated
1059
1060Enable warnings for deprecated constructs and define \_\_DEPRECATED
1061
1062.. option:: -Wnonportable-cfstrings<arg>, -Wno-nonportable-cfstrings<arg>
1063
1064Target-independent compilation options
1065~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1066.. option:: -Wframe-larger-than=<arg>
1067
1068.. option:: -fPIC, -fno-PIC
1069
1070.. option:: -fPIE, -fno-PIE
1071
1072.. option:: -faccess-control, -fno-access-control
1073
1074.. program:: clang1
1075.. option:: -faligned-allocation, -faligned-new, -fno-aligned-allocation
1076.. program:: clang
1077
1078Enable C++17 aligned allocation functions
1079
1080.. option:: -fallow-editor-placeholders, -fno-allow-editor-placeholders
1081
1082Treat editor placeholders as valid source code
1083
1084.. option:: -fallow-unsupported
1085
1086.. option:: -faltivec, -fno-altivec
1087
1088.. option:: -fansi-escape-codes
1089
1090Use ANSI escape codes for diagnostics
1091
1092.. option:: -fapple-kext, -findirect-virtual-calls, -fterminated-vtables
1093
1094Use Apple's kernel extensions ABI
1095
1096.. option:: -fapple-pragma-pack, -fno-apple-pragma-pack
1097
1098Enable Apple gcc-compatible #pragma pack handling
1099
1100.. option:: -fapplication-extension, -fno-application-extension
1101
1102Restrict code to those available for App Extensions
1103
1104.. option:: -fasm, -fno-asm
1105
1106.. option:: -fasm-blocks, -fno-asm-blocks
1107
1108.. option:: -fassociative-math, -fno-associative-math
1109
1110.. option:: -fassume-sane-operator-new, -fno-assume-sane-operator-new
1111
1112.. option:: -fast
1113
1114.. option:: -fastcp
1115
1116.. option:: -fastf
1117
1118.. option:: -fasynchronous-unwind-tables, -fno-asynchronous-unwind-tables
1119
1120.. option:: -fautolink, -fno-autolink
1121
1122.. option:: -fblocks, -fno-blocks
1123
1124Enable the 'blocks' language feature
1125
1126.. option:: -fbootclasspath=<arg>, --bootclasspath <arg>, --bootclasspath=<arg>
1127
1128.. option:: -fborland-extensions, -fno-borland-extensions
1129
1130Accept non-standard constructs supported by the Borland compiler
1131
1132.. option:: -fbracket-depth=<arg>
1133
1134.. option:: -fbuiltin, -fno-builtin
1135
1136.. option:: -fbuiltin-module-map
1137
1138Load the clang builtins module map file.
1139
1140.. option:: -fcaret-diagnostics, -fno-caret-diagnostics
1141
1142.. option:: -fclasspath=<arg>, --CLASSPATH <arg>, --CLASSPATH=<arg>, --classpath <arg>, --classpath=<arg>
1143
1144.. option:: -fcolor-diagnostics, -fno-color-diagnostics
1145
1146Use colors in diagnostics
1147
1148.. option:: -fcommon, -fno-common
1149
1150.. option:: -fcompile-resource=<arg>, --resource <arg>, --resource=<arg>
1151
1152.. option:: -fconstant-cfstrings, -fno-constant-cfstrings
1153
1154.. option:: -fconstant-string-class=<arg>
1155
1156.. option:: -fconstexpr-backtrace-limit=<arg>
1157
1158.. option:: -fconstexpr-depth=<arg>
1159
1160.. option:: -fconstexpr-steps=<arg>
1161
1162.. option:: -fcoroutines-ts, -fno-coroutines-ts
1163
1164Enable support for the C++ Coroutines TS
1165
1166.. option:: -fcoverage-mapping, -fno-coverage-mapping
1167
1168Generate coverage mapping to enable code coverage analysis
1169
1170.. option:: -fcreate-profile
1171
1172.. option:: -fcxx-exceptions, -fno-cxx-exceptions
1173
1174Enable C++ exceptions
1175
1176.. option:: -fcxx-modules, -fno-cxx-modules
1177
1178.. option:: -fdata-sections, -fno-data-sections
1179
1180Place each data in its own section (ELF Only)
1181
1182.. option:: -fdebug-info-for-profiling, -fno-debug-info-for-profiling
1183
1184Emit extra debug info to make sample profile more accurate.
1185
1186.. option:: -fdebug-macro, -fno-debug-macro
1187
1188Emit macro debug information
1189
1190.. option:: -fdebug-pass-arguments
1191
1192.. option:: -fdebug-pass-structure
1193
1194.. option:: -fdebug-prefix-map=<arg>
1195
1196remap file source paths in debug info
1197
1198.. option:: -fdebug-types-section, -fno-debug-types-section
1199
1200Place debug types in their own section (ELF Only)
1201
1202.. option:: -fdelayed-template-parsing, -fno-delayed-template-parsing
1203
1204Parse templated function definitions at the end of the translation unit
1205
1206.. option:: -fdenormal-fp-math=<arg>
1207
1208.. option:: -fdiagnostics-absolute-paths
1209
1210Print absolute paths in diagnostics
1211
1212.. option:: -fdiagnostics-color, -fno-diagnostics-color
1213
1214.. program:: clang1
1215.. option:: -fdiagnostics-color=<arg>
1216.. program:: clang
1217
1218.. option:: -fdiagnostics-hotness-threshold=<number>
1219
1220Prevent optimization remarks from being output if they do not have at least this profile count
1221
1222.. option:: -fdiagnostics-show-hotness, -fno-diagnostics-show-hotness
1223
1224Enable profile hotness information in diagnostic line
1225
1226.. option:: -fdiagnostics-show-note-include-stack, -fno-diagnostics-show-note-include-stack
1227
1228Display include stacks for diagnostic notes
1229
1230.. option:: -fdiagnostics-show-option, -fno-diagnostics-show-option
1231
1232Print option name with mappable diagnostics
1233
1234.. option:: -fdiagnostics-show-template-tree
1235
1236Print a template comparison tree for differing templates
1237
1238.. option:: -fdollars-in-identifiers, -fno-dollars-in-identifiers
1239
1240Allow '$' in identifiers
1241
1242.. option:: -fdwarf-directory-asm, -fno-dwarf-directory-asm
1243
1244.. option:: -felide-constructors, -fno-elide-constructors
1245
1246.. option:: -feliminate-unused-debug-symbols, -fno-eliminate-unused-debug-symbols
1247
1248.. option:: -fembed-bitcode=<option>, -fembed-bitcode (equivalent to -fembed-bitcode=all), -fembed-bitcode-marker (equivalent to -fembed-bitcode=marker)
1249
1250Embed LLVM bitcode (option: off, all, bitcode, marker)
1251
1252.. option:: -femit-all-decls
1253
1254Emit all declarations, even if unused
1255
1256.. option:: -femulated-tls, -fno-emulated-tls
1257
1258Use emutls functions to access thread\_local variables
1259
1260.. option:: -fencoding=<arg>, --encoding <arg>, --encoding=<arg>
1261
1262.. option:: -ferror-limit=<arg>
1263
1264.. option:: -fexceptions, -fno-exceptions
1265
1266Enable support for exception handling
1267
1268.. option:: -fexec-charset=<arg>
1269
1270.. option:: -fextdirs=<arg>, --extdirs <arg>, --extdirs=<arg>
1271
1272.. option:: -ffast-math, -fno-fast-math
1273
1274Allow aggressive, lossy floating-point optimizations
1275
1276.. option:: -ffinite-math-only, -fno-finite-math-only
1277
1278.. option:: -ffor-scope, -fno-for-scope
1279
1280.. option:: -ffp-contract=<arg>
1281
1282Form fused FP ops (e.g. FMAs): fast (everywhere) \| on (according to FP\_CONTRACT pragma, default) \| off (never fuse)
1283
1284.. option:: -ffreestanding
1285
1286Assert that the compilation takes place in a freestanding environment
1287
1288.. option:: -ffunction-sections, -fno-function-sections
1289
1290Place each function in its own section (ELF Only)
1291
1292.. option:: -fgnu-inline-asm, -fno-gnu-inline-asm
1293
1294.. option:: -fgnu-keywords, -fno-gnu-keywords
1295
1296Allow GNU-extension keywords regardless of language standard
1297
1298.. option:: -fgnu-runtime
1299
1300Generate output compatible with the standard GNU Objective-C runtime
1301
1302.. option:: -fgnu89-inline, -fno-gnu89-inline
1303
1304Use the gnu89 inline semantics
1305
1306.. option:: -fhonor-infinities, -fhonor-infinites, -fno-honor-infinities
1307
1308.. option:: -fhonor-nans, -fno-honor-nans
1309
1310.. option:: -fhosted
1311
1312.. option:: -fimplicit-module-maps, -fmodule-maps, -fno-implicit-module-maps
1313
1314Implicitly search the file system for module map files.
1315
1316.. option:: -fimplicit-modules, -fno-implicit-modules
1317
1318.. option:: -finput-charset=<arg>
1319
1320.. option:: -finstrument-functions
1321
1322Generate calls to instrument function entry and exit
1323
1324.. option:: -fintegrated-as, -fno-integrated-as, -integrated-as
1325
1326Enable the integrated assembler
1327
1328.. option:: -fjump-tables, -fno-jump-tables
1329
1330.. option:: -flax-vector-conversions, -fno-lax-vector-conversions
1331
1332.. option:: -flimited-precision=<arg>
1333
1334.. option:: -flto, -fno-lto
1335
1336Enable LTO in 'full' mode
1337
1338.. option:: -flto-jobs=<arg>
1339
1340Controls the backend parallelism of -flto=thin (default of 0 means the number of threads will be derived from the number of CPUs detected)
1341
1342.. program:: clang1
1343.. option:: -flto=<arg>
1344.. program:: clang
1345
1346Set LTO mode to either 'full' or 'thin'
1347
1348.. option:: -fmacro-backtrace-limit=<arg>
1349
1350.. option:: -fmath-errno, -fno-math-errno
1351
1352Require math functions to indicate errors by setting errno
1353
1354.. option:: -fmax-type-align=<arg>
1355
1356Specify the maximum alignment to enforce on pointers lacking an explicit alignment
1357
1358.. option:: -fmerge-all-constants, -fno-merge-all-constants
1359
1360.. option:: -fmessage-length=<arg>
1361
1362.. option:: -fmodule-file-deps, -fno-module-file-deps
1363
1364.. option:: -fmodule-file=<file>
1365
1366Load this precompiled module file
1367
1368.. option:: -fmodule-map-file=<file>
1369
1370Load this module map file
1371
1372.. option:: -fmodule-name=<name>, -fmodule-implementation-of <arg>, -fmodule-name <arg>
1373
1374Specify the name of the module to build
1375
1376.. option:: -fmodules, -fno-modules
1377
1378Enable the 'modules' language feature
1379
1380.. option:: -fmodules-decluse, -fno-modules-decluse
1381
1382Require declaration of modules used within a module
1383
1384.. option:: -fmodules-ignore-macro=<arg>
1385
1386Ignore the definition of the given macro when building and loading modules
1387
1388.. option:: -fmodules-search-all, -fno-modules-search-all
1389
1390Search even non-imported modules to resolve references
1391
1392.. option:: -fmodules-strict-decluse
1393
1394Like -fmodules-decluse but requires all headers to be in modules
1395
1396.. option:: -fmodules-ts
1397
1398Enable support for the C++ Modules TS
1399
1400.. option:: -fms-compatibility, -fno-ms-compatibility
1401
1402Enable full Microsoft Visual C++ compatibility
1403
1404.. option:: -fms-compatibility-version=<arg>
1405
1406Dot-separated value representing the Microsoft compiler version number to report in \_MSC\_VER (0 = don't define it (default))
1407
1408.. option:: -fms-extensions, -fno-ms-extensions
1409
1410Accept some non-standard constructs supported by the Microsoft compiler
1411
1412.. option:: -fms-memptr-rep=<arg>
1413
1414.. option:: -fms-volatile<arg>
1415
1416.. option:: -fmsc-version=<arg>
1417
1418Microsoft compiler version number to report in \_MSC\_VER (0 = don't define it (default))
1419
1420.. option:: -fmudflap
1421
1422.. option:: -fmudflapth
1423
1424.. option:: -fnested-functions
1425
1426.. option:: -fnew-alignment=<align>, -fnew-alignment <arg>
1427
1428Specifies the largest alignment guaranteed by '::operator new(size\_t)'
1429
1430.. option:: -fnext-runtime
1431
1432.. option:: -fno-builtin-<arg>
1433
1434Disable implicit builtin knowledge of a specific function
1435
1436.. option:: -fno-elide-type
1437
1438Do not elide types when printing diagnostics
1439
1440.. option:: -fno-max-type-align
1441
1442.. option:: -fno-operator-names
1443
1444Do not treat C++ operator name keywords as synonyms for operators
1445
1446.. option:: -fno-strict-modules-decluse
1447
1448.. option:: -fno-working-directory
1449
1450.. option:: -fnoopenmp-use-tls
1451
1452.. option:: -fobjc-abi-version=<arg>
1453
1454.. option:: -fobjc-arc, -fno-objc-arc
1455
1456Synthesize retain and release calls for Objective-C pointers
1457
1458.. option:: -fobjc-arc-exceptions, -fno-objc-arc-exceptions
1459
1460Use EH-safe code when synthesizing retains and releases in -fobjc-arc
1461
1462.. option:: -fobjc-exceptions, -fno-objc-exceptions
1463
1464Enable Objective-C exceptions
1465
1466.. option:: -fobjc-infer-related-result-type, -fno-objc-infer-related-result-type
1467
1468.. option:: -fobjc-legacy-dispatch, -fno-objc-legacy-dispatch
1469
1470.. option:: -fobjc-link-runtime
1471
1472.. option:: -fobjc-nonfragile-abi, -fno-objc-nonfragile-abi
1473
1474.. option:: -fobjc-nonfragile-abi-version=<arg>
1475
1476.. option:: -fobjc-runtime=<arg>
1477
1478Specify the target Objective-C runtime kind and version
1479
1480.. option:: -fobjc-sender-dependent-dispatch
1481
1482.. option:: -fobjc-weak, -fno-objc-weak
1483
1484Enable ARC-style weak references in Objective-C
1485
1486.. option:: -fomit-frame-pointer, -fno-omit-frame-pointer
1487
1488.. option:: -fopenmp, -fno-openmp
1489
1490.. option:: -fopenmp-dump-offload-linker-script
1491
1492.. option:: -fopenmp-use-tls
1493
1494.. option:: -fopenmp-version=<arg>
1495
1496.. program:: clang1
1497.. option:: -fopenmp=<arg>
1498.. program:: clang
1499
1500.. option:: -foperator-arrow-depth=<arg>
1501
1502.. option:: -foptimization-record-file=<arg>
1503
1504Specify the file name of any generated YAML optimization record
1505
1506.. option:: -foptimize-sibling-calls, -fno-optimize-sibling-calls
1507
1508.. option:: -foutput-class-dir=<arg>, --output-class-directory <arg>, --output-class-directory=<arg>
1509
1510.. option:: -fpack-struct, -fno-pack-struct
1511
1512.. program:: clang1
1513.. option:: -fpack-struct=<arg>
1514.. program:: clang
1515
1516Specify the default maximum struct packing alignment
1517
1518.. option:: -fpascal-strings, -fno-pascal-strings, -mpascal-strings
1519
1520Recognize and construct Pascal-style string literals
1521
1522.. option:: -fpcc-struct-return
1523
1524Override the default ABI to return all structs on the stack
1525
1526.. option:: -fpch-preprocess
1527
1528.. option:: -fpic, -fno-pic
1529
1530.. option:: -fpie, -fno-pie
1531
1532.. option:: -fplugin=<dsopath>
1533
1534Load the named plugin (dynamic shared object)
1535
1536.. option:: -fpreserve-as-comments, -fno-preserve-as-comments
1537
1538.. option:: -fprofile-arcs, -fno-profile-arcs
1539
1540.. option:: -fprofile-dir=<arg>
1541
1542.. option:: -fprofile-generate, -fno-profile-generate
1543
1544Generate instrumented code to collect execution counts into default.profraw (overridden by LLVM\_PROFILE\_FILE env var)
1545
1546.. program:: clang1
1547.. option:: -fprofile-generate=<directory>
1548.. program:: clang
1549
1550Generate instrumented code to collect execution counts into <directory>/default.profraw (overridden by LLVM\_PROFILE\_FILE env var)
1551
1552.. option:: -fprofile-instr-generate, -fno-profile-instr-generate
1553
1554Generate instrumented code to collect execution counts into default.profraw file (overridden by '=' form of option or LLVM\_PROFILE\_FILE env var)
1555
1556.. program:: clang1
1557.. option:: -fprofile-instr-generate=<file>
1558.. program:: clang
1559
1560Generate instrumented code to collect execution counts into <file> (overridden by LLVM\_PROFILE\_FILE env var)
1561
1562.. option:: -fprofile-instr-use, -fno-profile-instr-use, -fprofile-use
1563
1564.. program:: clang1
1565.. option:: -fprofile-instr-use=<arg>
1566.. program:: clang
1567
1568Use instrumentation data for profile-guided optimization
1569
1570.. option:: -fprofile-sample-use, -fauto-profile, -fno-profile-sample-use
1571
1572.. program:: clang1
1573.. option:: -fprofile-sample-use=<arg>, -fauto-profile=<arg>
1574.. program:: clang
1575
1576Enable sample-based profile guided optimizations
1577
1578.. program:: clang1
1579.. option:: -fprofile-use=<pathname>
1580.. program:: clang
1581
1582Use instrumentation data for profile-guided optimization. If pathname is a directory, it reads from <pathname>/default.profdata. Otherwise, it reads from file <pathname>.
1583
1584.. option:: -freciprocal-math, -fno-reciprocal-math
1585
1586Allow division operations to be reassociated
1587
1588.. option:: -freg-struct-return
1589
1590Override the default ABI to return small structs in registers
1591
1592.. option:: -frelaxed-template-template-args, -fno-relaxed-template-template-args
1593
1594Enable C++17 relaxed template template argument matching
1595
1596.. option:: -freroll-loops, -fno-reroll-loops
1597
1598Turn on loop reroller
1599
1600.. option:: -fretain-comments-from-system-headers
1601
1602.. option:: -frewrite-imports, -fno-rewrite-imports
1603
1604.. option:: -frewrite-includes, -fno-rewrite-includes
1605
1606.. option:: -frewrite-map-file <arg>
1607
1608.. program:: clang1
1609.. option:: -frewrite-map-file=<arg>
1610.. program:: clang
1611
1612.. option:: -fropi, -fno-ropi
1613
1614.. option:: -frtti, -fno-rtti
1615
1616.. option:: -frwpi, -fno-rwpi
1617
1618.. option:: -fsave-optimization-record, -fno-save-optimization-record
1619
1620Generate a YAML optimization record file
1621
1622.. option:: -fshort-enums, -fno-short-enums
1623
1624Allocate to an enum type only as many bytes as it needs for the declared range of possible values
1625
1626.. option:: -fshort-wchar, -fno-short-wchar
1627
1628Force wchar\_t to be a short unsigned int
1629
1630.. option:: -fshow-column, -fno-show-column
1631
1632.. option:: -fshow-overloads=<arg>
1633
1634Which overload candidates to show when overload resolution fails: best\|all; defaults to all
1635
1636.. option:: -fshow-source-location, -fno-show-source-location
1637
1638.. option:: -fsignaling-math, -fno-signaling-math
1639
1640.. option:: -fsigned-bitfields
1641
1642.. option:: -fsigned-char, -fno-signed-char, --signed-char
1643
1644.. option:: -fsigned-zeros, -fno-signed-zeros
1645
1646.. option:: -fsized-deallocation, -fno-sized-deallocation
1647
1648Enable C++14 sized global deallocation functions
1649
1650.. option:: -fsjlj-exceptions
1651
1652Use SjLj style exceptions
1653
1654.. option:: -fslp-vectorize, -fno-slp-vectorize, -ftree-slp-vectorize
1655
1656Enable the superword-level parallelism vectorization passes
1657
1658.. option:: -fspell-checking, -fno-spell-checking
1659
1660.. option:: -fspell-checking-limit=<arg>
1661
1662.. option:: -fsplit-dwarf-inlining, -fno-split-dwarf-inlining
1663
1664Place debug types in their own section (ELF Only)
1665
1666.. option:: -fsplit-stack
1667
1668.. option:: -fstack-protector, -fno-stack-protector
1669
1670Enable stack protectors for functions potentially vulnerable to stack smashing
1671
1672.. option:: -fstack-protector-all
1673
1674Force the usage of stack protectors for all functions
1675
1676.. option:: -fstack-protector-strong
1677
1678Use a strong heuristic to apply stack protectors to functions
1679
1680.. option:: -fstandalone-debug, -fno-limit-debug-info, -fno-standalone-debug
1681
1682Emit full debug info for all types used by the program
1683
1684.. option:: -fstrict-aliasing, -fno-strict-aliasing
1685
1686.. option:: -fstrict-enums, -fno-strict-enums
1687
1688Enable optimizations based on the strict definition of an enum's value range
1689
1690.. option:: -fstrict-overflow, -fno-strict-overflow
1691
1692.. option:: -fstrict-return, -fno-strict-return
1693
1694Always treat control flow paths that fall off the end of a non-void function as unreachable
1695
1696.. option:: -fstrict-vtable-pointers, -fno-strict-vtable-pointers
1697
1698Enable optimizations based on the strict rules for overwriting polymorphic C++ objects
1699
1700.. option:: -fstruct-path-tbaa, -fno-struct-path-tbaa
1701
1702.. option:: -ftabstop=<arg>
1703
1704.. option:: -ftemplate-backtrace-limit=<arg>
1705
1706.. option:: -ftemplate-depth-<arg>
1707
1708.. option:: -ftemplate-depth=<arg>
1709
1710.. option:: -ftest-coverage
1711
1712.. option:: -fthinlto-index=<arg>
1713
1714Perform ThinLTO importing using provided function summary index
1715
1716.. option:: -fthreadsafe-statics, -fno-threadsafe-statics
1717
1718.. option:: -ftime-report
1719
1720.. option:: -ftls-model=<arg>
1721
1722.. option:: -ftrap-function=<arg>
1723
1724Issue call to specified function rather than a trap instruction
1725
1726.. option:: -ftrapping-math, -fno-trapping-math
1727
1728.. option:: -ftrapv
1729
1730Trap on integer overflow
1731
1732.. option:: -ftrapv-handler <arg>
1733
1734.. program:: clang1
1735.. option:: -ftrapv-handler=<function name>
1736.. program:: clang
1737
1738Specify the function to be called on overflow
1739
1740.. option:: -ftrigraphs, -fno-trigraphs, -trigraphs, --trigraphs
1741
1742Process trigraph sequences
1743
1744.. option:: -funique-section-names, -fno-unique-section-names
1745
1746Use unique names for text and data sections (ELF Only)
1747
1748.. option:: -funit-at-a-time, -fno-unit-at-a-time
1749
1750.. option:: -funroll-loops, -fno-unroll-loops
1751
1752Turn on loop unroller
1753
1754.. option:: -funsafe-math-optimizations, -fno-unsafe-math-optimizations
1755
1756.. option:: -funsigned-bitfields
1757
1758.. option:: -funsigned-char, -fno-unsigned-char, --unsigned-char
1759
1760.. option:: -funwind-tables, -fno-unwind-tables
1761
1762.. option:: -fuse-cxa-atexit, -fno-use-cxa-atexit
1763
1764.. option:: -fuse-init-array, -fno-use-init-array
1765
1766Use .init\_array instead of .ctors
1767
1768.. option:: -fuse-ld=<arg>
1769
1770.. option:: -fuse-line-directives, -fno-use-line-directives
1771
1772.. option:: -fveclib=<arg>
1773
1774Use the given vector functions library
1775
1776.. option:: -fvectorize, -fno-vectorize, -ftree-vectorize
1777
1778Enable the loop vectorization passes
1779
1780.. option:: -fverbose-asm, -fno-verbose-asm
1781
1782.. option:: -fvisibility-inlines-hidden
1783
1784Give inline C++ member functions default visibility by default
1785
1786.. option:: -fvisibility-ms-compat
1787
1788Give global types 'default' visibility and global functions and variables 'hidden' visibility by default
1789
1790.. option:: -fvisibility=<arg>
1791
1792Set the default symbol visibility for all global declarations
1793
1794.. option:: -fwhole-program-vtables, -fno-whole-program-vtables
1795
1796Enables whole-program vtable optimization. Requires -flto
1797
1798.. option:: -fwrapv, -fno-wrapv
1799
1800Treat signed integer overflow as two's complement
1801
1802.. option:: -fwritable-strings
1803
1804Store string literals as writable data
1805
1806.. option:: -fxray-always-instrument=<arg>
1807
1808Filename defining the whitelist for imbuing the 'always instrument' XRay attribute.
1809
1810.. option:: -fxray-instruction-threshold<arg>
1811
1812.. program:: clang1
1813.. option:: -fxray-instruction-threshold=<arg>
1814.. program:: clang
1815
1816Sets the minimum function size to instrument with XRay
1817
1818.. option:: -fxray-instrument, -fno-xray-instrument
1819
1820Generate XRay instrumentation sleds on function entry and exit
1821
1822.. option:: -fxray-never-instrument=<arg>
1823
1824Filename defining the whitelist for imbuing the 'never instrument' XRay attribute.
1825
1826.. option:: -fzero-initialized-in-bss, -fno-zero-initialized-in-bss
1827
1828.. option:: -fzvector, -fno-zvector, -mzvector
1829
1830Enable System z vector language extension
1831
1832.. option:: -pedantic, --pedantic, -no-pedantic, --no-pedantic
1833
1834.. option:: -pedantic-errors, --pedantic-errors
1835
1836OpenCL flags
1837------------
1838.. option:: -cl-denorms-are-zero
1839
1840OpenCL only. Allow denormals to be flushed to zero.
1841
1842.. option:: -cl-fast-relaxed-math
1843
1844OpenCL only. Sets -cl-finite-math-only and -cl-unsafe-math-optimizations, and defines \_\_FAST\_RELAXED\_MATH\_\_.
1845
1846.. option:: -cl-finite-math-only
1847
1848OpenCL only. Allow floating-point optimizations that assume arguments and results are not NaNs or +-Inf.
1849
1850.. option:: -cl-fp32-correctly-rounded-divide-sqrt
1851
1852OpenCL only. Specify that single precision floating-point divide and sqrt used in the program source are correctly rounded.
1853
1854.. option:: -cl-kernel-arg-info
1855
1856OpenCL only. Generate kernel argument metadata.
1857
1858.. option:: -cl-mad-enable
1859
1860OpenCL only. Allow use of less precise MAD computations in the generated binary.
1861
1862.. option:: -cl-no-signed-zeros
1863
1864OpenCL only. Allow use of less precise no signed zeros computations in the generated binary.
1865
1866.. option:: -cl-opt-disable
1867
1868OpenCL only. This option disables all optimizations. By default optimizations are enabled.
1869
1870.. option:: -cl-single-precision-constant
1871
1872OpenCL only. Treat double precision floating-point constant as single precision constant.
1873
1874.. option:: -cl-std=<arg>
1875
1876OpenCL language standard to compile for.
1877
1878.. option:: -cl-strict-aliasing
1879
1880OpenCL only. This option is added for compatibility with OpenCL 1.0.
1881
1882.. option:: -cl-unsafe-math-optimizations
1883
1884OpenCL only. Allow unsafe floating-point optimizations.  Also implies -cl-no-signed-zeros and -cl-mad-enable.
1885
1886Target-dependent compilation options
1887~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1888.. option:: -G<size>, -G=<arg>, -msmall-data-threshold=<arg>
1889
1890Put objects of at most <size> bytes into small data section (MIPS / Hexagon)
1891
1892.. option:: -m16
1893
1894.. option:: -m32
1895
1896.. option:: -m64
1897
1898.. option:: -mabi=<arg>
1899
1900.. option:: -mabicalls, -mno-abicalls
1901
1902Enable SVR4-style position-independent code (Mips only)
1903
1904.. option:: -malign-double
1905
1906Align doubles to two words in structs (x86 only)
1907
1908.. option:: -march=<arg>
1909
1910.. option:: -masm=<arg>
1911
1912.. option:: -mbackchain, -mno-backchain
1913
1914Link stack frames through backchain on System Z
1915
1916.. option:: -mcheck-zero-division, -mno-check-zero-division
1917
1918.. option:: -mcmodel=<arg>
1919
1920.. option:: -mcompact-branches=<arg>
1921
1922.. option:: -mconsole<arg>
1923
1924.. option:: -mcpu=<arg>, -mv4 (equivalent to -mcpu=hexagonv4), -mv5 (equivalent to -mcpu=hexagonv5), -mv55 (equivalent to -mcpu=hexagonv55), -mv60 (equivalent to -mcpu=hexagonv60), -mv62 (equivalent to -mcpu=hexagonv62)
1925
1926.. option:: -mdefault-build-attributes<arg>, -mno-default-build-attributes<arg>
1927
1928.. option:: -mdll<arg>
1929
1930.. option:: -mdouble-float
1931
1932.. option:: -mdsp, -mno-dsp
1933
1934.. option:: -mdspr2, -mno-dspr2
1935
1936.. option:: -mdynamic-no-pic<arg>
1937
1938.. option:: -meabi <arg>
1939
1940Set EABI type, e.g. 4, 5 or gnu (default depends on triple)
1941
1942.. option:: -mfentry
1943
1944Insert calls to fentry at function entry (x86 only)
1945
1946.. option:: -mfloat-abi=<arg>
1947
1948.. option:: -mfp32
1949
1950Use 32-bit floating point registers (MIPS only)
1951
1952.. option:: -mfp64
1953
1954Use 64-bit floating point registers (MIPS only)
1955
1956.. option:: -mfpmath=<arg>
1957
1958.. option:: -mfpu=<arg>
1959
1960.. option:: -mglobal-merge, -mno-global-merge
1961
1962Enable merging of globals
1963
1964.. option:: -mgpopt, -mno-gpopt
1965
1966Use GP relative accesses for symbols known to be in a small data section (MIPS)
1967
1968.. option:: -mhard-float
1969
1970.. option:: -mhwdiv=<arg>, --mhwdiv <arg>, --mhwdiv=<arg>
1971
1972.. option:: -miamcu, -mno-iamcu
1973
1974Use Intel MCU ABI
1975
1976.. option:: -mimplicit-float, -mno-implicit-float
1977
1978.. option:: -mimplicit-it=<arg>
1979
1980.. option:: -mincremental-linker-compatible, -mno-incremental-linker-compatible
1981
1982(integrated-as) Emit an object file which can be used with an incremental linker
1983
1984.. option:: -miphoneos-version-min=<arg>, -mios-version-min=<arg>
1985
1986.. option:: -mips16
1987
1988.. option:: -mkernel
1989
1990.. option:: -mldc1-sdc1, -mno-ldc1-sdc1
1991
1992.. option:: -mlong-calls, -mno-long-calls
1993
1994Generate branches with extended addressability, usually via indirect jumps.
1995
1996.. option:: -mmacosx-version-min=<arg>, -mmacos-version-min=<arg>
1997
1998Set Mac OS X deployment target
1999
2000.. option:: -mmadd4, -mno-madd4
2001
2002Enable the generation of 4-operand madd.s, madd.d and related instructions.
2003
2004.. option:: -mmcu=<arg>
2005
2006.. option:: -mmicromips, -mno-micromips
2007
2008.. option:: -mms-bitfields, -mno-ms-bitfields
2009
2010Set the default structure layout to be compatible with the Microsoft compiler standard
2011
2012.. option:: -mmsa, -mno-msa
2013
2014Enable MSA ASE (MIPS only)
2015
2016.. option:: -mmt, -mno-mt
2017
2018Enable MT ASE (MIPS only)
2019
2020.. option:: -mnan=<arg>
2021
2022.. option:: -mno-mips16
2023
2024.. option:: -momit-leaf-frame-pointer, -mno-omit-leaf-frame-pointer
2025
2026Omit frame pointer setup for leaf functions
2027
2028.. option:: -moslib=<arg>
2029
2030.. option:: -mpie-copy-relocations, -mno-pie-copy-relocations
2031
2032Use copy relocations support for PIE builds
2033
2034.. option:: -mqdsp6-compat
2035
2036Enable hexagon-qdsp6 backward compatibility
2037
2038.. option:: -mrecip
2039
2040.. program:: clang1
2041.. option:: -mrecip=<arg1>,<arg2>...
2042.. program:: clang
2043
2044.. option:: -mred-zone, -mno-red-zone
2045
2046.. option:: -mregparm=<arg>
2047
2048.. option:: -mrelax-all, -mno-relax-all
2049
2050(integrated-as) Relax all machine instructions
2051
2052.. option:: -mrtd, -mno-rtd
2053
2054Make StdCall calling convention the default
2055
2056.. option:: -msingle-float
2057
2058.. option:: -msoft-float, -mno-soft-float
2059
2060Use software floating point
2061
2062.. option:: -mstack-alignment=<arg>
2063
2064Set the stack alignment
2065
2066.. option:: -mstack-probe-size=<arg>
2067
2068Set the stack probe size
2069
2070.. option:: -mstackrealign, -mno-stackrealign
2071
2072Force realign the stack at entry to every function
2073
2074.. option:: -mthread-model <arg>
2075
2076The thread model to use, e.g. posix, single (posix by default)
2077
2078.. option:: -mthreads<arg>
2079
2080.. option:: -mthumb, -mno-thumb
2081
2082.. option:: -mtune=<arg>
2083
2084.. option:: -mtvos-version-min=<arg>, -mappletvos-version-min=<arg>
2085
2086.. option:: -municode<arg>
2087
2088.. option:: -mvx, -mno-vx
2089
2090.. option:: -mwarn-nonportable-cfstrings, -mno-warn-nonportable-cfstrings
2091
2092.. option:: -mwatchos-version-min=<arg>
2093
2094.. option:: -mwindows<arg>
2095
2096.. option:: -mx32
2097
2098.. option:: -mxgot, -mno-xgot
2099
2100AARCH64
2101-------
2102.. option:: -ffixed-x18
2103
2104Reserve the x18 register (AArch64 only)
2105
2106.. option:: -mfix-cortex-a53-835769, -mno-fix-cortex-a53-835769
2107
2108Workaround Cortex-A53 erratum 835769 (AArch64 only)
2109
2110.. option:: -mgeneral-regs-only
2111
2112Generate code which only uses the general purpose registers (AArch64 only)
2113
2114AMDGPU
2115------
2116ARM
2117---
2118.. option:: -ffixed-r9
2119
2120Reserve the r9 register (ARM only)
2121
2122.. option:: -mcrc
2123
2124Allow use of CRC instructions (ARM only)
2125
2126.. option:: -mexecute-only, -mno-execute-only, -mpure-code
2127
2128Disallow generation of data access to code sections (ARM only)
2129
2130.. option:: -mno-movt
2131
2132Disallow use of movt/movw pairs (ARM only)
2133
2134.. option:: -mno-neg-immediates
2135
2136Disallow converting instructions with negative immediates to their negation or inversion.
2137
2138.. option:: -mnocrc
2139
2140Disallow use of CRC instructions (ARM only)
2141
2142.. option:: -mrestrict-it, -mno-restrict-it
2143
2144Disallow generation of deprecated IT blocks for ARMv8. It is on by default for ARMv8 Thumb mode.
2145
2146.. option:: -munaligned-access, -mno-unaligned-access
2147
2148Allow memory accesses to be unaligned (AArch32/AArch64 only)
2149
2150Hexagon
2151-------
2152.. option:: -mhvx, -mno-hvx
2153
2154Enable Hexagon Vector eXtensions
2155
2156.. option:: -mhvx-double, -mno-hvx-double
2157
2158Enable Hexagon Double Vector eXtensions
2159
2160.. option:: -mieee-rnd-near
2161
2162PowerPC
2163-------
2164.. option:: -maltivec, -mno-altivec
2165
2166.. option:: -mcmpb, -mno-cmpb
2167
2168.. option:: -mcrbits, -mno-crbits
2169
2170.. option:: -mcrypto, -mno-crypto
2171
2172.. option:: -mdirect-move, -mno-direct-move
2173
2174.. option:: -mfloat128, -mno-float128
2175
2176.. option:: -mfprnd, -mno-fprnd
2177
2178.. option:: -mhtm, -mno-htm
2179
2180.. option:: -minvariant-function-descriptors, -mno-invariant-function-descriptors
2181
2182.. option:: -misel, -mno-isel
2183
2184.. option:: -mlongcall, -mno-longcall
2185
2186.. option:: -mmfocrf, -mmfcrf, -mno-mfocrf
2187
2188.. option:: -mpopcntd, -mno-popcntd
2189
2190.. option:: -mpower8-vector, -mno-power8-vector
2191
2192.. option:: -mpower9-vector, -mno-power9-vector
2193
2194.. option:: -mqpx, -mno-qpx
2195
2196.. option:: -mvsx, -mno-vsx
2197
2198WebAssembly
2199-----------
2200.. option:: -msimd128, -mno-simd128
2201
2202X86
2203---
2204.. option:: -m3dnow, -mno-3dnow
2205
2206.. option:: -m3dnowa, -mno-3dnowa
2207
2208.. option:: -madx, -mno-adx
2209
2210.. option:: -maes, -mno-aes
2211
2212.. option:: -mavx, -mno-avx
2213
2214.. option:: -mavx2, -mno-avx2
2215
2216.. option:: -mavx512bw, -mno-avx512bw
2217
2218.. option:: -mavx512cd, -mno-avx512cd
2219
2220.. option:: -mavx512dq, -mno-avx512dq
2221
2222.. option:: -mavx512er, -mno-avx512er
2223
2224.. option:: -mavx512f, -mno-avx512f
2225
2226.. option:: -mavx512ifma, -mno-avx512ifma
2227
2228.. option:: -mavx512pf, -mno-avx512pf
2229
2230.. option:: -mavx512vbmi, -mno-avx512vbmi
2231
2232.. option:: -mavx512vl, -mno-avx512vl
2233
2234.. option:: -mavx512vpopcntdq, -mno-avx512vpopcntdq
2235
2236.. option:: -mbmi, -mno-bmi
2237
2238.. option:: -mbmi2, -mno-bmi2
2239
2240.. option:: -mclflushopt, -mno-clflushopt
2241
2242.. option:: -mclwb, -mno-clwb
2243
2244.. option:: -mclzero, -mno-clzero
2245
2246.. option:: -mcx16, -mno-cx16
2247
2248.. option:: -mf16c, -mno-f16c
2249
2250.. option:: -mfma, -mno-fma
2251
2252.. option:: -mfma4, -mno-fma4
2253
2254.. option:: -mfsgsbase, -mno-fsgsbase
2255
2256.. option:: -mfxsr, -mno-fxsr
2257
2258.. option:: -mlwp, -mno-lwp
2259
2260.. option:: -mlzcnt, -mno-lzcnt
2261
2262.. option:: -mmmx, -mno-mmx
2263
2264.. option:: -mmovbe, -mno-movbe
2265
2266.. option:: -mmpx, -mno-mpx
2267
2268.. option:: -mmwaitx, -mno-mwaitx
2269
2270.. option:: -mpclmul, -mno-pclmul
2271
2272.. option:: -mpku, -mno-pku
2273
2274.. option:: -mpopcnt, -mno-popcnt
2275
2276.. option:: -mprefetchwt1, -mno-prefetchwt1
2277
2278.. option:: -mprfchw, -mno-prfchw
2279
2280.. option:: -mrdrnd, -mno-rdrnd
2281
2282.. option:: -mrdseed, -mno-rdseed
2283
2284.. option:: -mrtm, -mno-rtm
2285
2286.. option:: -msgx, -mno-sgx
2287
2288.. option:: -msha, -mno-sha
2289
2290.. option:: -msse, -mno-sse
2291
2292.. option:: -msse2, -mno-sse2
2293
2294.. option:: -msse3, -mno-sse3
2295
2296.. option:: -msse4.1, -mno-sse4.1
2297
2298.. program:: clang1
2299.. option:: -msse4.2, -mno-sse4.2, -msse4
2300.. program:: clang
2301
2302.. option:: -msse4a, -mno-sse4a
2303
2304.. option:: -mssse3, -mno-ssse3
2305
2306.. option:: -mtbm, -mno-tbm
2307
2308.. option:: -mx87, -m80387, -mno-x87
2309
2310.. option:: -mxop, -mno-xop
2311
2312.. option:: -mxsave, -mno-xsave
2313
2314.. option:: -mxsavec, -mno-xsavec
2315
2316.. option:: -mxsaveopt, -mno-xsaveopt
2317
2318.. option:: -mxsaves, -mno-xsaves
2319
2320Optimization level
2321~~~~~~~~~~~~~~~~~~
2322
2323Flags controlling how much optimization should be performed.
2324
2325.. option:: -O<arg>, -O (equivalent to -O2), --optimize, --optimize=<arg>
2326
2327.. option:: -Ofast<arg>
2328
2329Debug information generation
2330~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2331
2332Flags controlling how much and what kind of debug information should be
2333generated.
2334
2335Kind and level of debug information
2336-----------------------------------
2337.. option:: -g, --debug, --debug=<arg>
2338
2339Generate source-level debug information
2340
2341.. option:: -gdwarf-2
2342
2343Generate source-level debug information with dwarf version 2
2344
2345.. option:: -gdwarf-3
2346
2347Generate source-level debug information with dwarf version 3
2348
2349.. option:: -gdwarf-4, -gdwarf
2350
2351Generate source-level debug information with dwarf version 4
2352
2353.. option:: -gdwarf-5
2354
2355Generate source-level debug information with dwarf version 5
2356
2357.. option:: -gfull
2358
2359.. option:: -gused
2360
2361Debug level
2362___________
2363.. option:: -g0
2364
2365.. option:: -g2
2366
2367.. option:: -g3
2368
2369.. option:: -ggdb0
2370
2371.. option:: -ggdb1
2372
2373.. option:: -ggdb2
2374
2375.. option:: -ggdb3
2376
2377.. option:: -gline-tables-only, -g1, -gmlt
2378
2379Emit debug line number tables only
2380
2381.. option:: -gmodules
2382
2383Generate debug info with external references to clang modules or precompiled headers
2384
2385Debugger to tune debug information for
2386______________________________________
2387.. option:: -ggdb
2388
2389.. option:: -glldb
2390
2391.. option:: -gsce
2392
2393Debug information flags
2394-----------------------
2395.. option:: -gcolumn-info, -gno-column-info
2396
2397.. option:: -gdwarf-aranges
2398
2399.. option:: -ggnu-pubnames
2400
2401.. option:: -grecord-gcc-switches, -gno-record-gcc-switches
2402
2403.. option:: -gsplit-dwarf
2404
2405.. option:: -gstrict-dwarf, -gno-strict-dwarf
2406
2407.. option:: -gz
2408
2409DWARF debug sections compression type
2410
2411.. program:: clang1
2412.. option:: -gz=<arg>
2413.. program:: clang
2414
2415DWARF debug sections compression type
2416
2417Static analyzer flags
2418=====================
2419
2420Flags controlling the behavior of the Clang Static Analyzer.
2421
2422.. option:: -Xanalyzer <arg>
2423
2424Pass <arg> to the static analyzer
2425
2426Fortran compilation flags
2427=========================
2428
2429Flags that will be passed onto the ``gfortran`` compiler when Clang is given
2430a Fortran input.
2431
2432.. option:: -A<arg>, --assert <arg>, --assert=<arg>
2433
2434.. option:: -A-<arg>
2435
2436.. option:: -J<arg>
2437
2438.. option:: -cpp
2439
2440.. option:: -faggressive-function-elimination, -fno-aggressive-function-elimination
2441
2442.. option:: -falign-commons, -fno-align-commons
2443
2444.. option:: -fall-intrinsics, -fno-all-intrinsics
2445
2446.. option:: -fautomatic, -fno-automatic
2447
2448.. option:: -fbackslash, -fno-backslash
2449
2450.. option:: -fbacktrace, -fno-backtrace
2451
2452.. option:: -fblas-matmul-limit=<arg>
2453
2454.. option:: -fbounds-check, -fno-bounds-check
2455
2456.. option:: -fcheck-array-temporaries, -fno-check-array-temporaries
2457
2458.. option:: -fcheck=<arg>
2459
2460.. option:: -fcoarray=<arg>
2461
2462.. option:: -fconvert=<arg>
2463
2464.. option:: -fcray-pointer, -fno-cray-pointer
2465
2466.. option:: -fd-lines-as-code, -fno-d-lines-as-code
2467
2468.. option:: -fd-lines-as-comments, -fno-d-lines-as-comments
2469
2470.. option:: -fdefault-double-8, -fno-default-double-8
2471
2472.. option:: -fdefault-integer-8, -fno-default-integer-8
2473
2474.. option:: -fdefault-real-8, -fno-default-real-8
2475
2476.. option:: -fdollar-ok, -fno-dollar-ok
2477
2478.. option:: -fdump-fortran-optimized, -fno-dump-fortran-optimized
2479
2480.. option:: -fdump-fortran-original, -fno-dump-fortran-original
2481
2482.. option:: -fdump-parse-tree, -fno-dump-parse-tree
2483
2484.. option:: -fexternal-blas, -fno-external-blas
2485
2486.. option:: -ff2c, -fno-f2c
2487
2488.. option:: -ffixed-form, -fno-fixed-form
2489
2490.. option:: -ffixed-line-length-<arg>
2491
2492.. option:: -ffpe-trap=<arg>
2493
2494.. option:: -ffree-form, -fno-free-form
2495
2496.. option:: -ffree-line-length-<arg>
2497
2498.. option:: -ffrontend-optimize, -fno-frontend-optimize
2499
2500.. option:: -fimplicit-none, -fno-implicit-none
2501
2502.. option:: -finit-character=<arg>
2503
2504.. option:: -finit-integer=<arg>
2505
2506.. option:: -finit-local-zero, -fno-init-local-zero
2507
2508.. option:: -finit-logical=<arg>
2509
2510.. option:: -finit-real=<arg>
2511
2512.. option:: -finteger-4-integer-8, -fno-integer-4-integer-8
2513
2514.. option:: -fintrinsic-modules-path, -fno-intrinsic-modules-path
2515
2516.. option:: -fmax-array-constructor=<arg>
2517
2518.. option:: -fmax-errors=<arg>
2519
2520.. option:: -fmax-identifier-length, -fno-max-identifier-length
2521
2522.. option:: -fmax-stack-var-size=<arg>
2523
2524.. option:: -fmax-subrecord-length=<arg>
2525
2526.. option:: -fmodule-private, -fno-module-private
2527
2528.. option:: -fpack-derived, -fno-pack-derived
2529
2530.. option:: -fprotect-parens, -fno-protect-parens
2531
2532.. option:: -frange-check, -fno-range-check
2533
2534.. option:: -freal-4-real-10, -fno-real-4-real-10
2535
2536.. option:: -freal-4-real-16, -fno-real-4-real-16
2537
2538.. option:: -freal-4-real-8, -fno-real-4-real-8
2539
2540.. option:: -freal-8-real-10, -fno-real-8-real-10
2541
2542.. option:: -freal-8-real-16, -fno-real-8-real-16
2543
2544.. option:: -freal-8-real-4, -fno-real-8-real-4
2545
2546.. option:: -frealloc-lhs, -fno-realloc-lhs
2547
2548.. option:: -frecord-marker=<arg>
2549
2550.. option:: -frecursive, -fno-recursive
2551
2552.. option:: -frepack-arrays, -fno-repack-arrays
2553
2554.. option:: -fsecond-underscore, -fno-second-underscore
2555
2556.. option:: -fsign-zero, -fno-sign-zero
2557
2558.. option:: -fstack-arrays, -fno-stack-arrays
2559
2560.. option:: -funderscoring, -fno-underscoring
2561
2562.. option:: -fwhole-file, -fno-whole-file
2563
2564.. option:: -nocpp
2565
2566.. option:: -static-libgfortran
2567
2568Linker flags
2569============
2570Flags that are passed on to the linker
2571
2572.. option:: -L<dir>, --library-directory <arg>, --library-directory=<arg>
2573
2574Add directory to library search path
2575
2576.. option:: -Mach
2577
2578.. option:: -T<script>
2579
2580Specify <script> as linker script
2581
2582.. option:: -Tbss<addr>
2583
2584Set starting address of BSS to <addr>
2585
2586.. option:: -Tdata<addr>
2587
2588Set starting address of BSS to <addr>
2589
2590.. option:: -Ttext<addr>
2591
2592Set starting address of BSS to <addr>
2593
2594.. option:: -Wl,<arg>,<arg2>...
2595
2596Pass the comma separated arguments in <arg> to the linker
2597
2598.. option:: -X
2599
2600.. option:: -Xlinker <arg>, --for-linker <arg>, --for-linker=<arg>
2601
2602Pass <arg> to the linker
2603
2604.. program:: clang1
2605.. option:: -Z
2606.. program:: clang
2607
2608.. option:: -e<arg>, --entry
2609
2610.. option:: -filelist <arg>
2611
2612.. option:: -l<arg>
2613
2614.. option:: -r
2615
2616.. option:: -rpath <arg>
2617
2618.. option:: -s
2619
2620.. option:: -t
2621
2622.. option:: -u<arg>, --force-link <arg>, --force-link=<arg>
2623
2624.. option:: -undef
2625
2626undef all system defines
2627
2628.. option:: -undefined<arg>, --no-undefined
2629
2630.. option:: -z <arg>
2631
2632Pass -z <arg> to the linker
2633
2634