clang --help编译选项 中文说明


)
USAGE: clang [options]

OPTIONS:

-B

\<dir\>   Add \<dir> to search path for binaries and object files used implicitly
 添加到隐式使用的二进制文件和对象文件的搜索路径

-CC

Include comments from within macros in preprocessed output
在预处理输出中包含来自宏内部的注释

–config <value>

  Specifies configuration file
  指定配置文件

-C

   Include comments in preprocessed output
   在预处理输出中包含注释

-c

   Only run preprocess, compile, and assemble steps
   只运行预处理、编译和组装步骤

-dD

  Print macro definitions in -E mode in addition to normal output

-dependency-dot

   Filename to write DOT-formatted header dependencies to

-dependency-file

 Filename (or -) to write dependency output to

-dI

 Print include directives in -E mode in addition to normal output

-dM

 Print macro definitions in -E mode instead of normal output

-D <macro>=<value>

Define <macro> to <value> (or 1 if <value> omitted)

-emit-ast

       Emit Clang AST files for source inputs

-emit-llvm

      Use the LLVM representation for assembler and object files

-E

  Only run the preprocessor

-fembed-bitcode-marker
Embed placeholder LLVM IR data as a marker
-fembed-bitcode=/
Embed LLVM bitcode (option: off, all, bitcode, marker)
-fembed-bitcode
Embed LLVM IR bitcode as data
-femit-all-decls
Emit all declarations, even if unused
发出所有声明,即使未使用
-fimplicit-module-maps
Implicitly search the file system for module map files.
-finline-functions
Inline suitable functions
-finline-hint-functions
Inline functions which are (explicitly or implicitly) marked inline
-finstrument-function-entry-bare
Instrument function entry only, after inlining, without arguments to the instrumentation call
-finstrument-functions-after-inlining
Like -finstrument-functions, but insert the calls after inlining
-finstrument-functions
Generate calls to instrument function entry and exit
-fno-access-control
Disable C++ access control
-fno-assume-sane-operator-new
Don’t assume that C++'s global operator new can’t alias any pointer
-fno-autolink Disable generation of linker directives for automatic library linking
-fno-builtin-<value> Disable implicit builtin knowledge of a specific function
-fno-builtin Disable implicit builtin knowledge of functions
-fno-common Compile common globals like normal definitions
-fno-constant-cfstrings Disable creation of CodeFoundation-type constant strings
-fno-coverage-mapping Disable code coverage analysis
-fno-crash-diagnostics Disable auto-generation of preprocessed source files and a script for reproduction during a clang crash
-fno-debug-info-for-profiling
Do not emit extra debug info for sample profiler.
-fno-debug-macro Do not emit macro debug information
-fno-declspec Disallow __declspec as a keyword
-fno-delayed-template-parsing
Disable delayed template parsing
-fno-diagnostics-fixit-info
Do not include fixit information in diagnostics
-fno-dollars-in-identifiers
Disallow ‘$’ in identifiers
-fno-double-square-bracket-attributes
Disable ‘[[]]’ attributes in all C and C++ language modes
-fno-elide-constructors Disable C++ copy constructor elision
-fno-elide-type Do not elide types when printing diagnostics
-fno-experimental-isel Disables the experimental global instruction selector
-fno-experimental-new-pass-manager
Disables an experimental new pass manager in LLVM.
-fno-fine-grained-bitfield-accesses
Use large-integer access for consecutive bitfield runs.
-fno-gnu-inline-asm Disable GNU style inline asm
-fno-integrated-as Disable the integrated assembler
-fno-jump-tables Do not use jump tables for lowering switches
-fno-lax-vector-conversions
Disallow implicit conversions between vectors with a different number of elements or different element types
-fno-lto Disable LTO mode (default)
-fno-merge-all-constants
Disallow merging of constants
-fno-objc-infer-related-result-type
do not infer Objective-C related result type based on method family
-fno-openmp-simd Disable OpenMP code for SIMD-based constructs.
-fno-operator-names Do not treat C++ operator name keywords as synonyms for operators
-fno-plt Do not use the PLT to make function calls
-fno-preserve-as-comments
Do not preserve comments in inline assembly
-fno-profile-generate Disable generation of profile instrumentation.
-fno-profile-instr-generate
Disable generation of profile instrumentation.
-fno-profile-instr-use Disable using instrumentation data for profile-guided optimization
-fno-reroll-loops Turn off loop reroller
-fno-rtlib-add-rpath Do not add -rpath with architecture-specific resource directory to the linker flags
-fno-rtti Disable generation of rtti information
-fno-sanitize-address-use-after-scope
Disable use-after-scope detection in AddressSanitizer
-fno-sanitize-blacklist Don’t use blacklist file for sanitizers
-fno-sanitize-cfi-cross-dso
Disable control flow integrity (CFI) checks for cross-DSO calls.
-fno-sanitize-coverage=
Disable specified features of coverage instrumentation for Sanitizers
-fno-sanitize-memory-track-origins
Disable origins tracking in MemorySanitizer
-fno-sanitize-memory-use-after-dtor
Disable use-after-destroy detection in MemorySanitizer
-fno-sanitize-recover=
Disable recovery for specified sanitizers
-fno-sanitize-stats Disable sanitizer statistics gathering.
-fno-sanitize-thread-atomics
Disable atomic operations instrumentation in ThreadSanitizer
-fno-sanitize-thread-func-entry-exit
Disable function entry/exit instrumentation in ThreadSanitizer
-fno-sanitize-thread-memory-access
Disable memory access instrumentation in ThreadSanitizer
-fno-sanitize-trap=
Disable trapping for specified sanitizers
-fno-short-wchar Force wchar_t to be an unsigned int
-fno-show-column Do not include column number on diagnostics
-fno-show-source-location
Do not include source location information with diagnostics
-fno-signed-char Char is unsigned
-fno-signed-zeros Allow optimizations that ignore the sign of floating point zeros
-fno-spell-checking Disable spell-checking
-fno-stack-protector Disable the use of stack protectors
-fno-standalone-debug Limit debug information produced to reduce size of debug binary
-fno-threadsafe-statics Do not emit code to make initialization of local statics thread safe
-fno-trigraphs Do not process trigraph sequences
-fno-unroll-loops Turn off loop unroller
-fno-use-cxa-atexit Don’t use __cxa_atexit for calling destructors
-fno-use-init-array Don’t use .init_array instead of .ctors
-fnoopenmp-relocatable-target
Do not compile OpenMP target code as relocatable.
-fobjc-arc-exceptions Use EH-safe code when synthesizing retains and releases in -fobjc-arc
-fobjc-arc Synthesize retain and release calls for Objective-C pointers
-fobjc-exceptions Enable Objective-C exceptions
-fobjc-runtime= Specify the target Objective-C runtime kind and version
-fobjc-weak Enable ARC-style weak references in Objective-C
-fopenmp-relocatable-target
OpenMP target code is compiled as relocatable using the -c flag. For OpenMP targets the code is relocatable by default.
-fopenmp-simd Emit OpenMP code only for SIMD-based constructs.
-fopenmp-targets=
Specify comma-separated list of triples OpenMP offloading targets to be supported
-foptimization-record-file=
Specify the file name of any generated YAML optimization record

-fmodules
Enable the ‘modules’ language feature
允许modules的语言特性

  • -fsyntax-only
    防止编译器生成代码,只是语法级别的说明和修改

  • -Xclang
    向clang编译器传递参数

  • -dump-tokens
    运行预处理器,拆分内部代码段为各种token

  • -ast-dump
    构建抽象语法树AST,然后对其进行拆解和调试

  • -S
    只运行预处理和编译步骤

  • -fobjc-arc
    为OC对象生成retain和release的调用

  • -emit-llvm
    使用LLVM描述汇编和对象文件

  • -o
    输出到目标文件

  • -c
    只运行预处理,编译和汇编步骤

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值