Merge pull request #1556 from der-teufel-programming/fix-build+utf8

Fix build+utf8
This commit is contained in:
Mitchell Hashimoto
2024-02-27 11:33:00 -08:00
committed by GitHub
14 changed files with 22 additions and 22 deletions

View File

@ -24,7 +24,7 @@ const Command = @import("src/Command.zig");
// but we liberally update it. In the future, we'll be more careful about
// using released versions so that package managers can integrate better.
comptime {
const required_zig = "0.12.0-dev.2818+97290e0bf";
const required_zig = "0.12.0-dev.3033+031f23117";
const current_zig = builtin.zig_version;
const min_zig = std.SemanticVersion.parse(required_zig) catch unreachable;
if (current_zig.order(min_zig) == .lt) {

12
flake.lock generated
View File

@ -147,11 +147,11 @@
},
"nixpkgs-zig-0-12": {
"locked": {
"lastModified": 1708536163,
"narHash": "sha256-UdGZLYXoIJRal/J/uYlMqPi27LE92wdsIHtDOWRVXhM=",
"lastModified": 1709060268,
"narHash": "sha256-IGt0MDqdojBXdE97ORxL2Pk5x4GHFEOc3G7tjsMXLfU=",
"owner": "vancluever",
"repo": "nixpkgs",
"rev": "aba18e2126357afc8a997c12dcf027517b7432b0",
"rev": "c7dc015475bd4ac5de01a04680aa08777879add1",
"type": "github"
},
"original": {
@ -194,11 +194,11 @@
]
},
"locked": {
"lastModified": 1708776432,
"narHash": "sha256-BgVtWuK4v0J0z+8wj2ww0T7M85NrknimOFDVp7Yx7XU=",
"lastModified": 1709035693,
"narHash": "sha256-ac5fR8n4RPjP5GHhFMdtUhdL6e/eFCxIOO+7UoP1B/g=",
"owner": "mitchellh",
"repo": "zig-overlay",
"rev": "14ec3b93067932906652567e01bfc171f72c750e",
"rev": "e1c418c2315adaeca6f27fd8919141eb7992866d",
"type": "github"
},
"original": {

View File

@ -157,7 +157,7 @@ pub fn build(b: *std.Build) !void {
}
lib.addCSourceFiles(.{
.dependency = upstream,
.root = upstream.path(""),
.files = srcs,
.flags = flags.items,
});

View File

@ -46,7 +46,7 @@ pub fn build(b: *std.Build) !void {
if (libpng_enabled) try flags.append("-DFT_CONFIG_OPTION_USE_PNG=1");
lib.addCSourceFiles(.{
.dependency = upstream,
.root = upstream.path(""),
.files = srcs,
.flags = flags.items,
});

View File

@ -66,7 +66,7 @@ fn buildGlslang(
});
lib.addCSourceFiles(.{
.dependency = upstream,
.root = upstream.path(""),
.flags = flags.items,
.files = &.{
// GenericCodeGen
@ -125,7 +125,7 @@ fn buildGlslang(
if (target.result.os.tag != .windows) {
lib.addCSourceFiles(.{
.dependency = upstream,
.root = upstream.path(""),
.flags = flags.items,
.files = &.{
"glslang/OSDependent/Unix/ossource.cpp",
@ -133,7 +133,7 @@ fn buildGlslang(
});
} else {
lib.addCSourceFiles(.{
.dependency = upstream,
.root = upstream.path(""),
.flags = flags.items,
.files = &.{
"glslang/OSDependent/Windows/ossource.cpp",

View File

@ -73,7 +73,7 @@ pub fn build(b: *std.Build) !void {
lib.addCSourceFiles(.{ .flags = flags.items, .files = &.{"bridge.cpp"} });
lib.addCSourceFiles(.{
.dependency = upstream,
.root = upstream.path(""),
.flags = flags.items,
.files = &.{
"hwy/aligned_allocator.cc",

View File

@ -35,7 +35,7 @@ pub fn build(b: *std.Build) !void {
});
lib.addCSourceFiles(.{
.dependency = upstream,
.root = upstream.path(""),
.files = srcs,
.flags = flags.items,
});

View File

@ -95,7 +95,7 @@ pub fn build(b: *std.Build) !void {
}
lib.addCSourceFiles(.{
.dependency = upstream,
.root = upstream.path(""),
.files = srcs,
.flags = flags.items,
});

View File

@ -71,7 +71,7 @@ fn buildOniguruma(
defer flags.deinit();
try flags.appendSlice(&.{});
lib.addCSourceFiles(.{
.dependency = upstream,
.root = upstream.path(""),
.flags = flags.items,
.files = &.{
"src/regerror.c",

View File

@ -57,7 +57,7 @@ pub fn build(b: *std.Build) !void {
}
lib.addCSourceFiles(.{
.dependency = upstream,
.root = upstream.path(""),
.files = srcs,
.flags = flags.items,
});

View File

@ -58,7 +58,7 @@ fn buildSpirvCross(
});
lib.addCSourceFiles(.{
.dependency = upstream,
.root = upstream.path(""),
.flags = flags.items,
.files = &.{
// Core

View File

@ -21,7 +21,7 @@ pub fn build(b: *std.Build) !void {
try flags.append("-DUTF8PROC_EXPORTS");
defer flags.deinit();
lib.addCSourceFiles(.{
.dependency = upstream,
.root = upstream.path(""),
.files = &.{"utf8proc.c"},
.flags = flags.items,
});

View File

@ -34,7 +34,7 @@ pub fn build(b: *std.Build) !void {
"-DZ_HAVE_UNISTD_H",
});
lib.addCSourceFiles(.{
.dependency = upstream,
.root = upstream.path(""),
.files = srcs,
.flags = flags.items,
});

View File

@ -88,7 +88,7 @@ fn homeWindows(buf: []u8) !?[]u8 {
const fba = fba_instance.allocator();
const drive = std.process.getEnvVarOwned(fba, "HOMEDRIVE") catch |err| switch (err) {
error.OutOfMemory => return Error.BufferTooSmall,
error.InvalidUtf8, error.EnvironmentVariableNotFound => return null,
error.InvalidWtf8, error.EnvironmentVariableNotFound => return null,
};
// could shift the contents if this ever happens
if (drive.ptr != buf.ptr) @panic("codebug");
@ -101,7 +101,7 @@ fn homeWindows(buf: []u8) !?[]u8 {
const fba = fba_instance.allocator();
const homepath = std.process.getEnvVarOwned(fba, "HOMEPATH") catch |err| switch (err) {
error.OutOfMemory => return Error.BufferTooSmall,
error.InvalidUtf8, error.EnvironmentVariableNotFound => return null,
error.InvalidWtf8, error.EnvironmentVariableNotFound => return null,
};
// could shift the contents if this ever happens
if (homepath.ptr != path_buf.ptr) @panic("codebug");