Skip to content

Commit b35bc7b

Browse files
committed
makefile: add missing error propagation
If the noop.tcl failed, for instance due to a segfault because HOME was not set(fixed in other PRs), then that error was not propagated, the segfault was dumped to stderr and the build continued. Signed-off-by: Øyvind Harboe <[email protected]>
1 parent 80c23f9 commit b35bc7b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

flow/Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -608,10 +608,11 @@ endif
608608
.PHONY: do-$(1)
609609
do-$(1): $(OBJECTS_DIR)/copyright.txt
610610
@echo Running $(3).tcl, stage $(1)
611-
@(trap 'mv $(LOG_DIR)/$(1).tmp.log $(LOG_DIR)/$(1).log' EXIT; \
612-
$(OPENROAD_EXE) -exit -no_init $(SCRIPTS_DIR)/noop.tcl 2>&1 >$(LOG_DIR)/$(1).tmp.log; \
613-
$(TIME_CMD) $(OPENROAD_CMD) -no_splash $(SCRIPTS_DIR)/$(3).tcl -metrics $(LOG_DIR)/$(1).json 2>&1 | \
614-
tee -a $(LOG_DIR)/$(1).tmp.log)
611+
@(set -eo pipefail; \
612+
trap 'mv $(LOG_DIR)/$(1).tmp.log $(LOG_DIR)/$(1).log' EXIT; \
613+
$(OPENROAD_EXE) -exit -no_init $(SCRIPTS_DIR)/noop.tcl 2>&1 >$(LOG_DIR)/$(1).tmp.log; \
614+
$(TIME_CMD) $(OPENROAD_CMD) -no_splash $(SCRIPTS_DIR)/$(3).tcl -metrics $(LOG_DIR)/$(1).json 2>&1 | \
615+
tee -a $(LOG_DIR)/$(1).tmp.log)
615616
endef
616617

617618
# generate make rules to copy a file, if a dependency change and

0 commit comments

Comments
 (0)