windows: initial support for zig build test

Makes progress getting "zig build test" to work on windows.  Mostly
fixed issues around build configuration and added some branches throughout
the Zig code to return/throw errors for unimplemented parts.

I also added an initial implementation for getting the home dir.
This commit is contained in:
Jonathan Marler
2023-09-14 02:34:43 -06:00
parent e213a93fe3
commit a2e881ff4e
9 changed files with 89 additions and 24 deletions

View File

@@ -329,7 +329,7 @@ pub fn build(b: *std.Build) !void {
// Convert to termcap source format if thats helpful to people and
// install it. The resulting value here is the termcap source in case
// that is used for other commands.
{
if (!target.isWindows()) {
const run_step = RunStep.create(b, "infotocap");
run_step.addArg("infotocap");
run_step.addFileSourceArg(src_source);
@@ -349,7 +349,7 @@ pub fn build(b: *std.Build) !void {
}
// Compile the terminfo source into a terminfo database
{
if (!target.isWindows()) {
const run_step = RunStep.create(b, "tic");
run_step.addArgs(&.{ "tic", "-x", "-o" });
const path = run_step.addOutputFileArg("terminfo");
@@ -799,7 +799,11 @@ fn addDeps(
b,
step.target,
step.optimize,
.{ .lzma = false, .zlib = false },
.{
.lzma = false,
.zlib = false,
.iconv = !step.target.isWindows(),
},
);
libxml2_lib.link(step);