Skip to content

Commit 0cf17a2

Browse files
authored
Merge pull request #3083 from The-OpenROAD-Project-staging/flow-nix-shell-override
variables: Allow yosys/openroad override in Nix shell
2 parents 22e0229 + 972c828 commit 0cf17a2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

flow/scripts/variables.mk

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,16 @@ export TIME_CMD
9292
# The following determine the executable location for each tool used by this flow.
9393
# Priority is given to
9494
# 1 user explicit set with variable in Makefile or command line, for instance setting OPENROAD_EXE
95-
# 2 ORFS compiled tools: openroad, yosys
95+
# 2 either
96+
# 2.1 if in Nix shell: openroad, yosys from the environment
97+
# 2.2 ORFS compiled tools: openroad, yosys
9698
ifneq (${IN_NIX_SHELL},)
97-
export OPENROAD_EXE := $(shell command -v openroad)
99+
export OPENROAD_EXE ?= $(shell command -v openroad)
98100
else
99101
export OPENROAD_EXE ?= $(abspath $(FLOW_HOME)/../tools/install/OpenROAD/bin/openroad)
100102
endif
101103
ifneq (${IN_NIX_SHELL},)
102-
export OPENSTA_EXE := $(shell command -v sta)
104+
export OPENSTA_EXE ?= $(shell command -v sta)
103105
else
104106
export OPENSTA_EXE ?= $(abspath $(FLOW_HOME)/../tools/install/OpenROAD/bin/sta)
105107
endif
@@ -110,7 +112,7 @@ export OPENROAD_NO_EXIT_CMD = $(OPENROAD_EXE) $(OPENROAD_ARGS)
110112
export OPENROAD_GUI_CMD = $(OPENROAD_EXE) -gui $(OR_ARGS)
111113

112114
ifneq (${IN_NIX_SHELL},)
113-
YOSYS_EXE := $(shell command -v yosys)
115+
YOSYS_EXE ?= $(shell command -v yosys)
114116
else
115117
YOSYS_EXE ?= $(abspath $(FLOW_HOME)/../tools/install/yosys/bin/yosys)
116118
endif

0 commit comments

Comments
 (0)