Scroll to navigation

CASTXML(1) User Commands CASTXML(1)

NAME

castxml - Create an XML representation of C++ declarations

SYNOPSIS

castxml ( <castxml-opt> | <clang-opt> | <src> )...

DESCRIPTION

Options interpreted by castxml are listed below. Remaining options are given to the internal Clang compiler.

OPTIONS

--castxml-cc-<id> <cc>

--castxml-cc-<id> "(" <cc> <cc-opt>... ")"

Configure the internal Clang preprocessor and target platform to match that of the given compiler command. The <id> must be "gnu", "msvc", "gnu-c", or "msvc-c". <cc> names a compiler (e.g. "gcc") and <cc-opt>... specifies options that may affect its target (e.g. "-m32").

--castxml-output=<v>

Write castxml-format output to <src>.xml or file named by '-o' The <v> specifies the "epic" format version number to generate, and must be '1'.

--castxml-gccxml

Write gccxml-format output to <src>.xml or file named by '-o' Use this option if you need an output similar to the one generated by the legacy gccxml tool.

--castxml-start <name>[,<name>]...

Start AST traversal at declaration(s) with the given (qualified) name(s). Multiple names may be specified as a comma-separated list or by repeating the option.

-help, --help

Print castxml and internal Clang compiler usage information

-o <file>

Write output to <file>

--version

Print castxml and internal Clang compiler version information

Help for the internal Clang compiler appears below.

---------------------------------------------------------------

OVERVIEW: clang LLVM compiler

USAGE: clang [options] file...

OPTIONS:

-###
Print (but do not run) the commands to run for this compilation
Tool used for detecting AMD GPU arch in the system.
Static analyzer report output format (html|plist|plist-multi-file|plist-html|sarif|sarif-html|text).
Run the static analyzer
Emit ARC errors even if the migrator can fix them
Output path for the plist report
Search $prefix$file for executables, libraries, and data files. If $prefix is a directory, search $prefix/$file
Pass -b <arg> to the linker on AIX
Include comments from within macros in preprocessed output
OpenCL only. Allow denormals to be flushed to zero.
OpenCL only. Enable or disable OpenCL extensions/optional features. The argument is a comma-separated sequence of one or more extension names, each prefixed by '+' or '-'.
OpenCL only. Sets -cl-finite-math-only and -cl-unsafe-math-optimizations, and defines __FAST_RELAXED_MATH__.
OpenCL only. Allow floating-point optimizations that assume arguments and results are not NaNs or +-Inf.
OpenCL only. Specify that single precision floating-point divide and sqrt used in the program source are correctly rounded.
OpenCL only. Generate kernel argument metadata.
OpenCL only. Allow use of less precise MAD computations in the generated binary.
OpenCL only. Allow use of less precise no signed zeros computations in the generated binary.
OpenCL only. Disables all standard includes containing non-native compiler types and functions.
OpenCL only. This option disables all optimizations. By default optimizations are enabled.
OpenCL only. Treat double precision floating-point constant as single precision constant.
OpenCL language standard to compile for.
OpenCL only. This option is added for compatibility with OpenCL 1.0.
OpenCL only. Defines that the global work-size be a multiple of the work-group size specified to clEnqueueNDRangeKernel
OpenCL only. Allow unsafe floating-point optimizations. Also implies -cl-no-signed-zeros and -cl-mad-enable.
Specify configuration file
Compile CUDA code for both host and device (default). Has no effect on non-CUDA compilations.
Compile CUDA code for device only
Manually specify the CUDA feature to use
Compile CUDA code for host only. Has no effect on non-CUDA compilations.
Include PTX for the following GPU architecture (e.g. sm_35) or 'all'. May be specified more than once.
Enable device-side debug info generation. Disables ptxas optimizations.
Ignore environment variables to detect CUDA installation
CUDA installation path
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.
Add directory to the C++ SYSTEM include search path
Include comments in preprocessed output
Only run preprocess, compile, and assemble steps
Specify the darwin target variant triple
Generate code for an additional runtime variant of the deployment target
Print macro definitions in -E mode in addition to normal output

-dependency-dot <value> Filename to write DOT-formatted header dependencies to

Filename (or -) to write dependency output to
Print include directives in -E mode in addition to normal output
Print macro definitions in -E mode instead of normal output
Directory to output dSYM's (if any) to
Use <dumpfpx> as a prefix to form auxiliary and dump file names
Define <macro> to <value> (or 1 if <value> omitted)
Emit Clang AST files for source inputs
Generate Interface Stub Files.
Use the LLVM representation for assembler and object files
Generate Interface Stub Files, emit merged text not binary.
Enable linker job to emit a static library.
Generate Extract API information as a side effect of compilation.
Start emitting warnings for unused driver arguments
Comma separated list of files containing a new line separated list of API symbols to ignore when extracting API information.
Extract API information
Only run the preprocessor
Follows the AAPCS standard that all volatile bit-field write generates at least one load. (ARM only).
Follow the AAPCS standard requirement stating that volatile bit-field width is dictated by the field container type. (ARM only).
Emit an address-significance table
N must be a power of two. Align loops to the boundary
Enable C++17 aligned allocation functions
Treat editor placeholders as valid source code
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'.
Use ANSI escape codes for diagnostics
Use Apple's kernel extensions ABI
Force linking the clang builtins runtime library
Enable Apple gcc-compatible #pragma pack handling

-fapplication-extension Restrict code to those available for App Extensions

Allow certain math function calls to be replaced with an approximately equivalent calculation
Enable EH Asynchronous exceptions
Place each function's basic blocks in unique sections (ELF Only)
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.
Enable the 'blocks' language feature
Accept non-standard constructs supported by the Borland compiler
Use the last modification time of <file> as the build session timestamp
Time when the current build session started
Load the clang builtins module map file.
C++ ABI to use. This will override the target C++ ABI.
Make the x10 register call-saved (AArch64 only)
Make the x11 register call-saved (AArch64 only)
Make the x12 register call-saved (AArch64 only)
Make the x13 register call-saved (AArch64 only)
Make the x14 register call-saved (AArch64 only)
Make the x15 register call-saved (AArch64 only)
Make the x18 register call-saved (AArch64 only)
Make the x8 register call-saved (AArch64 only)
Make the x9 register call-saved (AArch64 only)
Set the maximum number of source lines to show in a caret diagnostic (0 = no limit).

-fcf-protection=<value> Instrument control-flow architecture protection

