File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed
Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 1+ ifndef rustc-version-check
2+ rustc-version-check := target/.rustc-version
3+ target/.rustc-version :
4+ $(eval prev_version := $(if $(wildcard $@ ) ,$(shell cat $@ ) ) )
5+ $(eval curr_version := $(shell $(RUSTC ) -V | cut -d' ' -f2) )
6+ $(if $(filter-out $(prev_version ) ,$(curr_version ) ) , \
7+ rm -fr $(@D ) && mkdir $(@D ) && echo $(curr_version ) > $@ )
8+ endif
Original file line number Diff line number Diff line change 11# -*- mode: makefile-gmake; indent-tabs-mode: t -*-
2+ include $(top_srcdir ) /defs/rustc.mk
23
34YJIT_SRC_FILES = $(wildcard \
45 $(top_srcdir ) /yjit/Cargo.* \
@@ -16,14 +17,14 @@ BUILD_YJIT_LIBS = $(TOP_BUILD_DIR)/$(YJIT_LIBS)
1617# In a YJIT-only build (no ZJIT)
1718ifneq ($(strip $(YJIT_LIBS ) ) ,)
1819yjit-libs : $(BUILD_YJIT_LIBS )
19- $(BUILD_YJIT_LIBS ) : $(YJIT_SRC_FILES )
20+ $(BUILD_YJIT_LIBS ) : $(YJIT_SRC_FILES ) $( rustc-version-check )
2021 $(ECHO ) ' building Rust YJIT (release mode)'
2122 $(gnumake_recursive )$(Q ) $(RUSTC ) $(YJIT_RUSTC_ARGS )
2223else ifneq ($(strip $(RLIB_DIR)),) # combo build
2324# Absolute path to avoid VPATH ambiguity
2425YJIT_RLIB = $(TOP_BUILD_DIR ) /$(RLIB_DIR ) /libyjit.rlib
2526
26- $(YJIT_RLIB ) : $(YJIT_SRC_FILES )
27+ $(YJIT_RLIB ) : $(YJIT_SRC_FILES ) $( rustc-version-check )
2728 $(ECHO ) ' building $(@F)'
2829 $(gnumake_recursive )$(Q ) $(RUSTC ) ' -L$(@D)' --extern=jit $(YJIT_RUSTC_ARGS )
2930
Original file line number Diff line number Diff line change 11# -*- mode: makefile-gmake; indent-tabs-mode: t -*-
2+ include $(top_srcdir ) /defs/rustc.mk
23
34# Put no definitions when ZJIT isn't configured
45ifneq ($(ZJIT_SUPPORT ) ,no)
@@ -20,14 +21,14 @@ BUILD_ZJIT_LIBS = $(TOP_BUILD_DIR)/$(ZJIT_LIBS)
2021
2122# In a ZJIT-only build (no YJIT)
2223ifneq ($(strip $(ZJIT_LIBS ) ) ,)
23- $(BUILD_ZJIT_LIBS ) : $(ZJIT_SRC_FILES )
24+ $(BUILD_ZJIT_LIBS ) : $(ZJIT_SRC_FILES ) $( rustc-version-check )
2425 $(ECHO ) ' building Rust ZJIT (release mode)'
2526 $(gnumake_recursive )$(Q ) $(RUSTC ) $(ZJIT_RUSTC_ARGS )
2627else ifneq ($(strip $(RLIB_DIR)),) # combo build
2728# Absolute path to avoid VPATH ambiguity
2829ZJIT_RLIB = $(TOP_BUILD_DIR ) /$(RLIB_DIR ) /libzjit.rlib
2930
30- $(ZJIT_RLIB ) : $(ZJIT_SRC_FILES )
31+ $(ZJIT_RLIB ) : $(ZJIT_SRC_FILES ) $( rustc-version-check )
3132 $(ECHO ) ' building $(@F)'
3233 $(gnumake_recursive )$(Q ) $(RUSTC ) ' -L$(@D)' --extern=jit $(ZJIT_RUSTC_ARGS )
3334
You can’t perform that action at this time.
0 commit comments