From 72105fc6cdf57630db83356aca5fed75837b5d62 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 23 Sep 2022 12:08:06 -0700 Subject: [PATCH] update to the latest stage2 compiler we can --- .gitmodules | 2 +- build.zig | 6 +++--- flake.lock | 6 +++--- nix/overlay.nix | 5 ++++- pkg/fontconfig/build.zig | 4 ++++ src/Window.zig | 2 -- vendor/mach | 2 +- vendor/zig-libxml2 | 2 +- 8 files changed, 17 insertions(+), 12 deletions(-) diff --git a/.gitmodules b/.gitmodules index a7820d48f..651473f1e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "vendor/mach"] path = vendor/mach - url = https://github.com/hexops/mach.git + url = https://github.com/mitchellh/mach.git [submodule "vendor/freetype"] path = vendor/freetype url = https://github.com/freetype/freetype.git diff --git a/build.zig b/build.zig index 136d48f8f..206e028ab 100644 --- a/build.zig +++ b/build.zig @@ -2,7 +2,7 @@ const std = @import("std"); const fs = std.fs; const Builder = std.build.Builder; const LibExeObjStep = std.build.LibExeObjStep; -const glfw = @import("vendor/mach/glfw/build.zig"); +const glfw = @import("vendor/mach/libs/glfw/build.zig"); const fontconfig = @import("pkg/fontconfig/build.zig"); const freetype = @import("pkg/freetype/build.zig"); const harfbuzz = @import("pkg/harfbuzz/build.zig"); @@ -12,7 +12,7 @@ const libpng = @import("pkg/libpng/build.zig"); const utf8proc = @import("pkg/utf8proc/build.zig"); const zlib = @import("pkg/zlib/build.zig"); const tracylib = @import("pkg/tracy/build.zig"); -const system_sdk = @import("vendor/mach/glfw/system_sdk.zig"); +const system_sdk = @import("vendor/mach/libs/glfw/system_sdk.zig"); // Build options, see the build options help for more info. var tracy: bool = false; @@ -166,7 +166,7 @@ fn addDeps( step.addPackage(utf8proc.pkg); // We always statically compile glad - step.addIncludeDir("vendor/glad/include/"); + step.addIncludePath("vendor/glad/include/"); step.addCSourceFile("vendor/glad/src/gl.c", &.{}); // Tracy diff --git a/flake.lock b/flake.lock index 092e5053c..710e5b8b0 100644 --- a/flake.lock +++ b/flake.lock @@ -109,11 +109,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1662668669, - "narHash": "sha256-91R5xjCt1cLJBbYygtiQwXCex596/2cxsTneKUdnVwc=", + "lastModified": 1663935107, + "narHash": "sha256-uCA5Y3cn2Jk15VBRCUIq1lIb7mFyi3j2lp9Up+FbjFY=", "owner": "mitchellh", "repo": "zig-overlay", - "rev": "6ed17531becf61347f4f30b62ad22d21e14fc4da", + "rev": "39778bb594f9eed1c2673b08d0c29d52b6f7dfb2", "type": "github" }, "original": { diff --git a/nix/overlay.nix b/nix/overlay.nix index c3f77e273..e90fb07a7 100644 --- a/nix/overlay.nix +++ b/nix/overlay.nix @@ -12,8 +12,11 @@ final: prev: rec { wraptest = prev.callPackage ./wraptest.nix { }; + # Last known working self-hosted with -fstage1 + zig = final.zigpkgs.master-2022-09-13; + # zig we want to be the latest nightly since 0.9.0 is not released yet. - zig = final.zigpkgs.master; + #zig = final.zigpkgs.master; # last known working stage1 build, the rest in the future are stage3 #zig = final.zigpkgs.master-2022-08-19; diff --git a/pkg/fontconfig/build.zig b/pkg/fontconfig/build.zig index 6196e32b1..8778584fe 100644 --- a/pkg/fontconfig/build.zig +++ b/pkg/fontconfig/build.zig @@ -142,6 +142,10 @@ pub fn buildFontconfig( "-DFC_GPERF_SIZE_T=size_t", + // Default errors that fontconfig can't handle + "-Wno-implicit-function-declaration", + "-Wno-int-conversion", + // https://gitlab.freedesktop.org/fontconfig/fontconfig/-/merge_requests/231 "-fno-sanitize=undefined", "-fno-sanitize-trap=undefined", diff --git a/src/Window.zig b/src/Window.zig index 2dc67367a..2d3f91ca0 100644 --- a/src/Window.zig +++ b/src/Window.zig @@ -979,8 +979,6 @@ fn mouseButtonCallback( glfw_action: glfw.Action, mods: glfw.Mods, ) void { - _ = mods; - const tracy = trace(@src()); defer tracy.end(); diff --git a/vendor/mach b/vendor/mach index 0d5b85344..e03ff5aeb 160000 --- a/vendor/mach +++ b/vendor/mach @@ -1 +1 @@ -Subproject commit 0d5b85344376ac22440680c696fc42b2e3614972 +Subproject commit e03ff5aeba9f4120fa9024461e929d2445e46843 diff --git a/vendor/zig-libxml2 b/vendor/zig-libxml2 index 559e909ee..47fc435b1 160000 --- a/vendor/zig-libxml2 +++ b/vendor/zig-libxml2 @@ -1 +1 @@ -Subproject commit 559e909eeda65508b0a3b7c1c5107f6621fe8218 +Subproject commit 47fc435b1b5885345693a09b19f2fdcfb91082d8