Merge user provided CPPFLAGS with build system CPPFLAGS (#1261)
This commit is contained in:
parent
4d2cb3e78d
commit
d9367d28ad
|
@ -26,6 +26,9 @@ def get_make_env_vars(
|
|||
|
||||
# -I flags should be put into preprocessor flags, CPPFLAGS
|
||||
# https://www.gnu.org/software/autoconf/manual/autoconf-2.63/html_node/Preset-Output-Variables.html
|
||||
if "CPPFLAGS" in vars.keys():
|
||||
vars["CPPFLAGS"] = vars["CPPFLAGS"] + deps_flags.flags
|
||||
else:
|
||||
vars["CPPFLAGS"] = deps_flags.flags
|
||||
|
||||
return " ".join(["{}=\"{}\""
|
||||
|
@ -108,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])
|
||||
|
|
Loading…
Reference in New Issue