build.zig: fix erroneous cwd references
This worked fine building libressl by itself, but it references the wrong directory when executed as a dependency of another library. The builder object seems to have its build root set correctly, so use that.
This commit is contained in:
parent
6582b5efe9
commit
dd538e896b
@ -205,8 +205,8 @@ pub fn libresslBuild(
|
|||||||
|
|
||||||
// TODO: can we just add this as an install header instead? It's needed during this
|
// TODO: can we just add this as an install header instead? It's needed during this
|
||||||
// build. This mutates the source tree, which is really gross.
|
// build. This mutates the source tree, which is really gross.
|
||||||
const include_dir = try std.fs.cwd().openDir(install_header_prefix ++ "openssl", .{});
|
const include_dir = try b.build_root.handle.openDir(install_header_prefix ++ "openssl", .{});
|
||||||
try std.fs.cwd().copyFile(header, include_dir, "opensslconf.h", .{});
|
try b.build_root.handle.copyFile(header, include_dir, "opensslconf.h", .{});
|
||||||
|
|
||||||
try header_search(
|
try header_search(
|
||||||
b,
|
b,
|
||||||
@ -312,7 +312,7 @@ pub fn header_search(
|
|||||||
base: []const u8,
|
base: []const u8,
|
||||||
skiplist: []const SkipSpec,
|
skiplist: []const SkipSpec,
|
||||||
) !void {
|
) !void {
|
||||||
const dir = try std.fs.cwd().openIterableDir(base, .{});
|
const dir = try b.build_root.handle.openIterableDir(base, .{});
|
||||||
var walker = try dir.walk(b.allocator);
|
var walker = try dir.walk(b.allocator);
|
||||||
defer walker.deinit();
|
defer walker.deinit();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user