Skip to content

Commit

Permalink
Be more explict about CPPFLAGS
Browse files Browse the repository at this point in the history
  • Loading branch information
allsey87 committed Aug 14, 2024
1 parent ee8e45c commit 799f91c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion foreign_cc/private/make_env_vars.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ _MAKE_FLAGS = {
"AR_FLAGS": "cxx_linker_static",
"ASFLAGS": "assemble",
"CFLAGS": "cc",
"CPPFLAGS": "",
"CXXFLAGS": "cxx",
"LDFLAGS": "cxx_linker_executable",
# missing: cxx_linker_shared
Expand All @@ -112,6 +111,11 @@ def _get_make_variables(workspace_name, tools, flags, user_env_vars, make_comman
if toolchain_flags or user_flags:
vars[flag] = toolchain_flags + user_flags

# Add user defined CPPFLAGS
user_cpp_flags = [flag for flag in user_env_vars.get("CPPFLAGS", "").split(" ") if flag]
if user_cpp_flags:
vars["CPPFLAGS"] = user_cpp_flags

tools_dict = {}
for tool in _MAKE_TOOLS:
tool_value = getattr(tools, _MAKE_TOOLS[tool])
Expand Down

0 comments on commit 799f91c

Please sign in to comment.