Enable cf-protection in 'full' mode
Enable C++ builtin type char8_t
Do not assume C++ operator new may not return NULL
Attempt to match the ABI of Clang <version>
Enable colors in diagnostics
Treat each comma separated argument in <arg> as a documentation comment block command
Place uninitialized global variables in a common block
Require member pointer base types to be complete if they would be significant under the Microsoft ABI
Set the maximum number of entries to print in a constexpr evaluation backtrace (0 = no limit)
Set the maximum depth of recursive constexpr function calls
Set the maximum number of steps in constexpr function evaluation
Prefer aligned allocation for C++ Coroutines
Enable support for the C++ Coroutines
The compilation directory to embed in the coverage mapping.
Generate coverage mapping to enable code coverage analysis
remap file source paths <old> to <new> in coverage mapping. If there are multiple options, prefix replacement is applied in reverse order starting from the last one
Put crash-report files in <dir>
Set level of crash diagnostic reporting, (option: off, compiler, all)
Enable crash diagnostic reporting (default)
Generate instrumented code to collect context sensitive execution counts into <directory>/default.profraw (overridden by LLVM_PROFILE_FILE env var)
Generate instrumented code to collect context sensitive execution counts into default.profraw (overridden by LLVM_PROFILE_FILE env var)
Use approximate transcendental functions
Use 32-bit pointers for accessing const/local/shared address spaces
Enable C++ exceptions
Enable modules for C++
Place each data in its own section
The compilation directory to embed in the debug info
Default DWARF version to use, if a -g option caused DWARF debug info to be produced
Emit extra debug info to make sample profile more accurate
Emit macro debug information
For paths in debug info, remap directory <old> to <new>. If multiple options match a path, the last option wins
Use DWARF base address selection entries in .debug_ranges
Place debug types in their own section (ELF Only)
Allow __declspec as a keyword
Parse templated function definitions at the end of the translation unit
Treat usage of null pointers as undefined behavior (default)
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
Prevent misexpect diagnostics from being output if the profile counts are within N% of the expected.
Print fix-its in machine parseable form
Print source range spans in numeric form
Enable profile hotness information in diagnostic line
Display include stacks for diagnostic notes
Print option name with mappable diagnostics
Print a template comparison tree for differing templates
Enable alternative token representations '<:', ':>', '<%', '%>', '%:', '%:%:' (default)
Don't use GOT indirection to reference external data symbols
Discard value names in LLVM IR
Allow '$' in identifiers
Only run the driver.
Use DWARF style exceptions
Do not emit debug info for defined but unused types
Embed placeholder LLVM IR data as a marker
Embed LLVM bitcode
Embed LLVM IR bitcode as data
Embed Offloading device-side binary into host object file as a section.
Emit all declarations, even if unused
Try emitting Compact-Unwind for non-canonical entries. Maybe overriden by other constraints
When to emit DWARF unwind (EH frame) info
Use emutls functions to access thread_local variables
Enable matrix data type and related builtin functions
Enable support for exception handling
Allows control over excess precision on targets where native support for the precision types is not available. By default, excess precision is used to calculate intermediate results following the rules specified in ISO C99.
Control whether unstable and experimental library features are enabled. This option enables various library features that are either experimental (also known as TSes), or have been but are not stable yet in the selected Standard Library implementation. It is not recommended to use this option in production code, since neither ABI nor API stability are guaranteed. This is intended to provide a preview of features that will ship in the future for experimentation purposes
Enable the experimental new constant interpreter
Use the experimental C++ class ABI for classes with virtual tables
Disable sanitizer metadata for modules and functions that match the provided special case list
Specify the type of metadata to emit for binary analysis sanitizers
Enables the use of non-default rounding modes and non-default exception handling on targets that are not currently ready.
Controls how scalar integer arguments are extended in calls to unprototyped and varargs functions
Allow aggressive, lossy floating-point optimizations
The compilation directory to embed in the debug info and coverage mapping.
remap file source paths in debug info, predefined preprocessor macros and __builtin_FILE(). Implies -ffile-reproducible.
Use the target's platform-specific path separator character when expanding the __FILE__ macro
Use separate accesses for consecutive bitfield runs with legal widths and alignments.
Assume all loops are finite.
Allow floating-point optimizations that assume arguments and results are not NaNs or +-inf. This defines the \_\_FINITE\_MATH\_ONLY\_\_ preprocessor macro.
Reserve the a0 register (M68k only)
Reserve the a1 register (M68k only)
Reserve the a2 register (M68k only)
Reserve the a3 register (M68k only)
Reserve the a4 register (M68k only)
Reserve the a5 register (M68k only)
Reserve the a6 register (M68k only)
Reserve the d0 register (M68k only)
Reserve the d1 register (M68k only)
Reserve the d2 register (M68k only)
Reserve the d3 register (M68k only)
Reserve the d4 register (M68k only)
Reserve the d5 register (M68k only)
Reserve the d6 register (M68k only)
Reserve the d7 register (M68k only)
Enable fixed point types
Reserve register r19 (Hexagon only)
Reserve the r9 register (ARM only)
Reserve the x10 register (AArch64/RISC-V only)
Reserve the x11 register (AArch64/RISC-V only)
Reserve the x12 register (AArch64/RISC-V only)
Reserve the x13 register (AArch64/RISC-V only)
Reserve the x14 register (AArch64/RISC-V only)
Reserve the x15 register (AArch64/RISC-V only)
Reserve the x16 register (AArch64/RISC-V only)
Reserve the x17 register (AArch64/RISC-V only)
Reserve the x18 register (AArch64/RISC-V only)
Reserve the x19 register (AArch64/RISC-V only)
Reserve the x1 register (AArch64/RISC-V only)
Reserve the x20 register (AArch64/RISC-V only)
Reserve the x21 register (AArch64/RISC-V only)
Reserve the x22 register (AArch64/RISC-V only)
Reserve the x23 register (AArch64/RISC-V only)
Reserve the x24 register (AArch64/RISC-V only)
Reserve the x25 register (AArch64/RISC-V only)
Reserve the x26 register (AArch64/RISC-V only)
Reserve the x27 register (AArch64/RISC-V only)
Reserve the x28 register (AArch64/RISC-V only)
Reserve the x29 register (AArch64/RISC-V only)
Reserve the x2 register (AArch64/RISC-V only)
Reserve the x30 register (AArch64/RISC-V only)
Reserve the x31 register (AArch64/RISC-V only)
Reserve the x3 register (AArch64/RISC-V only)
Reserve the x4 register (AArch64/RISC-V only)
Reserve the x5 register (AArch64/RISC-V only)
Reserve the x6 register (AArch64/RISC-V only)
Reserve the x7 register (AArch64/RISC-V only)
Reserve the x8 register (AArch64/RISC-V only)
Reserve the x9 register (AArch64/RISC-V only)
Always emit a debug frame section
Emits more virtual tables to improve devirtualization
Enable support for int128_t type
Form fused FP ops (e.g. FMAs)
Specifies the evaluation method to use for floating-point arithmetic.
Specifies the exception behavior of floating-point operations.
Controls the semantics of floating-point calculations.
Assert that the compilation takes place in a freestanding environment
Set Fuchsia API level
Place each function in its own section
Enables the global instruction selector
Allow GNU-extension keywords regardless of language standard
Generate output compatible with the standard GNU Objective-C runtime
Use the gnu89 inline semantics
Sets various macros to claim compatibility with the given GCC version (default is 4.2.1)

-fgpu-allow-device-init Allow device side init function in HIP (experimental)

