ruby-changes:73551
From: Nobuyoshi <ko1@a...>
Date: Wed, 14 Sep 2022 21:24:56 +0900 (JST)
Subject: [ruby-changes:73551] 075df960c9 (master): Add comments to touch libyjit
https://git.ruby-lang.org/ruby.git/commit/?id=075df960c9 From 075df960c93cb2d3ebe308f67871f39565b4426e Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Wed, 14 Sep 2022 15:23:04 +0900 Subject: Add comments to touch libyjit --- yjit/yjit.mk | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/yjit/yjit.mk b/yjit/yjit.mk index e25d7c1ce6..81441a7925 100644 --- a/yjit/yjit.mk +++ b/yjit/yjit.mk @@ -13,6 +13,12 @@ YJIT_SRC_FILES = $(wildcard \ https://github.com/ruby/ruby/blob/trunk/yjit/yjit.mk#L13 $(top_srcdir)/yjit/src/*/*/*/*.rs \ ) +# Because of Cargo cache, if the actual binary is not changed from the +# previous build, the mtime is preserved as the cached file. +# This means the target is not updated actually, and it will need to +# rebuild at the next build. +YJIT_LIB_TOUCH = touch $@ + # YJIT_SUPPORT=yes when `configure` gets `--enable-yjit` ifeq ($(YJIT_SUPPORT),yes) $(YJIT_LIBS): $(YJIT_SRC_FILES) @@ -25,7 +31,7 @@ $(YJIT_LIBS): $(YJIT_SRC_FILES) https://github.com/ruby/ruby/blob/trunk/yjit/yjit.mk#L31 -C overflow-checks=on \ '--out-dir=$(CARGO_TARGET_DIR)/release/' \ $(top_srcdir)/yjit/src/lib.rs - touch $@ + $(YJIT_LIB_TOUCH) else ifeq ($(YJIT_SUPPORT),no) $(YJIT_LIBS): $(ECHO) 'Error: Tried to build YJIT without configuring it first. Check `make showconfig`?' @@ -37,7 +43,7 @@ $(YJIT_LIBS): $(YJIT_SRC_FILES) https://github.com/ruby/ruby/blob/trunk/yjit/yjit.mk#L43 CARGO_TARGET_DIR='$(CARGO_TARGET_DIR)' \ CARGO_TERM_PROGRESS_WHEN='never' \ $(CARGO) $(CARGO_VERBOSE) build $(CARGO_BUILD_ARGS) - touch $@ + $(YJIT_LIB_TOUCH) else endif -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/