llvm-project/clang/docs
Hans Wennborg 797004d2ea clang-cl: Add "/clang:" pass-through arg support.
The clang-cl driver disables access to command line options outside of the
"Core" and "CLOption" sets of command line arguments. This filtering makes it
impossible to pass arguments that are interpreted by the clang driver and not
by either 'cc1' (the frontend) or one of the other tools invoked by the driver.

An example driver-level flag is the '-fno-slp-vectorize' flag, which is
processed by the driver in Clang::ConstructJob and used to set the cc1 flag
"-vectorize-slp". There is no negative cc1 flag or -mllvm flag, so it is not
currently possible to disable the SLP vectorizer from the clang-cl driver.

This change introduces the "/clang:" argument that is available when the
driver mode is set to CL compatibility. This option works similarly to the
"-Xclang" option, except that the option values are processed by the clang
driver rather than by 'cc1'. An example usage is:

  clang-cl /clang:-fno-slp-vectorize /O2 test.c

Another example shows how "/clang:" can be used to pass a flag where there is
a conflict between a clang-cl compat option and an overlapping clang driver
option:

  clang-cl /MD /clang:-MD /clang:-MF /clang:test_dep_file.dep test.c

In the previous example, the unprefixed /MD selects the DLL version of the msvc
CRT, while the prefixed -MD flag and the -MF flags are used to create a make
dependency file for included headers.

One note about flag ordering: the /clang: flags are concatenated to the end of
the argument list, so in cases where the last flag wins, the /clang: flags
will be chosen regardless of their order relative to other flags on the driver
command line.

Patch by Neeraj K. Singh!

Differential revision: https://reviews.llvm.org/D53457

llvm-svn: 346393
2018-11-08 11:27:04 +00:00
..
CommandGuide Update our URLs in clang doc to use https 2018-11-04 17:02:00 +00:00
analyzer [analyzer] Add a testing facility for testing relationships between symbols. 2018-09-25 23:50:53 +00:00
tools Update our URLs in clang doc to use https 2018-11-04 17:02:00 +00:00
AddressSanitizer.rst Update our URLs in clang doc to use https 2018-11-04 17:02:00 +00:00
AttributeReference.rst
AutomaticReferenceCounting.rst Fix and improve the ARC spec's wording about unmanaged objects. 2018-07-20 05:40:09 +00:00
Block-ABI-Apple.rst [CodeGen][ObjC] Make copying and disposing of a non-escaping block 2018-07-20 17:10:32 +00:00
Block-ABI-Apple.txt Update our URLs in clang doc to use https 2018-11-04 17:02:00 +00:00
BlockLanguageSpec.rst
CMakeLists.txt docs: Fix Sphinx detection with out-of-tree builds 2017-05-09 01:42:33 +00:00
ClangCheck.rst [clang docs] Minor fix in ClangCheck.rst 2016-11-14 17:31:24 +00:00
ClangCommandLineReference.rst Change -fsanitize-address-poison-class-member-array-new-cookie to -fsanitize-address-poison-custom-array-cookie 2018-11-02 17:29:04 +00:00
ClangFormat.rst Update our URLs in clang doc to use https 2018-11-04 17:02:00 +00:00
ClangFormatStyleOptions.rst Update our URLs in clang doc to use https 2018-11-04 17:02:00 +00:00
ClangPlugins.rst Update our URLs in clang doc to use https 2018-11-04 17:02:00 +00:00
ClangTools.rst Update our URLs in clang doc to use https 2018-11-04 17:02:00 +00:00
ControlFlowIntegrity.rst Update our URLs in clang doc to use https 2018-11-04 17:02:00 +00:00
ControlFlowIntegrityDesign.rst Update our URLs in clang doc to use https 2018-11-04 17:02:00 +00:00
CrossCompilation.rst Update our URLs in clang doc to use https 2018-11-04 17:02:00 +00:00
DataFlowSanitizer.rst
DataFlowSanitizerDesign.rst
DiagnosticsReference.rst [Diagnostic] Fix a warning typo. NFC. 2018-09-12 18:27:21 +00:00
DriverArchitecture.png
DriverInternals.rst
ExternalClangExamples.rst Add LibreOffice Clang plugin to ExternalClangExamples.rst 2017-03-22 08:45:49 +00:00
FAQ.rst
HardwareAssistedAddressSanitizerDesign.rst [docs] Don't use the `asm` syntax highlighting (which our docs builder 2018-08-06 01:28:42 +00:00
HowToSetupToolingForLLVM.rst Allow the creation of human-friendly ASTDumper to arbitrary output stream 2018-04-06 13:01:12 +00:00
InternalsManual.rst Update our URLs in clang doc to use https 2018-11-04 17:02:00 +00:00
IntroductionToTheClangAST.rst Update our URLs in clang doc to use https 2018-11-04 17:02:00 +00:00
ItaniumMangleAbiTags.rst NFC fix documentation build by rL263015 2016-03-09 19:39:16 +00:00
JSONCompilationDatabase.rst [Tooling] Use FixedCompilationDatabase when `compile_flags.txt` is found. 2017-11-09 10:37:39 +00:00
LTOVisibility.rst Implement CFI for indirect calls via a member function pointer. 2018-06-26 02:15:47 +00:00
LanguageExtensions.rst Update our URLs in clang doc to use https 2018-11-04 17:02:00 +00:00
LeakSanitizer.rst [docs] Update LeakSanitizer documentation to reflect OS X support 2017-09-13 19:40:10 +00:00
LibASTMatchers.rst Update our URLs in clang doc to use https 2018-11-04 17:02:00 +00:00
LibASTMatchersReference.html Update our URLs in clang doc to use https 2018-11-04 17:02:00 +00:00
LibASTMatchersTutorial.rst Update our URLs in clang doc to use https 2018-11-04 17:02:00 +00:00
LibFormat.rst Update our URLs in clang doc to use https 2018-11-04 17:02:00 +00:00
LibTooling.rst Update our URLs in clang doc to use https 2018-11-04 17:02:00 +00:00
MSVCCompatibility.rst Update our URLs in clang doc to use https 2018-11-04 17:02:00 +00:00
Makefile.sphinx docs: Clarify that cfi-unrelated-cast is based on lifetime. 2016-02-01 18:55:50 +00:00
MemorySanitizer.rst Update our URLs in clang doc to use https 2018-11-04 17:02:00 +00:00
Modules.rst [Modules] Add platform and environment features to requires clause 2018-09-18 17:11:13 +00:00
ObjectiveCLiterals.rst
OpenMPSupport.rst [OPENMP] What's new for OpenMP in clang. 2018-07-26 17:53:45 +00:00
PCHInternals.rst Update our URLs in clang doc to use https 2018-11-04 17:02:00 +00:00
PCHLayout.graffle
PCHLayout.png
PTHInternals.rst
RAVFrontendAction.rst Port getLocStart -> getBeginLoc 2018-08-09 21:08:08 +00:00
README.txt
RefactoringEngine.rst Fix small nits in clang-refactor doc. 2017-10-10 09:00:56 +00:00
ReleaseNotes.rst [clang] try-fix broken documentation builder 2018-10-31 17:00:50 +00:00
SafeStack.rst [Docs] Update supported oses for safestack, ubsan, asan, tsan and msan 2018-07-25 13:55:06 +00:00
SanitizerCoverage.rst Update our URLs in clang doc to use https 2018-11-04 17:02:00 +00:00
SanitizerSpecialCaseList.rst Allow specifying sanitizers in blacklists 2017-09-25 22:11:12 +00:00
SanitizerStats.rst [docs] -fsanitize=cfi only allowed with -fvisibility= 2018-06-15 23:11:18 +00:00
ShadowCallStack.rst [ShadowCallStack] fix the docs 2018-05-01 00:15:56 +00:00
SourceBasedCodeCoverage.rst Update our URLs in clang doc to use https 2018-11-04 17:02:00 +00:00
ThinLTO.rst Update our URLs in clang doc to use https 2018-11-04 17:02:00 +00:00
ThreadSafetyAnalysis.rst Correct the attribute spelling for guarded_var and pt_guarded_var. 2017-05-08 12:39:17 +00:00
ThreadSanitizer.rst Update our URLs in clang doc to use https 2018-11-04 17:02:00 +00:00
Toolchain.rst Update our URLs in clang doc to use https 2018-11-04 17:02:00 +00:00
Tooling.rst Update our URLs in clang doc to use https 2018-11-04 17:02:00 +00:00
UndefinedBehaviorSanitizer.rst Update our URLs in clang doc to use https 2018-11-04 17:02:00 +00:00
UsersManual.rst clang-cl: Add "/clang:" pass-through arg support. 2018-11-08 11:27:04 +00:00
conf.py Update docs version and clear release notes after 8.0.0 version bump 2018-08-01 14:01:27 +00:00
doxygen-mainpage.dox [docs] Add missing file 2016-03-03 10:44:10 +00:00
doxygen.cfg.in Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
index.rst Add the -fsanitize=shadow-call-stack flag 2018-04-03 22:33:53 +00:00
make.bat

README.txt

See llvm/docs/README.txt