Specify default stream. The default value is 'legacy'. (HIP only)
Defer host/device related diagnostic messages for CUDA/HIP
Flush denormal floating point values to zero in CUDA/HIP device mode.
Generate relocatable device code, also known as separate compilation mode
Enable sanitizer for AMDGPU target
Compile HIP source to relocatable
Specify that single precision floating-point divide and sqrt used in the program source are correctly rounded (HIP device compilation only)
Specify that kernel argument names are preserved (HIP only)
Use new kernel launching API for HIP
Specify that floating-point optimizations are not allowed that assume arguments and results are not +-inf.
Specify that floating-point optimizations are not allowed that assume arguments and results are not NANs.
Enable support for ignoring exception handling constructs
Implicitly search the file system for module map files.
Enable incremental processing extensions such as processingstatements on the global scope.
Inline suitable functions

-finline-hint-functions Inline functions which are (explicitly or implicitly) marked inline

Suppress inlining of functions whose stack size exceeds the given value

-finput-charset=<value> Specify the default character set for source files

Instrument function entry only, after inlining, without arguments to the instrumentation call
Like -finstrument-functions, but insert the calls after inlining
Generate calls to instrument function entry and exit
Enable the integrated assembler
Run cc1 in-process

-fintegrated-objemitter Use internal machine object code emitter.

Enable just-my-code debugging
Use jump tables for lowering switches
Enable keeping all variables that have a persistent storage duration, including global, static and thread-local variables, to guarantee that they can be directly addressed
Keep static const variables even if unused
Enable implicit vector bit-casts
Controls the backend parallelism of -flto=thin (default of 0 means the number of threads will be derived from the number of CPUs detected)
Enable LTO in 'full' mode
Enable LTO in 'full' mode
Set LTO mode
Enable LTO in 'full' mode
Set the maximum number of entries to print in a macro expansion backtrace (0 = no limit)
remap file source paths in predefined preprocessor macros and __builtin_FILE(). Implies -ffile-reproducible.
Require math functions to indicate errors by setting errno
Max total number of preprocessed tokens for -Wmax-tokens.
Specify the maximum alignment to enforce on pointers lacking an explicit alignment
Use memory profile for profile-guided memory optimization
Enable heap memory profiling and dump results into <directory>
Enable heap memory profiling
Allow merging of constants
Format message diagnostics so that they fit within N columns
Ignore the whitespace from the input file when emitting preprocessor output. It will only contain whitespace when necessary, e.g. to keep two minus signs from merging into to an increment operator. Useful with the -P option to normalize whitespace such that two files with only formatting changes are equal.

Only valid with -E on C-like inputs and incompatible with -traditional-cpp.

Specify the mapping of module name to precompiled module file, or load a module file if name is omitted.
Build 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.
Build a C++20 Header Unit from a header.
Load this module map file
Specify the name of the module to build

-fmodule-output=<value> Save intermediate module file results when compiling a standard C++ module unit.

