From 3e7831ba12e2c030be2b9b279312858cb6520d52 Mon Sep 17 00:00:00 2001 From: Shahbaz Youssefi Date: Fri, 20 Sep 2024 16:35:33 -0400 Subject: [PATCH] Fix SPIR-V support in GN build The cmake build recently got ENABLE_SPIRV which is enabled by default. This was missing from the GN build, accidentally removing SPIR-V support in this build. --- BUILD.gn | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index b055c1a2..894cd95b 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -235,7 +235,7 @@ template("glslang_sources_common") { ] } - defines = [] + defines = [ "ENABLE_SPIRV=1" ] if (invoker.enable_opt) { sources += [ "SPIRV/SpvTools.cpp" ] defines += [ "ENABLE_OPT=1" ] @@ -318,7 +318,10 @@ executable("glslang_validator") { if (!is_win) { cflags = [ "-Woverflow" ] } - defines = [ "ENABLE_OPT=1" ] + defines = [ + "ENABLE_OPT=1", + "ENABLE_SPIRV=1", + ] deps = [ ":glslang_build_info", ":glslang_default_resource_limits_sources", @@ -338,7 +341,10 @@ executable("glslang_validator") { executable("spirv-remap") { sources = [ "StandAlone/spirv-remap.cpp" ] - defines = [ "ENABLE_OPT=1" ] + defines = [ + "ENABLE_OPT=1", + "ENABLE_SPIRV=1", + ] deps = [ ":glslang_sources" ] include_dirs = [ "${spirv_tools_dir}/include" ]