From 26c4de7ccbdc55d5a515992ae0b2e46b8235830f Mon Sep 17 00:00:00 2001 From: Andrew Adams Date: Wed, 13 May 2026 14:15:39 -0700 Subject: [PATCH] Fix Makefile dep so autoscheduler plugins re-cp into distrib The libHalide.so distrib rule runs `rm -rf $(DISTRIB_DIR)` before repopulating, which deletes the previously-copied autoscheduler plugins. Make decides up-front whether the plugin distrib targets need rebuilding, so it doesn't notice the deletion. The mullapudi2016 and li2018 sub-makes treat libHalide as order-only, so their bin/ files don't refresh either, leaving distrib missing those two plugins until a second `make distrib`. Add libHalide.so as a prereq of the plugin distrib rule so the cp re-fires whenever libHalide is rebuilt. Co-Authored-By: Claude Opus 4.7 (1M context) --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 62c1e5f1a68f..a4155c4f9fdd 100644 --- a/Makefile +++ b/Makefile @@ -2416,7 +2416,7 @@ ifeq ($(UNAME), Darwin) endif -$(DISTRIB_DIR)/lib/libautoschedule_%.$(PLUGIN_EXT): $(BIN_DIR)/libautoschedule_%.$(PLUGIN_EXT) +$(DISTRIB_DIR)/lib/libautoschedule_%.$(PLUGIN_EXT): $(BIN_DIR)/libautoschedule_%.$(PLUGIN_EXT) $(DISTRIB_DIR)/lib/libHalide.$(SHARED_EXT) @mkdir -p $(@D) cp $< $(DISTRIB_DIR)/lib ifeq ($(UNAME), Darwin)