diff --git a/build.zig b/build.zig index 065315b1..30a57200 100644 --- a/build.zig +++ b/build.zig @@ -4,6 +4,7 @@ const spvtools = @import("External/spirv-tools/build.zig"); const Build = std.Build; const log = std.log.scoped(.glslang_zig); +const spirv_header_name = "spirv-headers"; // Since update_glslang_sources downloads it as spirv-headers instead of SPIRV-Headers pub fn build(b: *Build) !void { const optimize = b.standardOptimizeOption(.{}); @@ -16,7 +17,7 @@ pub fn build(b: *Build) !void { const standalone_glslang = b.option(bool, "standalone", "Build glslang.exe standalone command-line compiler.") orelse false; const standalone_spvremap = b.option(bool, "standalone-remap", "Build spirv-remap.exe standalone command-line remapper.") orelse false; - const tools_libs: spvtools.SPVLibs = spvtools.build_spirv(b, optimize, target, shared_tools, debug) catch |err| { + const tools_libs: spvtools.SPVLibs = spvtools.build_spirv(b, optimize, target, shared_tools, debug, spirv_header_name) catch |err| { log.err("Error building SPIRV-Tools: {s}", .{ @errorName(err) }); std.process.exit(1); }; @@ -131,7 +132,7 @@ pub fn build(b: *Build) !void { addIncludes(glslang_lib); - spvtools.addSPIRVPublicIncludes(glslang_lib); + spvtools.addSPIRVPublicIncludes(glslang_lib, spirv_header_name); glslang_lib.linkLibCpp(); diff --git a/known_good_zig.json b/known_good_zig.json index dcd85232..0095b1a8 100644 --- a/known_good_zig.json +++ b/known_good_zig.json @@ -11,7 +11,7 @@ "name" : "spirv-tools/external/spirv-headers", "site" : "github", "subrepo" : "KhronosGroup/SPIRV-Headers", - "subdir" : "External/spirv-tools/external/SPIRV-Headers", + "subdir" : "External/spirv-tools/external/spirv-headers", "commit" : "4f7b471f1a66b6d06462cd4ba57628cc0cd087d7" }, { diff --git a/update_glslang_sources.py b/update_glslang_sources.py index 7deeda4a..19c94972 100755 --- a/update_glslang_sources.py +++ b/update_glslang_sources.py @@ -27,12 +27,12 @@ KNOWN_GOOD_FILE = 'known_good.json' SITE_TO_KNOWN_GOOD_FILE = { 'github' : 'known_good.json', 'gitlab' : 'known_good_khr.json', - 'zig-github' : 'known_good_zig.json' } + 'zig' : 'known_good_zig.json' } # Maps a site name to its hostname. SITE_TO_HOST = { 'github' : 'https://github.com/', 'gitlab' : 'git@gitlab.khronos.org:', - 'zig-github' : 'https://github.com/' } + 'zig' : 'https://github.com/' } VERBOSE = True