mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 14:23:09 +00:00
std: fix EmulatableRunStep
Fixes a compilation error when using the `EmulatableRunStep` that is being generated from a step directly using `runEmulatable`.
This commit is contained in:
parent
7fe2a3d104
commit
d4c56804df
@ -1898,7 +1898,11 @@ pub const LibExeObjStep = struct {
|
|||||||
pub fn runEmulatable(exe: *LibExeObjStep) *EmulatableRunStep {
|
pub fn runEmulatable(exe: *LibExeObjStep) *EmulatableRunStep {
|
||||||
assert(exe.kind == .exe or exe.kind == .test_exe);
|
assert(exe.kind == .exe or exe.kind == .test_exe);
|
||||||
|
|
||||||
return EmulatableRunStep.create(exe.builder, exe.builder.fmt("run {s}", .{exe.step.name}), exe);
|
const run_step = EmulatableRunStep.create(exe.builder, exe.builder.fmt("run {s}", .{exe.step.name}), exe);
|
||||||
|
if (exe.vcpkg_bin_path) |path| {
|
||||||
|
RunStep.addPathDirInternal(&run_step.step, exe.builder, path);
|
||||||
|
}
|
||||||
|
return run_step;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn checkObject(self: *LibExeObjStep, obj_format: std.Target.ObjectFormat) *CheckObjectStep {
|
pub fn checkObject(self: *LibExeObjStep, obj_format: std.Target.ObjectFormat) *CheckObjectStep {
|
||||||
|
|||||||
@ -101,7 +101,7 @@ pub fn addPathDir(self: *RunStep, search_path: []const u8) void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// For internal use only, users of `RunStep` should use `addPathDir` directly.
|
/// For internal use only, users of `RunStep` should use `addPathDir` directly.
|
||||||
fn addPathDirInternal(step: *Step, builder: *Builder, search_path: []const u8) void {
|
pub fn addPathDirInternal(step: *Step, builder: *Builder, search_path: []const u8) void {
|
||||||
const env_map = getEnvMapInternal(step, builder.allocator);
|
const env_map = getEnvMapInternal(step, builder.allocator);
|
||||||
|
|
||||||
const key = "PATH";
|
const key = "PATH";
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user