From f0047ba2f56f15e9774252ef5f9d98fb6384f691 Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Wed, 9 Feb 2022 00:05:33 +0100 Subject: [PATCH] Do not set user defined env variables twice for (c)make (#860) --- foreign_cc/private/make_env_vars.bzl | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/foreign_cc/private/make_env_vars.bzl b/foreign_cc/private/make_env_vars.bzl index c6185840..4c0b328e 100644 --- a/foreign_cc/private/make_env_vars.bzl +++ b/foreign_cc/private/make_env_vars.bzl @@ -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