From 2f069a2aaa82fbd7eef2136866c943edb18b5553 Mon Sep 17 00:00:00 2001 From: Mike Will Date: Thu, 18 Dec 2025 03:34:40 -0500 Subject: [PATCH] Add virtual paths while still detecting file modifications. This also allows paths to be either files or directories. --- build.zig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build.zig b/build.zig index 26b72fc..1a5feaf 100644 --- a/build.zig +++ b/build.zig @@ -250,14 +250,16 @@ pub fn emccStep( if (options.embed_paths) |embed_paths| { for (embed_paths) |path| { emcc.addArg("--embed-file"); - emcc.addFileArg(path.src_path); + emcc.addArg(path.get(b)); + path.src_path.addStepDependencies(&emcc.step); } } if (options.preload_paths) |preload_paths| { for (preload_paths) |path| { emcc.addArg("--preload-file"); - emcc.addFileArg(path.src_path); + emcc.addArg(path.get(b)); + path.src_path.addStepDependencies(&emcc.step); } }