script,
template_file,
]
- outputs = [
- out_file
- ]
+ outputs = [ out_file ]
args = [
rebase_path(src_dir, root_build_dir),
- "-i", rebase_path(template_file, root_build_dir),
- "-o", rebase_path(out_file, root_build_dir),
+ "-i",
+ rebase_path(template_file, root_build_dir),
+ "-o",
+ rebase_path(out_file, root_build_dir),
+ ]
+}
+
+action("glslang_extension_headers") {
+ script = "gen_extension_headers.py"
+
+ out_file = "${target_gen_dir}/include/glslang/glsl_intrinsic_header.h"
+
+ # Fuchsia GN build rules require all GN actions to be hermetic and they
+ # should correctly and fully state their inputs and outpus (see
+ # https://fuchsia.dev/fuchsia-src/development/build/hermetic_actions
+ # for details). All input files of the script should be added to the
+ # |sources| list.
+ sources = [
+ "glslang/ExtensionHeaders/GL_EXT_shader_realtime_clock.glsl",
+ ]
+
+ inputs = [
+ script
+ ]
+ outputs = [ out_file ]
+ args = [
+ "-i",
+ rebase_path("glslang/ExtensionHeaders", root_build_dir),
+ "-o",
+ rebase_path(out_file, root_build_dir),
]
}
config("glslang_public") {
include_dirs = [ "." ]
+ if (!is_win || is_clang) {
+ cflags = [ "-Wno-conversion" ]
+ }
}
config("glslang_hlsl") {
"SPIRV/Logger.cpp",
"SPIRV/Logger.h",
"SPIRV/NonSemanticDebugPrintf.h",
+ "SPIRV/NonSemanticShaderDebugInfo100.h",
"SPIRV/SPVRemapper.cpp",
"SPIRV/SPVRemapper.h",
"SPIRV/SpvBuilder.cpp",
"SPIRV/SpvBuilder.h",
"SPIRV/SpvPostProcess.cpp",
- "SPIRV/SpvTools.cpp",
"SPIRV/SpvTools.h",
"SPIRV/bitutils.h",
"SPIRV/disassemble.cpp",
"glslang/Include/PoolAlloc.h",
"glslang/Include/ResourceLimits.h",
"glslang/Include/ShHandle.h",
+ "glslang/Include/SpirvIntrinsics.h",
"glslang/Include/Types.h",
"glslang/Include/arrays.h",
"glslang/Include/intermediate.h",
"glslang/MachineIndependent/Scan.h",
"glslang/MachineIndependent/ScanContext.h",
"glslang/MachineIndependent/ShaderLang.cpp",
+ "glslang/MachineIndependent/SpirvIntrinsics.cpp",
"glslang/MachineIndependent/SymbolTable.cpp",
"glslang/MachineIndependent/SymbolTable.h",
"glslang/MachineIndependent/Versions.cpp",
defines = []
if (invoker.enable_opt) {
+ sources += [ "SPIRV/SpvTools.cpp" ]
defines += [ "ENABLE_OPT=1" ]
}
+ if (invoker.is_angle) {
+ defines += [ "GLSLANG_ANGLE" ]
+ }
if (is_win) {
sources += [ "glslang/OSDependent/Windows/ossource.cpp" ]
"-Wno-ignored-qualifiers",
"-Wno-implicit-fallthrough",
"-Wno-inconsistent-missing-override",
- "-Wno-sign-compare",
- "-Wno-unused-variable",
"-Wno-missing-field-initializers",
"-Wno-newline-eof",
+ "-Wno-sign-compare",
+ "-Wno-suggest-destructor-override",
+ "-Wno-suggest-override",
+ "-Wno-unused-variable",
]
}
if (is_win && !is_clang) {
]
}
+ include_dirs = [ "${target_gen_dir}/include" ]
+
deps = [ ":glslang_build_info" ]
if (invoker.enable_opt) {
deps += [
- ":glslang_build_info",
"${spirv_tools_dir}:spvtools_opt",
"${spirv_tools_dir}:spvtools_val",
]
+ include_dirs += [ "${spirv_tools_dir}/include" ]
}
- include_dirs = [ "${target_gen_dir}/include" ]
-
configs -= _configs_to_remove
configs += _configs_to_add
}
glslang_sources_common("glslang_lib_sources") {
enable_opt = !glslang_angle
enable_hlsl = !glslang_angle
+ is_angle = glslang_angle
}
glslang_sources_common("glslang_sources") {
enable_opt = true
enable_hlsl = true
+ is_angle = false
}
source_set("glslang_default_resource_limits_sources") {
}
defines = [ "ENABLE_OPT=1" ]
deps = [
+ ":glslang_build_info",
":glslang_default_resource_limits_sources",
":glslang_sources",
+ ":glslang_extension_headers",
]
public_configs = [ ":glslang_hlsl" ]
- include_dirs = [ "${target_gen_dir}/include" ]
+ include_dirs = [
+ "${target_gen_dir}/include",
+ "${spirv_tools_dir}/include",
+ ]
configs -= _configs_to_remove
configs += _configs_to_add
defines = [ "ENABLE_OPT=1" ]
deps = [ ":glslang_sources" ]
+ include_dirs = [ "${spirv_tools_dir}/include" ]
+
configs -= _configs_to_remove
configs += _configs_to_add
}