Save intermediate module file results when compiling a standard C++ module unit.
Specify the module cache path
Require declaration of modules used within a module
Disable validation of the diagnostic options when loading the module
Ignore the definition of the given macro when building and loading modules
Specify the interval (in seconds) after which a module file will be considered unused
Specify the interval (in seconds) between attempts to prune the module cache
Search even non-imported modules to resolve references
Like -fmodules-decluse but requires all headers to be in modules
Specify the module user build path
Validate PCM input files based on content if mtime differs
Don't verify input files for the modules if the module has been successfully validated or loaded during this build session
Validate the system headers that a module depends on when loading the module
Enable the 'modules' language feature
Dot-separated value representing the Microsoft compiler version number to report in _MSC_VER (0 = don't define it (default))
Enable full Microsoft Visual C++ compatibility
Accept some non-standard constructs supported by the Microsoft compiler
Ensure that all functions can be hotpatched at runtime
Select Windows run-time library
Microsoft compiler version number to report in _MSC_VER (0 = don't define it (default))

-fnew-alignment=<align> Specifies the largest alignment guaranteed by '::operator new(size_t)'

Enable treating throwing global C++ operator new as always returning valid memory (annotates with __attribute__((returns_nonnull)) and throw()). This is detectable in source.
Do not follow the AAPCS standard requirement stating that volatile bit-field width is dictated by the field container type. (ARM only).
Disable C++ access control
Don't emit an address-significance table
Don't assume that C++'s global operator new can't alias any pointer
Disable optimizations based on vtable pointer identity
Disable generation of linker directives for automatic library linking
Disable implicit builtin knowledge of a specific function
Disable implicit builtin knowledge of functions
Disable C++ static destructor registration
Disable C++ builtin type char8_t
Disable colors in diagnostics
Compile common globals like normal definitions
Do not require member pointer base types to be complete if they would be significant under the Microsoft ABI

-fno-constant-cfstrings Disable creation of CodeFoundation-type constant strings

Assume all functions may be convergent.
Disable code coverage analysis
Disable auto-generation of preprocessed source files and a script for reproduction during a clang crash
Don't use approximate transcendental functions
Disable modules for C++
Do not emit macro debug information
Disallow __declspec as a keyword
Disable delayed template parsing
Do not treat usage of null pointers as undefined behavior
Do not include fixit information in diagnostics
Show line numbers in diagnostic code snippets
Disallow alternative token representations '<:', ':>', '<%', '%>', '%:', '%:%:'
Use GOT indirection to reference external data symbols
Do not discard value names in LLVM IR
Disallow '$' in identifiers

-fno-elide-constructors Disable C++ copy constructor elision

Do not elide types when printing diagnostics
Emit debug info for defined but unused types
Disable support for exception handling
Do not use the experimental C++ class ABI for classes with virtual tables
Disable emitting metadata for binary analysis sanitizers
Use the host's platform-specific path separator character when expanding the __FILE__ macro
Use large-integer access for consecutive bitfield runs.
Do not assume that any loop is finite.
Disable fixed point types
Disable support for int128_t type
Disables the global instruction selector
Disable GNU style inline asm
Don't allow device side init function in HIP (experimental)
Don't defer host/device related diagnostic messages for CUDA/HIP
Do not override toolchain to compile HIP source to relocatable
Don't specify that single precision floating-point divide and sqrt used in the program source are correctly rounded (HIP device compilation only)
Don't specify that kernel argument names are preserved (HIP only)

-fno-hip-new-launch-api Don't use new kernel launching API for HIP

Disable the integrated assembler
Spawn a separate process for each cc1
Use external machine object code emitter.
Do not use jump tables for lowering switches
Disable keeping all variables that have a persistent storage duration, including global, static and thread-local variables, to guarantee that they can be directly addressed

-fno-keep-static-consts Don't keep static const variables even if unused

Disable support for K&R C function declarations
Disable LTO mode (default)
Disable heap memory profiling
Disallow merging of constants
Skip checks for relocated modules when loading PCM files
Do not enforce -fmodules-decluse and private header restrictions for textual headers. This flag will be removed in a future Clang release.
Disable treating throwing global C++ operator new as always returning valid memory (annotates with __attribute__((returns_nonnull)) and throw()). This is detectable in source.
do not infer Objective-C related result type based on method family
Disable LTO mode (default) for offload compilation
Disable all Clang extensions for OpenMP directives and clauses
Do not treat C++ operator name keywords as synonyms for operators
Disable tail call optimization, keeping the call stack accurate
Do not generate code for uses of this PCH that assumes an explicit object file will be built for the PCH
Do not generate debug info for types in an object file built from this PCH and do not generate them elsewhere
Use GOT indirection instead of PLT to make external function calls (x86 only)
Do not preserve comments in inline assembly
Disable generation of profile instrumentation.
Disable generation of profile instrumentation.
Disable using instrumentation data for profile-guided optimization
Do not emit pseudo probes for sample profiling
Don't use atexit or __cxa_atexit to register global destructors
Do not add -rpath with architecture-specific resource directory to the linker flags. When --hip-link is specified, do not add -rpath with HIP runtime library directory to the linker flags
Disable generation of RTTI data
Disable generation of rtti information
Disable linker dead stripping of globals in AddressSanitizer
Use default code inlining logic for the address sanitizer
Disable poisoning array cookies when using custom operator new[] in AddressSanitizer
Disable use-after-scope detection in AddressSanitizer
Disable ODR indicator globals
Do not make the jump table addresses canonical in the symbol table
Disable control flow integrity (CFI) checks for cross-DSO calls.
Disable features of coverage instrumentation for Sanitizers
Disable aliasing mode in HWAddressSanitizer
Don't use ignorelist file for sanitizers
Disable detection of uninitialized parameters and return values
Disable origins tracking in MemorySanitizer
Disable use-after-destroy detection in MemorySanitizer
Disable recovery for specified sanitizers
Conventional ABI instrumentation for sanitizer runtime. Default: Conventional
Disable sanitizer statistics gathering.
Disable atomic operations instrumentation in ThreadSanitizer
Disable function entry/exit instrumentation in ThreadSanitizer
Disable memory access instrumentation in ThreadSanitizer
Disable trapping for specified sanitizers
Disable trapping for all sanitizers
Force wchar_t to be an unsigned int
Do not include column number on diagnostics
Do not include source location information with diagnostics
char is unsigned
Allow optimizations that ignore the sign of floating point zeros
Disable spell-checking
Disable late function splitting using profile information (x86 ELF)
Wouldn't use segmented stack
Disable stack clash protection
Disable the use of stack protectors
Limit debug information produced to reduce size of debug binary
Relax language rules and try to match the behavior of the target's native float-to-int conversion instructions
Don't treat control flow paths that fall off the end of a non-void function as unreachable
Disables SYCL kernels compilation for device
Directly create compilation output files. This may lead to incorrect incremental builds if the compiler crashes

-fno-threadsafe-statics Do not emit code to make initialization of local statics thread safe

Do not process trigraph sequences
Use distinct LTO pipelines
Don't use unique names for text and data sections
Turn off loop unroller
Don't use __cxa_atexit for calling destructors
Use .ctors/.dtors instead of .init_array/.fini_array
Disables -fvisibility-inlines-hidden-static-local-var (this is the default on non-darwin targets)
Omit function index section at the expense of single-function patching performance
Don't place zero initialized data in BSS
Use EH-safe code when synthesizing retains and releases in -fobjc-arc
Synthesize retain and release calls for Objective-C pointers
Ignore attribute objc_direct so that direct methods can be tested
Fully encode c++ class template specialization
Enable Objective-C exceptions
Specify the target Objective-C runtime kind and version
Enable ARC-style weak references in Objective-C
Set LTO mode for offload compilation
Enable LTO in 'full' mode for offload compilation
Omit the frame pointer from functions that don't need it. Some stack unwinding cases, such as profilers and sanitizers, may prefer specifying -fno-omit-frame-pointer. On many targets, -O1 and higher omit the frame pointer by default. -m[no-]omit-leaf-frame-pointer takes precedence for leaf functions
Enable all Clang extensions for OpenMP directives and clauses
Do not create a host fallback if offloading to the device fails.
Emit OpenMP code only for SIMD-based constructs.
Enable debugging in the OpenMP offloading device RTL
Emit code that can be JIT compiled for OpenMP offloading. Implies -foffload-lto=full
Specify comma-separated list of triples OpenMP offloading targets to be supported
Set OpenMP version (e.g. 45 for OpenMP 4.5, 50 for OpenMP 5.0). Default value is 50 for Clang and 11 for Flang
Parse OpenMP pragmas and generate parallel code.
Maximum number of 'operator->'s to call for a member access
Specify 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.
Only include passes which match a specified regular expression in the generated optimization record (by default, include all passes)
Generate instrumented code to collect order file into default.profraw file (overridden by '=' form of option or LLVM_PROFILE_FILE env var)
Specify the default maximum struct packing alignment
Recognize and construct Pascal-style string literals

-fpass-plugin=<dsopath> Load pass plugin from a dynamic shared object file (only with new pass manager).

Generate M NOPs before function entry and N-M NOPs after function entry
Override the default ABI to return all structs on the stack
Generate code for uses of this PCH that assumes an explicit object file will be built for the PCH
Generate debug info for types in an object file built from this PCH and do not generate them elsewhere
Instantiate templates already while building a PCH
Validate PCH input files based on content if mtime differs
Pass <arg> to plugin <name>
Load the named plugin (dynamic shared object)
Look up implicit modules in the prebuilt module path
Specify the prebuilt module path
Save subprocess statistics to the given file
Print subprocess statistics
Instrument code to produce gcov data files (*.gcda)
Instrument only functions from files where names don't match all the regexes separated by a semi-colon
Instrument only functions from files where names match any regex separated by a semi-colon
Partition functions into N groups and select only functions in group i to be instrumented using -fprofile-selected-function-group
Generate instrumented code to collect execution counts into <directory>/default.profraw (overridden by LLVM_PROFILE_FILE env var)
Generate instrumented code to collect execution counts into default.profraw (overridden by LLVM_PROFILE_FILE env var)
Generate instrumented code to collect execution counts into <file> (overridden by LLVM_PROFILE_FILE env var)
Generate instrumented code to collect execution counts into default.profraw file (overridden by '=' form of option or LLVM_PROFILE_FILE env var)
Use instrumentation data for profile-guided optimization
Filename defining the list of functions/files to instrument. The file uses the sanitizer special case list format.
Use the remappings described in <file> to match the profile data against names in the program
Specifies that the sample profile is accurate
Enable sample-based profile guided optimizations
Partition functions into N groups using -fprofile-function-groups and select only functions in group i to be instrumented. The valid range is 0 to N-1 inclusive
Set update method of profile counters
Use instrumentation data for profile-guided optimization. If pathname is a directory, it reads from <pathname>/default.profdata. Otherwise, it reads from file <pathname>.
Determines whether the optimizer honors parentheses when floating-point expressions are evaluated
Emit pseudo probes for sample profiling
File holding the seed used by the randomize structure layout feature
The seed used by the randomize structure layout feature
Allow division operations to be reassociated
Override the default ABI to return small structs in registers
Use atexit or __cxa_atexit to register global destructors
Enable C++17 relaxed template template argument matching
Turn on loop reroller
Generate read-only position independent code (ARM only)
Add -rpath with architecture-specific resource directory to the linker flags. When --hip-link is specified, also add -rpath with HIP runtime library directory to the linker flags
Generate read-write position independent code (ARM only)
Display suggestions to update code associated with -Wunsafe-buffer-usage warnings
Use profi to infer block and edge counts
Set the kind of module destructors emitted by AddressSanitizer instrumentation. These destructors are emitted to unregister instrumented global variables when code is unloaded (e.g. via `dlclose()`).
Level of field padding for AddressSanitizer
Enable linker dead stripping of globals in AddressSanitizer
Always generate function calls for address sanitizer instrumentation
Enable poisoning array cookies when using custom operator new[] in AddressSanitizer
Select the mode of detecting stack use-after-return in AddressSanitizer
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
Alias for -fsanitize-ignorelist=
Make the jump table addresses canonical in the symbol table
Enable control flow integrity (CFI) checks for cross-DSO calls.
Normalize integers in CFI indirect call type signature checks
Generalize pointers in CFI indirect call type signature checks
Restrict sanitizer coverage instrumentation exclusively to modules and functions that match the provided special case list, except the blocked ones
Disable sanitizer coverage instrumentation for modules and functions that match the provided special case list, even the allowed ones
Specify the type of coverage instrumentation for Sanitizers
Select the HWAddressSanitizer ABI to target (interceptor or platform, default interceptor). This option is currently unused.
Enable aliasing mode in HWAddressSanitizer
Path to ignorelist file for sanitizers
Enable detection of uninitialized parameters and return values
Enable origins tracking in MemorySanitizer
Enable origins tracking in MemorySanitizer
Enable use-after-destroy detection in MemorySanitizer
Set default MTE mode to 'sync' (default) or 'async'
Enable recovery for specified sanitizers
Stable ABI instrumentation for sanitizer runtime. Default: Conventional
Enable sanitizer statistics gathering.
Path to system ignorelist file for sanitizers
Enable atomic operations instrumentation in ThreadSanitizer (default)
Enable function entry/exit instrumentation in ThreadSanitizer (default)
Enable memory access instrumentation in ThreadSanitizer (default)

-fsanitize-trap=<value> Enable trapping for specified sanitizers

Enable trapping for all sanitizers
Strip (or keep only, if negative) a given number of path components when emitting check metadata.
Turn on runtime checks for various forms of undefined or suspicious behavior. See user manual for available checks
Generate an optimization record file in a specific format
Generate a YAML optimization record file
Use SEH style exceptions
Allocate to an enum type only as many bytes as it needs for the declared range of possible values
Force wchar_t to be a short unsigned int
Which overload candidates to show when overload resolution fails. Defaults to 'all'

-fshow-skipped-includes Show skipped includes in -H output.

char is signed
Enable C++14 sized global deallocation functions
Use SjLj style exceptions
Enable the superword-level parallelism vectorization passes
Set the maximum number of times to perform spell checking on unrecognized identifiers (0 = no limit)
Provide minimal debug info in the object/executable to facilitate online symbolication/stack traces in the absence of .dwo/.dwp files when using Split DWARF
Enables splitting of the LTO unit
Enable late function splitting using profile information (x86 ELF)
Use segmented stack
Enable stack clash protection
Enable stack protectors for all functions
Enable 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
Enable 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.
Emit section containing metadata on function stack sizes
Emit .su file containing information on function stack sizes
Emit full debug info for all types used by the program
Enable optimizations based on the strict definition of an enum's value range
Enable optimizations based on the strict definition of flexible arrays
Assume that overflowing float-to-int casts are undefined (default)
Enable optimizations based on the strict rules for overwriting polymorphic C++ objects
Control emission of Swift async extended frame info
Enables SYCL kernels compilation for device
Run the preprocessor, parser and semantic analysis stages
Build this module as a system module. Only used with -emit-module
Set the maximum number of entries to print in a template instantiation backtrace (0 = no limit)
Set the maximum depth of recursive template instantiation
Produce gcov notes files (*.gcno)
Write minimized bitcode to <file> for the ThinLTO thin link only

-fthinlto-index=<value> Perform ThinLTO importing using provided function summary index

(For new pass manager) 'per-pass': one report for each pass; 'per-pass-run': one report for each pass invocation
Minimum time granularity (in microseconds) traced by time profiler
Similar to -ftime-trace. Specify the JSON file or a directory which will contain the JSON file
Turn on time profiler. Generates JSON file based on output filename.

-ftrap-function=<value> Issue call to specified function rather than a trap instruction

Specify the function to be called on overflow
Trap on integer overflow
Process trigraph sequences
Stop initializing trivial automatic stack variables after the specified number of instances
Initialize trivial automatic stack variables. Defaults to 'uninitialized'
Use the unified LTO pipeline
Use unique names for basic block sections (ELF Only)
Uniqueify Internal Linkage Symbol Names by appending the MD5 hash of the module path
Turn on loop unroller
Allow unsafe floating-point math optimizations which may decrease precision
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 overridden by option '-cuid=[ID]' if it is specified.
Use #line in preprocessed output
Compute 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
Use the given vector functions library
Enable the loop vectorization passes
Generate verbose assembly output
Enables dead virtual function elimination optimization. Requires -flto=full
The visibility for dllexport definitions [-fvisibility-from-dllstorageclass]
The visibility for dllimport external declarations [-fvisibility-from-dllstorageclass]
The visibility for external declarations without an explicit DLL dllstorageclass [-fvisibility-from-dllstorageclass]
Set the visibility of symbols in the generated code from their DLL storage class
Give global C++ operator new and delete declarations hidden visibility
When -fvisibility-inlines-hidden is enabled, static variables in inline C++ member functions will also be given hidden visibility by default
Give inline C++ member functions hidden visibility by default
Give global types 'default' visibility and global functions and variables 'hidden' visibility by default
The visibility for definitions without an explicit DLL export class [-fvisibility-from-dllstorageclass]
Set the default symbol visibility for all global definitions
Use WebAssembly style exceptions

-fwhole-program-vtables Enables whole-program vtable optimization. Requires -flto

Treat signed integer overflow as two's complement
Store string literals as writable data
Enable IBM XL #pragma pack handling
Always emit __xray_customevent(...) calls even if the containing function is not always instrumented
Always emit __xray_typedevent(...) calls even if the containing function is not always instrumented
DEPRECATED: Filename defining the whitelist for imbuing the 'always instrument' XRay attribute.
Filename defining the list of functions/types for imbuing XRay attributes.
Only instrument 1 of N groups
Don't instrument functions with loops unless they also meet the minimum function size
Sets the minimum function size to instrument with XRay
Select 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'.
Generate XRay instrumentation sleds on function entry and exit
Link XRay runtime library when -fxray-instrument is specified (default)
List of modes to link in by default into XRay instrumented binaries.
DEPRECATED: Filename defining the whitelist for imbuing the 'never instrument' XRay attribute.
When using -fxray-function-groups, select which group of functions to instrument. Valid range is 0 to fxray-function-groups - 1
Clear call-used registers upon function return (AArch64/x86 only)
Enable System z vector language extension
Add directory to framework include search path
Use GCC installation in the specified directory. The directory ends with path components like 'lib{,32,64}/gcc{,-cross}/$triple/$version'. Note: executables (e.g. ld) used by the compiler are not overridden by the selected GCC installation

--gcc-toolchain=<value> Specify a directory where Clang can find 'include' and 'lib{,32,64}/gcc{,-cross}/$triple/$version'. Clang will use the GCC installation with the largest version

-gcodeview-command-line Emit compiler path and command line into CodeView debug information

Emit type record hashes in a .debug$H section
Generate CodeView debug information
Generate source-level debug information with dwarf version 2
Generate source-level debug information with dwarf version 3
Generate source-level debug information with dwarf version 4
Generate source-level debug information with dwarf version 5
Enables DWARF32 format for ELF binaries, if debug information emission is enabled.
Enables DWARF64 format for ELF binaries, if debug information emission is enabled.
Generate source-level debug information with the default dwarf version
Embed source text in DWARF debug sections

-gen-reproducer=<value> Emit reproducer on (option: off, crash (default), error, always)

Emit debug line info directives only
Emit debug line number tables only
Generate debug info with external references to clang modules or precompiled headers
Don't emit compiler path and command line into CodeView debug information
Restore the default behavior of not embedding source text in DWARF debug sections

-gno-inline-line-tables Don't emit inline line tables.

Bundle output files of HIP device compilation
Instrument device library for HIP, which is a LLVM bitcode containing __cyg_profile_func_enter and __cyg_profile_func_exit
Default max threads per block for kernel launch bounds for HIP
Set DWARF fission mode
Restrict DWARF features to those defined in the specified version, avoiding features from later versions.
DWARF debug sections compression type
Put objects of at most <size> bytes into small data section (MIPS / Hexagon)
Generate source-level debug information
Display help for hidden options
Display available options
HIP device library
Link clang-offload-bundler bundles for HIP
HIP runtime installation path, used for finding HIP version and adding HIP include path.
HIP version in the format of major.minor.patch
path to a pass plugin for HIP to SPIR-V passes.
Show header includes and nesting depth
Restrict all prior -I flags to double-quoted inclusion and remove current directory from include path
Enable builtin #include directories even when -nostdinc is used before or after -ibuiltininc. Using -nobuiltininc after the option disables it
Add directory to AFTER include search path
Add directory to SYSTEM framework search path, absolute paths are relative to -isysroot
Add directory to SYSTEM framework search path
Include macros from file before parsing
Include precompiled header file
Include file before parsing
Make the next included directory (-I or -F) an indexer header map
Set the -iwithprefix/-iwithprefixbefore prefix
Add directory to QUOTE include search path
Set the system root directory (usually /)
Add directory to end of the SYSTEM include search path
Add directory to SYSTEM include search path
Overlay the virtual filesystem described by file over the real file system
Set directory to include search path with prefix
Set directory to SYSTEM include search path with prefix
Add directory to SYSTEM include search path, absolute paths are relative to -isysroot
Add directory to the end of the list of include search paths
Path to libomptarget-amdgcn bitcode library
Path to libomptarget-amdgcn bitcode library
Path to libomptarget-nvptx bitcode library
Add directory to library search path
Enable quadword atomics ABI on AIX (AIX PPC64 only). Uses lqarx/stqcx. instructions.
Enable SVR4-style position-independent code (Mips only)
Return all structs in memory (PPC32 only)
Specify the boundary's size to align branches
Specify types of branches to align
Align doubles to two words in structs (x86 only)
Enable AltiVec vector initializer syntax
Sets 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)
For a list of available architectures for the target use '-mcpu=help'
Link stack frames through backchain on System Z
Enforce targets of indirect branches and function returns
Align selected branches (fused, jcc, jmp) within 32-byte boundary
Enable CABAC instructions
Equivalent to -mcmodel=medium, compatible with RISC-V gcc.
Equivalent to -mcmodel=small, compatible with RISC-V gcc.
Allow use of CMSE (Armv8-M Security Extensions)
Specify code object ABI version. Defaults to 4. (AMDGPU only)
For a list of available CPUs for the target use '-mcpu=help'
Control the CR-bit tracking feature on PowerPC. ``-mcrbits`` (the enablement of CR-bit tracking support) is the default for POWER8 and above, as well as for all other CPUs when optimization is applied (-O2 and above).
Allow use of CRC instructions (ARM/Mips only)
Specify CU wavefront execution mode (AMDGPU only)
Mapping between default visibility and export
Force double to be <n> bits
Write a depfile containing user and system headers
Set EABI type. Default depends on triple)
Place constants in the .rodata section instead of the .sdata section even if they meet the -G <size> threshold (MIPS)
Enable use of experimental RISC-V extensions.
Execution model (WebAssembly only)
Disallow generation of data access to code sections (ARM only)
Assume that externally defined data is in the small data if it meets the -G <size> threshold (MIPS)
Insert calls to fentry at function entry (x86/SystemZ only)
Work around VLLDM erratum CVE-2021-35465 (ARM only)

