Edited build.zig
This commit is contained in:
parent
f2f81cf089
commit
b56668a51c
3 changed files with 6 additions and 5 deletions
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue