[llvm] [libc][bazel] Allow configure options to alter all targets (PR #89251)
Guillaume Chatelet via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 23 02:52:58 PDT 2024
================
@@ -3228,7 +3213,7 @@ libc_support_library(
libc_support_library(
name = "printf_mock_parser",
hdrs = ["src/stdio/printf_core/parser.h"],
- defines = PRINTF_COPTS + ["LIBC_COPT_MOCK_ARG_LIST"],
+ defines = ["LIBC_COPT_MOCK_ARG_LIST"],
----------------
gchatelet wrote:
So after discussing this internally a bit I think we want to remove all `define`s from LLVM libc.
We should really use `local_define` to make the configuration internal and not leak preprocessor definitions to the outside world.
The [documentation](https://bazel.build/reference/be/c-cpp#cc_binary.defines) is quite clear as well:
`Be very careful, since this may have far-reaching effects. When in doubt, add define values to "local_defines" instead.`
https://github.com/llvm/llvm-project/pull/89251
More information about the llvm-commits
mailing list