Skip to content
This repository was archived by the owner on Sep 27, 2024. It is now read-only.

Commit 18ced61

Browse files
fix(configure): make sysroot work
1 parent d42e9e8 commit 18ced61

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Step/Configure.zig

+2-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ fn make(step: *std.Build.Step, _: *std.Progress.Node) anyerror!void {
106106
b.graph.zig_exe,
107107
}));
108108

109-
try env_map.put("CFLAGS", b.fmt("-target {s} -mcpu={s} -O{s}", .{
109+
try env_map.put("CFLAGS", b.fmt("-target {s} -mcpu={s} -O{s}{s}", .{
110110
try self.target.query.zigTriple(arena),
111111
try self.target.query.serializeCpuAlloc(arena),
112112
@as([]const u8, switch (self.optimize) {
@@ -115,6 +115,7 @@ fn make(step: *std.Build.Step, _: *std.Progress.Node) anyerror!void {
115115
.ReleaseFast => "fast",
116116
.Debug => "g",
117117
}),
118+
@as([]const u8, if (b.sysroot) |sysroot| b.fmt(" --sysroot {s}", .{sysroot}) else ""),
118119
}));
119120

120121
if (b.findProgram(&.{"pkg-config"}, &.{}) catch null) |pkgconfig| {

0 commit comments

Comments
 (0)