gpu-dawn: add NO_ENSURE_SUBMODULES=true env var for development
If you're working on changes to source files in `gpu-dawn/libs/dawn/`, it's annoying to have the build system constantly reset your revision to the desired one. `NO_ENSURE_SUBMODULES=true` will now disable this behavior. Helps hexops/mach#86 Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
1bc6a7e829
commit
69b2551378
1 changed files with 3 additions and 0 deletions
|
|
@ -177,6 +177,9 @@ fn linkFromSource(b: *Builder, step: *std.build.LibExeObjStep, options: Options)
|
|||
}
|
||||
|
||||
fn ensureSubmodules(allocator: std.mem.Allocator) !void {
|
||||
if (std.process.getEnvVarOwned(allocator, "NO_ENSURE_SUBMODULES")) |no_ensure_submodules| {
|
||||
if (std.mem.eql(u8, no_ensure_submodules, "true")) return;
|
||||
} else |_| {}
|
||||
const child = try std.ChildProcess.init(&.{ "git", "submodule", "update", "--init", "--recursive" }, allocator);
|
||||
child.cwd = thisDir();
|
||||
child.stderr = std.io.getStdErr();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue