- Generate //:vars.bzl from llvm/CMakeLists.txt
_extract_cmake_settings() generates //:vars.bzl in llvm_configure().
It would be easier to use external commands like sed(1) and python.
For portability, I think the parser should run on Starlark.
@llvm-project//:vars.bzl may be loaded from both WORKSPACE and BUILD.
At the moment, vars.bzl provides some values as string.
- CMAKE_CXX_STANDARD = "17"
- LLVM_VERSION_MAJOR = "16"
- LLVM_VERSION_MINOR = "0"
- LLVM_VERSION_PATCH = "0"
- LLVM_VERSION = "16.0.0"
- llvm_vars = (dict of these values)
CMAKE_CXX_STANDARD may be used to configure toolchain.
- Use //vars.bzl for each BUILD files
It would be smarter if the BUILD phase could generate llvm-config.h.
Since I am afraid of the discussion in D126581, I just remove
LLVM_VERSION stuff out of the static llvm-config.h.
- Eliminate Bazel stuff in 'bump-version.py'
Current version of bump-version.py tries to substitute CLANG_VERSION.
It is the reason why I modify bump-version in this change rather than
upcoming patches.
Nit: We don't add a blank line after def: