summaryrefslogtreecommitdiff
path: root/docs/ClangCommandLineReference.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/ClangCommandLineReference.rst')
-rw-r--r--docs/ClangCommandLineReference.rst135
1 files changed, 127 insertions, 8 deletions
diff --git a/docs/ClangCommandLineReference.rst b/docs/ClangCommandLineReference.rst
index d964e34b98bf6..4d095883a4b79 100644
--- a/docs/ClangCommandLineReference.rst
+++ b/docs/ClangCommandLineReference.rst
@@ -56,6 +56,16 @@ Pass <arg> to fatbinary invocation
Pass <arg> to the ptxas assembler
+.. option:: -Xopenmp-target <arg>
+
+Pass <arg> to the target offloading toolchain.
+
+.. program:: clang1
+.. option:: -Xopenmp-target=<arg> <arg2>
+.. program:: clang
+
+Pass <arg> to the specified target offloading toolchain. The triple that identifies the toolchain must be provided after the equals sign.
+
.. option:: -Z<arg>
.. option:: -a<arg>, --profile-blocks
@@ -312,6 +322,10 @@ Disable standard #include directories for the C++ standard library
.. option:: -nostdlib, --no-standard-libraries
+.. program:: clang1
+.. option:: -nostdlib++
+.. program:: clang
+
.. option:: -nostdlibinc
.. option:: -o<file>, --output <arg>, --output=<arg>
@@ -510,10 +524,10 @@ Serialize compiler diagnostics to a file
.. option:: -shared, --shared
-.. option:: -shared-libasan
-
.. option:: -shared-libgcc
+.. option:: -shared-libsan, -shared-libasan
+
.. option:: -single\_module
.. option:: -specs=<arg>, --specs=<arg>
@@ -522,6 +536,8 @@ Serialize compiler diagnostics to a file
.. option:: -static-libgcc
+.. option:: -static-libsan
+
.. option:: -static-libstdc++
.. option:: -std-default=<arg>
@@ -574,6 +590,8 @@ Verify the binary representation of debug output
.. option:: --version
+Print version information
+
.. option:: -w, --no-warnings
Suppress all warnings
@@ -688,6 +706,10 @@ Print source range spans in numeric form
Enables an experimental new pass manager in LLVM.
+.. option:: -ffine-grained-bitfield-accesses, -fno-fine-grained-bitfield-accesses
+
+Use separate accesses for bitfields with legal widths and alignments.
+
.. option:: -finline-functions, -fno-inline-functions
Inline suitable functions
@@ -726,6 +748,10 @@ Path to blacklist file for sanitizers
Enable control flow integrity (CFI) checks for cross-DSO calls.
+.. option:: -fsanitize-cfi-icall-generalize-pointers
+
+Generalize pointers in CFI indirect call type signature checks
+
.. option:: -fsanitize-coverage=<arg1>,<arg2>..., -fno-sanitize-coverage=<arg1>,<arg2>...
Specify the type of coverage instrumentation for Sanitizers
@@ -742,10 +768,12 @@ Enable origins tracking in MemorySanitizer
Enable origins tracking in MemorySanitizer
-.. option:: -fsanitize-memory-use-after-dtor
+.. option:: -fsanitize-memory-use-after-dtor, -fno-sanitize-memory-use-after-dtor
Enable use-after-destroy detection in MemorySanitizer
+.. option:: -fsanitize-minimal-runtime, -fno-sanitize-minimal-runtime
+
.. option:: -fsanitize-recover, -fno-sanitize-recover
.. program:: clang1
@@ -856,6 +884,10 @@ Use the last modification time of <file> as the build session timestamp
Time when the current build session started
+.. option:: -fmodule-file=\[<name>=\]<file>
+
+Specify the mapping of module name to precompiled module file, or load a module file if name is omitted.
+
.. option:: -fmodules-cache-path=<directory>
Specify the module cache path
@@ -1243,8 +1275,16 @@ Print a template comparison tree for differing templates
Allow '$' in identifiers
+.. option:: -fdouble-square-bracket-attributes, -fno-double-square-bracket-attributes
+
+Enable '\[\[\]\]' attributes in all C and C++ language modes
+
.. option:: -fdwarf-directory-asm, -fno-dwarf-directory-asm
+.. option:: -fdwarf-exceptions
+
+Use DWARF style exceptions
+
.. option:: -felide-constructors, -fno-elide-constructors
.. option:: -feliminate-unused-debug-symbols, -fno-eliminate-unused-debug-symbols
@@ -1321,10 +1361,18 @@ Implicitly search the file system for module map files.
.. option:: -finput-charset=<arg>
+.. option:: -finstrument-function-entry-bare
+
+Instrument function entry only, after inlining, without arguments to the instrumentation call
+
.. option:: -finstrument-functions
Generate calls to instrument function entry and exit
+.. option:: -finstrument-functions-after-inlining
+
+Like -finstrument-functions, but insert the calls after inlining
+
.. option:: -fintegrated-as, -fno-integrated-as, -integrated-as
Enable the integrated assembler
@@ -1365,10 +1413,6 @@ Specify the maximum alignment to enforce on pointers lacking an explicit alignme
.. option:: -fmodule-file-deps, -fno-module-file-deps
-.. option:: -fmodule-file=<file>
-
-Load this precompiled module file
-
.. option:: -fmodule-map-file=<file>
Load this module map file
@@ -1451,6 +1495,10 @@ Do not treat C++ operator name keywords as synonyms for operators
.. option:: -fno-working-directory
+.. option:: -fnoopenmp-relocatable-target
+
+Do not compile OpenMP target code as relocatable.
+
.. option:: -fnoopenmp-use-tls
.. option:: -fobjc-abi-version=<arg>
@@ -1493,6 +1541,10 @@ Enable ARC-style weak references in Objective-C
.. option:: -fopenmp-dump-offload-linker-script
+.. option:: -fopenmp-relocatable-target
+
+OpenMP target code is compiled as relocatable using the -c flag. For OpenMP targets the code is relocatable by default.
+
.. option:: -fopenmp-use-tls
.. option:: -fopenmp-version=<arg>
@@ -1533,6 +1585,10 @@ Override the default ABI to return all structs on the stack
.. option:: -fpie, -fno-pie
+.. option:: -fplt, -fno-plt
+
+Use the PLT to make function calls
+
.. option:: -fplugin=<dsopath>
Load the named plugin (dynamic shared object)
@@ -1571,6 +1627,13 @@ Generate instrumented code to collect execution counts into <file> (overridden b
Use instrumentation data for profile-guided optimization
+.. option:: -fprofile-sample-accurate, -fauto-profile-accurate, -fno-profile-sample-accurate
+
+Specifies that the sample profile is accurate. If the sample
+ profile is accurate, callsites without profile samples are marked
+ as cold. Otherwise, treat callsites without profile samples as if
+ we have no profile
+
.. option:: -fprofile-sample-use, -fauto-profile, -fno-profile-sample-use
.. program:: clang1
@@ -1623,6 +1686,10 @@ Turn on loop reroller
Generate a YAML optimization record file
+.. option:: -fseh-exceptions
+
+Use SEH style exceptions
+
.. option:: -fshort-enums, -fno-short-enums
Allocate to an enum type only as many bytes as it needs for the declared range of possible values
@@ -1807,6 +1874,10 @@ Treat signed integer overflow as two's complement
Store string literals as writable data
+.. option:: -fxray-always-emit-customevents, -fno-xray-always-emit-customevents
+
+Determine whether to always emit \_\_xray\_customevent(...) calls even if the function it appears in is not always instrumented.
+
.. option:: -fxray-always-instrument=<arg>
Filename defining the whitelist for imbuing the 'always instrument' XRay attribute.
@@ -1905,6 +1976,8 @@ Put objects of at most <size> bytes into small data section (MIPS / Hexagon)
Enable SVR4-style position-independent code (Mips only)
+.. option:: -mabs=<arg>
+
.. option:: -malign-double
Align doubles to two words in structs (x86 only)
@@ -1943,6 +2016,14 @@ Link stack frames through backchain on System Z
Set EABI type, e.g. 4, 5 or gnu (default depends on triple)
+.. option:: -membedded-data, -mno-embedded-data
+
+Place constants in the .rodata section instead of the .sdata section even if they meet the -G <size> threshold (MIPS)
+
+.. option:: -mextern-sdata, -mno-extern-sdata
+
+Assume that externally defined data is in the small data if it meets the -G <size> threshold (MIPS)
+
.. option:: -mfentry
Insert calls to fentry at function entry (x86 only)
@@ -1965,6 +2046,10 @@ Use 64-bit floating point registers (MIPS only)
Enable merging of globals
+.. option:: -mgpopt, -mno-gpopt
+
+Use GP relative accesses for symbols known to be in a small data section (MIPS)
+
.. option:: -mhard-float
.. option:: -mhwdiv=<arg>, --mhwdiv <arg>, --mhwdiv=<arg>
@@ -1989,6 +2074,10 @@ Use Intel MCU ABI
.. option:: -mldc1-sdc1, -mno-ldc1-sdc1
+.. option:: -mlocal-sdata, -mno-local-sdata
+
+Extend the -G behaviour to object local data (MIPS)
+
.. option:: -mlong-calls, -mno-long-calls
Generate branches with extended addressability, usually via indirect jumps.
@@ -2031,6 +2120,10 @@ Omit frame pointer setup for leaf functions
Use copy relocations support for PIE builds
+.. option:: -mprefer-vector-width=<arg>
+
+Specifies preferred vector width for auto-vectorization. Defaults to 'none' which allows target specific decisions.
+
.. option:: -mqdsp6-compat
Enable hexagon-qdsp6 backward compatibility
@@ -2113,6 +2206,10 @@ Generate code which only uses the general purpose registers (AArch64 only)
AMDGPU
------
+.. option:: -mxnack, -mno-xnack
+
+Enable XNACK (AMDGPU only)
+
ARM
---
.. option:: -ffixed-r9
@@ -2143,12 +2240,20 @@ Disallow use of CRC instructions (ARM only)
Disallow generation of deprecated IT blocks for ARMv8. It is on by default for ARMv8 Thumb mode.
+.. option:: -mtp=<arg>
+
+Read thread pointer from coprocessor register (ARM only)
+
.. option:: -munaligned-access, -mno-unaligned-access
Allow memory accesses to be unaligned (AArch32/AArch64 only)
Hexagon
-------
+.. option:: -mieee-rnd-near
+
+Hexagon
+-------
.. option:: -mhvx, -mno-hvx
Enable Hexagon Vector eXtensions
@@ -2157,7 +2262,15 @@ Enable Hexagon Vector eXtensions
Enable Hexagon Double Vector eXtensions
-.. option:: -mieee-rnd-near
+.. option:: -mhvx-length=<arg>
+
+Set Hexagon Vector Length
+
+.. program:: clang1
+.. option:: -mhvx=<arg>
+.. program:: clang
+
+Enable Hexagon Vector eXtensions
PowerPC
-------
@@ -2197,6 +2310,8 @@ PowerPC
WebAssembly
-----------
+.. option:: -mnontrapping-fptoint, -mno-nontrapping-fptoint
+
.. option:: -msimd128, -mno-simd128
X86
@@ -2255,6 +2370,8 @@ X86
.. option:: -mfxsr, -mno-fxsr
+.. option:: -mibt, -mno-ibt
+
.. option:: -mlwp, -mno-lwp
.. option:: -mlzcnt, -mno-lzcnt
@@ -2287,6 +2404,8 @@ X86
.. option:: -msha, -mno-sha
+.. option:: -mshstk, -mno-shstk
+
.. option:: -msse, -mno-sse
.. option:: -msse2, -mno-sse2