Skip to content

Commit 8826393

Browse files
committed
make: preserve tool *_EXE env vars across UNSET_AND_MAKE
Commit df79ba1 ("make: immediately expand deferred vars") changed the tool-path setup from export OPENROAD_EXE ?= $(abspath ...) to OPENROAD_EXE ?= $(abspath ...) export OPENROAD_EXE := $(OPENROAD_EXE) The := reassign gives the variable origin "file" even when the value was supplied through the environment. UNSET_VARIABLES_NAMES collects every file-origin variable and $(UNSET_AND_MAKE) unsets them in the bash wrapper before invoking the submake. That strips a caller- supplied OPENROAD_EXE / OPENSTA_EXE / YOSYS_EXE from the submake's environment, and variables.mk re-derives them via the $(FLOW_HOME)/../tools/install/... fallback — a path that does not exist in hermetic builds (e.g. bazel-orfs). Extend the unset exclusion list to cover OPENROAD%, OPENSTA%, YOSYS%, mirroring the KLAYOUT% entry already there for the same reason. This restores the pre-df79ba1d9 behavior for callers that pass tool paths through the environment, without reverting the immediate- expansion fix. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
1 parent 43ca564 commit 8826393

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

flow/scripts/variables.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ export RESULTS_V = $(notdir $(sort $(wildcard $(RESULTS_DIR)/*.v)))
188188
export GDS_MERGED_FILE = $(RESULTS_DIR)/6_1_merged.$(STREAM_SYSTEM_EXT)
189189

190190
define get_variables
191-
$(foreach V, $(.VARIABLES),$(if $(filter-out $(1), $(origin $V)), $(if $(filter-out .% %QT_QPA_PLATFORM% KLAYOUT% GENERATE_ABSTRACT_RULE% do-step% do-copy% OPEN_GUI% OPEN_GUI_SHORTCUT% SUB_MAKE% UNSET_VARS% export%, $(V)), $V$ )))
191+
$(foreach V, $(.VARIABLES),$(if $(filter-out $(1), $(origin $V)), $(if $(filter-out .% %QT_QPA_PLATFORM% KLAYOUT% OPENROAD% OPENSTA% YOSYS% GENERATE_ABSTRACT_RULE% do-step% do-copy% OPEN_GUI% OPEN_GUI_SHORTCUT% SUB_MAKE% UNSET_VARS% export%, $(V)), $V$ )))
192192
endef
193193

194194
export UNSET_VARIABLES_NAMES := $(call get_variables,command% line environment% default automatic)

0 commit comments

Comments
 (0)