This patch gathers all variables passed to cmake, adds them
to a list in the cache, and prints them out. This is helpful for
debugging, especially in the buildbots, but could also be used to
automatically decide what to pass down to cmake when building NATIVE
tools.
Here's an example of what it prints:
-- *** Gathering initial cache variables -- from command line and/or cache files into LLVM_CACHE_VARIABLES *** -- from commandline or cache files: CLANGD_BUILD_XPC = OFF -- from commandline or cache files: CMAKE_BUILD_TYPE = Debug -- from commandline or cache files: CMAKE_CXX_FLAGS = -I/opt/local/include -- from commandline or cache files: CMAKE_C_FLAGS = -I/opt/local/include -- from commandline or cache files: CMAKE_GENERATOR = Ninja -- from commandline or cache files: GOLD = GOLD-NOTFOUND -- from commandline or cache files: LLVM_APPEND_VC_REV = OFF -- from commandline or cache files: LLVM_ENABLE_PROJECTS = Scratch;clang;libcxx;libcxxabi -- from commandline or cache files: LLVM_EXTERNAL_PROJECTS = Scratch -- from commandline or cache files: LLVM_INCLUDE_BENCHMARKS = OFF -- from commandline or cache files: LLVM_LIT_ARGS = '-vv' -- from commandline or cache files: LLVM_OPTIMIZED_TABLEGEN = ON -- from commandline or cache files: LLVM_TARGETS_TO_BUILD = X86
And the corresponding LLVM_CACHE_VARIABLES variable added to the cache:
LLVM_CACHE_VARIABLES:STRING=CLANGD_BUILD_XPC;CMAKE_BUILD_TYPE;CMAKE_CXX_FLAGS;CMAKE_C_FLAGS;CMAKE_GENERATOR;GOLD;LLVM_APPEND_VC_REV;LLVM_ENABLE_PROJECTS;LLVM_EXTERNAL_PROJECTS;LLVM_INCLUDE_BENCHMARKS;LLVM_LIT_ARGS;LLVM_OPTIMIZED_TABLEGEN;LLVM_TARGETS_TO_BUILD
NIT: are we missing a part of the phrase? what should when