Fix build runner optional issue (#725)
This commit is contained in:
parent
862d30055a
commit
ced6e97cc2
@ -142,11 +142,11 @@ fn processStep(
|
|||||||
) anyerror!void {
|
) anyerror!void {
|
||||||
if (step.cast(InstallArtifactStep)) |install_exe| {
|
if (step.cast(InstallArtifactStep)) |install_exe| {
|
||||||
if (install_exe.artifact.root_src) |src| {
|
if (install_exe.artifact.root_src) |src| {
|
||||||
const path = switch (src) {
|
const maybe_path = switch (src) {
|
||||||
.path => |path| path,
|
.path => |path| path,
|
||||||
.generated => |generated| generated.path,
|
.generated => |generated| generated.path,
|
||||||
};
|
};
|
||||||
try packages.append(allocator, .{ .name = "root", .path = path });
|
if (maybe_path) |path| try packages.append(allocator, .{ .name = "root", .path = path });
|
||||||
}
|
}
|
||||||
|
|
||||||
try processIncludeDirs(allocator, include_dirs, install_exe.artifact.include_dirs.items);
|
try processIncludeDirs(allocator, include_dirs, install_exe.artifact.include_dirs.items);
|
||||||
@ -156,11 +156,11 @@ fn processStep(
|
|||||||
}
|
}
|
||||||
} else if (step.cast(LibExeObjStep)) |exe| {
|
} else if (step.cast(LibExeObjStep)) |exe| {
|
||||||
if (exe.root_src) |src| {
|
if (exe.root_src) |src| {
|
||||||
const path = switch (src) {
|
const maybe_path = switch (src) {
|
||||||
.path => |path| path,
|
.path => |path| path,
|
||||||
.generated => |generated| generated.path,
|
.generated => |generated| generated.path,
|
||||||
};
|
};
|
||||||
try packages.append(allocator, .{ .name = "root", .path = path });
|
if (maybe_path) |path| try packages.append(allocator, .{ .name = "root", .path = path });
|
||||||
}
|
}
|
||||||
try processIncludeDirs(allocator, include_dirs, exe.include_dirs.items);
|
try processIncludeDirs(allocator, include_dirs, exe.include_dirs.items);
|
||||||
try processPkgConfig(allocator, include_dirs, exe);
|
try processPkgConfig(allocator, include_dirs, exe);
|
||||||
|
Loading…
Reference in New Issue
Block a user