Skip to content

Commit 09fdc1a

Browse files
committed
mk/stage0: complain instead of creating an empty file
If the expected rustc snapshot is not where we expect it to be, complain and fail at that point rather than creating a empty rustc file and continuing until we try to run it.
1 parent 1e2044e commit 09fdc1a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mk/stage0.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ ifdef CFG_ENABLE_LOCAL_RUST
2222
else
2323
$(Q)$(CFG_PYTHON) $(S)src/etc/get-snapshot.py $(CFG_BUILD) $(SNAPSHOT_FILE)
2424
endif
25-
$(Q)touch $@
25+
$(Q)if [ -e "$@" ]; then touch "$@"; else echo "ERROR: snapshot $@ not found"; exit 1; fi
2626

2727
# For other targets, let the host build the target:
2828

0 commit comments

Comments
 (0)