2
0
Fork 0
mirror of https://github.com/bazel-contrib/rules_foreign_cc synced 2024-11-25 17:31:25 +00:00

Handle case where LDFLAGS is undefined (#407)

Co-authored-by: irengrig <ichern@google.com>
This commit is contained in:
Ilya Dmitrichenko 2020-06-08 18:05:29 +01:00 committed by GitHub
parent aeb5a4e35d
commit d02a56d0c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -91,7 +91,10 @@ def get_env_vars(
vars = _get_configure_variables(tools, flags, user_vars) vars = _get_configure_variables(tools, flags, user_vars)
deps_flags = _define_deps_flags(deps, inputs) deps_flags = _define_deps_flags(deps, inputs)
vars["LDFLAGS"] = vars["LDFLAGS"] + deps_flags.libs if "LDFLAGS" in vars.keys():
vars["LDFLAGS"] = vars["LDFLAGS"] + deps_flags.libs
else:
vars["LDFLAGS"] = deps_flags.libs
# -I flags should be put into preprocessor flags, CPPFLAGS # -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 # https://www.gnu.org/software/autoconf/manual/autoconf-2.63/html_node/Preset-Output-Variables.html