From: patrick Date: Fri, 17 Dec 2021 14:46:39 +0000 (+0000) Subject: Merge LLVM 13.0.0. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a0747c9f67a4ae71ccb71e62a28d1ea19e06a63c;p=openbsd Merge LLVM 13.0.0. --- diff --git a/gnu/llvm/clang/docs/ClangCommandLineReference.rst b/gnu/llvm/clang/docs/ClangCommandLineReference.rst index 1613c8e4531..74557c5bd58 100644 --- a/gnu/llvm/clang/docs/ClangCommandLineReference.rst +++ b/gnu/llvm/clang/docs/ClangCommandLineReference.rst @@ -18,9 +18,9 @@ GCC-compatible ``clang`` and ``clang++`` drivers. .. program:: clang -.. option:: -B, --prefix , --prefix= +.. option:: -B, --prefix , --prefix= -Add to search path for binaries and object files used implicitly +Search $prefix/$triple-$file and $prefix$file for executables, libraries, includes, and data files used by the compiler. $prefix may or may not be a directory .. option:: -F @@ -102,9 +102,7 @@ Run the static analyzer .. option:: --analyzer-output -Static analyzer report output format (html\|plist\|plist-multi-file\|plist-html\|sarif\|text). - -.. option:: -ansi, --ansi +Static analyzer report output format (html\|plist\|plist-multi-file\|plist-html\|sarif\|sarif-html\|text). .. option:: -arch @@ -144,8 +142,6 @@ Specifies configuration file .. option:: --constant-cfstrings -.. option:: -coverage, --coverage - .. option:: --cuda-compile-host-device Compile CUDA code for both host and device (default). Has no effect on non-CUDA compilations. @@ -166,6 +162,10 @@ Include PTX for the following GPU architecture (e.g. sm\_35) or 'all'. May be sp Enable device-side debug info generation. Disables ptxas optimizations. +.. option:: -cuid= + +An 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. + .. option:: -current\_version .. option:: -dead\_strip @@ -178,6 +178,10 @@ Filename to write DOT-formatted header dependencies to Filename (or -) to write dependency output to +.. option:: -dsym-dir + +Directory to output dSYM's (if any) to + .. option:: -dumpmachine .. option:: -dumpversion @@ -200,6 +204,10 @@ Filename (or -) to write dependency output to Emit Clang AST files for source inputs +.. option:: --emit-static-lib + +Enable linker job to emit a static library. + .. option:: -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang Trivial 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 @@ -208,14 +216,14 @@ Trivial automatic variable initialization to zero is only here for benchmarks, i .. option:: -faligned-new= -.. option:: -fcuda-flush-denormals-to-zero, -fno-cuda-flush-denormals-to-zero - -Flush denormal floating point values to zero in CUDA device mode. - .. option:: -ffixed-r19 Reserve register r19 (Hexagon only) +.. 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. + .. option:: -fheinous-gnu-extensions .. option:: -flat\_namespace @@ -240,17 +248,26 @@ Specify comma-separated list of triples OpenMP offloading targets to be supporte Add -rpath with architecture-specific resource directory to the linker flags -.. option:: -fsanitize-system-blacklist= +.. option:: -fsanitize-system-ignorelist=, -fsanitize-system-blacklist= + +Path to system ignorelist file for sanitizers + +.. option:: -fshow-skipped-includes -Path to system blacklist file for sanitizers +#include files may be "skipped" due to include guard optimization + or #pragma once. This flag makes -H show also such includes. .. option:: -fsystem-module Build this module as a system module. Only used with -emit-module +.. option:: -fuse-cuid= + +Method 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 overriden by option '-cuid=\[ID\]' if it is specified. + .. option:: --gcc-toolchain=, -gcc-toolchain -Use the gcc toolchain at the given directory +Search 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 .. option:: -gcodeview @@ -260,7 +277,9 @@ Generate CodeView debug information Emit type record hashes in a .debug$H section -.. option:: -ginline-line-tables, -gno-inline-line-tables +.. option:: --gpu-instrument-lib= + +Instrument device library for HIP, which is a LLVM bitcode containing \_\_cyg\_profile\_func\_enter and \_\_cyg\_profile\_func\_exit .. option:: --gpu-max-threads-per-block= @@ -280,6 +299,10 @@ Display help for hidden options Link clang-offload-bundler bundles for HIP +.. option:: --hip-version= + +HIP version in the format of major.minor.patch + .. option:: -ibuiltininc Enable builtin #include directories even when -nostdinc is used before or after -ibuiltininc. Using -nobuiltininc after the option disables it @@ -310,6 +333,14 @@ Make the next included directory (-I or -F) an indexer header map Enforce targets of indirect branches and function returns +.. option:: -menable-unsafe-fp-math + +Allow unsafe floating-point math optimizations which may decrease precision + +.. option:: -mharden-sls= + +Select straight-line speculation hardening scope + .. option:: --migrate Run the migrator @@ -358,6 +389,8 @@ Disable builtin #include directories .. option:: -nogpuinc, -nocudainc +Do not add include paths for CUDA/HIP and do not include the default CUDA/HIP wrapper headers + .. option:: -nogpulib, -nocudalib Do not link device library for CUDA/HIP device compilation @@ -374,8 +407,6 @@ Do not link device library for CUDA/HIP device compilation .. option:: -noseglinkedit -.. option:: -nostartfiles - .. option:: -nostdinc, --no-standard-includes .. program:: clang1 @@ -384,11 +415,7 @@ Do not link device library for CUDA/HIP device compilation Disable standard #include directories for the C++ standard library -.. option:: -nostdlib, --no-standard-libraries - -.. program:: clang1 .. option:: -nostdlib++ -.. program:: clang .. option:: -nostdlibinc @@ -464,7 +491,7 @@ Only modify files with a filename contained in the provided directory path .. option:: --offload-arch=, --cuda-gpu-arch=, --no-offload-arch= -CUDA/HIP offloading device architecture (e.g. sm\_35, gfx906). May be specified more than once. +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:: -p, --profile @@ -474,8 +501,6 @@ CUDA/HIP offloading device architecture (e.g. sm\_35, gfx906). May be specified Enable mcount instrumentation -.. option:: -pie - .. option:: -pipe, --pipe Use pipes between commands, when possible @@ -510,6 +535,10 @@ Print the library path for the currently used compiler runtime library ("libgcc. .. option:: -print-multi-lib, --print-multi-lib +.. option:: -print-multiarch, --print-multiarch + +Print the multiarch target triple + .. option:: -print-prog-name=, --print-prog-name=, --print-prog-name Print the full program path of @@ -518,6 +547,14 @@ Print the full program path of Print the resource directory pathname +.. option:: -print-rocm-search-dirs, --print-rocm-search-dirs + +Print the paths used for finding ROCm installation + +.. option:: -print-runtime-dir, --print-runtime-dir + +Print the directory pathname containing clangs runtime libraries + .. option:: -print-search-dirs, --print-search-dirs Print the paths used for finding libraries and programs @@ -538,8 +575,6 @@ Support POSIX threads in generated code .. option:: -pthreads -.. option:: -rdynamic - .. option:: -read\_only\_relocs .. option:: -relocatable-pch, --relocatable-pch @@ -602,8 +637,6 @@ Save intermediate compilation results. Serialize compiler diagnostics to a file -.. option:: -shared, --shared - .. option:: -shared-libgcc .. option:: -shared-libsan, -shared-libasan @@ -612,10 +645,6 @@ Dynamically link the sanitizer runtime .. option:: -single\_module -.. option:: -specs=, --specs= - -.. option:: -static, --static - .. option:: -static-libgcc .. option:: -static-libsan @@ -628,8 +657,6 @@ Statically link the sanitizer runtime Use the static host OpenMP runtime while linking. -.. option:: -static-pie - .. option:: -std-default= .. option:: -stdlib=, --stdlib=, --stdlib @@ -704,7 +731,7 @@ Suppress all warnings .. option:: -whatsloaded -.. option:: -whyload +.. option:: -why\_load, -whyload .. option:: -working-directory, -working-directory= @@ -734,7 +761,7 @@ Only run preprocess, compile, and assemble steps .. option:: -emit-interface-stubs -Generate Inteface Stub Files. +Generate Interface Stub Files. .. option:: -emit-llvm @@ -776,6 +803,12 @@ Pass to the assembler Pass to the clang compiler +.. option:: -ansi, --ansi + +.. option:: -fc++-abi= + +C++ ABI to use. This will override the target C++ ABI. + .. option:: -fclang-abi-compat= Attempt to match the ABI of Clang @@ -788,7 +821,9 @@ Treat each comma separated argument in as a documentation comment block co Require member pointer base types to be complete if they would be significant under the Microsoft ABI -.. option:: -fcrash-diagnostics-dir= +.. option:: -fcrash-diagnostics-dir= + +Put crash-report files in .. option:: -fdeclspec, -fno-declspec @@ -814,13 +849,13 @@ Print source range spans in numeric form Discard value names in LLVM IR -.. option:: -fexperimental-new-pass-manager, -fno-experimental-new-pass-manager +.. option:: -fexperimental-relative-c++-abi-vtables, -fno-experimental-relative-c++-abi-vtables -Enables an experimental new pass manager in LLVM. +Use the experimental C++ class ABI for classes with virtual tables .. option:: -fexperimental-strict-floating-point -Enables the use of non-default rounding modes and non-default exception handling on targets that are not currently ready. +Enables experimental strict floating point in LLVM. .. option:: -ffine-grained-bitfield-accesses, -fno-fine-grained-bitfield-accesses @@ -838,18 +873,26 @@ Inline suitable functions Inline functions which are (explicitly or implicitly) marked inline +.. option:: -flegacy-pass-manager, -fno-experimental-new-pass-manager, -fno-legacy-pass-manager + +Use the legacy pass manager in LLVM + .. option:: -fno-crash-diagnostics Disable auto-generation of preprocessed source files and a script for reproduction during a clang crash -.. option:: -fno-sanitize-blacklist +.. option:: -fno-sanitize-ignorelist, -fno-sanitize-blacklist -Don't use blacklist file for sanitizers +Don't use ignorelist file for sanitizers .. option:: -fparse-all-comments .. option:: -frecord-command-line, -fno-record-command-line, -frecord-gcc-switches +.. option:: -fsanitize-address-destructor= + +Set destructor type used in ASan instrumentation + .. option:: -fsanitize-address-field-padding= Level of field padding for AddressSanitizer @@ -862,6 +905,10 @@ Enable linker dead stripping of globals in AddressSanitizer Enable poisoning array cookies when using custom operator new\[\] in AddressSanitizer +.. option:: -fsanitize-address-use-after-return= + +Select the mode of detecting stack use-after-return in AddressSanitizer + .. option:: -fsanitize-address-use-after-scope, -fno-sanitize-address-use-after-scope Enable use-after-scope detection in AddressSanitizer @@ -870,10 +917,6 @@ Enable use-after-scope detection in AddressSanitizer Enable ODR indicator globals to avoid false ODR violation reports in partially sanitized programs at the cost of an increase in binary size -.. option:: -fsanitize-blacklist= - -Path to blacklist file for sanitizers - .. option:: -fsanitize-cfi-canonical-jump-tables, -fno-sanitize-cfi-canonical-jump-tables Make the jump table addresses canonical in the symbol table @@ -886,11 +929,11 @@ Enable control flow integrity (CFI) checks for cross-DSO calls. Generalize pointers in CFI indirect call type signature checks -.. option:: -fsanitize-coverage-allowlist= +.. option:: -fsanitize-coverage-allowlist=, -fsanitize-coverage-whitelist= Restrict sanitizer coverage instrumentation exclusively to modules and functions that match the provided special case list, except the blocked ones -.. option:: -fsanitize-coverage-blocklist= +.. option:: -fsanitize-coverage-ignorelist=, -fsanitize-coverage-blacklist= Disable sanitizer coverage instrumentation for modules and functions that match the provided special case list, even the allowed ones @@ -902,6 +945,14 @@ Specify the type of coverage instrumentation for Sanitizers Select the HWAddressSanitizer ABI to target (interceptor or platform, default interceptor). This option is currently unused. +.. option:: -fsanitize-hwaddress-experimental-aliasing, -fno-sanitize-hwaddress-experimental-aliasing + +Enable aliasing mode in HWAddressSanitizer + +.. option:: -fsanitize-ignorelist=, -fsanitize-blacklist= + +Path to ignorelist file for sanitizers + .. option:: -fsanitize-link-c++-runtime, -fno-sanitize-link-c++-runtime .. option:: -fsanitize-link-runtime, -fno-sanitize-link-runtime @@ -958,6 +1009,10 @@ Turn on runtime checks for various forms of undefined or suspicious behavior. Se Enable function outlining (AArch64 only) +.. option:: -moutline-atomics, -mno-outline-atomics + +Generate local calls to out-of-line atomic operations + .. option:: --param , --param= .. option:: -print-supported-cpus, --print-supported-cpus, -mcpu=?, -mtune=? @@ -1016,12 +1071,21 @@ Flags controlling how ``#include``\s are resolved to files. .. option:: -I, --include-directory , --include-directory= -Add directory to include search path +Add directory to include search path. For C++ inputs, if +there are multiple -I options, these directories are searched +in the order they are given before the standard system directories +are searched. If the same directory is in the SYSTEM include search +paths, for example if also specified with -isystem, the -I option +will be ignored .. option:: -I-, --include-barrier Restrict all prior -I flags to double-quoted inclusion and remove current directory from include path +.. option:: --amdgpu-arch-tool= + +Tool used for detecting AMD GPU arch in the system. + .. option:: --cuda-path-ignore-env Ignore environment variables to detect CUDA installation @@ -1078,6 +1142,10 @@ Validate the system headers that a module depends on when loading the module Specify the prebuilt module path +.. option:: --hip-path= + +HIP runtime installation path, used for finding HIP version and adding HIP include path. + .. option:: -idirafter, --include-directory-after , --include-directory-after= Add directory to AFTER include search path @@ -1138,9 +1206,13 @@ Set directory to include search path with prefix Add directory to SYSTEM include search path, absolute paths are relative to -isysroot -.. option:: --libomptarget-nvptx-path= +.. option:: --libomptarget-amdgcn-bc-path= + +Path to libomptarget-amdgcn bitcode library -Path to libomptarget-nvptx libraries +.. option:: --libomptarget-nvptx-bc-path= + +Path to libomptarget-nvptx bitcode library .. option:: --ptxas-path= @@ -1273,6 +1345,8 @@ Target-independent compilation options .. option:: -fPIE, -fno-PIE +.. option:: -faccess-control, -fno-access-control + .. option:: -faddrsig, -fno-addrsig Emit an address-significance table @@ -1331,6 +1405,10 @@ Restrict code to those available for App Extensions .. option:: -fastf +.. option:: -fasync-exceptions, -fno-async-exceptions + +Enable EH Asynchronous exceptions + .. option:: -fasynchronous-unwind-tables, -fno-asynchronous-unwind-tables .. option:: -fautolink, -fno-autolink @@ -1339,6 +1417,10 @@ Restrict code to those available for App Extensions Generate labels for each basic block or place each basic block or a subset of basic blocks in its own section. +.. option:: -fbinutils-version= + +Produced 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. + .. option:: -fblocks, -fno-blocks Enable the 'blocks' language feature @@ -1357,7 +1439,9 @@ Accept non-standard constructs supported by the Borland compiler Load the clang builtins module map file. +.. program:: clang1 .. option:: -fc++-static-destructors, -fno-c++-static-destructors +.. program:: clang .. option:: -fcaret-diagnostics, -fno-caret-diagnostics @@ -1401,10 +1485,18 @@ Assume functions may be convergent Enable support for the C++ Coroutines TS +.. option:: -fcoverage-compilation-dir= + +The compilation directory to embed in the coverage mapping. + .. option:: -fcoverage-mapping, -fno-coverage-mapping Generate coverage mapping to enable code coverage analysis +.. option:: -fcoverage-prefix-map= + +remap file source paths in coverage mapping + .. option:: -fcreate-profile .. option:: -fcs-profile-generate @@ -1435,9 +1527,9 @@ Enable C++ exceptions Place each data in its own section -.. option:: -fdebug-compilation-dir , -fdebug-compilation-dir= +.. option:: -fdebug-compilation-dir=, -fdebug-compilation-dir -The compilation directory to embed in the debug info. +The compilation directory to embed in the debug info .. option:: -fdebug-default-version= @@ -1487,9 +1579,9 @@ Print absolute paths in diagnostics .. option:: -fdiagnostics-color= .. program:: clang -.. option:: -fdiagnostics-hotness-threshold= +.. option:: -fdiagnostics-hotness-threshold= -Prevent optimization remarks from being output if they do not have at least this profile count +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-show-hotness, -fno-diagnostics-show-hotness @@ -1511,6 +1603,10 @@ Print a template comparison tree for differing templates Enable alternative token representations '<:', ':>', '<%', '%>', '%:', '%:%:' (default) +.. option:: -fdirect-access-external-data, -fno-direct-access-external-data + +Don't use GOT indirection to reference external data symbols + .. option:: -fdollars-in-identifiers, -fno-dollars-in-identifiers Allow '$' in identifiers @@ -1529,6 +1625,10 @@ Use DWARF style exceptions .. option:: -feliminate-unused-debug-symbols, -fno-eliminate-unused-debug-symbols +.. option:: -feliminate-unused-debug-types, -fno-eliminate-unused-debug-types + +Do not emit debug info for defined but unused types + .. option:: -fembed-bitcode=