-mfix-cortex-a53-835769 Workaround Cortex-A53 erratum 835769 (AArch64 only)

Work around Cortex-A57 Erratum 1742098 (ARM only)
Work around Cortex-A72 Erratum 1655431 (ARM only)
Use 32-bit floating point registers (MIPS only)
Use 64-bit floating point registers (MIPS only)
Select the frame chain model used to emit frame records (Arm only).
Replace returns with jumps to ``__x86_return_thunk`` (x86 only, error otherwise)
Write depfile output from -MMD, -MD, -MM, or -M to <file>
Generate code which only uses the general purpose registers (AArch64/x86 only)
Enable merging of globals
Use GP relative accesses for symbols known to be in a small data section (MIPS)
Enable or disable Control Flow Guard checks and guard tables emission
Add missing headers to depfile
Select straight-line speculation hardening scope (ARM/AArch64/X86 only). <arg> must be: all, none, retbr(ARM/AArch64), blr(ARM/AArch64), comdat(ARM/AArch64), nocomdat(ARM/AArch64), return(X86), indirect-jmp(X86)
Enable Hexagon HVX IEEE floating-point
Set Hexagon Vector Length
Enable Hexagon HVX QFloat instructions
Enable Hexagon Vector eXtensions
Enable Hexagon Vector eXtensions
Use Intel MCU ABI
Not emit the visibility attribute for asm in AIX OS or give all symbols 'unspecified' visibility in XCOFF object file
Run the migrator
(integrated-as) Emit an object file which can be used with an incremental linker
Add cs prefix to call and jmp to indirect thunk

