From 44d75409d023b0f1ec09ad8eec21305c5f2b7cc0 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Fri, 3 Feb 2023 07:56:32 +0100 Subject: [PATCH] build.rs: re-run autocxx if any ffi module changed I'm not 100% sure this is the right thing but it seems to fix a scenario where a change to a Rust module was not propagated by "make". --- fish-rust/build.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fish-rust/build.rs b/fish-rust/build.rs index ab8977600..35d16d12e 100644 --- a/fish-rust/build.rs +++ b/fish-rust/build.rs @@ -26,7 +26,7 @@ fn main() -> miette::Result<()> { "src/topic_monitor.rs", "src/builtins/shared.rs", ]; - cxx_build::bridges(source_files) + cxx_build::bridges(&source_files) .flag_if_supported("-std=c++11") .include(&fish_src_dir) .include(&fish_build_dir) // For config.h @@ -41,7 +41,9 @@ fn main() -> miette::Result<()> { .build()?; b.flag_if_supported("-std=c++11") .compile("fish-rust-autocxx"); - println!("cargo:rerun-if-changed=src/ffi.rs"); + for file in source_files { + println!("cargo:rerun-if-changed={file}"); + } Ok(()) }