Skip to content

Commit

Permalink
Fix SPIR-V support in GN build
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ShabbyX authored and arcady-lunarg committed Sep 20, 2024
1 parent c5b76b7 commit 3e7831b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
Expand Down Expand Up @@ -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",
Expand All @@ -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" ]
Expand Down

0 comments on commit 3e7831b

Please sign in to comment.