-mindirect-jump=<value> Change indirect jump instructions to inhibit speculation

Set iOS deployment target
Write a compilation database entry per input
Alias for -mllvm
Additional arguments to forward to LLVM's option processing
Extend the -G behaviour to object local data (MIPS)
Generate branches with extended addressability, usually via indirect jumps.
Force long double to be 128 bits
Force long double to be 64 bits
Force long double to be 80 bits, padded to 128 bits for storage
Enable only control-flow mitigations for Load Value Injection (LVI)
Enable all mitigations for Load Value Injection (LVI)
Set macOS deployment target
Enable the generation of 4-operand madd.s, madd.d and related instructions.
Add .note.gnu.property with BTI to assembly files (AArch64 only)
Write a depfile containing user headers
Enable generation of memop instructions
Additional arguments to forward to MLIR's option processing
Set the default structure layout to be compatible with the Microsoft compiler standard
Enable MSA ASE (MIPS only)
Enable MT ASE (MIPS only)
Like -MMD, but also implies -E and writes to stdout by default
Disable SVR4-style position-independent code (Mips only)
Do not add a BTI instruction after a setjmp or other return-twice construct (Arm/AArch64 only)
Disallow use of CRC instructions (Mips only)
Specify WGP wavefront execution mode (AMDGPU only)
Do not place constants in the .rodata section instead of the .sdata if they meet the -G <size> threshold (MIPS)
Allow generation of data access to code sections (ARM only)
Do not assume that externally defined data is in the small data if it meets the -G <size> threshold (MIPS)
Don't work around VLLDM erratum CVE-2021-35465 (ARM only)
Don't workaround Cortex-A53 erratum 835769 (AArch64 only)
Don't work around Cortex-A57 Erratum 1742098 (ARM only)
Don't work around Cortex-A72 Erratum 1655431 (ARM only)
Disable function multiversioning
Disable generation of gather instructions in auto-vectorization(x86 only)
Disable merging of globals
Do not use GP relative accesses for symbols known to be in a small data section (MIPS)
Disable Hexagon HVX IEEE floating-point
Disable Hexagon HVX QFloat instructions
Disable Hexagon Vector eXtensions
Don't generate implicit floating point or vector instructions
(integrated-as) Emit an object file which cannot be used with an incremental linker
Do not extend the -G behaviour to object local data (MIPS)
Restore the default behaviour of not generating long calls
Disable control-flow mitigations for Load Value Injection (LVI)
Disable mitigations for Load Value Injection (LVI)
Disable the generation of 4-operand madd.s, madd.d and related instructions.
Disable generation of memop instructions
Disallow use of movt/movw pairs (ARM only)
Do not set the default structure layout to be compatible with the Microsoft compiler standard
Disable MSA ASE (MIPS only)
Disable MT ASE (MIPS only)
Disallow converting instructions with negative immediates to their negation or inversion.
Disable generation of new-value jumps
Disable generation of new-value stores
Don't generate local calls to out-of-line atomic operations
Disable function outlining (AArch64 only)
Disable generation of instruction packets
Don't assume data segments are relative to text segment
Disable linker relaxation
Allow generation of complex IT blocks.
Disable using library calls for save and restore
Disable generation of scatter instructions in auto-vectorization(x86 only)
Disable speculative execution side effect suppression (SESES)
Disable stack probes which are enabled by default
Disable threadgroup split execution mode (AMDGPU only)
Disable direct TLS access through segment registers
Force all memory accesses to be aligned (AArch32/AArch64/LoongArch only)
Specify wavefront size 32 mode (AMDGPU only)
Disallow use of CRC instructions (ARM only)
Generate mcount/__fentry__ calls as nops. To activate they need to be patched in.
Enable generation of new-value jumps
Enable generation of new-value stores
Directory to dump module dependencies to
Provide information about a particular module file
Omit frame pointer setup for leaf functions
Generate local calls to out-of-line atomic operations
Enable function outlining (AArch64 only)
Use packed stack layout (SystemZ only).
Enable generation of instruction packets
Specify maximum number of prefixes to use for padding
Assume data segments are relative to text segment
Specifies preferred vector width for auto-vectorization. Defaults to 'none' which allows target specific decisions.
Specify the printf lowering scheme (AMDGPU only), allowed values are "hostcall"(printing happens during kernel execution, this scheme relies on hostcalls which require system to support pcie atomics) and "buffered"(printing happens after all kernel threads exit, this uses a printf buffer and does not rely on pcie atomic support)
Create phony target for each dependency (other than main file)
Enable hexagon-qdsp6 backward compatibility
Specify name of main file output to quote in depfile
Control use of approximate reciprocal and reciprocal square root instructions followed by <n> iterations of Newton-Raphson refinement. <value> = ( ['!'] ['vec-'] ('rcp'|'sqrt') [('h'|'s'|'d')] [':'<n>] ) | 'all' | 'default' | 'none'
Equivalent to '-mrecip=all'
Generate a __mcount_loc section entry for each __fentry__ call.
(integrated-as) Relax all machine instructions
Enable linker relaxation
Disallow generation of complex IT blocks. It is off by default.
Make StdCall calling convention the default
Specify the size in bits of an RVV vector register. Defaults to the vector length agnostic value of "scalable". Accepts power of 2 values between 64 and 65536. Also accepts "zvl" to use the value implied by -march/-mcpu. Value will be reflected in __riscv_v_fixed_vlen preprocessor define (RISC-V only)
Enable using library calls for save and restore
Enable speculative execution side effect suppression (SESES). Includes LVI control flow integrity mitigations
Select return address signing scope
Skip setting up RAX register when passing variable arguments (x86 only)
Put global and static data smaller than the limit into a special section
Use software floating point
Set the stack alignment
Enable stack probes
Set the stack probe size
Use the given offset for addressing the stack-protector guard
Use the given reg for addressing the stack-protector guard
Use the given symbol for addressing the stack-protector guard
Use the given guard (global, tls) for addressing the stack-protector guard
Force realign the stack at entry to every function
Specify the size in bits of an SVE vector register. Defaults to the vector length agnostic value of "scalable". (AArch64 only)
Return small structs in registers (PPC32 only)
Set the deployment target to be the specified OS and OS version
Enable threadgroup split execution mode (AMDGPU only)
The thread model to use. Defaults to 'posix')
Enable direct TLS access through segment registers (default)
Specify 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)
Thread pointer access method. For AArch32: 'soft' uses a function call, or 'tpidrurw', 'tpidruro' or 'tpidrprw' use the three CP15 registers. 'cp15' is an alias for 'tpidruro'. For AArch64: 'tpidr_el0', 'tpidr_el1', 'tpidr_el2', 'tpidr_el3' or 'tpidrro_el0' use the five system registers. 'elN' is an alias for 'tpidr_elN'.
Only supported on AArch64, PowerPC, RISC-V, SystemZ, and X86
Specify name of main file output in depfile
Allow memory accesses to be unaligned (AArch32/AArch64/LoongArch only)
Enable generation of unsafe floating point atomic instructions. May generate more efficient code, but may not respect rounding and denormal modes, and may give incorrect results for certain memory destinations. (AMDGPU only)
Specify the vscale maximum. Defaults to the vector length agnostic value of "0". (AArch64/RISC-V only)
Specify the vscale minimum. Defaults to "1". (AArch64/RISC-V only)
Use NMake/Jom format for the depfile
Specify wavefront size 64 mode (AMDGPU only)
On AIX, request creation of a build-id string, "0xHEXSTRING", in the string table of the loader section inside the linked binary
Place constant objects with relocatable address values in the RO data section and add -bforceimprw to the linker flags (AIX only)
High level qualifier for z/OS C++RT side deck datasets
High level qualifier for z/OS CSSLIB dataset
High level qualifier for z/OS Language Environment datasets
Path to system headers on z/OS
Like -MD, but also implies -E and writes to stdout by default
Do not include PTX for the following GPU architecture (e.g. sm_35) or 'all'. May be specified more than once.

