Skip to content

Commit 2f069a2

Browse files
committed
Add virtual paths while still detecting file modifications.
This also allows paths to be either files or directories.
1 parent 70bdafc commit 2f069a2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

build.zig

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,14 +250,16 @@ pub fn emccStep(
250250
if (options.embed_paths) |embed_paths| {
251251
for (embed_paths) |path| {
252252
emcc.addArg("--embed-file");
253-
emcc.addFileArg(path.src_path);
253+
emcc.addArg(path.get(b));
254+
path.src_path.addStepDependencies(&emcc.step);
254255
}
255256
}
256257

257258
if (options.preload_paths) |preload_paths| {
258259
for (preload_paths) |path| {
259260
emcc.addArg("--preload-file");
260-
emcc.addFileArg(path.src_path);
261+
emcc.addArg(path.get(b));
262+
path.src_path.addStepDependencies(&emcc.step);
261263
}
262264
}
263265

0 commit comments

Comments
 (0)