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<prefix>, --prefix <arg>, --prefix=<arg> 22 23Search $prefix$file for executables, libraries, and data files. If $prefix is a directory, search $prefix/$file 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.. program:: clang1 60.. option:: -Xarch\_device <arg> 61.. program:: clang 62 63Pass <arg> to the CUDA/HIP device compilation 64 65.. program:: clang2 66.. option:: -Xarch\_host <arg> 67.. program:: clang 68 69Pass <arg> to the CUDA/HIP host compilation 70 71.. option:: -Xcuda-fatbinary <arg> 72 73Pass <arg> to fatbinary invocation 74 75.. option:: -Xcuda-ptxas <arg> 76 77Pass <arg> to the ptxas assembler 78 79.. option:: -Z<arg> 80 81.. option:: -a<arg>, --profile-blocks 82 83.. option:: -all\_load 84 85.. option:: -allowable\_client <arg> 86 87.. option:: --analyze 88 89Run the static analyzer 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\|sarif\|sarif-html\|text). 96 97.. option:: -arch <arg> 98 99.. program:: clang1 100.. option:: -arch\_errors\_fatal 101.. program:: clang 102 103.. program:: clang2 104.. option:: -arch\_only <arg> 105.. program:: clang 106 107.. option:: -arcmt-migrate-emit-errors 108 109Emit ARC errors even if the migrator can fix them 110 111.. option:: -arcmt-migrate-report-output <arg> 112 113Output path for the plist report 114 115.. option:: --autocomplete=<arg> 116 117.. option:: -bind\_at\_load 118 119.. option:: -bundle 120 121.. program:: clang1 122.. option:: -bundle\_loader <arg> 123.. program:: clang 124 125.. option:: -client\_name<arg> 126 127.. option:: -compatibility\_version<arg> 128 129.. option:: --config <arg> 130 131Specifies configuration file 132 133.. option:: --constant-cfstrings 134 135.. option:: --cuda-feature=<arg> 136 137Manually specify the CUDA feature to use 138 139.. option:: --cuda-include-ptx=<arg>, --no-cuda-include-ptx=<arg> 140 141Include PTX for the following GPU architecture (e.g. sm\_35) or 'all'. May be specified more than once. 142 143.. option:: --cuda-noopt-device-debug, --no-cuda-noopt-device-debug 144 145Enable device-side debug info generation. Disables ptxas optimizations. 146 147.. option:: -cuid=<arg> 148 149An ID for compilation unit, which should be the same for the same compilation unit but different for different compilation units. It is used to externalize device-side static variables for single source offloading languages CUDA and HIP so that they can be accessed by the host code of the same compilation unit. 150 151.. option:: -current\_version<arg> 152 153.. option:: -darwin-target-variant <arg> 154 155Generate code for an additional runtime variant of the deployment target 156 157.. option:: -darwin-target-variant-triple <arg> 158 159Specify the darwin target variant triple 160 161.. option:: -dead\_strip 162 163.. option:: -dependency-dot <arg> 164 165Filename to write DOT-formatted header dependencies to 166 167.. option:: -dependency-file <arg> 168 169Filename (or -) to write dependency output to 170 171.. option:: -dsym-dir<dir> 172 173Directory to output dSYM's (if any) to 174 175.. option:: -dumpmachine 176 177.. option:: -dumpversion 178 179.. option:: --dyld-prefix=<arg>, --dyld-prefix <arg> 180 181.. option:: -dylib\_file <arg> 182 183.. option:: -dylinker 184 185.. program:: clang1 186.. option:: -dylinker\_install\_name<arg> 187.. program:: clang 188 189.. option:: -dynamic 190 191.. option:: -dynamiclib 192 193.. option:: -emit-ast 194 195Emit Clang AST files for source inputs 196 197.. option:: --emit-static-lib 198 199Enable linker job to emit a static library. 200 201.. option:: -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang 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:: --end-no-unused-arguments 206 207Start emitting warnings for unused driver arguments 208 209.. option:: -exported\_symbols\_list <arg> 210 211.. option:: -faligned-new=<arg> 212 213.. option:: -fautomatic 214 215.. option:: -ffixed-r19 216 217Reserve register r19 (Hexagon only) 218 219.. option:: -fgpu-default-stream=<arg> 220 221Specify default stream. The default value is 'legacy'. (HIP only). <arg> must be 'legacy' or 'per-thread'. 222 223.. option:: -fgpu-flush-denormals-to-zero, -fcuda-flush-denormals-to-zero, -fno-gpu-flush-denormals-to-zero 224 225Flush denormal floating point values to zero in CUDA/HIP device mode. 226 227.. option:: -fheinous-gnu-extensions 228 229.. option:: -flat\_namespace 230 231.. option:: -fopenmp-targets=<arg1>,<arg2>... 232 233Specify comma-separated list of triples OpenMP offloading targets to be supported 234 235.. option:: -force\_cpusubtype\_ALL 236 237.. program:: clang1 238.. option:: -force\_flat\_namespace 239.. program:: clang 240 241.. program:: clang2 242.. option:: -force\_load <arg> 243.. program:: clang 244 245.. option:: -fplugin-arg-<name>-<arg> 246 247Pass <arg> to plugin <name> 248 249.. option:: -framework <arg> 250 251.. option:: -frtlib-add-rpath, -fno-rtlib-add-rpath 252 253Add -rpath with architecture-specific resource directory to the linker flags 254 255.. option:: -fsanitize-system-ignorelist=<arg>, -fsanitize-system-blacklist=<arg> 256 257Path to system ignorelist file for sanitizers 258 259.. option:: -fshow-skipped-includes 260 261#include files may be "skipped" due to include guard optimization 262 or #pragma once. This flag makes -H show also such includes. 263 264.. option:: -fsystem-module 265 266Build this module as a system module. Only used with -emit-module 267 268.. option:: -fuse-cuid=<arg> 269 270Method to generate ID's for compilation units for single source offloading languages CUDA and HIP: 'hash' (ID's generated by hashing file path and command line options) \| 'random' (ID's generated as random numbers) \| 'none' (disabled). Default is 'hash'. This option will be overridden by option '-cuid=\[ID\]' if it is specified. 271 272.. option:: --gcc-toolchain=<arg> 273 274Search for GCC installation in the specified directory on targets which commonly use GCC. The directory usually contains 'lib{,32,64}/gcc{,-cross}/$triple' and 'include'. If specified, sysroot is skipped for GCC detection. Note: executables (e.g. ld) used by the compiler are not overridden by the selected GCC installation 275 276.. option:: -gcodeview 277 278Generate CodeView debug information 279 280.. option:: -gcodeview-ghash, -gno-codeview-ghash 281 282Emit type record hashes in a .debug$H section 283 284.. option:: --gpu-instrument-lib=<arg> 285 286Instrument device library for HIP, which is a LLVM bitcode containing \_\_cyg\_profile\_func\_enter and \_\_cyg\_profile\_func\_exit 287 288.. option:: --gpu-max-threads-per-block=<arg> 289 290Default max threads per block for kernel launch bounds for HIP 291 292.. option:: -headerpad\_max\_install\_names<arg> 293 294.. option:: -help, --help, /help<arg>, -help<arg>, --help<arg> 295 296Display available options 297 298.. option:: --help-hidden 299 300Display help for hidden options 301 302.. option:: --hip-link 303 304Link clang-offload-bundler bundles for HIP 305 306.. option:: --hip-version=<arg> 307 308HIP version in the format of major.minor.patch 309 310.. option:: -ibuiltininc 311 312Enable builtin #include directories even when -nostdinc is used before or after -ibuiltininc. Using -nobuiltininc after the option disables it 313 314.. option:: -image\_base <arg> 315 316.. option:: -index-header-map 317 318Make the next included directory (-I or -F) an indexer header map 319 320.. option:: -init <arg> 321 322.. option:: -install\_name <arg> 323 324.. option:: -interface-stub-version=<arg> 325 326.. option:: -keep\_private\_externs 327 328.. option:: -lazy\_framework <arg> 329 330.. program:: clang1 331.. option:: -lazy\_library <arg> 332.. program:: clang 333 334.. option:: -mbig-endian, -EB 335 336.. option:: -menable-unsafe-fp-math 337 338Allow unsafe floating-point math optimizations which may decrease precision 339 340.. option:: -mharden-sls=<arg> 341 342Select straight-line speculation hardening scope 343 344.. option:: --migrate 345 346Run the migrator 347 348.. option:: -mios-simulator-version-min=<arg>, -miphonesimulator-version-min=<arg> 349 350.. option:: -mlinker-version=<arg> 351 352.. option:: -mlittle-endian, -EL 353 354.. option:: -mllvm <arg> 355 356Additional arguments to forward to LLVM's option processing 357 358.. option:: -mmlir <arg> 359 360Additional arguments to forward to MLIR's option processing 361 362.. option:: -module-dependency-dir <arg> 363 364Directory to dump module dependencies to 365 366.. option:: -mtvos-simulator-version-min=<arg>, -mappletvsimulator-version-min=<arg> 367 368.. option:: -multi\_module 369 370.. option:: -multiply\_defined <arg> 371 372.. program:: clang1 373.. option:: -multiply\_defined\_unused <arg> 374.. program:: clang 375 376.. option:: -mwatchos-simulator-version-min=<arg>, -mwatchsimulator-version-min=<arg> 377 378.. option:: --no-cuda-version-check 379 380Don't error out if the detected version of the CUDA install is too low for the requested CUDA gpu architecture. 381 382.. option:: -no-hip-rt 383 384Do not link against HIP runtime libraries 385 386.. option:: -no-integrated-cpp, --no-integrated-cpp 387 388.. option:: -no\_dead\_strip\_inits\_and\_terms 389 390.. option:: -nobuiltininc 391 392Disable builtin #include directories 393 394.. option:: -nodefaultlibs 395 396.. option:: -nodriverkitlib 397 398.. option:: -nofixprebinding 399 400.. option:: -nogpuinc, -nocudainc 401 402Do not add include paths for CUDA/HIP and do not include the default CUDA/HIP wrapper headers 403 404.. option:: -nogpulib, -nocudalib 405 406Do not link device library for CUDA/HIP device compilation 407 408.. option:: -nohipwrapperinc 409 410Do not include the default HIP wrapper headers and include paths 411 412.. option:: -nolibc 413 414.. option:: -nomultidefs 415 416.. option:: -nopie, -no-pie 417 418.. option:: -noprebind 419 420.. option:: -noprofilelib 421 422.. option:: -noseglinkedit 423 424.. option:: -nostdinc, --no-standard-includes 425 426.. program:: clang1 427.. option:: -nostdinc++ 428.. program:: clang 429 430Disable standard #include directories for the C++ standard library 431 432.. option:: -nostdlib++ 433 434.. option:: -nostdlibinc 435 436.. program:: clang1 437.. option:: -o<file>, /Fo<arg>, -Fo<arg>, --output <arg>, --output=<arg> 438.. program:: clang 439 440Write output to <file> 441 442.. option:: -objcmt-allowlist-dir-path=<arg>, -objcmt-white-list-dir-path=<arg>, -objcmt-whitelist-dir-path=<arg> 443 444Only modify files with a filename contained in the provided directory path 445 446.. option:: -objcmt-atomic-property 447 448Make migration to 'atomic' properties 449 450.. option:: -objcmt-migrate-all 451 452Enable migration to modern ObjC 453 454.. option:: -objcmt-migrate-annotation 455 456Enable migration to property and method annotations 457 458.. option:: -objcmt-migrate-designated-init 459 460Enable migration to infer NS\_DESIGNATED\_INITIALIZER for initializer methods 461 462.. option:: -objcmt-migrate-instancetype 463 464Enable migration to infer instancetype for method result type 465 466.. option:: -objcmt-migrate-literals 467 468Enable migration to modern ObjC literals 469 470.. option:: -objcmt-migrate-ns-macros 471 472Enable migration to NS\_ENUM/NS\_OPTIONS macros 473 474.. option:: -objcmt-migrate-property 475 476Enable migration to modern ObjC property 477 478.. option:: -objcmt-migrate-property-dot-syntax 479 480Enable migration of setter/getter messages to property-dot syntax 481 482.. option:: -objcmt-migrate-protocol-conformance 483 484Enable migration to add protocol conformance on classes 485 486.. option:: -objcmt-migrate-readonly-property 487 488Enable migration to modern ObjC readonly property 489 490.. option:: -objcmt-migrate-readwrite-property 491 492Enable migration to modern ObjC readwrite property 493 494.. option:: -objcmt-migrate-subscripting 495 496Enable migration to modern ObjC subscripting 497 498.. option:: -objcmt-ns-nonatomic-iosonly 499 500Enable migration to use NS\_NONATOMIC\_IOSONLY macro for setting property's 'atomic' attribute 501 502.. option:: -objcmt-returns-innerpointer-property 503 504Enable migration to annotate property with NS\_RETURNS\_INNER\_POINTER 505 506.. option:: -object 507 508.. option:: -object-file-name=<file>, -object-file-name <arg> 509 510Set the output <file> for debug infos 511 512.. option:: --offload-arch=<arg>, --cuda-gpu-arch=<arg>, --no-offload-arch=<arg> 513 514CUDA offloading device architecture (e.g. sm\_35), or HIP offloading target ID in the form of a device architecture followed by target ID features delimited by a colon. Each target ID feature is a pre-defined string followed by a plus or minus sign (e.g. gfx908:xnack+:sramecc-). May be specified more than once. 515 516.. option:: --offload-device-only, --cuda-device-only 517 518Only compile for the offloading device. 519 520.. option:: --offload-host-device, --cuda-compile-host-device 521 522Only compile for the offloading host. 523 524.. option:: --offload-host-only, --cuda-host-only 525 526Only compile for the offloading host. 527 528.. option:: --offload=<arg1>,<arg2>... 529 530Specify comma-separated list of offloading target triples (CUDA and HIP only) 531 532.. option:: -p, --profile 533 534.. option:: -pagezero\_size<arg> 535 536.. option:: -pg 537 538Enable mcount instrumentation 539 540.. option:: -pipe, --pipe 541 542Use pipes between commands, when possible 543 544.. option:: -prebind 545 546.. program:: clang1 547.. option:: -prebind\_all\_twolevel\_modules 548.. program:: clang 549 550.. option:: -preload 551 552.. option:: --print-diagnostic-categories 553 554.. option:: -print-effective-triple, --print-effective-triple 555 556Print the effective target triple 557 558.. option:: -print-file-name=<file>, --print-file-name=<file>, --print-file-name <arg> 559 560Print the full library path of <file> 561 562.. option:: -print-ivar-layout 563 564Enable Objective-C Ivar layout bitmap print trace 565 566.. option:: -print-libgcc-file-name, --print-libgcc-file-name 567 568Print the library path for the currently used compiler runtime library ("libgcc.a" or "libclang\_rt.builtins.\*.a") 569 570.. option:: -print-multi-directory, --print-multi-directory 571 572.. option:: -print-multi-lib, --print-multi-lib 573 574.. option:: -print-multiarch, --print-multiarch 575 576Print the multiarch target triple 577 578.. option:: -print-prog-name=<name>, --print-prog-name=<name>, --print-prog-name <arg> 579 580Print the full program path of <name> 581 582.. option:: -print-resource-dir, --print-resource-dir 583 584Print the resource directory pathname 585 586.. option:: -print-rocm-search-dirs, --print-rocm-search-dirs 587 588Print the paths used for finding ROCm installation 589 590.. option:: -print-runtime-dir, --print-runtime-dir 591 592Print the directory pathname containing clangs runtime libraries 593 594.. option:: -print-search-dirs, --print-search-dirs 595 596Print the paths used for finding libraries and programs 597 598.. option:: -print-target-triple, --print-target-triple 599 600Print the normalized target triple 601 602.. option:: -print-targets, --print-targets 603 604Print the registered targets 605 606.. option:: -private\_bundle 607 608.. option:: --product-name=<arg> 609 610.. option:: -pthread, -no-pthread 611 612Support POSIX threads in generated code 613 614.. option:: -pthreads 615 616.. option:: -read\_only\_relocs <arg> 617 618.. option:: -relocatable-pch, --relocatable-pch 619 620Whether to build a relocatable precompiled header 621 622.. option:: -remap 623 624.. option:: -rewrite-legacy-objc 625 626Rewrite Legacy Objective-C source to C++ 627 628.. option:: -rtlib=<arg>, --rtlib=<arg>, --rtlib <arg> 629 630Compiler runtime library to use 631 632.. option:: -save-stats=<arg>, --save-stats=<arg>, -save-stats (equivalent to -save-stats=cwd), --save-stats (equivalent to -save-stats=cwd) 633 634Save llvm statistics. 635 636.. option:: -save-temps=<arg>, --save-temps=<arg>, -save-temps (equivalent to -save-temps=cwd), --save-temps (equivalent to -save-temps=cwd) 637 638Save intermediate compilation results. 639 640.. option:: -sectalign <arg1> <arg2> <arg3> 641 642.. option:: -sectcreate <arg1> <arg2> <arg3> 643 644.. option:: -sectobjectsymbols <arg1> <arg2> 645 646.. option:: -sectorder <arg1> <arg2> <arg3> 647 648.. option:: -seg1addr<arg> 649 650.. option:: -seg\_addr\_table <arg> 651 652.. program:: clang1 653.. option:: -seg\_addr\_table\_filename <arg> 654.. program:: clang 655 656.. option:: -segaddr <arg1> <arg2> 657 658.. option:: -segcreate <arg1> <arg2> <arg3> 659 660.. option:: -seglinkedit 661 662.. option:: -segprot <arg1> <arg2> <arg3> 663 664.. option:: -segs\_read\_<arg> 665 666.. program:: clang1 667.. option:: -segs\_read\_only\_addr <arg> 668.. program:: clang 669 670.. program:: clang2 671.. option:: -segs\_read\_write\_addr <arg> 672.. program:: clang 673 674.. option:: -serialize-diagnostics <arg>, --serialize-diagnostics <arg> 675 676Serialize compiler diagnostics to a file 677 678.. option:: -shared-libgcc 679 680.. option:: -shared-libsan, -shared-libasan 681 682Dynamically link the sanitizer runtime 683 684.. option:: -single\_module 685 686.. option:: --start-no-unused-arguments 687 688Don't emit warnings about unused arguments for the following arguments 689 690.. option:: -static-libgcc 691 692.. option:: -static-libsan 693 694Statically link the sanitizer runtime 695 696.. option:: -static-libstdc++ 697 698.. option:: -static-openmp 699 700Use the static host OpenMP runtime while linking. 701 702.. option:: -std-default=<arg> 703 704.. option:: -stdlib=<arg>, --stdlib=<arg>, --stdlib <arg> 705 706C++ standard library to use. <arg> must be 'libc++', 'libstdc++' or 'platform'. 707 708.. option:: -sub\_library<arg> 709 710.. program:: clang1 711.. option:: -sub\_umbrella<arg> 712.. program:: clang 713 714.. option:: --sysroot=<arg>, --sysroot <arg> 715 716.. option:: --target-help 717 718.. option:: --target=<arg>, -target <arg> 719 720Generate code for the given target 721 722.. option:: -time 723 724Time individual commands 725 726.. option:: -traditional, --traditional 727 728.. option:: -traditional-cpp, --traditional-cpp 729 730Enable some traditional CPP emulation 731 732.. option:: -twolevel\_namespace 733 734.. program:: clang1 735.. option:: -twolevel\_namespace\_hints 736.. program:: clang 737 738.. option:: -umbrella <arg> 739 740.. option:: -unexported\_symbols\_list <arg> 741 742.. option:: -unwindlib=<arg>, --unwindlib=<arg> 743 744Unwind library to use. <arg> must be 'libgcc', 'unwindlib' or 'platform'. 745 746.. option:: -v, --verbose 747 748Show commands to run and use verbose output 749 750.. option:: --verify-debug-info 751 752Verify the binary representation of debug output 753 754.. option:: --version 755 756Print version information 757 758.. option:: -w, --no-warnings 759 760Suppress all warnings 761 762.. option:: -weak-l<arg> 763 764.. option:: -weak\_framework <arg> 765 766.. program:: clang1 767.. option:: -weak\_library <arg> 768.. program:: clang 769 770.. program:: clang2 771.. option:: -weak\_reference\_mismatches <arg> 772.. program:: clang 773 774.. option:: -whatsloaded 775 776.. option:: -why\_load, -whyload 777 778.. option:: -working-directory<arg>, -working-directory=<arg> 779 780Resolve file paths relative to the specified directory 781 782.. option:: -x<language>, --language <arg>, --language=<arg> 783 784Treat subsequent input files as having type <language> 785 786.. option:: -y<arg> 787 788Actions 789======= 790The action to perform on the input. 791 792.. option:: -E, --preprocess 793 794Only run the preprocessor 795 796.. option:: -S, --assemble 797 798Only run preprocess and compilation steps 799 800.. option:: -c, --compile 801 802Only run preprocess, compile, and assemble steps 803 804.. option:: -emit-interface-stubs 805 806Generate Interface Stub Files. 807 808.. option:: -emit-llvm 809 810Use the LLVM representation for assembler and object files 811 812.. option:: -emit-merged-ifs 813 814Generate Interface Stub Files, emit merged text not binary. 815 816.. option:: -extract-api 817 818Extract API information 819 820.. option:: -fsyntax-only 821 822.. option:: -module-file-info 823 824Provide information about a particular module file 825 826.. option:: --precompile 827 828Only precompile the input 829 830.. option:: -rewrite-objc 831 832Rewrite Objective-C source to C++ 833 834.. option:: -verify-pch 835 836Load and verify that a pre-compiled header file is not stale 837 838Compilation flags 839================= 840 841Flags controlling the behavior of Clang during compilation. These flags have 842no effect during actions that do not perform compilation. 843 844.. option:: -Xassembler <arg> 845 846Pass <arg> to the assembler 847 848.. option:: -Xclang <arg> 849 850Pass <arg> to the clang compiler 851 852.. option:: -Xopenmp-target <arg> 853 854Pass <arg> to the target offloading toolchain. 855 856.. program:: clang1 857.. option:: -Xopenmp-target=<triple> <arg> 858.. program:: clang 859 860Pass <arg> to the target offloading toolchain identified by <triple>. 861 862.. option:: -ansi, --ansi 863 864.. option:: -fc++-abi=<arg> 865 866C++ ABI to use. This will override the target C++ ABI. 867 868.. option:: -fclang-abi-compat=<version> 869 870Attempt to match the ABI of Clang <version>. <version> must be '<major>.<minor>' or 'latest'. 871 872.. option:: -fcomment-block-commands=<arg>,<arg2>... 873 874Treat each comma separated argument in <arg> as a documentation comment block command 875 876.. option:: -fcomplete-member-pointers, -fno-complete-member-pointers 877 878Require member pointer base types to be complete if they would be significant under the Microsoft ABI 879 880.. option:: -fcrash-diagnostics-dir=<dir> 881 882Put crash-report files in <dir> 883 884.. option:: -fdeclspec, -fno-declspec 885 886Allow \_\_declspec as a keyword 887 888.. option:: -fdepfile-entry=<arg> 889 890.. option:: -fdiagnostics-fixit-info, -fno-diagnostics-fixit-info 891 892.. option:: -fdiagnostics-format=<arg> 893 894.. option:: -fdiagnostics-parseable-fixits 895 896Print fix-its in machine parseable form 897 898.. option:: -fdiagnostics-print-source-range-info 899 900Print source range spans in numeric form 901 902.. option:: -fdiagnostics-show-category=<arg> 903 904.. option:: -fdiscard-value-names, -fno-discard-value-names 905 906Discard value names in LLVM IR 907 908.. option:: -fexperimental-relative-c++-abi-vtables, -fno-experimental-relative-c++-abi-vtables 909 910Use the experimental C++ class ABI for classes with virtual tables 911 912.. option:: -fexperimental-strict-floating-point 913 914Enables experimental strict floating point in LLVM. 915 916.. option:: -ffine-grained-bitfield-accesses, -fno-fine-grained-bitfield-accesses 917 918Use separate accesses for consecutive bitfield runs with legal widths and alignments. 919 920.. option:: -fglobal-isel, -fexperimental-isel, -fno-global-isel 921 922Enables the global instruction selector 923 924.. option:: -finline-functions, -fno-inline-functions 925 926Inline suitable functions 927 928.. option:: -finline-hint-functions 929 930Inline functions which are (explicitly or implicitly) marked inline 931 932.. option:: -fno-crash-diagnostics 933 934Disable auto-generation of preprocessed source files and a script for reproduction during a clang crash 935 936.. option:: -fno-legacy-pass-manager, -fexperimental-new-pass-manager 937 938.. option:: -fno-sanitize-ignorelist, -fno-sanitize-blacklist 939 940Don't use ignorelist file for sanitizers 941 942.. option:: -fparse-all-comments 943 944.. option:: -frandomize-layout-seed-file=<file> 945 946File holding the seed used by the randomize structure layout feature 947 948.. option:: -frandomize-layout-seed=<seed> 949 950The seed used by the randomize structure layout feature 951 952.. option:: -frecord-command-line, -fno-record-command-line, -frecord-gcc-switches 953 954.. option:: -fsanitize-address-destructor=<arg> 955 956Set destructor type used in ASan instrumentation. <arg> must be 'none' or 'global'. 957 958.. option:: -fsanitize-address-field-padding=<arg> 959 960Level of field padding for AddressSanitizer 961 962.. option:: -fsanitize-address-globals-dead-stripping, -fno-sanitize-address-globals-dead-stripping 963 964Enable linker dead stripping of globals in AddressSanitizer 965 966.. option:: -fsanitize-address-outline-instrumentation, -fno-sanitize-address-outline-instrumentation 967 968Always generate function calls for address sanitizer instrumentation 969 970.. option:: -fsanitize-address-poison-custom-array-cookie, -fno-sanitize-address-poison-custom-array-cookie 971 972Enable poisoning array cookies when using custom operator new\[\] in AddressSanitizer 973 974.. option:: -fsanitize-address-use-after-return=<mode> 975 976Select the mode of detecting stack use-after-return in AddressSanitizer. <mode> must be 'never', 'runtime' or 'always'. 977 978.. option:: -fsanitize-address-use-after-scope, -fno-sanitize-address-use-after-scope 979 980Enable use-after-scope detection in AddressSanitizer 981 982.. option:: -fsanitize-address-use-odr-indicator, -fno-sanitize-address-use-odr-indicator 983 984Enable ODR indicator globals to avoid false ODR violation reports in partially sanitized programs at the cost of an increase in binary size 985 986.. option:: -fsanitize-cfi-canonical-jump-tables, -fno-sanitize-cfi-canonical-jump-tables 987 988Make the jump table addresses canonical in the symbol table 989 990.. option:: -fsanitize-cfi-cross-dso, -fno-sanitize-cfi-cross-dso 991 992Enable control flow integrity (CFI) checks for cross-DSO calls. 993 994.. option:: -fsanitize-cfi-icall-generalize-pointers 995 996Generalize pointers in CFI indirect call type signature checks 997 998.. option:: -fsanitize-coverage-allowlist=<arg>, -fsanitize-coverage-whitelist=<arg> 999 1000Restrict sanitizer coverage instrumentation exclusively to modules and functions that match the provided special case list, except the blocked ones 1001 1002.. option:: -fsanitize-coverage-ignorelist=<arg>, -fsanitize-coverage-blacklist=<arg> 1003 1004Disable sanitizer coverage instrumentation for modules and functions that match the provided special case list, even the allowed ones 1005 1006.. option:: -fsanitize-coverage=<arg1>,<arg2>..., -fno-sanitize-coverage=<arg1>,<arg2>... 1007 1008Specify the type of coverage instrumentation for Sanitizers 1009 1010.. option:: -fsanitize-hwaddress-abi=<arg> 1011 1012Select the HWAddressSanitizer ABI to target (interceptor or platform, default interceptor). This option is currently unused. 1013 1014.. option:: -fsanitize-hwaddress-experimental-aliasing, -fno-sanitize-hwaddress-experimental-aliasing 1015 1016Enable aliasing mode in HWAddressSanitizer 1017 1018.. option:: -fsanitize-ignorelist=<arg>, -fsanitize-blacklist=<arg> 1019 1020Path to ignorelist file for sanitizers 1021 1022.. option:: -fsanitize-link-c++-runtime, -fno-sanitize-link-c++-runtime 1023 1024.. option:: -fsanitize-link-runtime, -fno-sanitize-link-runtime 1025 1026.. option:: -fsanitize-memory-track-origins, -fno-sanitize-memory-track-origins 1027 1028Enable origins tracking in MemorySanitizer 1029 1030.. program:: clang1 1031.. option:: -fsanitize-memory-track-origins=<arg> 1032.. program:: clang 1033 1034Enable origins tracking in MemorySanitizer 1035 1036.. option:: -fsanitize-memory-use-after-dtor, -fno-sanitize-memory-use-after-dtor 1037 1038Enable use-after-destroy detection in MemorySanitizer 1039 1040.. option:: -fsanitize-memtag-mode=<arg> 1041 1042Set default MTE mode to 'sync' (default) or 'async' 1043 1044.. option:: -fsanitize-minimal-runtime, -fno-sanitize-minimal-runtime 1045 1046.. option:: -fsanitize-recover=<arg1>,<arg2>..., -fno-sanitize-recover=<arg1>,<arg2>..., -fsanitize-recover (equivalent to -fsanitize-recover=all) 1047 1048Enable recovery for specified sanitizers 1049 1050.. option:: -fsanitize-stats, -fno-sanitize-stats 1051 1052Enable sanitizer statistics gathering. 1053 1054.. option:: -fsanitize-thread-atomics, -fno-sanitize-thread-atomics 1055 1056Enable atomic operations instrumentation in ThreadSanitizer (default) 1057 1058.. option:: -fsanitize-thread-func-entry-exit, -fno-sanitize-thread-func-entry-exit 1059 1060Enable function entry/exit instrumentation in ThreadSanitizer (default) 1061 1062.. option:: -fsanitize-thread-memory-access, -fno-sanitize-thread-memory-access 1063 1064Enable memory access instrumentation in ThreadSanitizer (default) 1065 1066.. option:: -fsanitize-trap=<arg1>,<arg2>..., -fno-sanitize-trap=<arg1>,<arg2>..., -fsanitize-trap (equivalent to -fsanitize-trap=all), -fsanitize-undefined-trap-on-error (equivalent to -fsanitize-trap=undefined) 1067 1068Enable trapping for specified sanitizers 1069 1070.. option:: -fsanitize-undefined-strip-path-components=<number> 1071 1072Strip (or keep only, if negative) a given number of path components when emitting check metadata. 1073 1074.. option:: -fsanitize=<check>,<arg2>..., -fno-sanitize=<arg1>,<arg2>... 1075 1076Turn on runtime checks for various forms of undefined or suspicious behavior. See user manual for available checks 1077 1078.. option:: -moutline, -mno-outline 1079 1080Enable function outlining (AArch64 only) 1081 1082.. option:: -moutline-atomics, -mno-outline-atomics 1083 1084Generate local calls to out-of-line atomic operations 1085 1086.. option:: --param <arg>, --param=<arg> 1087 1088.. option:: -print-supported-cpus, --print-supported-cpus, -mcpu=?, -mtune=? 1089 1090Print supported cpu models for the given target (if target is not specified, it will print the supported cpus for the default target) 1091 1092.. option:: -std=<arg>, --std=<arg>, --std <arg> 1093 1094Language standard to compile for 1095 1096Preprocessor flags 1097~~~~~~~~~~~~~~~~~~ 1098 1099Flags controlling the behavior of the Clang preprocessor. 1100 1101.. option:: -C, --comments 1102 1103Include comments in preprocessed output 1104 1105.. option:: -CC, --comments-in-macros 1106 1107Include comments from within macros in preprocessed output 1108 1109.. option:: -D<macro>=<value>, --define-macro <arg>, --define-macro=<arg> 1110 1111Define <macro> to <value> (or 1 if <value> omitted) 1112 1113.. option:: -H, --trace-includes 1114 1115Show header includes and nesting depth 1116 1117.. option:: -P, --no-line-commands 1118 1119Disable linemarker output in -E mode 1120 1121.. option:: -U<macro>, --undefine-macro <arg>, --undefine-macro=<arg> 1122 1123Undefine macro <macro> 1124 1125.. option:: -Wp,<arg>,<arg2>... 1126 1127Pass the comma separated arguments in <arg> to the preprocessor 1128 1129.. option:: -Xpreprocessor <arg> 1130 1131Pass <arg> to the preprocessor 1132 1133Include path management 1134----------------------- 1135 1136Flags controlling how ``#include``\s are resolved to files. 1137 1138.. option:: -I<dir>, --include-directory <arg>, --include-directory=<arg> 1139 1140Add directory to include search path. For C++ inputs, if 1141there are multiple -I options, these directories are searched 1142in the order they are given before the standard system directories 1143are searched. If the same directory is in the SYSTEM include search 1144paths, for example if also specified with -isystem, the -I option 1145will be ignored 1146 1147.. option:: -I-, --include-barrier 1148 1149Restrict all prior -I flags to double-quoted inclusion and remove current directory from include path 1150 1151.. option:: --amdgpu-arch-tool=<arg> 1152 1153Tool used for detecting AMD GPU arch in the system. 1154 1155.. option:: --cuda-path-ignore-env 1156 1157Ignore environment variables to detect CUDA installation 1158 1159.. option:: --cuda-path=<arg> 1160 1161CUDA installation path 1162 1163.. option:: -cxx-isystem<directory> 1164 1165Add directory to the C++ SYSTEM include search path 1166 1167.. option:: -fbuild-session-file=<file> 1168 1169Use the last modification time of <file> as the build session timestamp 1170 1171.. option:: -fbuild-session-timestamp=<time since Epoch in seconds> 1172 1173Time when the current build session started 1174 1175.. option:: -fmodule-file=\[<name>=\]<file> 1176 1177Specify the mapping of module name to precompiled module file, or load a module file if name is omitted. 1178 1179.. option:: -fmodules-cache-path=<directory> 1180 1181Specify the module cache path 1182 1183.. option:: -fmodules-disable-diagnostic-validation 1184 1185Disable validation of the diagnostic options when loading the module 1186 1187.. option:: -fmodules-prune-after=<seconds> 1188 1189Specify the interval (in seconds) after which a module file will be considered unused 1190 1191.. option:: -fmodules-prune-interval=<seconds> 1192 1193Specify the interval (in seconds) between attempts to prune the module cache 1194 1195.. option:: -fmodules-user-build-path <directory> 1196 1197Specify the module user build path 1198 1199.. option:: -fmodules-validate-once-per-build-session 1200 1201Don't verify input files for the modules if the module has been successfully validated or loaded during this build session 1202 1203.. option:: -fmodules-validate-system-headers, -fno-modules-validate-system-headers 1204 1205Validate the system headers that a module depends on when loading the module 1206 1207.. option:: -fprebuilt-module-path=<directory> 1208 1209Specify the prebuilt module path 1210 1211.. option:: --hip-path=<arg> 1212 1213HIP runtime installation path, used for finding HIP version and adding HIP include path. 1214 1215.. option:: -idirafter<arg>, --include-directory-after <arg>, --include-directory-after=<arg> 1216 1217Add directory to AFTER include search path 1218 1219.. option:: -iframework<arg> 1220 1221Add directory to SYSTEM framework search path 1222 1223.. option:: -iframeworkwithsysroot<directory> 1224 1225Add directory to SYSTEM framework search path, absolute paths are relative to -isysroot 1226 1227.. option:: -imacros<file>, --imacros<file>, --imacros=<arg> 1228 1229Include macros from file before parsing 1230 1231.. option:: -include<file>, --include<file>, --include=<arg> 1232 1233Include file before parsing 1234 1235.. option:: -include-pch <file> 1236 1237Include precompiled header file 1238 1239.. option:: -iprefix<dir>, --include-prefix <arg>, --include-prefix=<arg> 1240 1241Set the -iwithprefix/-iwithprefixbefore prefix 1242 1243.. option:: -iquote<directory> 1244 1245Add directory to QUOTE include search path 1246 1247.. option:: -isysroot<dir> 1248 1249Set the system root directory (usually /) 1250 1251.. option:: -isystem<directory> 1252 1253Add directory to SYSTEM include search path 1254 1255.. option:: -isystem-after<directory> 1256 1257Add directory to end of the SYSTEM include search path 1258 1259.. option:: -ivfsoverlay<arg> 1260 1261Overlay the virtual filesystem described by file over the real file system 1262 1263.. option:: -iwithprefix<dir>, --include-with-prefix <arg>, --include-with-prefix-after <arg>, --include-with-prefix-after=<arg>, --include-with-prefix=<arg> 1264 1265Set directory to SYSTEM include search path with prefix 1266 1267.. option:: -iwithprefixbefore<dir>, --include-with-prefix-before <arg>, --include-with-prefix-before=<arg> 1268 1269Set directory to include search path with prefix 1270 1271.. option:: -iwithsysroot<directory> 1272 1273Add directory to SYSTEM include search path, absolute paths are relative to -isysroot 1274 1275.. option:: --libomptarget-amdgpu-bc-path=<arg>, --libomptarget-amdgcn-bc-path=<arg> 1276 1277Path to libomptarget-amdgcn bitcode library 1278 1279.. option:: --libomptarget-nvptx-bc-path=<arg> 1280 1281Path to libomptarget-nvptx bitcode library 1282 1283.. option:: --ptxas-path=<arg> 1284 1285Path to ptxas (used for compiling CUDA code) 1286 1287.. option:: --rocm-path=<arg> 1288 1289ROCm installation path, used for finding and automatically linking required bitcode libraries. 1290 1291.. program:: clang1 1292.. option:: -stdlib++-isystem<directory> 1293.. program:: clang 1294 1295Use directory as the C++ standard library include path 1296 1297.. option:: --system-header-prefix=<prefix>, --no-system-header-prefix=<prefix>, --system-header-prefix <arg> 1298 1299Treat all #include paths starting with <prefix> as including a system header. 1300 1301Dependency file generation 1302-------------------------- 1303 1304Flags controlling generation of a dependency file for ``make``-like build 1305systems. 1306 1307.. option:: -M, --dependencies 1308 1309Like -MD, but also implies -E and writes to stdout by default 1310 1311.. option:: -MD, --write-dependencies 1312 1313Write a depfile containing user and system headers 1314 1315.. option:: -MF<file> 1316 1317Write depfile output from -MMD, -MD, -MM, or -M to <file> 1318 1319.. option:: -MG, --print-missing-file-dependencies 1320 1321Add missing headers to depfile 1322 1323.. option:: -MJ<arg> 1324 1325Write a compilation database entry per input 1326 1327.. option:: -MM, --user-dependencies 1328 1329Like -MMD, but also implies -E and writes to stdout by default 1330 1331.. option:: -MMD, --write-user-dependencies 1332 1333Write a depfile containing user headers 1334 1335.. option:: -MP 1336 1337Create phony target for each dependency (other than main file) 1338 1339.. option:: -MQ<arg> 1340 1341Specify name of main file output to quote in depfile 1342 1343.. option:: -MT<arg> 1344 1345Specify name of main file output in depfile 1346 1347.. option:: -MV 1348 1349Use NMake/Jom format for the depfile 1350 1351Dumping preprocessor state 1352-------------------------- 1353 1354Flags allowing the state of the preprocessor to be dumped in various ways. 1355 1356.. option:: -d 1357 1358.. program:: clang1 1359.. option:: -d<arg> 1360.. program:: clang 1361 1362.. option:: -dD 1363 1364Print macro definitions in -E mode in addition to normal output 1365 1366.. option:: -dI 1367 1368Print include directives in -E mode in addition to normal output 1369 1370.. option:: -dM 1371 1372Print macro definitions in -E mode instead of normal output 1373 1374Diagnostic flags 1375~~~~~~~~~~~~~~~~ 1376 1377Flags controlling which warnings, errors, and remarks Clang will generate. 1378See the :doc:`full list of warning and remark flags <DiagnosticsReference>`. 1379 1380.. option:: -R<remark> 1381 1382Enable the specified remark 1383 1384.. option:: -Rpass-analysis=<arg> 1385 1386Report transformation analysis from optimization passes whose name matches the given POSIX regular expression 1387 1388.. option:: -Rpass-missed=<arg> 1389 1390Report missed transformations by optimization passes whose name matches the given POSIX regular expression 1391 1392.. option:: -Rpass=<arg> 1393 1394Report transformations performed by optimization passes whose name matches the given POSIX regular expression 1395 1396.. option:: -W<warning>, --extra-warnings, --warn-<arg>, --warn-=<arg> 1397 1398Enable the specified warning 1399 1400.. option:: -Wdeprecated, -Wno-deprecated 1401 1402Enable warnings for deprecated constructs and define \_\_DEPRECATED 1403 1404.. option:: -Wframe-larger-than=<arg>, -Wframe-larger-than 1405 1406.. option:: -Wnonportable-cfstrings<arg>, -Wno-nonportable-cfstrings<arg> 1407 1408Target-independent compilation options 1409~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1410.. option:: -fPIC, -fno-PIC 1411 1412.. option:: -fPIE, -fno-PIE 1413 1414.. option:: -faccess-control, -fno-access-control 1415 1416.. option:: -faddrsig, -fno-addrsig 1417 1418Emit an address-significance table 1419 1420.. option:: -falign-functions, -fno-align-functions 1421 1422.. program:: clang1 1423.. option:: -falign-functions=<arg> 1424.. program:: clang 1425 1426.. option:: -falign-loops=<N> 1427 1428N must be a power of two. Align loops to the boundary 1429 1430.. program:: clang1 1431.. option:: -faligned-allocation, -faligned-new, -fno-aligned-allocation 1432.. program:: clang 1433 1434Enable C++17 aligned allocation functions 1435 1436.. option:: -fallow-editor-placeholders, -fno-allow-editor-placeholders 1437 1438Treat editor placeholders as valid source code 1439 1440.. option:: -fallow-unsupported 1441 1442.. option:: -faltivec, -fno-altivec 1443 1444.. option:: -faltivec-src-compat=<arg> 1445 1446Source-level compatibility for Altivec vectors (for PowerPC targets). This includes results of vector comparison (scalar for 'xl', vector for 'gcc') as well as behavior when initializing with a scalar (splatting for 'xl', element zero only for 'gcc'). For 'mixed', the compatibility is as 'gcc' for 'vector bool/vector pixel' and as 'xl' for other types. Current default is 'mixed'. <arg> must be 'mixed', 'gcc' or 'xl'. 1447 1448.. option:: -fansi-escape-codes 1449 1450Use ANSI escape codes for diagnostics 1451 1452.. option:: -fapple-kext, -findirect-virtual-calls, -fterminated-vtables 1453 1454Use Apple's kernel extensions ABI 1455 1456.. option:: -fapple-link-rtlib 1457 1458Force linking the clang builtins runtime library 1459 1460.. option:: -fapple-pragma-pack, -fno-apple-pragma-pack 1461 1462Enable Apple gcc-compatible #pragma pack handling 1463 1464.. option:: -fapplication-extension, -fno-application-extension 1465 1466Restrict code to those available for App Extensions 1467 1468.. option:: -fapprox-func, -fno-approx-func 1469 1470Allow certain math function calls to be replaced with an approximately equivalent calculation 1471 1472.. option:: -fasm, -fno-asm 1473 1474.. option:: -fasm-blocks, -fno-asm-blocks 1475 1476.. option:: -fassociative-math, -fno-associative-math 1477 1478.. option:: -fassume-sane-operator-new, -fno-assume-sane-operator-new 1479 1480.. option:: -fast 1481 1482.. option:: -fastcp 1483 1484.. option:: -fastf 1485 1486.. option:: -fasync-exceptions, -fno-async-exceptions 1487 1488Enable EH Asynchronous exceptions 1489 1490.. option:: -fasynchronous-unwind-tables, -fno-asynchronous-unwind-tables 1491 1492.. option:: -fautolink, -fno-autolink 1493 1494.. option:: -fbasic-block-sections=<arg> 1495 1496Generate labels for each basic block or place each basic block or a subset of basic blocks in its own section. <arg> must be 'all', 'labels', 'none' or 'list='. 1497 1498.. option:: -fbinutils-version=<major.minor> 1499 1500Produced object files can use all ELF features supported by this binutils version and newer. If -fno-integrated-as is specified, the generated assembly will consider GNU as support. 'none' means that all ELF features can be used, regardless of binutils support. Defaults to 2.26. 1501 1502.. option:: -fblocks, -fno-blocks 1503 1504Enable the 'blocks' language feature 1505 1506.. option:: -fbootclasspath=<arg>, --bootclasspath <arg>, --bootclasspath=<arg> 1507 1508.. option:: -fborland-extensions, -fno-borland-extensions 1509 1510Accept non-standard constructs supported by the Borland compiler 1511 1512.. option:: -fbracket-depth=<arg> 1513 1514.. option:: -fbuiltin, -fno-builtin 1515 1516.. option:: -fbuiltin-module-map 1517 1518Load the clang builtins module map file. 1519 1520.. program:: clang1 1521.. option:: -fc++-static-destructors, -fno-c++-static-destructors 1522.. program:: clang 1523 1524.. option:: -fcaret-diagnostics, -fno-caret-diagnostics 1525 1526.. option:: -fcf-protection=<arg>, -fcf-protection (equivalent to -fcf-protection=full) 1527 1528Instrument control-flow architecture protection. <arg> must be 'return', 'branch', 'full' or 'none'. 1529 1530.. option:: -fcf-runtime-abi=<arg> 1531 1532 <arg> must be 'unspecified', 'standalone', 'objc', 'swift', 'swift-5.0', 'swift-4.2' or 'swift-4.1'. 1533 1534.. option:: -fchar8\_t, -fno-char8\_t 1535 1536Enable C++ builtin type char8\_t 1537 1538.. option:: -fclasspath=<arg>, --CLASSPATH <arg>, --CLASSPATH=<arg>, --classpath <arg>, --classpath=<arg> 1539 1540.. option:: -fcolor-diagnostics, -fdiagnostics-color, -fno-color-diagnostics 1541 1542Enable colors in diagnostics 1543 1544.. option:: -fcommon, -fno-common 1545 1546Place uninitialized global variables in a common block 1547 1548.. option:: -fcompile-resource=<arg>, --resource <arg>, --resource=<arg> 1549 1550.. option:: -fconstant-cfstrings, -fno-constant-cfstrings 1551 1552.. option:: -fconstant-string-class=<arg> 1553 1554.. option:: -fconstexpr-backtrace-limit=<arg> 1555 1556.. option:: -fconstexpr-depth=<arg> 1557 1558.. option:: -fconstexpr-steps=<arg> 1559 1560.. option:: -fconvergent-functions 1561 1562Assume functions may be convergent 1563 1564.. option:: -fcoroutines-ts, -fno-coroutines-ts 1565 1566Enable support for the C++ Coroutines TS 1567 1568.. option:: -fcoverage-compilation-dir=<arg> 1569 1570The compilation directory to embed in the coverage mapping. 1571 1572.. option:: -fcoverage-mapping, -fno-coverage-mapping 1573 1574Generate coverage mapping to enable code coverage analysis 1575 1576.. option:: -fcoverage-prefix-map=<arg> 1577 1578remap file source paths in coverage mapping 1579 1580.. option:: -fcreate-profile 1581 1582.. option:: -fcs-profile-generate 1583 1584Generate instrumented code to collect context sensitive execution counts into default.profraw (overridden by LLVM\_PROFILE\_FILE env var) 1585 1586.. program:: clang1 1587.. option:: -fcs-profile-generate=<directory> 1588.. program:: clang 1589 1590Generate instrumented code to collect context sensitive execution counts into <directory>/default.profraw (overridden by LLVM\_PROFILE\_FILE env var) 1591 1592.. option:: -fcuda-approx-transcendentals, -fno-cuda-approx-transcendentals 1593 1594Use approximate transcendental functions 1595 1596.. option:: -fcuda-short-ptr, -fno-cuda-short-ptr 1597 1598Use 32-bit pointers for accessing const/local/shared address spaces 1599 1600.. option:: -fcxx-exceptions, -fno-cxx-exceptions 1601 1602Enable C++ exceptions 1603 1604.. option:: -fcxx-modules, -fno-cxx-modules 1605 1606Enable modules for C++ 1607 1608.. option:: -fdata-sections, -fno-data-sections 1609 1610Place each data in its own section 1611 1612.. option:: -fdebug-compilation-dir=<arg>, -fdebug-compilation-dir <arg> 1613 1614The compilation directory to embed in the debug info 1615 1616.. option:: -fdebug-default-version=<arg> 1617 1618Default DWARF version to use, if a -g option caused DWARF debug info to be produced 1619 1620.. option:: -fdebug-info-for-profiling, -fno-debug-info-for-profiling 1621 1622Emit extra debug info to make sample profile more accurate 1623 1624.. option:: -fdebug-macro, -fno-debug-macro 1625 1626Emit macro debug information 1627 1628.. option:: -fdebug-pass-arguments 1629 1630.. option:: -fdebug-pass-structure 1631 1632.. option:: -fdebug-prefix-map=<arg> 1633 1634remap file source paths in debug info 1635 1636.. option:: -fdebug-ranges-base-address, -fno-debug-ranges-base-address 1637 1638Use DWARF base address selection entries in .debug\_ranges 1639 1640.. option:: -fdebug-types-section, -fno-debug-types-section 1641 1642Place debug types in their own section (ELF Only) 1643 1644.. option:: -fdelayed-template-parsing, -fno-delayed-template-parsing 1645 1646Parse templated function definitions at the end of the translation unit 1647 1648.. option:: -fdelete-null-pointer-checks, -fno-delete-null-pointer-checks 1649 1650Treat usage of null pointers as undefined behavior (default) 1651 1652.. option:: -fdenormal-fp-math=<arg> 1653 1654.. option:: -fdiagnostics-absolute-paths 1655 1656Print absolute paths in diagnostics 1657 1658.. program:: clang1 1659.. option:: -fdiagnostics-color=<arg> 1660.. program:: clang 1661 1662.. option:: -fdiagnostics-hotness-threshold=<value> 1663 1664Prevent optimization remarks from being output if they do not have at least this profile count. Use 'auto' to apply the threshold from profile summary 1665 1666.. option:: -fdiagnostics-misexpect-tolerance=<value> 1667 1668Prevent misexpect diagnostics from being output if the profile counts are within N% of the expected. 1669 1670.. option:: -fdiagnostics-show-hotness, -fno-diagnostics-show-hotness 1671 1672Enable profile hotness information in diagnostic line 1673 1674.. option:: -fdiagnostics-show-note-include-stack, -fno-diagnostics-show-note-include-stack 1675 1676Display include stacks for diagnostic notes 1677 1678.. option:: -fdiagnostics-show-option, -fno-diagnostics-show-option 1679 1680Print option name with mappable diagnostics 1681 1682.. option:: -fdiagnostics-show-template-tree 1683 1684Print a template comparison tree for differing templates 1685 1686.. option:: -fdigraphs, -fno-digraphs 1687 1688Enable alternative token representations '<:', ':>', '<%', '%>', '%:', '%:%:' (default) 1689 1690.. option:: -fdirect-access-external-data, -fno-direct-access-external-data 1691 1692Don't use GOT indirection to reference external data symbols 1693 1694.. option:: -fdirectives-only, -fno-directives-only 1695 1696.. option:: -fdollars-in-identifiers, -fno-dollars-in-identifiers 1697 1698Allow '$' in identifiers 1699 1700.. option:: -fdouble-square-bracket-attributes, -fno-double-square-bracket-attributes 1701 1702Enable '\[\[\]\]' attributes in all C and C++ language modes 1703 1704.. option:: -fdwarf-directory-asm, -fno-dwarf-directory-asm 1705 1706.. option:: -fdwarf-exceptions 1707 1708Use DWARF style exceptions 1709 1710.. option:: -felide-constructors, -fno-elide-constructors 1711 1712.. option:: -feliminate-unused-debug-symbols, -fno-eliminate-unused-debug-symbols 1713 1714.. option:: -feliminate-unused-debug-types, -fno-eliminate-unused-debug-types 1715 1716Do not emit debug info for defined but unused types 1717 1718.. option:: -fembed-bitcode=<option>, -fembed-bitcode (equivalent to -fembed-bitcode=all), -fembed-bitcode-marker (equivalent to -fembed-bitcode=marker) 1719 1720Embed LLVM bitcode. <option> must be 'off', 'all', 'bitcode' or 'marker'. 1721 1722.. option:: -fembed-offload-object=<arg> 1723 1724Embed Offloading device-side binary into host object file as a section. 1725 1726.. option:: -femit-all-decls 1727 1728Emit all declarations, even if unused 1729 1730.. option:: -femulated-tls, -fno-emulated-tls 1731 1732Use emutls functions to access thread\_local variables 1733 1734.. option:: -fenable-matrix 1735 1736Enable matrix data type and related builtin functions 1737 1738.. option:: -fencoding=<arg>, --encoding <arg>, --encoding=<arg> 1739 1740.. option:: -ferror-limit=<arg> 1741 1742.. option:: -fescaping-block-tail-calls, -fno-escaping-block-tail-calls 1743 1744.. option:: -fexceptions, -fno-exceptions 1745 1746Enable support for exception handling 1747 1748.. option:: -fexec-charset=<arg> 1749 1750.. option:: -fexperimental-new-constant-interpreter 1751 1752Enable the experimental new constant interpreter 1753 1754.. option:: -fextdirs=<arg>, --extdirs <arg>, --extdirs=<arg> 1755 1756.. option:: -fextend-arguments=<arg> 1757 1758Controls how scalar integer arguments are extended in calls to unprototyped and varargs functions. <arg> must be '32' or '64'. 1759 1760.. option:: -ffast-math, -fno-fast-math 1761 1762Allow aggressive, lossy floating-point optimizations 1763 1764.. option:: -ffile-compilation-dir=<arg> 1765 1766The compilation directory to embed in the debug info and coverage mapping. 1767 1768.. option:: -ffile-prefix-map=<arg> 1769 1770remap file source paths in debug info, predefined preprocessor macros and \_\_builtin\_FILE(). Implies -ffile-reproducible. 1771 1772.. option:: -ffile-reproducible, -fno-file-reproducible 1773 1774Use the target's platform-specific path separator character when expanding the \_\_FILE\_\_ macro 1775 1776.. option:: -ffinite-loops, -fno-finite-loops 1777 1778Assume all loops are finite. 1779 1780.. option:: -ffinite-math-only, -fno-finite-math-only 1781 1782.. option:: -ffixed-point, -fno-fixed-point 1783 1784Enable fixed point types 1785 1786.. option:: -ffor-scope, -fno-for-scope 1787 1788.. option:: -fforce-dwarf-frame, -fno-force-dwarf-frame 1789 1790Always emit a debug frame section 1791 1792.. option:: -fforce-emit-vtables, -fno-force-emit-vtables 1793 1794Emits more virtual tables to improve devirtualization 1795 1796.. option:: -fforce-enable-int128, -fno-force-enable-int128 1797 1798Enable support for int128\_t type 1799 1800.. option:: -ffp-contract=<arg> 1801 1802Form fused FP ops (e.g. FMAs): fast (fuses across statements disregarding pragmas) \| on (only fuses in the same statement unless dictated by pragmas) \| off (never fuses) \| fast-honor-pragmas (fuses across statements unless diectated by pragmas). Default is 'fast' for CUDA, 'fast-honor-pragmas' for HIP, and 'on' otherwise. <arg> must be 'fast', 'on', 'off' or 'fast-honor-pragmas'. 1803 1804.. option:: -ffp-eval-method=<arg> 1805 1806Specifies the evaluation method to use for floating-point arithmetic. <arg> must be 'source', 'double' or 'extended'. 1807 1808.. option:: -ffp-exception-behavior=<arg> 1809 1810Specifies the exception behavior of floating-point operations. <arg> must be 'ignore', 'maytrap' or 'strict'. 1811 1812.. option:: -ffp-model=<arg> 1813 1814Controls the semantics of floating-point calculations. 1815 1816.. option:: -ffreestanding 1817 1818Assert that the compilation takes place in a freestanding environment 1819 1820.. option:: -ffunction-sections, -fno-function-sections 1821 1822Place each function in its own section 1823 1824.. option:: -fgnu-inline-asm, -fno-gnu-inline-asm 1825 1826.. option:: -fgnu-keywords, -fno-gnu-keywords 1827 1828Allow GNU-extension keywords regardless of language standard 1829 1830.. option:: -fgnu-runtime 1831 1832Generate output compatible with the standard GNU Objective-C runtime 1833 1834.. option:: -fgnu89-inline, -fno-gnu89-inline 1835 1836Use the gnu89 inline semantics 1837 1838.. option:: -fgnuc-version=<arg> 1839 1840Sets various macros to claim compatibility with the given GCC version (default is 4.2.1) 1841 1842.. option:: -fgpu-allow-device-init, -fno-gpu-allow-device-init 1843 1844Allow device side init function in HIP (experimental) 1845 1846.. option:: -fgpu-defer-diag, -fno-gpu-defer-diag 1847 1848Defer host/device related diagnostic messages for CUDA/HIP 1849 1850.. option:: -fgpu-rdc, -fcuda-rdc, -fno-gpu-rdc 1851 1852Generate relocatable device code, also known as separate compilation mode 1853 1854.. option:: -fgpu-sanitize, -fno-gpu-sanitize 1855 1856Enable sanitizer for AMDGPU target 1857 1858.. option:: -fhip-fp32-correctly-rounded-divide-sqrt, -fno-hip-fp32-correctly-rounded-divide-sqrt 1859 1860Specify that single precision floating-point divide and sqrt used in the program source are correctly rounded (HIP device compilation only) 1861 1862.. option:: -fhip-new-launch-api, -fno-hip-new-launch-api 1863 1864Use new kernel launching API for HIP 1865 1866.. option:: -fhonor-infinities, -fhonor-infinites, -fno-honor-infinities 1867 1868.. option:: -fhonor-nans, -fno-honor-nans 1869 1870.. option:: -fhosted 1871 1872.. option:: -fignore-exceptions 1873 1874Enable support for ignoring exception handling constructs 1875 1876.. option:: -fimplicit-module-maps, -fmodule-maps, -fno-implicit-module-maps 1877 1878Implicitly search the file system for module map files. 1879 1880.. option:: -fimplicit-modules, -fno-implicit-modules 1881 1882.. option:: -finput-charset=<arg> 1883 1884Specify the default character set for source files 1885 1886.. option:: -finstrument-function-entry-bare 1887 1888Instrument function entry only, after inlining, without arguments to the instrumentation call 1889 1890.. option:: -finstrument-functions 1891 1892Generate calls to instrument function entry and exit 1893 1894.. option:: -finstrument-functions-after-inlining 1895 1896Like -finstrument-functions, but insert the calls after inlining 1897 1898.. option:: -fintegrated-as, -fno-integrated-as, -integrated-as 1899 1900Enable the integrated assembler 1901 1902.. option:: -fintegrated-cc1, -fno-integrated-cc1 1903 1904Run cc1 in-process 1905 1906.. option:: -fjmc, -fno-jmc 1907 1908Enable just-my-code debugging 1909 1910.. option:: -fjump-tables, -fno-jump-tables 1911 1912Use jump tables for lowering switches 1913 1914.. option:: -fkeep-static-consts, -fno-keep-static-consts 1915 1916Keep static const variables if unused 1917 1918.. option:: -flax-vector-conversions=<arg>, -flax-vector-conversions (equivalent to -flax-vector-conversions=integer), -fno-lax-vector-conversions (equivalent to -flax-vector-conversions=none) 1919 1920Enable implicit vector bit-casts. <arg> must be 'none', 'integer' or 'all'. 1921 1922.. option:: -flimited-precision=<arg> 1923 1924.. option:: -flto-jobs=<arg> 1925 1926Controls the backend parallelism of -flto=thin (default of 0 means the number of threads will be derived from the number of CPUs detected) 1927 1928.. option:: -flto=<arg>, -flto (equivalent to -flto=full), -flto=auto (equivalent to -flto=full), -flto=jobserver (equivalent to -flto=full) 1929 1930Set LTO mode. <arg> must be 'thin' or 'full'. 1931 1932.. option:: -fmacro-backtrace-limit=<arg> 1933 1934.. option:: -fmacro-prefix-map=<arg> 1935 1936remap file source paths in predefined preprocessor macros and \_\_builtin\_FILE(). Implies -ffile-reproducible. 1937 1938.. option:: -fmath-errno, -fno-math-errno 1939 1940Require math functions to indicate errors by setting errno 1941 1942.. option:: -fmax-tokens=<arg> 1943 1944Max total number of preprocessed tokens for -Wmax-tokens. 1945 1946.. option:: -fmax-type-align=<arg> 1947 1948Specify the maximum alignment to enforce on pointers lacking an explicit alignment 1949 1950.. option:: -fmemory-profile, -fno-memory-profile 1951 1952Enable heap memory profiling 1953 1954.. program:: clang1 1955.. option:: -fmemory-profile=<directory> 1956.. program:: clang 1957 1958Enable heap memory profiling and dump results into <directory> 1959 1960.. option:: -fmerge-all-constants, -fno-merge-all-constants 1961 1962Allow merging of constants 1963 1964.. option:: -fmessage-length=<arg> 1965 1966Format message diagnostics so that they fit within N columns 1967 1968.. option:: -fminimize-whitespace, -fno-minimize-whitespace 1969 1970Minimize whitespace when emitting preprocessor output 1971 1972.. option:: -fmodule-file-deps, -fno-module-file-deps 1973 1974.. option:: -fmodule-header 1975 1976Build a C++20 Header Unit from a header. 1977 1978.. program:: clang1 1979.. option:: -fmodule-header=<kind> 1980.. program:: clang 1981 1982Build a C++20 Header Unit from a header that should be found in the user (fmodule-header=user) or system (fmodule-header=system) search path. 1983 1984.. option:: -fmodule-map-file=<file> 1985 1986Load this module map file 1987 1988.. option:: -fmodule-name=<name>, -fmodule-implementation-of <arg> 1989 1990Specify the name of the module to build 1991 1992.. option:: -fmodules, -fno-modules 1993 1994Enable the 'modules' language feature 1995 1996.. option:: -fmodules-decluse, -fno-modules-decluse 1997 1998Require declaration of modules used within a module 1999 2000.. option:: -fmodules-ignore-macro=<arg> 2001 2002Ignore the definition of the given macro when building and loading modules 2003 2004.. option:: -fmodules-search-all, -fno-modules-search-all 2005 2006Search even non-imported modules to resolve references 2007 2008.. option:: -fmodules-strict-decluse 2009 2010Like -fmodules-decluse but requires all headers to be in modules 2011 2012.. option:: -fmodules-ts 2013 2014Enable support for the C++ Modules TS 2015 2016.. option:: -fmodules-validate-input-files-content 2017 2018Validate PCM input files based on content if mtime differs 2019 2020.. option:: -fms-compatibility, -fno-ms-compatibility 2021 2022Enable full Microsoft Visual C++ compatibility 2023 2024.. option:: -fms-compatibility-version=<arg> 2025 2026Dot-separated value representing the Microsoft compiler version number to report in \_MSC\_VER (0 = don't define it (default)) 2027 2028.. option:: -fms-extensions, -fno-ms-extensions 2029 2030Accept some non-standard constructs supported by the Microsoft compiler 2031 2032.. option:: -fms-hotpatch 2033 2034Ensure that all functions can be hotpatched at runtime 2035 2036.. option:: -fms-memptr-rep=<arg> 2037 2038 <arg> must be 'single', 'multiple' or 'virtual'. 2039 2040.. option:: -fms-volatile 2041 2042.. option:: -fmsc-version=<arg> 2043 2044Microsoft compiler version number to report in \_MSC\_VER (0 = don't define it (default)) 2045 2046.. option:: -fmudflap 2047 2048.. option:: -fmudflapth 2049 2050.. option:: -fnested-functions 2051 2052.. option:: -fnew-alignment=<align>, -fnew-alignment <arg> 2053 2054Specifies the largest alignment guaranteed by '::operator new(size\_t)' 2055 2056.. option:: -fnew-infallible, -fno-new-infallible 2057 2058Enable treating throwing global C++ operator new as always returning valid memory (annotates with \_\_attribute\_\_((returns\_nonnull)) and throw()). This is detectable in source. 2059 2060.. option:: -fnext-runtime 2061 2062.. option:: -fno-builtin-<arg> 2063 2064Disable implicit builtin knowledge of a specific function 2065 2066.. option:: -fno-elide-type 2067 2068Do not elide types when printing diagnostics 2069 2070.. option:: -fno-knr-functions 2071 2072Disable support for K&R C function declarations 2073 2074.. option:: -fno-max-type-align 2075 2076.. option:: -fno-strict-modules-decluse 2077 2078.. option:: -fno-temp-file 2079 2080Directly create compilation output files. This may lead to incorrect incremental builds if the compiler crashes 2081 2082.. option:: -fno-working-directory 2083 2084.. option:: -fno\_modules-validate-input-files-content 2085 2086.. program:: clang1 2087.. option:: -fno\_pch-validate-input-files-content 2088.. program:: clang 2089 2090.. option:: -fnoxray-link-deps 2091 2092.. option:: -fobjc-abi-version=<arg> 2093 2094.. option:: -fobjc-arc, -fno-objc-arc 2095 2096Synthesize retain and release calls for Objective-C pointers 2097 2098.. option:: -fobjc-arc-exceptions, -fno-objc-arc-exceptions 2099 2100Use EH-safe code when synthesizing retains and releases in -fobjc-arc 2101 2102.. option:: -fobjc-convert-messages-to-runtime-calls, -fno-objc-convert-messages-to-runtime-calls 2103 2104.. option:: -fobjc-disable-direct-methods-for-testing 2105 2106Ignore attribute objc\_direct so that direct methods can be tested 2107 2108.. option:: -fobjc-encode-cxx-class-template-spec, -fno-objc-encode-cxx-class-template-spec 2109 2110Fully encode c++ class template specialization 2111 2112.. option:: -fobjc-exceptions, -fno-objc-exceptions 2113 2114Enable Objective-C exceptions 2115 2116.. option:: -fobjc-infer-related-result-type, -fno-objc-infer-related-result-type 2117 2118.. option:: -fobjc-legacy-dispatch, -fno-objc-legacy-dispatch 2119 2120.. option:: -fobjc-link-runtime 2121 2122.. option:: -fobjc-nonfragile-abi, -fno-objc-nonfragile-abi 2123 2124.. option:: -fobjc-nonfragile-abi-version=<arg> 2125 2126.. option:: -fobjc-runtime=<arg> 2127 2128Specify the target Objective-C runtime kind and version 2129 2130.. option:: -fobjc-sender-dependent-dispatch 2131 2132.. option:: -fobjc-weak, -fno-objc-weak 2133 2134Enable ARC-style weak references in Objective-C 2135 2136.. option:: -foffload-lto=<arg>, -foffload-lto (equivalent to -foffload-lto=full) 2137 2138Set LTO mode for offload compilation. <arg> must be 'thin' or 'full'. 2139 2140.. option:: -fomit-frame-pointer, -fno-omit-frame-pointer 2141 2142.. option:: -fopenmp, -fno-openmp 2143 2144Parse OpenMP pragmas and generate parallel code. 2145 2146.. option:: -fopenmp-extensions, -fno-openmp-extensions 2147 2148Enable all Clang extensions for OpenMP directives and clauses 2149 2150.. option:: -fopenmp-implicit-rpath, -fno-openmp-implicit-rpath 2151 2152Set rpath on OpenMP executables 2153 2154.. option:: -fopenmp-new-driver 2155 2156Use the new driver for OpenMP offloading. 2157 2158.. option:: -fopenmp-offload-mandatory 2159 2160Do not create a host fallback if offloading to the device fails. 2161 2162.. option:: -fopenmp-simd, -fno-openmp-simd 2163 2164Emit OpenMP code only for SIMD-based constructs. 2165 2166.. option:: -fopenmp-target-debug, -fno-openmp-target-debug 2167 2168Enable debugging in the OpenMP offloading device RTL 2169 2170.. option:: -fopenmp-version=<arg> 2171 2172Set OpenMP version (e.g. 45 for OpenMP 4.5, 50 for OpenMP 5.0). Default value is 50. 2173 2174.. program:: clang1 2175.. option:: -fopenmp=<arg> 2176.. program:: clang 2177 2178.. option:: -foperator-arrow-depth=<arg> 2179 2180.. option:: -foperator-names, -fno-operator-names 2181 2182.. option:: -foptimization-record-file=<file> 2183 2184Specify the output name of the file containing the optimization remarks. Implies -fsave-optimization-record. On Darwin platforms, this cannot be used with multiple -arch <arch> options. 2185 2186.. option:: -foptimization-record-passes=<regex> 2187 2188Only include passes which match a specified regular expression in the generated optimization record (by default, include all passes) 2189 2190.. option:: -foptimize-sibling-calls, -fno-optimize-sibling-calls 2191 2192.. option:: -forder-file-instrumentation 2193 2194Generate instrumented code to collect order file into default.profraw file (overridden by '=' form of option or LLVM\_PROFILE\_FILE env var) 2195 2196.. option:: -foutput-class-dir=<arg>, --output-class-directory <arg>, --output-class-directory=<arg> 2197 2198.. option:: -fpack-struct, -fno-pack-struct 2199 2200.. program:: clang1 2201.. option:: -fpack-struct=<arg> 2202.. program:: clang 2203 2204Specify the default maximum struct packing alignment 2205 2206.. option:: -fpascal-strings, -fno-pascal-strings, -mpascal-strings 2207 2208Recognize and construct Pascal-style string literals 2209 2210.. option:: -fpass-plugin=<dsopath> 2211 2212Load pass plugin from a dynamic shared object file (only with new pass manager). 2213 2214.. option:: -fpatchable-function-entry=<N,M> 2215 2216Generate M NOPs before function entry and N-M NOPs after function entry 2217 2218.. option:: -fpcc-struct-return 2219 2220Override the default ABI to return all structs on the stack 2221 2222.. option:: -fpch-codegen, -fno-pch-codegen 2223 2224Generate code for uses of this PCH that assumes an explicit object file will be built for the PCH 2225 2226.. option:: -fpch-debuginfo, -fno-pch-debuginfo 2227 2228Generate debug info for types in an object file built from this PCH and do not generate them elsewhere 2229 2230.. option:: -fpch-instantiate-templates, -fno-pch-instantiate-templates 2231 2232Instantiate templates already while building a PCH 2233 2234.. option:: -fpch-preprocess 2235 2236.. option:: -fpch-validate-input-files-content 2237 2238Validate PCH input files based on content if mtime differs 2239 2240.. option:: -fpic, -fno-pic 2241 2242.. option:: -fpie, -fno-pie 2243 2244.. option:: -fplt, -fno-plt 2245 2246.. option:: -fplugin=<dsopath> 2247 2248Load the named plugin (dynamic shared object) 2249 2250.. option:: -fprebuilt-implicit-modules, -fno-prebuilt-implicit-modules 2251 2252Look up implicit modules in the prebuilt module path 2253 2254.. option:: -fpreserve-as-comments, -fno-preserve-as-comments 2255 2256.. option:: -fproc-stat-report<arg> 2257 2258Print subprocess statistics 2259 2260.. program:: clang1 2261.. option:: -fproc-stat-report=<arg> 2262.. program:: clang 2263 2264Save subprocess statistics to the given file 2265 2266.. option:: -fprofile-arcs, -fno-profile-arcs 2267 2268.. option:: -fprofile-dir=<arg> 2269 2270.. option:: -fprofile-exclude-files=<arg> 2271 2272Instrument only functions from files where names don't match all the regexes separated by a semi-colon 2273 2274.. option:: -fprofile-filter-files=<arg> 2275 2276Instrument only functions from files where names match any regex separated by a semi-colon 2277 2278.. option:: -fprofile-generate, -fno-profile-generate 2279 2280Generate instrumented code to collect execution counts into default.profraw (overridden by LLVM\_PROFILE\_FILE env var) 2281 2282.. program:: clang1 2283.. option:: -fprofile-generate=<directory> 2284.. program:: clang 2285 2286Generate instrumented code to collect execution counts into <directory>/default.profraw (overridden by LLVM\_PROFILE\_FILE env var) 2287 2288.. option:: -fprofile-instr-generate, -fno-profile-instr-generate 2289 2290Generate instrumented code to collect execution counts into default.profraw file (overridden by '=' form of option or LLVM\_PROFILE\_FILE env var) 2291 2292.. program:: clang1 2293.. option:: -fprofile-instr-generate=<file> 2294.. program:: clang 2295 2296Generate instrumented code to collect execution counts into <file> (overridden by LLVM\_PROFILE\_FILE env var) 2297 2298.. option:: -fprofile-instr-use, -fno-profile-instr-use, -fprofile-use 2299 2300.. program:: clang1 2301.. option:: -fprofile-instr-use=<arg> 2302.. program:: clang 2303 2304Use instrumentation data for profile-guided optimization 2305 2306.. option:: -fprofile-list=<arg> 2307 2308Filename defining the list of functions/files to instrument 2309 2310.. option:: -fprofile-remapping-file=<file> 2311 2312Use the remappings described in <file> to match the profile data against names in the program 2313 2314.. option:: -fprofile-sample-accurate, -fauto-profile-accurate, -fno-profile-sample-accurate 2315 2316Specifies that the sample profile is accurate. If the sample 2317 profile is accurate, callsites without profile samples are marked 2318 as cold. Otherwise, treat callsites without profile samples as if 2319 we have no profile 2320 2321.. option:: -fprofile-sample-use, -fauto-profile, -fno-profile-sample-use 2322 2323.. program:: clang1 2324.. option:: -fprofile-sample-use=<arg>, -fauto-profile=<arg> 2325.. program:: clang 2326 2327Enable sample-based profile guided optimizations 2328 2329.. option:: -fprofile-update=<method> 2330 2331Set update method of profile counters. <method> must be 'atomic', 'prefer-atomic' or 'single'. 2332 2333.. program:: clang1 2334.. option:: -fprofile-use=<pathname> 2335.. program:: clang 2336 2337Use instrumentation data for profile-guided optimization. If pathname is a directory, it reads from <pathname>/default.profdata. Otherwise, it reads from file <pathname>. 2338 2339.. option:: -fprotect-parens, -fno-protect-parens 2340 2341Determines whether the optimizer honors parentheses when floating-point expressions are evaluated 2342 2343.. option:: -fpseudo-probe-for-profiling, -fno-pseudo-probe-for-profiling 2344 2345Emit pseudo probes for sample profiling 2346 2347.. option:: -freciprocal-math, -fno-reciprocal-math 2348 2349Allow division operations to be reassociated 2350 2351.. option:: -freg-struct-return 2352 2353Override the default ABI to return small structs in registers 2354 2355.. option:: -fregister-global-dtors-with-atexit, -fno-register-global-dtors-with-atexit 2356 2357Use atexit or \_\_cxa\_atexit to register global destructors 2358 2359.. option:: -frelaxed-template-template-args, -fno-relaxed-template-template-args 2360 2361Enable C++17 relaxed template template argument matching 2362 2363.. option:: -freroll-loops, -fno-reroll-loops 2364 2365Turn on loop reroller 2366 2367.. option:: -fretain-comments-from-system-headers 2368 2369.. option:: -frewrite-imports, -fno-rewrite-imports 2370 2371.. option:: -frewrite-includes, -fno-rewrite-includes 2372 2373.. option:: -frewrite-map-file=<arg> 2374 2375.. option:: -fropi, -fno-ropi 2376 2377Generate read-only position independent code (ARM only) 2378 2379.. option:: -frounding-math, -fno-rounding-math 2380 2381.. option:: -frtti, -fno-rtti 2382 2383.. option:: -frtti-data, -fno-rtti-data 2384 2385.. option:: -frwpi, -fno-rwpi 2386 2387Generate read-write position independent code (ARM only) 2388 2389.. option:: -fsanitize-memory-param-retval, -fno-sanitize-memory-param-retval 2390 2391Enable detection of uninitialized parameters and return values 2392 2393.. option:: -fsave-optimization-record, -fno-save-optimization-record 2394 2395Generate a YAML optimization record file 2396 2397.. program:: clang1 2398.. option:: -fsave-optimization-record=<format> 2399.. program:: clang 2400 2401Generate an optimization record file in a specific format 2402 2403.. option:: -fseh-exceptions 2404 2405Use SEH style exceptions 2406 2407.. option:: -fsemantic-interposition, -fno-semantic-interposition 2408 2409.. option:: -fshort-enums, -fno-short-enums 2410 2411Allocate to an enum type only as many bytes as it needs for the declared range of possible values 2412 2413.. option:: -fshort-wchar, -fno-short-wchar 2414 2415Force wchar\_t to be a short unsigned int 2416 2417.. option:: -fshow-column, -fno-show-column 2418 2419.. option:: -fshow-overloads=<arg> 2420 2421Which overload candidates to show when overload resolution fails. Defaults to 'all'. <arg> must be 'best' or 'all'. 2422 2423.. option:: -fshow-source-location, -fno-show-source-location 2424 2425.. option:: -fsignaling-math, -fno-signaling-math 2426 2427.. option:: -fsigned-bitfields 2428 2429.. option:: -fsigned-char, -fno-signed-char, --signed-char 2430 2431char is signed 2432 2433.. option:: -fsigned-zeros, -fno-signed-zeros 2434 2435.. option:: -fsized-deallocation, -fno-sized-deallocation 2436 2437Enable C++14 sized global deallocation functions 2438 2439.. option:: -fsjlj-exceptions 2440 2441Use SjLj style exceptions 2442 2443.. option:: -fslp-vectorize, -fno-slp-vectorize, -ftree-slp-vectorize 2444 2445Enable the superword-level parallelism vectorization passes 2446 2447.. option:: -fspell-checking, -fno-spell-checking 2448 2449.. option:: -fspell-checking-limit=<arg> 2450 2451.. option:: -fsplit-dwarf-inlining, -fno-split-dwarf-inlining 2452 2453Provide minimal debug info in the object/executable to facilitate online symbolication/stack traces in the absence of .dwo/.dwp files when using Split DWARF 2454 2455.. option:: -fsplit-lto-unit, -fno-split-lto-unit 2456 2457Enables splitting of the LTO unit 2458 2459.. option:: -fsplit-machine-functions, -fno-split-machine-functions 2460 2461Enable late function splitting using profile information (x86 ELF) 2462 2463.. option:: -fsplit-stack, -fno-split-stack 2464 2465Use segmented stack 2466 2467.. option:: -fstack-clash-protection, -fno-stack-clash-protection 2468 2469Enable stack clash protection 2470 2471.. option:: -fstack-protector, -fno-stack-protector 2472 2473Enable 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. A function with a stack protector has a guard value added to the stack frame that is checked on function exit. The guard value must be positioned in the stack frame such that a buffer overflow from a vulnerable variable will overwrite the guard value before overwriting the function's return address. The reference stack guard value is stored in a global variable. 2474 2475.. option:: -fstack-protector-all 2476 2477Enable stack protectors for all functions 2478 2479.. option:: -fstack-protector-strong 2480 2481Enable 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 2482 2483.. option:: -fstack-size-section, -fno-stack-size-section 2484 2485Emit section containing metadata on function stack sizes 2486 2487.. option:: -fstack-usage 2488 2489Emit .su file containing information on function stack sizes 2490 2491.. option:: -fstandalone-debug, -fno-limit-debug-info, -fno-standalone-debug 2492 2493Emit full debug info for all types used by the program 2494 2495.. option:: -fstrict-aliasing, -fno-strict-aliasing 2496 2497.. option:: -fstrict-enums, -fno-strict-enums 2498 2499Enable optimizations based on the strict definition of an enum's value range 2500 2501.. option:: -fstrict-float-cast-overflow, -fno-strict-float-cast-overflow 2502 2503Assume that overflowing float-to-int casts are undefined (default) 2504 2505.. option:: -fstrict-overflow, -fno-strict-overflow 2506 2507.. option:: -fstrict-return, -fno-strict-return 2508 2509.. option:: -fstrict-vtable-pointers, -fno-strict-vtable-pointers 2510 2511Enable optimizations based on the strict rules for overwriting polymorphic C++ objects 2512 2513.. option:: -fstruct-path-tbaa, -fno-struct-path-tbaa 2514 2515.. option:: -fswift-async-fp=<option> 2516 2517Control emission of Swift async extended frame info. <option> must be 'auto', 'always' or 'never'. 2518 2519.. option:: -fsymbol-partition=<arg> 2520 2521.. option:: -ftabstop=<arg> 2522 2523.. option:: -ftemplate-backtrace-limit=<arg> 2524 2525.. option:: -ftemplate-depth-<arg> 2526 2527.. option:: -ftemplate-depth=<arg> 2528 2529.. option:: -ftest-coverage, -fno-test-coverage 2530 2531.. option:: -fthin-link-bitcode=<arg> 2532 2533Write minimized bitcode to <file> for the ThinLTO thin link only 2534 2535.. option:: -fthinlto-index=<arg> 2536 2537Perform ThinLTO importing using provided function summary index 2538 2539.. option:: -fthreadsafe-statics, -fno-threadsafe-statics 2540 2541.. option:: -ftime-report 2542 2543.. program:: clang1 2544.. option:: -ftime-report=<arg> 2545.. program:: clang 2546 2547(For new pass manager) 'per-pass': one report for each pass; 'per-pass-run': one report for each pass invocation. <arg> must be 'per-pass' or 'per-pass-run'. 2548 2549.. option:: -ftime-trace 2550 2551 2552Turn on time profiler. Generates JSON file based on output filename. Results 2553can be analyzed with chrome://tracing or `Speedscope App 2554<https://www.speedscope.app>`_ for flamegraph visualization. 2555 2556.. option:: -ftime-trace-granularity=<arg> 2557 2558Minimum time granularity (in microseconds) traced by time profiler 2559 2560.. option:: -ftls-model=<arg> 2561 2562 <arg> must be 'global-dynamic', 'local-dynamic', 'initial-exec' or 'local-exec'. 2563 2564.. option:: -ftrap-function=<arg> 2565 2566Issue call to specified function rather than a trap instruction 2567 2568.. option:: -ftrapping-math, -fno-trapping-math 2569 2570.. option:: -ftrapv 2571 2572Trap on integer overflow 2573 2574.. option:: -ftrapv-handler <arg> 2575 2576.. program:: clang1 2577.. option:: -ftrapv-handler=<function name> 2578.. program:: clang 2579 2580Specify the function to be called on overflow 2581 2582.. option:: -ftrigraphs, -fno-trigraphs, -trigraphs, --trigraphs 2583 2584Process trigraph sequences 2585 2586.. option:: -ftrivial-auto-var-init-stop-after=<arg> 2587 2588Stop initializing trivial automatic stack variables after the specified number of instances 2589 2590.. option:: -ftrivial-auto-var-init=<arg> 2591 2592Initialize trivial automatic stack variables. Defaults to 'uninitialized'. <arg> must be 'uninitialized', 'zero' or 'pattern'. 2593 2594.. option:: -funique-basic-block-section-names, -fno-unique-basic-block-section-names 2595 2596Use unique names for basic block sections (ELF Only) 2597 2598.. option:: -funique-internal-linkage-names, -fno-unique-internal-linkage-names 2599 2600Uniqueify Internal Linkage Symbol Names by appending the MD5 hash of the module path 2601 2602.. option:: -funique-section-names, -fno-unique-section-names 2603 2604.. option:: -funroll-loops, -fno-unroll-loops 2605 2606Turn on loop unroller 2607 2608.. option:: -funsafe-math-optimizations, -fno-unsafe-math-optimizations 2609 2610.. option:: -funsigned-bitfields 2611 2612.. option:: -funsigned-char, -fno-unsigned-char, --unsigned-char 2613 2614.. option:: -funstable, -fno-unstable 2615 2616Enable unstable and experimental features 2617 2618.. option:: -funwind-tables, -fno-unwind-tables 2619 2620.. option:: -fuse-cxa-atexit, -fno-use-cxa-atexit 2621 2622.. option:: -fuse-init-array, -fno-use-init-array 2623 2624.. option:: -fuse-ld=<arg> 2625 2626.. option:: -fuse-line-directives, -fno-use-line-directives 2627 2628Use #line in preprocessed output 2629 2630.. option:: -fvalidate-ast-input-files-content 2631 2632Compute and store the hash of input files used to build an AST. Files with mismatching mtime's are considered valid if both contents is identical 2633 2634.. option:: -fveclib=<arg> 2635 2636Use the given vector functions library. <arg> must be 'Accelerate', 'libmvec', 'MASSV', 'SVML', 'Darwin_libsystem_m' or 'none'. 2637 2638.. option:: -fvectorize, -fno-vectorize, -ftree-vectorize 2639 2640Enable the loop vectorization passes 2641 2642.. option:: -fverbose-asm, -dA, -fno-verbose-asm 2643 2644Generate verbose assembly output 2645 2646.. option:: -fvirtual-function-elimination, -fno-virtual-function-elimination 2647 2648Enables dead virtual function elimination optimization. Requires -flto=full 2649 2650.. option:: -fvisibility-dllexport=<arg> 2651 2652The visibility for dllexport definitions \[-fvisibility-from-dllstorageclass\]. <arg> must be 'default', 'hidden', 'internal' or 'protected'. 2653 2654.. option:: -fvisibility-externs-dllimport=<arg> 2655 2656The visibility for dllimport external declarations \[-fvisibility-from-dllstorageclass\]. <arg> must be 'default', 'hidden', 'internal' or 'protected'. 2657 2658.. option:: -fvisibility-externs-nodllstorageclass=<arg> 2659 2660The visibility for external declarations without an explicit DLL dllstorageclass \[-fvisibility-from-dllstorageclass\]. <arg> must be 'default', 'hidden', 'internal' or 'protected'. 2661 2662.. option:: -fvisibility-from-dllstorageclass, -fno-visibility-from-dllstorageclass 2663 2664Set the visibility of symbols in the generated code from their DLL storage class 2665 2666.. option:: -fvisibility-global-new-delete-hidden 2667 2668Give global C++ operator new and delete declarations hidden visibility 2669 2670.. option:: -fvisibility-inlines-hidden, -fno-visibility-inlines-hidden 2671 2672Give inline C++ member functions hidden visibility by default 2673 2674.. option:: -fvisibility-inlines-hidden-static-local-var, -fno-visibility-inlines-hidden-static-local-var 2675 2676When -fvisibility-inlines-hidden is enabled, static variables in inline C++ member functions will also be given hidden visibility by default 2677 2678.. option:: -fvisibility-ms-compat 2679 2680Give global types 'default' visibility and global functions and variables 'hidden' visibility by default 2681 2682.. option:: -fvisibility-nodllstorageclass=<arg> 2683 2684The visibility for definitions without an explicit DLL export class \[-fvisibility-from-dllstorageclass\]. <arg> must be 'default', 'hidden', 'internal' or 'protected'. 2685 2686.. option:: -fvisibility=<arg> 2687 2688Set the default symbol visibility for all global declarations. <arg> must be 'hidden' or 'default'. 2689 2690.. option:: -fwasm-exceptions 2691 2692Use WebAssembly style exceptions 2693 2694.. option:: -fwhole-program-vtables, -fno-whole-program-vtables 2695 2696Enables whole-program vtable optimization. Requires -flto 2697 2698.. option:: -fwrapv, -fno-wrapv 2699 2700Treat signed integer overflow as two's complement 2701 2702.. option:: -fwritable-strings 2703 2704Store string literals as writable data 2705 2706.. option:: -fxl-pragma-pack, -fno-xl-pragma-pack 2707 2708Enable IBM XL #pragma pack handling 2709 2710.. option:: -fxray-always-emit-customevents, -fno-xray-always-emit-customevents 2711 2712Always emit \_\_xray\_customevent(...) calls even if the containing function is not always instrumented 2713 2714.. option:: -fxray-always-emit-typedevents, -fno-xray-always-emit-typedevents 2715 2716Always emit \_\_xray\_typedevent(...) calls even if the containing function is not always instrumented 2717 2718.. option:: -fxray-always-instrument=<arg> 2719 2720DEPRECATED: Filename defining the whitelist for imbuing the 'always instrument' XRay attribute. 2721 2722.. option:: -fxray-attr-list=<arg> 2723 2724Filename defining the list of functions/types for imbuing XRay attributes. 2725 2726.. option:: -fxray-function-groups=<arg> 2727 2728Only instrument 1 of N groups 2729 2730.. option:: -fxray-function-index, -fno-xray-function-index 2731 2732.. option:: -fxray-ignore-loops, -fno-xray-ignore-loops 2733 2734Don't instrument functions with loops unless they also meet the minimum function size 2735 2736.. option:: -fxray-instruction-threshold<arg> 2737 2738.. program:: clang1 2739.. option:: -fxray-instruction-threshold=<arg> 2740.. program:: clang 2741 2742Sets the minimum function size to instrument with XRay 2743 2744.. option:: -fxray-instrument, -fno-xray-instrument 2745 2746Generate XRay instrumentation sleds on function entry and exit 2747 2748.. option:: -fxray-instrumentation-bundle=<arg> 2749 2750Select which XRay instrumentation points to emit. Options: all, none, function-entry, function-exit, function, custom. Default is 'all'. 'function' includes both 'function-entry' and 'function-exit'. 2751 2752.. option:: -fxray-link-deps 2753 2754Tells clang to add the link dependencies for XRay. 2755 2756.. option:: -fxray-modes=<arg> 2757 2758List of modes to link in by default into XRay instrumented binaries. 2759 2760.. option:: -fxray-never-instrument=<arg> 2761 2762DEPRECATED: Filename defining the whitelist for imbuing the 'never instrument' XRay attribute. 2763 2764.. option:: -fxray-selected-function-group=<arg> 2765 2766When using -fxray-function-groups, select which group of functions to instrument. Valid range is 0 to fxray-function-groups - 1 2767 2768.. option:: -fzero-call-used-regs=<arg> 2769 2770Clear call-used registers upon function return. <arg> must be 'skip', 'used-gpr-arg', 'used-gpr', 'used-arg', 'used', 'all-gpr-arg', 'all-gpr', 'all-arg' or 'all'. 2771 2772.. option:: -fzero-initialized-in-bss, -fno-zero-initialized-in-bss 2773 2774.. option:: -fzvector, -fno-zvector, -mzvector 2775 2776Enable System z vector language extension 2777 2778.. option:: --gpu-bundle-output, --no-gpu-bundle-output 2779 2780Bundle output files of HIP device compilation 2781 2782.. option:: --offload-new-driver, --no-offload-new-driver 2783 2784Use the new driver for offloading compilation. 2785 2786.. option:: -pedantic, --pedantic, -no-pedantic, --no-pedantic 2787 2788Warn on language extensions 2789 2790.. option:: -pedantic-errors, --pedantic-errors 2791 2792OpenCL flags 2793------------ 2794.. option:: -cl-denorms-are-zero 2795 2796OpenCL only. Allow denormals to be flushed to zero. 2797 2798.. option:: -cl-fast-relaxed-math 2799 2800OpenCL only. Sets -cl-finite-math-only and -cl-unsafe-math-optimizations, and defines \_\_FAST\_RELAXED\_MATH\_\_. 2801 2802.. option:: -cl-finite-math-only 2803 2804OpenCL only. Allow floating-point optimizations that assume arguments and results are not NaNs or +-Inf. 2805 2806.. option:: -cl-fp32-correctly-rounded-divide-sqrt 2807 2808OpenCL only. Specify that single precision floating-point divide and sqrt used in the program source are correctly rounded. 2809 2810.. option:: -cl-kernel-arg-info 2811 2812OpenCL only. Generate kernel argument metadata. 2813 2814.. option:: -cl-mad-enable 2815 2816OpenCL only. Allow use of less precise MAD computations in the generated binary. 2817 2818.. option:: -cl-no-signed-zeros 2819 2820OpenCL only. Allow use of less precise no signed zeros computations in the generated binary. 2821 2822.. option:: -cl-no-stdinc 2823 2824OpenCL only. Disables all standard includes containing non-native compiler types and functions. 2825 2826.. option:: -cl-opt-disable 2827 2828OpenCL only. This option disables all optimizations. By default optimizations are enabled. 2829 2830.. option:: -cl-single-precision-constant 2831 2832OpenCL only. Treat double precision floating-point constant as single precision constant. 2833 2834.. option:: -cl-std=<arg> 2835 2836OpenCL language standard to compile for. <arg> must be 'cl', 'CL', 'cl1.0', 'CL1.0', 'cl1.1', 'CL1.1', 'cl1.2', 'CL1.2', 'cl2.0', 'CL2.0', 'cl3.0', 'CL3.0', 'clc++', 'CLC++', 'clc++1.0', 'CLC++1.0', 'clc++2021' or 'CLC++2021'. 2837 2838.. option:: -cl-strict-aliasing 2839 2840OpenCL only. This option is added for compatibility with OpenCL 1.0. 2841 2842.. option:: -cl-uniform-work-group-size 2843 2844OpenCL only. Defines that the global work-size be a multiple of the work-group size specified to clEnqueueNDRangeKernel 2845 2846.. option:: -cl-unsafe-math-optimizations 2847 2848OpenCL only. Allow unsafe floating-point optimizations. Also implies -cl-no-signed-zeros and -cl-mad-enable. 2849 2850SYCL flags 2851---------- 2852.. option:: -fsycl, -fno-sycl 2853 2854Enables SYCL kernels compilation for device 2855 2856.. option:: -sycl-std=<arg> 2857 2858SYCL language standard to compile for. <arg> must be '2020', '2017', '121', '1.2.1' or 'sycl-1.2.1'. 2859 2860Target-dependent compilation options 2861~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2862.. option:: -G<size>, -G=<arg>, -msmall-data-limit=<arg>, -msmall-data-threshold=<arg> 2863 2864Put objects of at most <size> bytes into small data section (MIPS / Hexagon) 2865 2866.. option:: -ffixed-x1 2867 2868Reserve the x1 register (AArch64/RISC-V only) 2869 2870.. option:: -ffixed-x10 2871 2872Reserve the x10 register (AArch64/RISC-V only) 2873 2874.. option:: -ffixed-x11 2875 2876Reserve the x11 register (AArch64/RISC-V only) 2877 2878.. option:: -ffixed-x12 2879 2880Reserve the x12 register (AArch64/RISC-V only) 2881 2882.. option:: -ffixed-x13 2883 2884Reserve the x13 register (AArch64/RISC-V only) 2885 2886.. option:: -ffixed-x14 2887 2888Reserve the x14 register (AArch64/RISC-V only) 2889 2890.. option:: -ffixed-x15 2891 2892Reserve the x15 register (AArch64/RISC-V only) 2893 2894.. option:: -ffixed-x16 2895 2896Reserve the x16 register (AArch64/RISC-V only) 2897 2898.. option:: -ffixed-x17 2899 2900Reserve the x17 register (AArch64/RISC-V only) 2901 2902.. option:: -ffixed-x18 2903 2904Reserve the x18 register (AArch64/RISC-V only) 2905 2906.. option:: -ffixed-x19 2907 2908Reserve the x19 register (AArch64/RISC-V only) 2909 2910.. option:: -ffixed-x2 2911 2912Reserve the x2 register (AArch64/RISC-V only) 2913 2914.. option:: -ffixed-x20 2915 2916Reserve the x20 register (AArch64/RISC-V only) 2917 2918.. option:: -ffixed-x21 2919 2920Reserve the x21 register (AArch64/RISC-V only) 2921 2922.. option:: -ffixed-x22 2923 2924Reserve the x22 register (AArch64/RISC-V only) 2925 2926.. option:: -ffixed-x23 2927 2928Reserve the x23 register (AArch64/RISC-V only) 2929 2930.. option:: -ffixed-x24 2931 2932Reserve the x24 register (AArch64/RISC-V only) 2933 2934.. option:: -ffixed-x25 2935 2936Reserve the x25 register (AArch64/RISC-V only) 2937 2938.. option:: -ffixed-x26 2939 2940Reserve the x26 register (AArch64/RISC-V only) 2941 2942.. option:: -ffixed-x27 2943 2944Reserve the x27 register (AArch64/RISC-V only) 2945 2946.. option:: -ffixed-x28 2947 2948Reserve the x28 register (AArch64/RISC-V only) 2949 2950.. option:: -ffixed-x29 2951 2952Reserve the x29 register (AArch64/RISC-V only) 2953 2954.. option:: -ffixed-x3 2955 2956Reserve the x3 register (AArch64/RISC-V only) 2957 2958.. option:: -ffixed-x30 2959 2960Reserve the x30 register (AArch64/RISC-V only) 2961 2962.. option:: -ffixed-x31 2963 2964Reserve the x31 register (AArch64/RISC-V only) 2965 2966.. option:: -ffixed-x4 2967 2968Reserve the x4 register (AArch64/RISC-V only) 2969 2970.. option:: -ffixed-x5 2971 2972Reserve the x5 register (AArch64/RISC-V only) 2973 2974.. option:: -ffixed-x6 2975 2976Reserve the x6 register (AArch64/RISC-V only) 2977 2978.. option:: -ffixed-x7 2979 2980Reserve the x7 register (AArch64/RISC-V only) 2981 2982.. option:: -ffixed-x8 2983 2984Reserve the x8 register (AArch64/RISC-V only) 2985 2986.. option:: -ffixed-x9 2987 2988Reserve the x9 register (AArch64/RISC-V only) 2989 2990.. option:: -ffuchsia-api-level=<arg> 2991 2992Set Fuchsia API level 2993 2994.. option:: -inline-asm=<arg> 2995 2996 <arg> must be 'att' or 'intel'. 2997 2998.. option:: -m16 2999 3000.. option:: -m32 3001 3002.. option:: -m64 3003 3004.. option:: -mabi=<arg> 3005 3006.. program:: clang1 3007.. option:: -mabi=vec-default 3008.. program:: clang 3009 3010Enable the default Altivec ABI on AIX (AIX only). Uses only volatile vector registers. 3011 3012.. program:: clang2 3013.. option:: -mabi=vec-extabi 3014.. program:: clang 3015 3016Enable the extended Altivec ABI on AIX (AIX only). Uses volatile and nonvolatile vector registers 3017 3018.. option:: -maix-struct-return 3019 3020Return all structs in memory (PPC32 only) 3021 3022.. option:: -malign-branch-boundary=<arg> 3023 3024Specify the boundary's size to align branches 3025 3026.. option:: -malign-branch=<arg1>,<arg2>... 3027 3028Specify types of branches to align 3029 3030.. option:: -malign-double 3031 3032Align doubles to two words in structs (x86 only) 3033 3034.. option:: -mamdgpu-ieee, -mno-amdgpu-ieee 3035 3036Sets the IEEE bit in the expected default floating point mode register. Floating point opcodes that support exception flag gathering quiet and propagate signaling NaN inputs per IEEE 754-2008. This option changes the ABI. (AMDGPU only) 3037 3038.. option:: -march=<arg> 3039 3040.. option:: -masm=<arg> 3041 3042.. option:: -mbackchain, -mno-backchain 3043 3044Link stack frames through backchain on System Z 3045 3046.. option:: -mbranch-protection=<arg> 3047 3048Enforce targets of indirect branches and function returns 3049 3050.. option:: -mbranches-within-32B-boundaries 3051 3052Align selected branches (fused, jcc, jmp) within 32-byte boundary 3053 3054.. option:: -mcmodel=<arg>, -mcmodel=medany (equivalent to -mcmodel=medium), -mcmodel=medlow (equivalent to -mcmodel=small) 3055 3056.. option:: -mcode-object-v3, -mno-code-object-v3 3057 3058Legacy option to specify code object ABI V3 (AMDGPU only) 3059 3060.. option:: -mcode-object-version=<arg> 3061 3062Specify code object ABI version. Defaults to 4. (AMDGPU only). <arg> must be 'none', '2', '3', '4' or '5'. 3063 3064.. option:: -mconsole<arg> 3065 3066.. program:: clang1 3067.. option:: -mcpu=<arg>, -mv5 (equivalent to -mcpu=hexagonv5), -mv55 (equivalent to -mcpu=hexagonv55), -mv60 (equivalent to -mcpu=hexagonv60), -mv62 (equivalent to -mcpu=hexagonv62), -mv65 (equivalent to -mcpu=hexagonv65), -mv66 (equivalent to -mcpu=hexagonv66), -mv67 (equivalent to -mcpu=hexagonv67), -mv67t (equivalent to -mcpu=hexagonv67t), -mv68 (equivalent to -mcpu=hexagonv68), -mv69 (equivalent to -mcpu=hexagonv69) 3068.. program:: clang 3069 3070.. option:: -mcrc, -mno-crc 3071 3072Allow use of CRC instructions (ARM/Mips only) 3073 3074.. option:: -mdefault-build-attributes<arg>, -mno-default-build-attributes<arg> 3075 3076.. option:: -mdll<arg> 3077 3078.. option:: -mdouble=<n 3079 3080Force double to be <n> bits. <n must be '32' or '64'. 3081 3082.. option:: -mdynamic-no-pic<arg> 3083 3084.. option:: -meabi <arg> 3085 3086Set EABI type. Default depends on triple). <arg> must be 'default', '4', '5' or 'gnu'. 3087 3088.. option:: -menable-experimental-extensions 3089 3090Enable use of experimental RISC-V extensions. 3091 3092.. option:: -mfentry 3093 3094Insert calls to fentry at function entry (x86/SystemZ only) 3095 3096.. option:: -mfloat-abi=<arg> 3097 3098 <arg> must be 'soft', 'softfp' or 'hard'. 3099 3100.. option:: -mfpmath=<arg> 3101 3102.. option:: -mfpu=<arg> 3103 3104.. option:: -mgeneral-regs-only 3105 3106Generate code which only uses the general purpose registers (AArch64/x86 only) 3107 3108.. option:: -mglobal-merge, -mno-global-merge 3109 3110Enable merging of globals 3111 3112.. option:: -mhard-float 3113 3114.. option:: -mhwdiv=<arg>, --mhwdiv <arg>, --mhwdiv=<arg> 3115 3116.. option:: -mhwmult=<arg> 3117 3118.. option:: -miamcu, -mno-iamcu 3119 3120Use Intel MCU ABI 3121 3122.. option:: -mibt-seal 3123 3124Optimize fcf-protection=branch/full (requires LTO). 3125 3126.. option:: -mignore-xcoff-visibility 3127 3128Not emit the visibility attribute for asm in AIX OS or give all symbols 'unspecified' visibility in XCOFF object file 3129 3130.. option:: -mimplicit-float, -mno-implicit-float 3131 3132.. option:: -mimplicit-it=<arg> 3133 3134.. option:: -mincremental-linker-compatible, -mno-incremental-linker-compatible 3135 3136(integrated-as) Emit an object file which can be used with an incremental linker 3137 3138.. option:: -miphoneos-version-min=<arg>, -mios-version-min=<arg> 3139 3140.. option:: -mkernel 3141 3142.. option:: -mlong-calls, -mno-long-calls 3143 3144Generate branches with extended addressability, usually via indirect jumps. 3145 3146.. option:: -mlvi-cfi, -mno-lvi-cfi 3147 3148Enable only control-flow mitigations for Load Value Injection (LVI) 3149 3150.. option:: -mlvi-hardening, -mno-lvi-hardening 3151 3152Enable all mitigations for Load Value Injection (LVI) 3153 3154.. option:: -mmacosx-version-min=<arg>, -mmacos-version-min=<arg> 3155 3156Set Mac OS X deployment target 3157 3158.. option:: -mmcu=<arg> 3159 3160.. option:: -mms-bitfields, -mno-ms-bitfields 3161 3162Set the default structure layout to be compatible with the Microsoft compiler standard 3163 3164.. option:: -mnop-mcount 3165 3166Generate mcount/\_\_fentry\_\_ calls as nops. To activate they need to be patched in. 3167 3168.. option:: -momit-leaf-frame-pointer, -mno-omit-leaf-frame-pointer 3169 3170Omit frame pointer setup for leaf functions 3171 3172.. option:: -moslib=<arg> 3173 3174.. option:: -mpacked-stack, -mno-packed-stack 3175 3176Use packed stack layout (SystemZ only). 3177 3178.. option:: -mpad-max-prefix-size=<arg> 3179 3180Specify maximum number of prefixes to use for padding 3181 3182.. option:: -mprefer-vector-width=<arg> 3183 3184Specifies preferred vector width for auto-vectorization. Defaults to 'none' which allows target specific decisions. 3185 3186.. option:: -mqdsp6-compat 3187 3188Enable hexagon-qdsp6 backward compatibility 3189 3190.. option:: -mrecip 3191 3192.. program:: clang1 3193.. option:: -mrecip=<arg1>,<arg2>... 3194.. program:: clang 3195 3196.. option:: -mrecord-mcount 3197 3198Generate a \_\_mcount\_loc section entry for each \_\_fentry\_\_ call. 3199 3200.. option:: -mred-zone, -mno-red-zone 3201 3202.. option:: -mregparm=<arg> 3203 3204.. option:: -mrelax, -mno-relax 3205 3206Enable linker relaxation 3207 3208.. option:: -mrelax-all, -mno-relax-all 3209 3210(integrated-as) Relax all machine instructions 3211 3212.. option:: -mretpoline, -mno-retpoline 3213 3214.. option:: -mrtd, -mno-rtd 3215 3216Make StdCall calling convention the default 3217 3218.. option:: -mseses, -mno-seses 3219 3220Enable speculative execution side effect suppression (SESES). Includes LVI control flow integrity mitigations 3221 3222.. option:: -msign-return-address=<arg> 3223 3224Select return address signing scope. <arg> must be 'none', 'all' or 'non-leaf'. 3225 3226.. option:: -msim 3227 3228.. option:: -mskip-rax-setup, -mno-skip-rax-setup 3229 3230Skip setting up RAX register when passing variable arguments (x86 only) 3231 3232.. option:: -msoft-float, -mno-soft-float 3233 3234Use software floating point 3235 3236.. option:: -mspeculative-load-hardening, -mno-speculative-load-hardening 3237 3238.. option:: -mstack-alignment=<arg> 3239 3240Set the stack alignment 3241 3242.. option:: -mstack-arg-probe, -mno-stack-arg-probe 3243 3244Enable stack probes 3245 3246.. option:: -mstack-probe-size=<arg> 3247 3248Set the stack probe size 3249 3250.. option:: -mstack-protector-guard-offset=<arg> 3251 3252Use the given offset for addressing the stack-protector guard 3253 3254.. option:: -mstack-protector-guard-reg=<arg> 3255 3256Use the given reg for addressing the stack-protector guard 3257 3258.. option:: -mstack-protector-guard=<arg> 3259 3260Use the given guard (global, tls) for addressing the stack-protector guard 3261 3262.. option:: -mstackrealign, -mno-stackrealign 3263 3264Force realign the stack at entry to every function 3265 3266.. option:: -msvr4-struct-return 3267 3268Return small structs in registers (PPC32 only) 3269 3270.. option:: -mtargetos=<arg> 3271 3272Set the deployment target to be the specified OS and OS version 3273 3274.. option:: -mthread-model <arg> 3275 3276The thread model to use. Defaults to 'posix'). <arg> must be 'posix' or 'single'. 3277 3278.. option:: -mthreads<arg> 3279 3280.. option:: -mthumb, -mno-thumb 3281 3282.. option:: -mtls-direct-seg-refs, -mno-tls-direct-seg-refs 3283 3284Enable direct TLS access through segment registers (default) 3285 3286.. option:: -mtls-size=<arg> 3287 3288Specify bit size of immediate TLS offsets (AArch64 ELF only): 12 (for 4KB) \| 24 (for 16MB, default) \| 32 (for 4GB) \| 48 (for 256TB, needs -mcmodel=large) 3289 3290.. program:: clang1 3291.. option:: -mtune=<arg> 3292.. program:: clang 3293 3294Only supported on X86 and RISC-V. Otherwise accepted for compatibility with GCC. 3295 3296.. option:: -mtvos-version-min=<arg>, -mappletvos-version-min=<arg> 3297 3298.. option:: -municode<arg> 3299 3300.. option:: -munsafe-fp-atomics, -mno-unsafe-fp-atomics 3301 3302Enable unsafe floating point atomic instructions (AMDGPU only) 3303 3304.. option:: -mvx, -mno-vx 3305 3306.. option:: -mwarn-nonportable-cfstrings, -mno-warn-nonportable-cfstrings 3307 3308.. option:: -mwatchos-version-min=<arg> 3309 3310.. option:: -mwavefrontsize64, -mno-wavefrontsize64 3311 3312Specify wavefront size 64 mode (AMDGPU only) 3313 3314.. option:: -mwindows<arg> 3315 3316.. option:: -mx32 3317 3318AARCH64 3319------- 3320.. option:: -fcall-saved-x10 3321 3322Make the x10 register call-saved (AArch64 only) 3323 3324.. option:: -fcall-saved-x11 3325 3326Make the x11 register call-saved (AArch64 only) 3327 3328.. option:: -fcall-saved-x12 3329 3330Make the x12 register call-saved (AArch64 only) 3331 3332.. option:: -fcall-saved-x13 3333 3334Make the x13 register call-saved (AArch64 only) 3335 3336.. option:: -fcall-saved-x14 3337 3338Make the x14 register call-saved (AArch64 only) 3339 3340.. option:: -fcall-saved-x15 3341 3342Make the x15 register call-saved (AArch64 only) 3343 3344.. option:: -fcall-saved-x18 3345 3346Make the x18 register call-saved (AArch64 only) 3347 3348.. option:: -fcall-saved-x8 3349 3350Make the x8 register call-saved (AArch64 only) 3351 3352.. option:: -fcall-saved-x9 3353 3354Make the x9 register call-saved (AArch64 only) 3355 3356.. option:: -mfix-cortex-a53-835769, -mno-fix-cortex-a53-835769 3357 3358Workaround Cortex-A53 erratum 835769 (AArch64 only) 3359 3360.. option:: -mmark-bti-property 3361 3362Add .note.gnu.property with BTI to assembly files (AArch64 only) 3363 3364.. option:: -msve-vector-bits=<arg> 3365 3366Specify the size in bits of an SVE vector register. Defaults to the vector length agnostic value of "scalable". (AArch64 only) 3367 3368.. option:: -mvscale-max=<arg> 3369 3370Specify the vscale maximum. Defaults to the vector length agnostic value of "0". (AArch64 only) 3371 3372.. option:: -mvscale-min=<arg> 3373 3374Specify the vscale minimum. Defaults to "1". (AArch64 only) 3375 3376AMDGPU 3377------ 3378.. option:: -mcumode, -mno-cumode 3379 3380Specify CU wavefront execution mode (AMDGPU only) 3381 3382.. option:: -mtgsplit, -mno-tgsplit 3383 3384Enable threadgroup split execution mode (AMDGPU only) 3385 3386ARM 3387--- 3388.. option:: -faapcs-bitfield-load 3389 3390Follows the AAPCS standard that all volatile bit-field write generates at least one load. (ARM only). 3391 3392.. option:: -faapcs-bitfield-width, -fno-aapcs-bitfield-width 3393 3394Follow the AAPCS standard requirement stating that volatile bit-field width is dictated by the field container type. (ARM only). 3395 3396.. option:: -ffixed-r9 3397 3398Reserve the r9 register (ARM only) 3399 3400.. option:: -mcmse 3401 3402Allow use of CMSE (Armv8-M Security Extensions) 3403 3404.. option:: -mexecute-only, -mno-execute-only, -mpure-code 3405 3406Disallow generation of data access to code sections (ARM only) 3407 3408.. option:: -mfix-cmse-cve-2021-35465, -mno-fix-cmse-cve-2021-35465 3409 3410Work around VLLDM erratum CVE-2021-35465 (ARM only) 3411 3412.. option:: -mfix-cortex-a57-aes-1742098, -mfix-cortex-a72-aes-1655431, -mno-fix-cortex-a57-aes-1742098 3413 3414Work around Cortex-A57 Erratum 1742098 (ARM only) 3415 3416.. option:: -mno-bti-at-return-twice 3417 3418Do not add a BTI instruction after a setjmp or other return-twice construct (Arm/AArch64 only) 3419 3420.. option:: -mno-movt 3421 3422Disallow use of movt/movw pairs (ARM only) 3423 3424.. option:: -mno-neg-immediates 3425 3426Disallow converting instructions with negative immediates to their negation or inversion. 3427 3428.. option:: -mnocrc 3429 3430Disallow use of CRC instructions (ARM only) 3431 3432.. option:: -mrestrict-it, -mno-restrict-it 3433 3434Disallow generation of complex IT blocks. 3435 3436.. option:: -mtp=<arg> 3437 3438Thread pointer access method (AArch32/AArch64 only). <arg> must be 'soft', 'cp15', 'el0', 'el1', 'el2' or 'el3'. 3439 3440.. option:: -munaligned-access, -mno-unaligned-access 3441 3442Allow memory accesses to be unaligned (AArch32/AArch64 only) 3443 3444Hexagon 3445------- 3446.. option:: -mhvx-ieee-fp, -mno-hvx-ieee-fp 3447 3448Enable Hexagon HVX IEEE floating-point 3449 3450.. option:: -mieee-rnd-near 3451 3452.. option:: -mmemops, -mno-memops 3453 3454Enable generation of memop instructions 3455 3456.. option:: -mnvj, -mno-nvj 3457 3458Enable generation of new-value jumps 3459 3460.. option:: -mnvs, -mno-nvs 3461 3462Enable generation of new-value stores 3463 3464.. option:: -mpackets, -mno-packets 3465 3466Enable generation of instruction packets 3467 3468Hexagon 3469------- 3470.. option:: -mhvx, -mno-hvx 3471 3472Enable Hexagon Vector eXtensions 3473 3474.. option:: -mhvx-length=<arg> 3475 3476Set Hexagon Vector Length. <arg> must be '64B' or '128B'. 3477 3478.. option:: -mhvx-qfloat, -mno-hvx-qfloat 3479 3480Enable Hexagon HVX QFloat instructions 3481 3482.. program:: clang1 3483.. option:: -mhvx=<arg> 3484.. program:: clang 3485 3486Enable Hexagon Vector eXtensions 3487 3488M68k 3489---- 3490.. option:: -ffixed-a0 3491 3492Reserve the a0 register (M68k only) 3493 3494.. option:: -ffixed-a1 3495 3496Reserve the a1 register (M68k only) 3497 3498.. option:: -ffixed-a2 3499 3500Reserve the a2 register (M68k only) 3501 3502.. option:: -ffixed-a3 3503 3504Reserve the a3 register (M68k only) 3505 3506.. option:: -ffixed-a4 3507 3508Reserve the a4 register (M68k only) 3509 3510.. option:: -ffixed-a5 3511 3512Reserve the a5 register (M68k only) 3513 3514.. option:: -ffixed-a6 3515 3516Reserve the a6 register (M68k only) 3517 3518.. option:: -ffixed-d0 3519 3520Reserve the d0 register (M68k only) 3521 3522.. option:: -ffixed-d1 3523 3524Reserve the d1 register (M68k only) 3525 3526.. option:: -ffixed-d2 3527 3528Reserve the d2 register (M68k only) 3529 3530.. option:: -ffixed-d3 3531 3532Reserve the d3 register (M68k only) 3533 3534.. option:: -ffixed-d4 3535 3536Reserve the d4 register (M68k only) 3537 3538.. option:: -ffixed-d5 3539 3540Reserve the d5 register (M68k only) 3541 3542.. option:: -ffixed-d6 3543 3544Reserve the d6 register (M68k only) 3545 3546.. option:: -ffixed-d7 3547 3548Reserve the d7 register (M68k only) 3549 3550.. option:: -m68000 3551 3552.. option:: -m68010 3553 3554.. option:: -m68020 3555 3556.. option:: -m68030 3557 3558.. option:: -m68040 3559 3560.. option:: -m68060 3561 3562MIPS 3563---- 3564.. option:: -mabicalls, -mno-abicalls 3565 3566Enable SVR4-style position-independent code (Mips only) 3567 3568.. option:: -mabs=<arg> 3569 3570.. option:: -mcheck-zero-division, -mno-check-zero-division 3571 3572.. option:: -mcompact-branches=<arg> 3573 3574.. option:: -mdouble-float 3575 3576.. option:: -mdsp, -mno-dsp 3577 3578.. option:: -mdspr2, -mno-dspr2 3579 3580.. option:: -membedded-data, -mno-embedded-data 3581 3582Place constants in the .rodata section instead of the .sdata section even if they meet the -G <size> threshold (MIPS) 3583 3584.. option:: -mextern-sdata, -mno-extern-sdata 3585 3586Assume that externally defined data is in the small data if it meets the -G <size> threshold (MIPS) 3587 3588.. option:: -mfix4300 3589 3590.. option:: -mfp32 3591 3592Use 32-bit floating point registers (MIPS only) 3593 3594.. option:: -mfp64 3595 3596Use 64-bit floating point registers (MIPS only) 3597 3598.. option:: -mginv, -mno-ginv 3599 3600.. option:: -mgpopt, -mno-gpopt 3601 3602Use GP relative accesses for symbols known to be in a small data section (MIPS) 3603 3604.. option:: -mindirect-jump=<arg> 3605 3606Change indirect jump instructions to inhibit speculation 3607 3608.. option:: -mips16 3609 3610.. option:: -mldc1-sdc1, -mno-ldc1-sdc1 3611 3612.. option:: -mlocal-sdata, -mno-local-sdata 3613 3614Extend the -G behaviour to object local data (MIPS) 3615 3616.. option:: -mmadd4, -mno-madd4 3617 3618Enable the generation of 4-operand madd.s, madd.d and related instructions. 3619 3620.. option:: -mmicromips, -mno-micromips 3621 3622.. option:: -mmsa, -mno-msa 3623 3624Enable MSA ASE (MIPS only) 3625 3626.. option:: -mmt, -mno-mt 3627 3628Enable MT ASE (MIPS only) 3629 3630.. option:: -mnan=<arg> 3631 3632.. option:: -mno-mips16 3633 3634.. option:: -msingle-float 3635 3636.. option:: -mvirt, -mno-virt 3637 3638.. option:: -mxgot, -mno-xgot 3639 3640PowerPC 3641------- 3642.. option:: -maltivec, -mno-altivec 3643 3644.. option:: -mcmpb, -mno-cmpb 3645 3646.. option:: -mcrbits, -mno-crbits 3647 3648.. option:: -mcrypto, -mno-crypto 3649 3650.. option:: -mdirect-move, -mno-direct-move 3651 3652.. option:: -mefpu2 3653 3654.. option:: -mfloat128, -mno-float128 3655 3656.. option:: -mfprnd, -mno-fprnd 3657 3658.. option:: -mhtm, -mno-htm 3659 3660.. option:: -minvariant-function-descriptors, -mno-invariant-function-descriptors 3661 3662.. option:: -misel, -mno-isel 3663 3664.. option:: -mlongcall, -mno-longcall 3665 3666.. option:: -mmfocrf, -mmfcrf, -mno-mfocrf 3667 3668.. option:: -mmma, -mno-mma 3669 3670.. option:: -mpaired-vector-memops, -mno-paired-vector-memops 3671 3672.. option:: -mpcrel, -mno-pcrel 3673 3674.. option:: -mpopcntd, -mno-popcntd 3675 3676.. option:: -mpower10-vector, -mno-power10-vector 3677 3678.. option:: -mpower8-vector, -mno-power8-vector 3679 3680.. option:: -mpower9-vector, -mno-power9-vector 3681 3682.. option:: -mprefixed, -mno-prefixed 3683 3684.. option:: -mprivileged 3685 3686.. option:: -mrop-protect 3687 3688.. option:: -msecure-plt 3689 3690.. option:: -mspe, -mno-spe 3691 3692.. option:: -mvsx, -mno-vsx 3693 3694WebAssembly 3695----------- 3696.. option:: -matomics, -mno-atomics 3697 3698.. option:: -mbulk-memory, -mno-bulk-memory 3699 3700.. option:: -mexception-handling, -mno-exception-handling 3701 3702.. option:: -mextended-const, -mno-extended-const 3703 3704.. option:: -mmultivalue, -mno-multivalue 3705 3706.. option:: -mmutable-globals, -mno-mutable-globals 3707 3708.. option:: -mnontrapping-fptoint, -mno-nontrapping-fptoint 3709 3710.. option:: -mreference-types, -mno-reference-types 3711 3712.. option:: -mrelaxed-simd, -mno-relaxed-simd 3713 3714.. option:: -msign-ext, -mno-sign-ext 3715 3716.. option:: -msimd128, -mno-simd128 3717 3718.. option:: -mtail-call, -mno-tail-call 3719 3720WebAssembly Driver 3721------------------ 3722.. option:: -mexec-model=<arg> 3723 3724Execution model (WebAssembly only). <arg> must be 'command' or 'reactor'. 3725 3726X86 3727--- 3728.. option:: -m3dnow, -mno-3dnow 3729 3730.. option:: -m3dnowa, -mno-3dnowa 3731 3732.. option:: -madx, -mno-adx 3733 3734.. option:: -maes, -mno-aes 3735 3736.. option:: -mamx-bf16, -mno-amx-bf16 3737 3738.. option:: -mamx-int8, -mno-amx-int8 3739 3740.. option:: -mamx-tile, -mno-amx-tile 3741 3742.. option:: -mavx, -mno-avx 3743 3744.. option:: -mavx2, -mno-avx2 3745 3746.. option:: -mavx512bf16, -mno-avx512bf16 3747 3748.. option:: -mavx512bitalg, -mno-avx512bitalg 3749 3750.. option:: -mavx512bw, -mno-avx512bw 3751 3752.. option:: -mavx512cd, -mno-avx512cd 3753 3754.. option:: -mavx512dq, -mno-avx512dq 3755 3756.. option:: -mavx512er, -mno-avx512er 3757 3758.. option:: -mavx512f, -mno-avx512f 3759 3760.. option:: -mavx512fp16, -mno-avx512fp16 3761 3762.. option:: -mavx512ifma, -mno-avx512ifma 3763 3764.. option:: -mavx512pf, -mno-avx512pf 3765 3766.. option:: -mavx512vbmi, -mno-avx512vbmi 3767 3768.. option:: -mavx512vbmi2, -mno-avx512vbmi2 3769 3770.. option:: -mavx512vl, -mno-avx512vl 3771 3772.. option:: -mavx512vnni, -mno-avx512vnni 3773 3774.. option:: -mavx512vp2intersect, -mno-avx512vp2intersect 3775 3776.. option:: -mavx512vpopcntdq, -mno-avx512vpopcntdq 3777 3778.. option:: -mavxvnni, -mno-avxvnni 3779 3780.. option:: -mbmi, -mno-bmi 3781 3782.. option:: -mbmi2, -mno-bmi2 3783 3784.. option:: -mcldemote, -mno-cldemote 3785 3786.. option:: -mclflushopt, -mno-clflushopt 3787 3788.. option:: -mclwb, -mno-clwb 3789 3790.. option:: -mclzero, -mno-clzero 3791 3792.. option:: -mcrc32, -mno-crc32 3793 3794.. option:: -mcx16, -mno-cx16 3795 3796.. option:: -menqcmd, -mno-enqcmd 3797 3798.. option:: -mf16c, -mno-f16c 3799 3800.. option:: -mfma, -mno-fma 3801 3802.. option:: -mfma4, -mno-fma4 3803 3804.. option:: -mfsgsbase, -mno-fsgsbase 3805 3806.. option:: -mfxsr, -mno-fxsr 3807 3808.. option:: -mgfni, -mno-gfni 3809 3810.. option:: -mhreset, -mno-hreset 3811 3812.. option:: -minvpcid, -mno-invpcid 3813 3814.. option:: -mkl, -mno-kl 3815 3816.. option:: -mlwp, -mno-lwp 3817 3818.. option:: -mlzcnt, -mno-lzcnt 3819 3820.. option:: -mmmx, -mno-mmx 3821 3822.. option:: -mmovbe, -mno-movbe 3823 3824.. option:: -mmovdir64b, -mno-movdir64b 3825 3826.. option:: -mmovdiri, -mno-movdiri 3827 3828.. option:: -mmwaitx, -mno-mwaitx 3829 3830.. option:: -mpclmul, -mno-pclmul 3831 3832.. option:: -mpconfig, -mno-pconfig 3833 3834.. option:: -mpku, -mno-pku 3835 3836.. option:: -mpopcnt, -mno-popcnt 3837 3838.. option:: -mprefetchwt1, -mno-prefetchwt1 3839 3840.. option:: -mprfchw, -mno-prfchw 3841 3842.. option:: -mptwrite, -mno-ptwrite 3843 3844.. option:: -mrdpid, -mno-rdpid 3845 3846.. option:: -mrdrnd, -mno-rdrnd 3847 3848.. option:: -mrdseed, -mno-rdseed 3849 3850.. option:: -mretpoline-external-thunk, -mno-retpoline-external-thunk 3851 3852.. option:: -mrtm, -mno-rtm 3853 3854.. option:: -msahf, -mno-sahf 3855 3856.. option:: -mserialize, -mno-serialize 3857 3858.. option:: -msgx, -mno-sgx 3859 3860.. option:: -msha, -mno-sha 3861 3862.. option:: -mshstk, -mno-shstk 3863 3864.. option:: -msse, -mno-sse 3865 3866.. option:: -msse2, -mno-sse2 3867 3868.. option:: -msse3, -mno-sse3 3869 3870.. option:: -msse4.1, -mno-sse4.1 3871 3872.. program:: clang1 3873.. option:: -msse4.2, -mno-sse4.2, -msse4 3874.. program:: clang 3875 3876.. option:: -msse4a, -mno-sse4a 3877 3878.. option:: -mssse3, -mno-ssse3 3879 3880.. option:: -mtbm, -mno-tbm 3881 3882.. option:: -mtsxldtrk, -mno-tsxldtrk 3883 3884.. option:: -muintr, -mno-uintr 3885 3886.. option:: -mvaes, -mno-vaes 3887 3888.. option:: -mvpclmulqdq, -mno-vpclmulqdq 3889 3890.. option:: -mvzeroupper, -mno-vzeroupper 3891 3892.. option:: -mwaitpkg, -mno-waitpkg 3893 3894.. option:: -mwbnoinvd, -mno-wbnoinvd 3895 3896.. option:: -mwidekl, -mno-widekl 3897 3898.. option:: -mx87, -m80387, -mno-x87 3899 3900.. option:: -mxop, -mno-xop 3901 3902.. option:: -mxsave, -mno-xsave 3903 3904.. option:: -mxsavec, -mno-xsavec 3905 3906.. option:: -mxsaveopt, -mno-xsaveopt 3907 3908.. option:: -mxsaves, -mno-xsaves 3909 3910RISCV 3911----- 3912.. option:: -msave-restore, -mno-save-restore 3913 3914Enable using library calls for save and restore 3915 3916Long double flags 3917----------------- 3918Selects the long double implementation 3919 3920.. option:: -mlong-double-128 3921 3922Force long double to be 128 bits 3923 3924.. option:: -mlong-double-64 3925 3926Force long double to be 64 bits 3927 3928.. option:: -mlong-double-80 3929 3930Force long double to be 80 bits, padded to 128 bits for storage 3931 3932Optimization level 3933~~~~~~~~~~~~~~~~~~ 3934 3935Flags controlling how much optimization should be performed. 3936 3937.. option:: -O<arg>, -O (equivalent to -O1), --optimize, --optimize=<arg> 3938 3939.. option:: -Ofast<arg> 3940 3941Debug information generation 3942~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3943 3944Flags controlling how much and what kind of debug information should be 3945generated. 3946 3947Kind and level of debug information 3948----------------------------------- 3949.. option:: -g, --debug, --debug=<arg> 3950 3951Generate source-level debug information 3952 3953.. option:: -gdwarf 3954 3955Generate source-level debug information with the default dwarf version 3956 3957.. option:: -gdwarf-2 3958 3959Generate source-level debug information with dwarf version 2 3960 3961.. option:: -gdwarf-3 3962 3963Generate source-level debug information with dwarf version 3 3964 3965.. option:: -gdwarf-4 3966 3967Generate source-level debug information with dwarf version 4 3968 3969.. option:: -gdwarf-5 3970 3971Generate source-level debug information with dwarf version 5 3972 3973.. option:: -gdwarf32 3974 3975Enables DWARF32 format for ELF binaries, if debug information emission is enabled. 3976 3977.. option:: -gdwarf64 3978 3979Enables DWARF64 format for ELF binaries, if debug information emission is enabled. 3980 3981.. option:: -gfull 3982 3983.. option:: -ginline-line-tables, -gno-inline-line-tables 3984 3985.. option:: -gused 3986 3987Debug level 3988___________ 3989.. option:: -g0 3990 3991.. option:: -g2 3992 3993.. option:: -g3 3994 3995.. option:: -ggdb0 3996 3997.. option:: -ggdb1 3998 3999.. option:: -ggdb2 4000 4001.. option:: -ggdb3 4002 4003.. option:: -gline-directives-only 4004 4005Emit debug line info directives only 4006 4007.. option:: -gline-tables-only, -g1, -gmlt 4008 4009Emit debug line number tables only 4010 4011.. option:: -gmodules 4012 4013Generate debug info with external references to clang modules or precompiled headers 4014 4015Debugger to tune debug information for 4016______________________________________ 4017.. option:: -gdbx 4018 4019.. option:: -ggdb 4020 4021.. option:: -glldb 4022 4023.. option:: -gsce 4024 4025Debug information flags 4026----------------------- 4027.. option:: -gcolumn-info, -gno-column-info 4028 4029.. option:: -gdwarf-aranges 4030 4031.. option:: -gembed-source, -gno-embed-source 4032 4033Embed source text in DWARF debug sections 4034 4035.. option:: -ggnu-pubnames, -gno-gnu-pubnames 4036 4037.. option:: -gpubnames, -gno-pubnames 4038 4039.. option:: -grecord-command-line, -gno-record-command-line, -grecord-gcc-switches 4040 4041.. option:: -gsimple-template-names, -gno-simple-template-names 4042 4043.. option:: -gsplit-dwarf, -gno-split-dwarf 4044 4045.. program:: clang1 4046.. option:: -gsplit-dwarf=<arg> 4047.. program:: clang 4048 4049Set DWARF fission mode. <arg> must be 'split' or 'single'. 4050 4051.. option:: -gstrict-dwarf, -gno-strict-dwarf 4052 4053.. option:: -gz=<arg>, -gz (equivalent to -gz=zlib) 4054 4055DWARF debug sections compression type 4056 4057Static analyzer flags 4058===================== 4059 4060Flags controlling the behavior of the Clang Static Analyzer. 4061 4062.. option:: -Xanalyzer <arg> 4063 4064Pass <arg> to the static analyzer 4065 4066Fortran compilation flags 4067========================= 4068 4069Flags that will be passed onto the ``gfortran`` compiler when Clang is given 4070a Fortran input. 4071 4072.. option:: -A<arg>, --assert <arg>, --assert=<arg> 4073 4074.. option:: -A-<arg> 4075 4076.. option:: -faggressive-function-elimination, -fno-aggressive-function-elimination 4077 4078.. option:: -falign-commons, -fno-align-commons 4079 4080.. option:: -fall-intrinsics, -fno-all-intrinsics 4081 4082.. option:: -fbacktrace, -fno-backtrace 4083 4084.. option:: -fblas-matmul-limit=<arg> 4085 4086.. option:: -fbounds-check, -fno-bounds-check 4087 4088.. option:: -fcheck-array-temporaries, -fno-check-array-temporaries 4089 4090.. option:: -fcheck=<arg> 4091 4092.. option:: -fcoarray=<arg> 4093 4094.. option:: -fconvert=<arg> 4095 4096.. option:: -fcray-pointer, -fno-cray-pointer 4097 4098.. option:: -fd-lines-as-code, -fno-d-lines-as-code 4099 4100.. option:: -fd-lines-as-comments, -fno-d-lines-as-comments 4101 4102.. option:: -fdollar-ok, -fno-dollar-ok 4103 4104.. option:: -fdump-fortran-optimized, -fno-dump-fortran-optimized 4105 4106.. option:: -fdump-fortran-original, -fno-dump-fortran-original 4107 4108.. option:: -fdump-parse-tree, -fno-dump-parse-tree 4109 4110.. option:: -fexternal-blas, -fno-external-blas 4111 4112.. option:: -ff2c, -fno-f2c 4113 4114.. option:: -ffpe-trap=<arg> 4115 4116.. option:: -ffree-line-length-<arg> 4117 4118.. option:: -ffrontend-optimize, -fno-frontend-optimize 4119 4120.. option:: -finit-character=<arg> 4121 4122.. option:: -finit-integer=<arg> 4123 4124.. option:: -finit-local-zero, -fno-init-local-zero 4125 4126.. option:: -finit-logical=<arg> 4127 4128.. option:: -finit-real=<arg> 4129 4130.. option:: -finteger-4-integer-8, -fno-integer-4-integer-8 4131 4132.. option:: -fmax-array-constructor=<arg> 4133 4134.. option:: -fmax-errors=<arg> 4135 4136.. option:: -fmax-identifier-length, -fno-max-identifier-length 4137 4138.. option:: -fmax-stack-var-size=<arg> 4139 4140.. option:: -fmax-subrecord-length=<arg> 4141 4142.. option:: -fmodule-private, -fno-module-private 4143 4144.. option:: -fpack-derived, -fno-pack-derived 4145 4146.. option:: -frange-check, -fno-range-check 4147 4148.. option:: -freal-4-real-10, -fno-real-4-real-10 4149 4150.. option:: -freal-4-real-16, -fno-real-4-real-16 4151 4152.. option:: -freal-4-real-8, -fno-real-4-real-8 4153 4154.. option:: -freal-8-real-10, -fno-real-8-real-10 4155 4156.. option:: -freal-8-real-16, -fno-real-8-real-16 4157 4158.. option:: -freal-8-real-4, -fno-real-8-real-4 4159 4160.. option:: -frealloc-lhs, -fno-realloc-lhs 4161 4162.. option:: -frecord-marker=<arg> 4163 4164.. option:: -frecursive, -fno-recursive 4165 4166.. option:: -frepack-arrays, -fno-repack-arrays 4167 4168.. option:: -fsecond-underscore, -fno-second-underscore 4169 4170.. option:: -fsign-zero, -fno-sign-zero 4171 4172.. option:: -fstack-arrays, -fno-stack-arrays 4173 4174.. option:: -funderscoring, -fno-underscoring 4175 4176.. option:: -fwhole-file, -fno-whole-file 4177 4178.. option:: -imultilib <arg> 4179 4180.. option:: -static-libgfortran 4181 4182Linker flags 4183============ 4184Flags that are passed on to the linker 4185 4186.. option:: -L<dir>, --library-directory <arg>, --library-directory=<arg> 4187 4188Add directory to library search path 4189 4190.. option:: -Mach 4191 4192.. option:: -T<script> 4193 4194Specify <script> as linker script 4195 4196.. option:: -Tbss<addr> 4197 4198Set starting address of BSS to <addr> 4199 4200.. option:: -Tdata<addr> 4201 4202Set starting address of DATA to <addr> 4203 4204.. option:: -Ttext<addr> 4205 4206Set starting address of TEXT to <addr> 4207 4208.. option:: -Wl,<arg>,<arg2>... 4209 4210Pass the comma separated arguments in <arg> to the linker 4211 4212.. option:: --offload-link 4213 4214Use the linker supporting offloading device linking. 4215 4216.. option:: -X 4217 4218.. option:: -Xlinker <arg>, --for-linker <arg>, --for-linker=<arg> 4219 4220Pass <arg> to the linker 4221 4222.. option:: -Xoffload-linker <arg>, -Xoffload-linker-<triple> <arg> 4223 4224Pass <arg> to all the device linking jobs, or for only <triple> if specified. 4225 4226.. program:: clang1 4227.. option:: -Z 4228.. program:: clang 4229 4230.. option:: -b<arg> 4231 4232Pass -b <arg> to the linker on AIX (only). 4233 4234.. option:: -coverage, --coverage 4235 4236.. option:: -e<arg>, --entry 4237 4238.. option:: -filelist <arg> 4239 4240.. option:: --hip-device-lib=<arg> 4241 4242HIP device library 4243 4244.. option:: --hipspv-pass-plugin=<dsopath> 4245 4246path to a pass plugin for HIP to SPIR-V passes. 4247 4248.. option:: -l<arg> 4249 4250.. option:: --ld-path=<arg> 4251 4252.. option:: -nostartfiles 4253 4254.. program:: clang1 4255.. option:: -nostdlib, --no-standard-libraries 4256.. program:: clang 4257 4258.. option:: -pie 4259 4260.. option:: -r 4261 4262.. option:: -rdynamic 4263 4264.. option:: --rocm-device-lib-path=<arg>, --hip-device-lib-path=<arg> 4265 4266ROCm device library path. Alternative to rocm-path. 4267 4268.. option:: -rpath <arg> 4269 4270.. option:: -s 4271 4272.. option:: -shared, --shared 4273 4274.. option:: -specs=<arg>, --specs=<arg> 4275 4276.. option:: -static, --static 4277 4278.. option:: -static-pie 4279 4280.. option:: -t 4281 4282.. option:: -u<arg>, --force-link <arg>, --force-link=<arg> 4283 4284.. option:: -undef 4285 4286undef all system defines 4287 4288.. option:: -undefined<arg>, --no-undefined 4289 4290.. option:: -z <arg> 4291 4292Pass -z <arg> to the linker 4293 4294<clang-dxc options> 4295=================== 4296dxc compatibility options 4297 4298.. program:: clang2 4299.. option:: /T<profile>, -T<profile> 4300.. program:: clang 4301 4302Set target profile. <profile> must be 'ps_6_0', ' ps_6_1', ' ps_6_2', ' ps_6_3', ' ps_6_4', ' ps_6_5', ' ps_6_6', ' ps_6_7', 'vs_6_0', ' vs_6_1', ' vs_6_2', ' vs_6_3', ' vs_6_4', ' vs_6_5', ' vs_6_6', ' vs_6_7', 'gs_6_0', ' gs_6_1', ' gs_6_2', ' gs_6_3', ' gs_6_4', ' gs_6_5', ' gs_6_6', ' gs_6_7', 'hs_6_0', ' hs_6_1', ' hs_6_2', ' hs_6_3', ' hs_6_4', ' hs_6_5', ' hs_6_6', ' hs_6_7', 'ds_6_0', ' ds_6_1', ' ds_6_2', ' ds_6_3', ' ds_6_4', ' ds_6_5', ' ds_6_6', ' ds_6_7', 'cs_6_0', ' cs_6_1', ' cs_6_2', ' cs_6_3', ' cs_6_4', ' cs_6_5', ' cs_6_6', ' cs_6_7', 'lib_6_3', ' lib_6_4', ' lib_6_5', ' lib_6_6', ' lib_6_7', ' lib_6_x', 'ms_6_5', ' ms_6_6', ' ms_6_7', 'as_6_5', ' as_6_6' or ' as_6_7'. 4303 4304.. program:: clang3 4305.. option:: /emit-pristine-llvm, -emit-pristine-llvm, /fcgl, -fcgl 4306.. program:: clang 4307 4308Emit pristine LLVM IR from the frontend by not running any LLVM passes at all.Same as -S + -emit-llvm + -disable-llvm-passes. 4309 4310