Skip to content

Commit

Permalink
Do not set user defined env variables twice for (c)make
Browse files Browse the repository at this point in the history
These variables are already exported in the build script prelude and
thus don't have to be set on individual make commands.
  • Loading branch information
fmeum committed Feb 1, 2022
1 parent 50ee997 commit 5a18138
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions foreign_cc/private/make_env_vars.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,8 @@ def _get_make_variables(workspace_name, tools, flags, user_env_vars):

vars.update(tools_dict)

# Put all other environment variables, passed by the user
for user_var in user_env_vars:
if not vars.get(user_var):
vars[user_var] = [user_env_vars[user_var]]
# Do not put in the other user-defined env variables at this point as they
# have already been exported globally by the prelude.

return vars

Expand Down

0 comments on commit 5a18138

Please sign in to comment.