diff options
author | Hans Wennborg <hans@hanshq.net> | 2019-07-29 09:16:42 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2019-07-29 09:16:42 +0000 |
commit | cc67974f56eb5bd372d9820412eef2cc214cef77 (patch) | |
tree | 887556d5f73ef948e86594e0f8a5893b6fd0874c | |
parent | 155c6c32f3a1047fddff1b277710fd1e21cd122d (diff) |
UsersManual.rst: Update clang-cl command reference
git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_90@367212 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | docs/UsersManual.rst | 103 |
1 files changed, 63 insertions, 40 deletions
diff --git a/docs/UsersManual.rst b/docs/UsersManual.rst index 2fbb414f68..f800e86e85 100644 --- a/docs/UsersManual.rst +++ b/docs/UsersManual.rst @@ -2998,42 +2998,42 @@ Execute ``clang-cl /?`` to see a list of supported options: CL.EXE COMPATIBILITY OPTIONS: /? Display available options /arch:<value> Set architecture for code generation - /Brepro- Emit an object file which cannot be reproduced over time - /Brepro Emit an object file which can be reproduced over time + /Brepro- Write current time into COFF output (default) + /Brepro Do not write current time into COFF output (breaks link.exe /incremental) /clang:<arg> Pass <arg> to the clang driver - /C Don't discard comments when preprocessing + /C Do not discard comments when preprocessing /c Compile only /d1PP Retain macro definitions in /E mode /d1reportAllClassLayout Dump record layout information - /diagnostics:caret Enable caret and column diagnostics (on by default) + /diagnostics:caret Enable caret and column diagnostics (default) /diagnostics:classic Disable column and caret diagnostics /diagnostics:column Disable caret diagnostics but keep column info /D <macro[=value]> Define macro - /EH<value> Exception handling model + /EH<value> Set exception handling model /EP Disable linemarker output and preprocess to stdout /execution-charset:<value> - Runtime encoding, supports only UTF-8 + Set runtime encoding, supports only UTF-8 /E Preprocess to stdout /fallback Fall back to cl.exe if clang-cl fails to compile /FA Output assembly code file during compilation - /Fa<file or directory> Output assembly code to this file during compilation (with /FA) - /Fe<file or directory> Set output executable file or directory (ends in / or \) + /Fa<file or dir/> Set assembly output file name (with /FA) + /Fe<file or dir/> Set output executable file name /FI <value> Include file before parsing /Fi<file> Set preprocess output file name (with /P) - /Fo<file or directory> Set output object file, or directory (ends in / or \) (with /c) + /Fo<file or dir/> Set output object file (with /c) /fp:except- /fp:except /fp:fast /fp:precise /fp:strict - /Fp<filename> Set pch filename (with /Yc and /Yu) + /Fp<file> Set pch file name (with /Yc and /Yu) /GA Assume thread-local variables are defined in the executable /Gd Set __cdecl as a default calling convention /GF- Disable string pooling /GF Enable string pooling (default) - /GR- Disable emission of RTTI data + /GR- Do not emit RTTI data /Gregcall Set __regcall as a default calling convention - /GR Enable emission of RTTI data + /GR Emit RTTI data (default) /Gr Set __fastcall as a default calling convention /GS- Disable buffer security check /GS Enable buffer security check (default) @@ -3042,15 +3042,15 @@ Execute ``clang-cl /?`` to see a list of supported options: /guard:<value> Enable Control Flow Guard with /guard:cf, or only the table with /guard:cf,nochecks /Gv Set __vectorcall as a default calling convention - /Gw- Don't put each data item in its own section + /Gw- Do not put each data item in its own section (default) /Gw Put each data item in its own section - /GX- Disable exception handling - /GX Enable exception handling - /Gy- Don't put each function in its own section (default) + /GX- Deprecated (like not passing /EH) + /GX Deprecated; use /EHsc + /Gy- Do not put each function in its own section (default) /Gy Put each function in its own section /Gz Set __stdcall as a default calling convention /help Display available options - /imsvc <dir> Add directory to system include search path, as if part of %INCLUDE% + /imsvc <dir> Add <dir> to system include search path, as if in %INCLUDE% /I <dir> Add directory to include search path /J Make char type unsigned /LDd Create debug DLL @@ -3060,11 +3060,10 @@ Execute ``clang-cl /?`` to see a list of supported options: /MD Use DLL run-time /MTd Use static debug run-time /MT Use static run-time - /O0 Disable optimization - /O1 Optimize for size (same as /Og /Os /Oy /Ob2 /GF /Gy) - /O2 Optimize for speed (same as /Og /Oi /Ot /Oy /Ob2 /GF /Gy) + /O1 Optimize for size (like /Og /Os /Oy /Ob2 /GF /Gy) + /O2 Optimize for speed (like /Og /Oi /Ot /Oy /Ob2 /GF /Gy) /Ob0 Disable function inlining - /Ob1 Only inline functions which are (explicitly or implicitly) marked inline + /Ob1 Only inline functions explicitly or implicitly marked inline /Ob2 Inline functions as deemed beneficial by the compiler /Od Disable optimization /Og No effect @@ -3072,23 +3071,23 @@ Execute ``clang-cl /?`` to see a list of supported options: /Oi Enable use of builtin functions /Os Optimize for size /Ot Optimize for speed - /Ox Deprecated (same as /Og /Oi /Ot /Oy /Ob2); use /O2 instead + /Ox Deprecated (like /Og /Oi /Ot /Oy /Ob2); use /O2 /Oy- Disable frame pointer omission (x86 only, default) /Oy Enable frame pointer omission (x86 only) /O<flags> Set multiple /O flags at once; e.g. '/O2y-' for '/O2 /Oy-' - /o <file or directory> Set output file or directory (ends in / or \) + /o <file or dir/> Deprecated (set output file name); use /Fe or /Fe /P Preprocess to file /Qvec- Disable the loop vectorization passes /Qvec Enable the loop vectorization passes - /showFilenames- Don't print the name of each compiled file (default) + /showFilenames- Do not print the name of each compiled file (default) /showFilenames Print the name of each compiled file /showIncludes Print info about included files to stderr - /source-charset:<value> Source encoding, supports only UTF-8 - /std:<value> Language standard to compile for + /source-charset:<value> Set source encoding, supports only UTF-8 + /std:<value> Set C++ version (c++14,c++17,c++latest) /TC Treat all source files as C - /Tc <filename> Specify a C source file + /Tc <file> Treat <file> as C source file /TP Treat all source files as C++ - /Tp <filename> Specify a C++ source file + /Tp <file> Treat <file> as C++ source file /utf-8 Set source and runtime encoding to UTF-8 (default) /U <macro> Undefine macro /vd<value> Control vtordisp placement @@ -3105,17 +3104,19 @@ Execute ``clang-cl /?`` to see a list of supported options: /W3 Enable -Wall /W4 Enable -Wall and -Wextra /Wall Enable -Weverything - /WX- Do not treat warnings as errors + /WX- Do not treat warnings as errors (default) /WX Treat warnings as errors /w Disable all warnings - /X Don't add %INCLUDE% to the include search path + /X Do not add %INCLUDE% to include search path /Y- Disable precompiled headers, overrides /Yc and /Yu /Yc<filename> Generate a pch file for all code up to and including <filename> /Yu<filename> Load a pch file and use it instead of all code up to and including <filename> /Z7 Enable CodeView debug information in object files - /Zc:char8_t Enable C++2a char8_t type - /Zc:char8_t- Disable C++2a char8_t type - /Zc:dllexportInlines- Don't dllexport/dllimport inline member functions of dllexport/import classes + /Zc:alignedNew- Disable C++17 aligned allocation functions + /Zc:alignedNew Enable C++17 aligned allocation functions + /Zc:char8_t- Disable char8_t from c++2a + /Zc:char8_t Enable char8_t from C++2a + /Zc:dllexportInlines- Do not dllexport/dllimport inline member functions of dllexport/import classes /Zc:dllexportInlines dllexport/dllimport inline member functions of dllexport/import classes (default) /Zc:sizedDealloc- Disable C++14 sized global deallocation functions /Zc:sizedDealloc Enable C++14 sized global deallocation functions @@ -3124,13 +3125,13 @@ Execute ``clang-cl /?`` to see a list of supported options: /Zc:threadSafeInit Enable thread-safe initialization of static variables /Zc:trigraphs- Disable trigraphs (default) /Zc:trigraphs Enable trigraphs - /Zc:twoPhase- Disable two-phase name lookup in templates + /Zc:twoPhase- Disable two-phase name lookup in templates (default) /Zc:twoPhase Enable two-phase name lookup in templates /Zd Emit debug line number tables only - /Zi Alias for /Z7. Does not produce PDBs. - /Zl Don't mention any default libraries in the object file - /Zp Set the default maximum struct packing alignment to 1 - /Zp<value> Specify the default maximum struct packing alignment + /Zi Like /Z7 + /Zl Do not let object file auto-link default libraries + /Zp Set default maximum struct packing alignment to 1 + /Zp<value> Set default maximum struct packing alignment /Zs Syntax-check only OPTIONS: @@ -3145,6 +3146,15 @@ Execute ``clang-cl /?`` to see a list of supported options: -fcomplete-member-pointers Require member pointer base types to be complete if they would be significant under the Microsoft ABI -fcoverage-mapping Generate coverage mapping to enable code coverage analysis + -fcs-profile-generate=<directory> + Generate instrumented code to collect context sensitive + execution counts into <directory>/default.profraw + (overridden by LLVM_PROFILE_FILE env var) + -fcs-profile-generate Generate instrumented code to collect context sensitive + execution counts into default.profraw + (overridden by LLVM_PROFILE_FILE env var) + -fdebug-compilation-dir <value> + The compilation directory to embed in the debug info. -fdebug-macro Emit macro debug information -fdelayed-template-parsing Parse templated function definitions at the end of the translation unit @@ -3172,6 +3182,10 @@ Execute ``clang-cl /?`` to see a list of supported options: -fno-debug-macro Do not emit macro debug information -fno-delayed-template-parsing Disable delayed template parsing + -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-sanitize-address-poison-custom-array-cookie Disable poisoning array cookies when using custom operator new[] in AddressSanitizer -fno-sanitize-address-use-after-scope @@ -3200,10 +3214,18 @@ Execute ``clang-cl /?`` to see a list of supported options: Disable trapping for specified sanitizers -fno-standalone-debug Limit debug information produced to reduce size of debug binary -fobjc-runtime=<value> Specify the target Objective-C runtime kind and version + -forder-file-instrumentation + Generate instrumented code to collect order file into default.profraw + file (overridden by '=' form of option or LLVM_PROFILE_FILE env var) -fprofile-exclude-files=<value> Instrument only functions from files where names don't match all the regexes separated by a semi-colon -fprofile-filter-files=<value> Instrument only functions from files where names match any regex separated by a semi-colon + -fprofile-generate=<directory> + Generate instrumented code to collect execution counts into + <directory>/default.profraw (overridden by LLVM_PROFILE_FILE env var) + -fprofile-generate Generate instrumented code to collect execution counts into + default.profraw (overridden by LLVM_PROFILE_FILE env var) -fprofile-instr-generate=<file> Generate instrumented code to collect execution counts into <file> (overridden by LLVM_PROFILE_FILE env var) @@ -3252,10 +3274,10 @@ Execute ``clang-cl /?`` to see a list of supported options: -fsanitize-trap=<value> Enable trapping for specified sanitizers -fsanitize-undefined-strip-path-components=<number> Strip (or keep only, if negative) a given number of path components when emitting check metadata. - -fsanitize=<check> Turn on runtime checks for various forms of undefined or suspicious - behavior. See user manual for available checks + -fsanitize=<check> Turn on runtime checks for various forms of undefined or suspicious behavior. See user manual for available checks -fsplit-lto-unit Enables splitting of the LTO unit. -fstandalone-debug Emit full debug info for all types used by the program + -fthinlto-index=<value> Perform ThinLTO importing using provided function summary index -fwhole-program-vtables Enables whole-program vtable optimization. Requires -flto -gcodeview-ghash Emit type record hashes in a .debug$H section -gcodeview Generate CodeView debug information @@ -3264,6 +3286,7 @@ Execute ``clang-cl /?`` to see a list of supported options: -miamcu Use Intel MCU ABI -mllvm <value> Additional arguments to forward to LLVM's option processing -nobuiltininc Disable builtin #include directories + -print-supported-cpus Print supported cpu models for the given target (if target is not specified, it will print the supported cpus for the default target) -Qunused-arguments Don't emit warning for unused driver arguments -R<remark> Enable the specified remark --target=<value> Generate code for the given target |