mizvekov created this revision. Herald added a project: All. mizvekov requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits.
We also mention limitations with regards to character encoding support. Signed-off-by: Matheus Izvekov <mizve...@gmail.com> Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D133209 Files: clang/docs/ClangCommandLineReference.rst
Index: clang/docs/ClangCommandLineReference.rst =================================================================== --- clang/docs/ClangCommandLineReference.rst +++ clang/docs/ClangCommandLineReference.rst @@ -5,7 +5,7 @@ ------------------------------------------------------------------- ===================================== -Clang command line argument reference +Clang command line reference ===================================== .. contents:: :local: @@ -13,7 +13,7 @@ Introduction ============ -This page lists the command line arguments currently supported by the +This page lists the command line arguments and environment variables currently supported by the GCC-compatible ``clang`` and ``clang++`` drivers. @@ -22,6 +22,11 @@ Search $prefix$file for executables, libraries, and data files. If $prefix is a directory, search $prefix/$file +.. envvar:: COMPILER_PATH=<paths> + +Search $paths for executables, libraries, and data files. The value is a list of paths separated by a system standard +separator. On Windows and Unix, this separator should be colon, just like ``PATH``. + .. option:: -F<arg> Add directory to framework include search path @@ -349,8 +354,51 @@ Run the migrator +.. option:: -mmacosx-version-min=<arg> + +Sets the deployment target version (macOS only) + +.. evnvar:: MACOSX_DEPLOYMENT_TARGET + +Sets the deployment target version (macOS only). +This variable might not correctly handle non-ASCII characters in some hosts. + .. option:: -mios-simulator-version-min=<arg>, -miphonesimulator-version-min=<arg> +Sets the deployment target version (iOS only) + +.. evnvar:: IPHONEOS_DEPLOYMENT_TARGET + +Sets the deployment target version (iOS only). +This variable might not correctly handle non-ASCII characters in some hosts. + +.. option:: -mtvos-version-min=<arg> + +Sets the deployment target version (tvOS only) + +.. evnvar:: TVOS_DEPLOYMENT_TARGET + +Sets the deployment target version (tvOS only). +This variable might not correctly handle non-ASCII characters in some hosts. + +.. option:: -mwatchos-version-min=<arg> + +Sets the deployment target version (watchOS only) + +.. evnvar:: WATCHOS_DEPLOYMENT_TARGET + +Sets the deployment target version (watchOS only). +This variable might not correctly handle non-ASCII characters in some hosts. + +.. option:: -mdriverkit-version-min=<arg> + +Sets the deployment target version (DriverKit only) + +.. evnvar:: DRIVERKIT_DEPLOYMENT_TARGET + +Sets the deployment target version (DriverKit only). +This variable might not correctly handle non-ASCII characters in some hosts. + .. option:: -mlinker-version=<arg> .. option:: -mlittle-endian, -EL @@ -1166,6 +1214,14 @@ paths, for example if also specified with -isystem, the -I option will be ignored +.. envvar:: CPATH=<paths> + +Takes a list of paths to add to the include search path, like :option:`-I<dir>`. +The value is a list of paths separated by a system standard separator. +On Windows and Unix, this separator should be colon, just like ``PATH``. + +This variable might not correctly handle non-ASCII characters in some hosts. + .. option:: -I-, --include-barrier Restrict all prior -I flags to double-quoted inclusion and remove current directory from include path @@ -1182,10 +1238,6 @@ CUDA installation path -.. option:: -cxx-isystem<directory> - -Add directory to the C++ SYSTEM include search path - .. option:: -fbuild-session-file=<file> Use the last modification time of <file> as the build session timestamp @@ -1202,6 +1254,12 @@ Specify the module cache path +.. envvar:: CLANG_MODULE_CACHE_PATH=<directory> + +Specify the module cache path. +Will be used as a fallback if ::option::`-fmodules-cache-path=<directory>` is not specified. +This variable might not correctly handle non-ASCII characters in some hosts. + .. option:: -fmodules-disable-diagnostic-validation Disable validation of the diagnostic options when loading the module @@ -1270,6 +1328,31 @@ Set the system root directory (usually /) +.. envvar:: SDKROOT=<dir> + +Set the system root directory, with a lower precedence than :option:`-isysroot<dir>` (Darwin only). +This variable might not correctly handle non-ASCII characters in some hosts. + +.. envvar:: RC_DEBUG_OPTIONS=<val> + +Sets DWARF debug flag if $val is not empty (Darwin only). +This variable might not correctly handle non-ASCII characters in some hosts. + +.. envvar:: RC_DEBUG_PREFIX_MAP=<val> + +Sets debug path remapping (Darwin only). +This variable might not correctly handle non-ASCII characters in some hosts. + +.. envvar:: SCE_ORBIS_SDK_DIR=<path> + +Determine where to find the libraries (PS4 only). +This variable might not correctly handle non-ASCII characters in some hosts. + +.. envvar:: SCE_PROSPERO_SDK_DIR=<path> + +Determine where to find the libraries (PS5 only). +This variable might not correctly handle non-ASCII characters in some hosts. + .. option:: -isystem<directory> Add directory to SYSTEM include search path @@ -1278,6 +1361,86 @@ Add directory to end of the SYSTEM include search path +.. option:: -c-isystem<directory> + +Add directory to the C SYSTEM include search path + +.. envvar:: C_INCLUDE_PATH=<paths> + +Takes a list of paths to add to the C SYSTEM include search path, like :option:`-c-isystem<directory>`. +The value is a list of paths separated by a system standard separator. +On Windows and Unix, this separator should be colon, just like ``PATH``. + +This variable might not correctly handle non-ASCII characters in some hosts. + +.. option:: -cxx-isystem<directory> + +Add directory to the C++ SYSTEM include search path + +.. envvar:: CPLUS_INCLUDE_PATH=<paths> + +Takes a list of paths to add to the C++ SYSTEM include search path, like :option:`-cxx-isystem<directory>`. +The value is a list of paths separated by a system standard separator. +On Windows and Unix, this separator should be colon, just like ``PATH``. + +This variable might not correctly handle non-ASCII characters in some hosts. + +.. option:: -objc-isystem<directory> + +Add directory to the Objective-C SYSTEM include search path + +.. envvar:: OBJC_INCLUDE_PATH=<paths> + +Takes a list of paths to add to the Objective-C SYSTEM include search path, like :option:`-objc-isystem<directory>`. +The value is a list of paths separated by a system standard separator. +On Windows and Unix, this separator should be colon, just like ``PATH``. + +This variable might not correctly handle non-ASCII characters in some hosts. + +.. option:: -objcxx-isystem<directory> + +Add directory to the Objective-C++ SYSTEM include search path + +.. envvar:: OBJCPLUS_INCLUDE_PATH=<paths> + +Takes a list of paths to add to the Objective-C++ SYSTEM include search path, like :option:`-objcxx-isystem<directory>`. +The value is a list of paths separated by a system standard separator. +On Windows and Unix, this separator should be colon, just like ``PATH``. + +This variable might not correctly handle non-ASCII characters in some hosts. + +.. envvar:: NCC_C_INCLUDE_PATH=<paths> + +Takes a list of paths to add to the C SYSTEM include search path, like :option:`-c-isystem<directory>` (VE only). +The value is a list of paths separated by a system standard separator. +On Windows and Unix, this separator should be colon, just like ``PATH``. + +This variable might not correctly handle non-ASCII characters in some hosts. + +.. envvar:: NCC_CPLUS_INCLUDE_PATH=<paths> + +Takes a list of paths to add to the C++ SYSTEM include search path, like :option:`-cxx-isystem<directory>` (VE only). +The value is a list of paths separated by a system standard separator. +On Windows and Unix, this separator should be colon, just like ``PATH``. + +This variable might not correctly handle non-ASCII characters in some hosts. + +.. envvar:: XCC_C_INCLUDE_PATH=<paths> + +Takes a list of paths to add to the C SYSTEM include search path, like :option:`-c-isystem<directory>` (XCore only). +The value is a list of paths separated by a system standard separator. +On Windows and Unix, this separator should be colon, just like ``PATH``. + +This variable might not correctly handle non-ASCII characters in some hosts. + +.. envvar:: XCC_CPLUS_INCLUDE_PATH=<paths> + +Takes a list of paths to add to the C++ SYSTEM include search path, like :option:`-cxx-isystem<directory>` (XCore only). +The value is a list of paths separated by a system standard separator. +On Windows and Unix, this separator should be colon, just like ``PATH``. + +This variable might not correctly handle non-ASCII characters in some hosts. + .. option:: -ivfsoverlay<arg> Overlay the virtual filesystem described by file over the real file system @@ -3053,10 +3216,21 @@ .. option:: -m16 +Generate code for a 16-bit environment. + .. option:: -m32 +Generate code for a 32-bit environment. + .. option:: -m64 +Generate code for a 64-bit environment. + +.. envvar:: OBJECT_MODE=<mode> + +Changes the code generation based on $mode (AIX only). +Possible values are ``32``, for a 32-bit environment, and ``64`` for a 64-bit one. + .. option:: -mabi=<arg> .. program:: clang1 @@ -4269,6 +4443,13 @@ Add directory to library search path +.. envvar:: LIBRARY_PATH=<paths> + +Add $paths to the library search path. The value is a list of paths separated by a system standard +separator. On Windows and Unix, this separator should be colon, just like ``PATH``. + +This variable might not correctly handle non-ASCII characters in some hosts under some circumstances. + .. option:: -Mach .. option:: -T<script> @@ -4343,9 +4524,29 @@ .. option:: -rdynamic -.. option:: --rocm-device-lib-path=<arg>, --hip-device-lib-path=<arg> +.. option:: --rocm-device-lib-path=<arg> + +ROCm device library path (ROCm only). Alternative to :option:`--rocm-path=<arg>`. -ROCm device library path. Alternative to rocm-path. +.. envvar:: ROCM_PATH=<paths> + +Takes a list of paths to add to the ROCm device library paths, like :option:`--rocm-path=<arg>` (ROCm only). +The value is a list of paths separated by a system standard separator. +On Windows and Unix, this separator should be colon, just like ``PATH``. + +This variable might not correctly handle non-ASCII characters in some hosts. + +.. option:: --hip-device-lib-path=<arg> + +HIP device library path (HIP and ROCm only). Alternative to :option:`--hip-path=<arg>`. + +.. envvar:: HIP_DEVICE_LIB_PATH=<paths> + +Takes a list of paths to add to the HIP device library paths, like :option:`--hip-path=<arg>` (HIP and ROCm only). +The value is a list of paths separated by a system standard separator. +On Windows and Unix, this separator should be colon, just like ``PATH``. + +This variable might not correctly handle non-ASCII characters in some hosts. .. option:: -rpath <arg> @@ -4376,6 +4577,18 @@ <clang-cl options> ================== CL.EXE COMPATIBILITY OPTIONS +.. program:: clang-cl + +.. envvar:: INCLUDE=<path>, EXTERNAL_INCLUDE=<path> + +Paths to the include subdirectory of visual studio. +Normally set by ``vcvarsall.bat``. + +.. envvar:: LIB=<paths> + +Additional search paths to pass to the linker. +The value is a list of paths separated by a system standard +separator. On Windows and Unix, this separator should be colon, just like ``PATH``. <clang-cl compile-only options> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits