@@ -595,7 +595,7 @@ fn addWasiUpdateStep(b: *std.Build, version: [:0]const u8) !void {
595
595
run_opt .addArg ("-o" );
596
596
run_opt .addFileArg (b .path ("stage1/zig1.wasm" ));
597
597
598
- const copy_zig_h = b .addWriteFiles ();
598
+ const copy_zig_h = b .addUpdateSourceFiles ();
599
599
copy_zig_h .addCopyFileToSource (b .path ("lib/zig.h" ), "stage1/zig.h" );
600
600
601
601
const update_zig1_step = b .step ("update-zig1" , "Update stage1/zig1.wasm" );
@@ -1261,7 +1261,9 @@ fn generateLangRef(b: *std.Build) std.Build.LazyPath {
1261
1261
});
1262
1262
1263
1263
var dir = b .build_root .handle .openDir ("doc/langref" , .{ .iterate = true }) catch | err | {
1264
- std .debug .panic ("unable to open 'doc/langref' directory: {s}" , .{@errorName (err )});
1264
+ std .debug .panic ("unable to open '{}doc/langref' directory: {s}" , .{
1265
+ b .build_root , @errorName (err ),
1266
+ });
1265
1267
};
1266
1268
defer dir .close ();
1267
1269
@@ -1280,10 +1282,7 @@ fn generateLangRef(b: *std.Build) std.Build.LazyPath {
1280
1282
// in a temporary directory
1281
1283
"--cache-root" , b .cache_root .path orelse "." ,
1282
1284
});
1283
- if (b .zig_lib_dir ) | p | {
1284
- cmd .addArg ("--zig-lib-dir" );
1285
- cmd .addDirectoryArg (p );
1286
- }
1285
+ cmd .addArgs (&.{ "--zig-lib-dir" , b .fmt ("{}" , .{b .graph .zig_lib_directory }) });
1287
1286
cmd .addArgs (&.{"-i" });
1288
1287
cmd .addFileArg (b .path (b .fmt ("doc/langref/{s}" , .{entry .name })));
1289
1288
0 commit comments