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:
Luuk de Gram 2022-08-21 16:42:11 +02:00
parent 7fe2a3d104
commit d4c56804df
No known key found for this signature in database
GPG Key ID: A8CFE58E4DC7D664
2 changed files with 6 additions and 2 deletions

View File

@ -1898,7 +1898,11 @@ pub const LibExeObjStep = struct {
pub fn runEmulatable(exe: *LibExeObjStep) *EmulatableRunStep {
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 {

View File

@ -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.
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 key = "PATH";