--no-cuda-version-check Don't error out if the detected version of the CUDA install is too low for the requested CUDA gpu architecture.

Disable loading default configuration files
Do not bundle output files of HIP device compilation
Do not link against HIP runtime libraries
Remove CUDA/HIP offloading device architecture (e.g. sm_35, gfx906) from the list of devices to compile for. 'all' resets the list to its default value.

--no-offload-new-driver Don't Use the new driver for offloading compilation.

Treat all #include paths starting with <prefix> as not including a system header.
Disable builtin #include directories
Do not add include paths for CUDA/HIP and do not include the default CUDA/HIP wrapper headers
Do not link device library for CUDA/HIP device compilation
Do not include the default HIP wrapper headers and include paths
Disable standard #include directories for the C++ standard library
Tool used for detecting NVIDIA GPU arch in the system.
Treat source input files as Objective-C++ inputs
Only modify files with a filename contained in the provided directory path

-objcmt-atomic-property Make migration to 'atomic' properties

Enable migration to modern ObjC
Enable migration to property and method annotations
Enable migration to infer NS_DESIGNATED_INITIALIZER for initializer methods
Enable migration to infer instancetype for method result type
Enable migration to modern ObjC literals
Enable migration to NS_ENUM/NS_OPTIONS macros
Enable migration of setter/getter messages to property-dot syntax
Enable migration to modern ObjC property
Enable migration to add protocol conformance on classes
Enable migration to modern ObjC readonly property
Enable migration to modern ObjC readwrite property
Enable migration to modern ObjC subscripting
Enable migration to use NS_NONATOMIC_IOSONLY macro for setting property's 'atomic' attribute
Enable migration to annotate property with NS_RETURNS_INNER_POINTER
Alias for -objcmt-allowlist-dir-path
Treat source input files as Objective-C inputs
Set the output <file> for debug infos
Specify an offloading device architecture for CUDA, HIP, or OpenMP. (e.g. sm_35). If 'native' is used the compiler will detect locally installed architectures. For HIP offloading, the device architecture can be followed by target ID features delimited by a colon (e.g. gfx908:xnack+:sramecc-). May be specified more than once.
Only compile for the offloading device.
Only compile for the offloading host.
Only compile for the offloading host.
Use the new offloading linker to perform the link job.
Use the new driver for offloading compilation.
Specify comma-separated list of offloading target triples (CUDA and HIP only)
Write output to <file>
Warn on language extensions
Enable mcount instrumentation
Use pipes between commands, when possible
Only precompile the input
Print all of Clang's warning options

