Build.zig_exe: make it sentinel-aware

This is useful for tests that want to `execve` zig directly. The string
is already null-terminated, so this will just expose it as such,
removing an extra allocation from the test.

Will be used in #14462
This commit is contained in:
Motiejus Jakštys
2023-03-17 15:09:26 +02:00
committed by Andrew Kelley
parent 2089b3f193
commit 9f2aa3fbee
2 changed files with 4 additions and 4 deletions

View File

@@ -60,7 +60,7 @@ verbose_cimport: bool,
verbose_llvm_cpu_features: bool,
reference_trace: ?u32 = null,
invalid_user_input: bool,
zig_exe: []const u8,
zig_exe: [:0]const u8,
default_step: *Step,
env_map: *EnvMap,
top_level_steps: std.StringArrayHashMapUnmanaged(*TopLevelStep),
@@ -184,7 +184,7 @@ pub const DirList = struct {
pub fn create(
allocator: Allocator,
zig_exe: []const u8,
zig_exe: [:0]const u8,
build_root: Cache.Directory,
cache_root: Cache.Directory,
global_cache_root: Cache.Directory,