diff --git a/clang/docs/ClangCommandLineReference.rst b/clang/docs/ClangCommandLineReference.rst index d8fa4b33baf0f..13e175a4e5203 100644 --- a/clang/docs/ClangCommandLineReference.rst +++ b/clang/docs/ClangCommandLineReference.rst @@ -76,16 +76,6 @@ Pass to fatbinary invocation Pass to the ptxas assembler -.. option:: -Xopenmp-target - -Pass to the target offloading toolchain. - -.. program:: clang1 -.. option:: -Xopenmp-target= -.. program:: clang - -Pass to the target offloading toolchain identified by . - .. option:: -Z .. option:: -a, --profile-blocks @@ -142,17 +132,9 @@ Specifies configuration file .. option:: --constant-cfstrings -.. option:: --cuda-compile-host-device - -Compile CUDA code for both host and device (default). Has no effect on non-CUDA compilations. - -.. option:: --cuda-device-only - -Compile CUDA code for device only +.. option:: --cuda-feature= -.. option:: --cuda-host-only - -Compile CUDA code for host only. Has no effect on non-CUDA compilations. +Manually specify the CUDA feature to use .. option:: --cuda-include-ptx=, --no-cuda-include-ptx= @@ -168,6 +150,14 @@ An ID for compilation unit, which should be the same for the same compilation un .. option:: -current\_version +.. option:: -darwin-target-variant + +Generate code for an additional runtime variant of the deployment target + +.. option:: -darwin-target-variant-triple + +Specify the darwin target variant triple + .. option:: -dead\_strip .. option:: -dependency-dot @@ -226,6 +216,10 @@ Start emitting warnings for unused driver arguments Reserve register r19 (Hexagon only) +.. option:: -fgpu-default-stream= + +Specify default stream. The default value is 'legacy'. (HIP only). must be 'legacy' or 'per-thread'. + .. option:: -fgpu-flush-denormals-to-zero, -fcuda-flush-denormals-to-zero, -fno-gpu-flush-denormals-to-zero Flush denormal floating point values to zero in CUDA/HIP device mode. @@ -238,22 +232,6 @@ Flush denormal floating point values to zero in CUDA/HIP device mode. Specify comma-separated list of triples OpenMP offloading targets to be supported -.. option:: -fopenmp-new-driver, -fno-openmp-new-driver - -Use the new driver for OpenMP offloading. - -.. option:: --offload-new-driver, --no-offload-new-driver - -Use the new driver for offloading compilation. - -.. option:: --offload-host-only - -Only compile for the host when offloading. - -.. option:: --offload-device-only - -Only compile for the device when offloading. - .. option:: -force\_cpusubtype\_ALL .. program:: clang1 @@ -313,7 +291,7 @@ Default max threads per block for kernel launch bounds for HIP .. option:: -headerpad\_max\_install\_names -.. option:: -help, --help +.. option:: -help, --help, /help, -help, --help Display available options @@ -355,10 +333,6 @@ Make the next included directory (-I or -F) an indexer header map .. option:: -mbig-endian, -EB -.. option:: -mbranch-protection= - -Enforce targets of indirect branches and function returns - .. option:: -menable-unsafe-fp-math Allow unsafe floating-point math optimizations which may decrease precision @@ -381,6 +355,10 @@ Run the migrator Additional arguments to forward to LLVM's option processing +.. option:: -mmlir + +Additional arguments to forward to MLIR's option processing + .. option:: -module-dependency-dir Directory to dump module dependencies to @@ -401,6 +379,10 @@ Directory to dump module dependencies to Don't error out if the detected version of the CUDA install is too low for the requested CUDA gpu architecture. +.. option:: -no-hip-rt + +Do not link against HIP runtime libraries + .. option:: -no-integrated-cpp, --no-integrated-cpp .. option:: -no\_dead\_strip\_inits\_and\_terms @@ -411,6 +393,8 @@ Disable builtin #include directories .. option:: -nodefaultlibs +.. option:: -nodriverkitlib + .. option:: -nofixprebinding .. option:: -nogpuinc, -nocudainc @@ -449,7 +433,9 @@ Disable standard #include directories for the C++ standard library .. option:: -nostdlibinc -.. option:: -o, --output , --output= +.. program:: clang1 +.. option:: -o, /Fo, -Fo, --output , --output= +.. program:: clang Write output to @@ -527,6 +513,18 @@ Set the output for debug infos CUDA 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. +.. option:: --offload-device-only, --cuda-device-only + +Only compile for the offloading device. + +.. option:: --offload-host-device, --cuda-compile-host-device + +Only compile for the offloading host. + +.. option:: --offload-host-only, --cuda-host-only + +Only compile for the offloading host. + .. option:: --offload=,... Specify comma-separated list of offloading target triples (CUDA and HIP only) @@ -607,6 +605,8 @@ Print the registered targets .. option:: -private\_bundle +.. option:: --product-name= + .. option:: -pthread, -no-pthread Support POSIX threads in generated code @@ -703,7 +703,7 @@ Use the static host OpenMP runtime while linking. .. option:: -stdlib=, --stdlib=, --stdlib -C++ standard library to use +C++ standard library to use. must be 'libc++', 'libstdc++' or 'platform'. .. option:: -sub\_library @@ -741,7 +741,7 @@ Enable some traditional CPP emulation .. option:: -unwindlib=, --unwindlib= -Unwind library to use +Unwind library to use. must be 'libgcc', 'unwindlib' or 'platform'. .. option:: -v, --verbose @@ -849,6 +849,16 @@ Pass to the assembler Pass to the clang compiler +.. option:: -Xopenmp-target + +Pass to the target offloading toolchain. + +.. program:: clang1 +.. option:: -Xopenmp-target= +.. program:: clang + +Pass to the target offloading toolchain identified by . + .. option:: -ansi, --ansi .. option:: -fc++-abi= @@ -857,7 +867,7 @@ C++ ABI to use. This will override the target C++ ABI. .. option:: -fclang-abi-compat= -Attempt to match the ABI of Clang +Attempt to match the ABI of Clang . must be '.' or 'latest'. .. option:: -fcomment-block-commands=,... @@ -919,31 +929,37 @@ Inline suitable functions Inline functions which are (explicitly or implicitly) marked inline -.. option:: -flegacy-pass-manager, -fno-legacy-pass-manager - -Use the legacy pass manager in LLVM (deprecated, to be removed in a future release) - .. option:: -fno-crash-diagnostics Disable auto-generation of preprocessed source files and a script for reproduction during a clang crash +.. option:: -fno-legacy-pass-manager, -fexperimental-new-pass-manager + .. option:: -fno-sanitize-ignorelist, -fno-sanitize-blacklist Don't use ignorelist file for sanitizers .. option:: -fparse-all-comments +.. option:: -frandomize-layout-seed-file= + +File holding the seed used by the randomize structure layout feature + +.. option:: -frandomize-layout-seed= + +The seed used by the randomize structure layout feature + .. option:: -frecord-command-line, -fno-record-command-line, -frecord-gcc-switches .. option:: -fsanitize-address-destructor= -Set destructor type used in ASan instrumentation +Set destructor type used in ASan instrumentation. must be 'none' or 'global'. .. option:: -fsanitize-address-field-padding= Level of field padding for AddressSanitizer -.. option:: -fsanitize-address-globals-dead-stripping +.. option:: -fsanitize-address-globals-dead-stripping, -fno-sanitize-address-globals-dead-stripping Enable linker dead stripping of globals in AddressSanitizer @@ -957,7 +973,7 @@ Enable poisoning array cookies when using custom operator new\[\] in AddressSani .. option:: -fsanitize-address-use-after-return= -Select the mode of detecting stack use-after-return in AddressSanitizer: never \| runtime (default) \| always +Select the mode of detecting stack use-after-return in AddressSanitizer. must be 'never', 'runtime' or 'always'. .. option:: -fsanitize-address-use-after-scope, -fno-sanitize-address-use-after-scope @@ -1021,6 +1037,10 @@ Enable origins tracking in MemorySanitizer Enable use-after-destroy detection in MemorySanitizer +.. option:: -fsanitize-memtag-mode= + +Set default MTE mode to 'sync' (default) or 'async' + .. option:: -fsanitize-minimal-runtime, -fno-sanitize-minimal-runtime .. option:: -fsanitize-recover=,..., -fno-sanitize-recover=,..., -fsanitize-recover (equivalent to -fsanitize-recover=all) @@ -1188,14 +1208,6 @@ Validate the system headers that a module depends on when loading the module Specify the prebuilt module path -.. option:: -fmodule-header - -Build a C++20 header unit from a header specified. - -.. option:: -fmodule-header=\[user,system\] - -Build a C++20 header unit, but search for the header in the user or system header search paths respectively. - .. option:: --hip-path= HIP runtime installation path, used for finding HIP version and adding HIP include path. @@ -1431,7 +1443,7 @@ Treat editor placeholders as valid source code .. option:: -faltivec-src-compat= -Source-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'. +Source-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'. must be 'mixed', 'gcc' or 'xl'. .. option:: -fansi-escape-codes @@ -1481,7 +1493,7 @@ Enable EH Asynchronous exceptions .. option:: -fbasic-block-sections= -Generate labels for each basic block or place each basic block or a subset of basic blocks in its own section. +Generate labels for each basic block or place each basic block or a subset of basic blocks in its own section. must be 'all', 'labels', 'none' or 'list='. .. option:: -fbinutils-version= @@ -1513,17 +1525,19 @@ Load the clang builtins module map file. .. option:: -fcf-protection=, -fcf-protection (equivalent to -fcf-protection=full) -Instrument control-flow architecture protection. Options: return, branch, full, none. +Instrument control-flow architecture protection. must be 'return', 'branch', 'full' or 'none'. .. option:: -fcf-runtime-abi= + must be 'unspecified', 'standalone', 'objc', 'swift', 'swift-5.0', 'swift-4.2' or 'swift-4.1'. + .. option:: -fchar8\_t, -fno-char8\_t Enable C++ builtin type char8\_t .. option:: -fclasspath=, --CLASSPATH , --CLASSPATH=, --classpath , --classpath= -.. option:: -fcolor-diagnostics, -fno-color-diagnostics +.. option:: -fcolor-diagnostics, -fdiagnostics-color, -fno-color-diagnostics Enable colors in diagnostics @@ -1641,8 +1655,6 @@ Treat usage of null pointers as undefined behavior (default) Print absolute paths in diagnostics -.. option:: -fdiagnostics-color, -fno-diagnostics-color - .. program:: clang1 .. option:: -fdiagnostics-color= .. program:: clang @@ -1651,6 +1663,10 @@ Print absolute paths in diagnostics Prevent optimization remarks from being output if they do not have at least this profile count. Use 'auto' to apply the threshold from profile summary +.. option:: -fdiagnostics-misexpect-tolerance= + +Prevent misexpect diagnostics from being output if the profile counts are within N% of the expected. + .. option:: -fdiagnostics-show-hotness, -fno-diagnostics-show-hotness Enable profile hotness information in diagnostic line @@ -1675,6 +1691,8 @@ Enable alternative token representations '<:', ':>', '<%', '%>', '%:', '%:%:' (d Don't use GOT indirection to reference external data symbols +.. option:: -fdirectives-only, -fno-directives-only + .. option:: -fdollars-in-identifiers, -fno-dollars-in-identifiers Allow '$' in identifiers @@ -1699,7 +1717,7 @@ Do not emit debug info for defined but unused types .. option:: -fembed-bitcode=