-print-effective-triple Print the effective target triple

-print-file-name=<file> Print the full library path of <file>

Enable Objective-C Ivar layout bitmap print trace

-print-libgcc-file-name Print the library path for the currently used compiler runtime library ("libgcc.a" or "libclang_rt.builtins.*.a")

Print the flags used for selecting multilibs (experimental)

-print-prog-name=<name> Print the full program path of <name>

Print the resource directory pathname

-print-rocm-search-dirs Print the paths used for finding ROCm installation

Print the directory pathname containing clangs runtime libraries
Print the paths used for finding libraries and programs
Print supported cpu models for the given target (if target is not specified, it will print the supported cpus for the default target)
Print the normalized target triple
Print the registered targets
Support POSIX threads in generated code
Path to ptxas (used for compiling CUDA code)
Disable linemarker output in -E mode
Enable mcount instrumentation with prof
Do not emit metadata containing compiler name and version
Don't emit warning for unused driver arguments
Emit metadata containing compiler name and version
Whether to build a relocatable precompiled header
Rewrite Legacy Objective-C source to C++
Rewrite Objective-C source to C++
ROCm device library path. Alternative to rocm-path.
ROCm installation path, used for finding and automatically linking required bitcode libraries.

-Rpass-analysis=<value> Report transformation analysis from optimization passes whose name matches the given POSIX regular expression

Report missed transformations by optimization passes whose name matches the given POSIX regular expression
Report transformations performed by optimization passes whose name matches the given POSIX regular expression
Compiler runtime library to use
Enable the specified remark
Save llvm statistics.
Save llvm statistics.
Save intermediate compilation results.
Save intermediate compilation results
Serialize compiler diagnostics to a file
Dynamically link the sanitizer runtime
Don't emit warnings about unused arguments for the following arguments
Statically link the sanitizer runtime (Not supported for ASan, TSan or UBSan on darwin)
Use the static host OpenMP runtime while linking.
Language standard to compile for
Use directory as the C++ standard library include path
C++ standard library to use
SYCL language standard to compile for.
Treat all #include paths starting with <prefix> as including a system header.
Only run preprocess and compilation steps
Generate code for the given target
Time individual commands
Enable some traditional CPP emulation
Process trigraph sequences
Specify <script> as linker script
undef all system defines
Unwind library to use
Undefine macro <macro>
Verify the binary representation of debug output
Load and verify that a pre-compiled header file is not stale
Print version information
Overlay the virtual filesystem described by file over the real file system. Additionally, pass this overlay file to the linker if it supports it
Show commands to run and use verbose output
Pass the comma separated arguments in <arg> to the assembler
Enable warnings for deprecated constructs and define __DEPRECATED
Pass the comma separated arguments in <arg> to the linker
Resolve file paths relative to the specified directory
Pass the comma separated arguments in <arg> to the preprocessor
Enable the specified warning
Suppress all warnings
Pass <arg> to the static analyzer
Pass <arg> to the CUDA/HIP device compilation
Pass <arg> to the CUDA/HIP host compilation
Pass <arg> to the assembler
Alias for -Xclang
Pass <arg> to clang -cc1
Pass <arg> to fatbinary invocation
Pass <arg> to the ptxas assembler
Pass <arg> to the linker
Pass <arg> to the offload linkers or the ones idenfied by -<triple>
Pass <arg> to the target offloading toolchain identified by <triple>.
Pass <arg> to the target offloading toolchain.
Pass <arg> to the preprocessor
Treat subsequent input files as having type <language>
Pass -z <arg> to the linker

CastXML project maintained and supported by Kitware (kitware.com).

Debian clang version 17.0.6 (9) Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir:

March 2024 castxml version 0.6.3