From ba56afadd3b958e755d7783f2eff2995107f26f9 Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Fri, 27 Nov 2020 15:47:58 -0500 Subject: [PATCH] Update documentation for supported clang options Change-Id: I5d7017cd5c4335959fe5bae322e90aa46cdbc672 [ROCm/hip commit: fe70aa49305af030909ca99533ec4a10f6220e43] --- projects/hip/docs/markdown/clang_options.md | 375 +++++++++++++----- projects/hip/docs/markdown/clang_options.txt | 264 +++++++++--- .../hip/docs/markdown/gen_clang_option_doc.sh | 28 +- 3 files changed, 492 insertions(+), 175 deletions(-) diff --git a/projects/hip/docs/markdown/clang_options.md b/projects/hip/docs/markdown/clang_options.md index 7c2538426c..01b7fa78ee 100644 --- a/projects/hip/docs/markdown/clang_options.md +++ b/projects/hip/docs/markdown/clang_options.md @@ -1,16 +1,16 @@ # Support of Clang options - Clang versiion: clang version 9.0.0 (https://github.com/llvm-mirror/clang.git 50988b3ea26e892a74a2848e5a06b96f2472a05c) (https://github.com/RadeonOpenCompute/llvm.git 6483275d3d7603784c30e08927f2b315dfb95639) + Clang version: clang version 12.0.0 927e2776dc0e4bb0119efbc5ea405b7425d7f4ac |Option|Support|Description| |-------|------|-------| |`-###`|Supported|`Print (but do not run) the commands to run for this compilation`| -|`--analyzer-output `|Supported|`Static analyzer report output format (html\|plist\|plist-multi-file\|plist-html\|text).`| +|`--analyzer-output `|Supported|`Static analyzer report output format (html\|plist\|plist-multi-file\|plist-html\|sarif\|text).`| |`--analyze`|Supported|`Run the static analyzer`| |`-arcmt-migrate-emit-errors`|Unsupported|`Emit ARC errors even if the migrator can fix them`| |`-arcmt-migrate-report-output `|Unsupported|`Output path for the plist report`| +|`-byteswapio`|Supported|`Swap byte-order for unformatted input/output`| |`-B `|Supported|`Add to search path for binaries and object files used implicitly`| |`-CC`|Supported|`Include comments from within macros in preprocessed output`| -|`-cfguard`|Supported|`Emit tables required for Windows Control Flow Guard.`| |`-cl-denorms-are-zero`|Supported|`OpenCL only. Allow denormals to be flushed to zero.`| |`-cl-fast-relaxed-math`|Supported|`OpenCL only. Sets -cl-finite-math-only and -cl-unsafe-math-optimizations, and defines __FAST_RELAXED_MATH__.`| |`-cl-finite-math-only`|Supported|`OpenCL only. Allow floating-point optimizations that assume arguments and results are not NaNs or +-Inf.`| @@ -27,7 +27,6 @@ |`--config `|Supported|`Specifies configuration file`| |`--cuda-compile-host-device`|Supported|`Compile CUDA code for both host and device (default). Has no effect on non-CUDA compilations.`| |`--cuda-device-only`|Supported|`Compile CUDA code for device only`| -|`--cuda-gpu-arch=`|Supported|`CUDA GPU architecture (e.g. sm_35). May be specified more than once.`| |`--cuda-host-only`|Supported|`Compile CUDA code for host only. Has no effect on non-CUDA compilations.`| |`--cuda-include-ptx=`|Unsupported|`Include PTX for the following GPU architecture (e.g. sm_35) or 'all'. May be specified more than once.`| |`--cuda-noopt-device-debug`|Unsupported|`Enable device-side debug info generation. Disables ptxas optimizations.`| @@ -41,24 +40,32 @@ |`-dependency-file `|Supported|`Filename (or -) to write dependency output to`| |`-dI`|Supported|`Print include directives in -E mode in addition to normal output`| |`-dM`|Supported|`Print macro definitions in -E mode instead of normal output`| +|`-dsym-dir `|Unsupported|`Directory to output dSYM's (if any) to`| |`-D `|Supported|`= Define to (or 1 if omitted)`| |`-emit-ast`|Supported|`Emit Clang AST files for source inputs`| +|`-emit-interface-stubs`|Supported|`Generate Interface Stub Files.`| |`-emit-llvm`|Supported|`Use the LLVM representation for assembler and object files`| -|`-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang`|Supported|`Trivial automatic variable initialization to zero is only here for benchmarks, it'll eventually be removed, and I'm OK with that because I'm only using it to benchmark`| -|`-E`||`Only run the preprocessor`| +|`-emit-merged-ifs`|Supported|`Generate Interface Stub Files, emit merged text not binary.`| +|`--emit-static-lib`|Supported|`Enable linker job to emit a static library.`| +|`-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang`|Supported|`Trivial automatic variable initialization to zero is only here for benchmarks, it'll eventually be removed, and I'm OK with that because I'm only using it to benchmark`| +|`-E`|Supported|`Only run the preprocessor`| +|`-fAAPCSBitfieldLoad`|Unsupported|`Follows the AAPCS standard that all volatile bit-field write generates at least one load. (ARM only).`| |`-faddrsig`|Supported|`Emit an address-significance table`| |`-faligned-allocation`|Supported|`Enable C++17 aligned allocation functions`| |`-fallow-editor-placeholders`|Supported|`Treat editor placeholders as valid source code`| +|`-fallow-fortran-gnu-ext`|Supported|`Allow Fortran GNU extensions`| |`-fansi-escape-codes`|Supported|`Use ANSI escape codes for diagnostics`| |`-fapple-kext`|Unsupported|`Use Apple's kernel extensions ABI`| +|`-fapple-link-rtlib`|Unsupported|`Force linking the clang builtins runtime library`| |`-fapple-pragma-pack`|Unsupported|`Enable Apple gcc-compatible #pragma pack handling`| |`-fapplication-extension`|Unsupported|`Restrict code to those available for App Extensions`| +|`-fbackslash`|Supported|`Treat backslash as C-style escape character`| +|`-fbasic-block-sections=`|Supported|`Place each function's basic blocks in unique sections (ELF Only) : all \| labels \| none \| list=`| |`-fblocks`|Supported|`Enable the 'blocks' language feature`| |`-fborland-extensions`|Unsupported|`Accept non-standard constructs supported by the Borland compiler`| |`-fbuild-session-file=`|Supported|`Use the last modification time of as the build session timestamp`| |`-fbuild-session-timestamp=