exports_files(["LICENSE"])
+# Build information generation script
+py_binary(
+ name = "build_info",
+ srcs = ["build_info.py"],
+)
+
+py_binary(
+ name = "gen_extension_headers",
+ srcs = ["gen_extension_headers.py"],
+)
+
+genrule(
+ name = "gen_build_info_h",
+ srcs = ["CHANGES.md", "build_info.h.tmpl"],
+ outs = ["glslang/build_info.h"],
+ cmd_bash = "$(location build_info) $$(dirname $(location CHANGES.md)) -i $(location build_info.h.tmpl) -o $(location glslang/build_info.h)",
+ cmd_bat = "for %F in ($(location CHANGES.md)) do $(location build_info) %~dpF -i $(location build_info.h.tmpl) -o $(location glslang/build_info.h)",
+ tools = [":build_info"],
+)
+
+genrule(
+ name = "gen_extension_headers_h",
+ srcs = ["glslang/ExtensionHeaders", "gen_extension_headers.py"],
+ outs = ["glslang/glsl_intrinsic_header.h"],
+ cmd_bash = "$(location gen_extension_headers) -i $(location glslang/ExtensionHeaders) -o $(location glslang/glsl_intrinsic_header.h)",
+ tools = [":gen_extension_headers"],
+)
+
COMMON_COPTS = select({
"@bazel_tools//src/conditions:windows": [""],
"//conditions:default": [
"StandAlone/DirStackFileIncluder.h",
"glslang/OSDependent/osinclude.h",
"glslang/Public/ShaderLang.h",
+ ":gen_build_info_h",
],
copts = COMMON_COPTS,
defines = [
"SPIRV/GLSL.ext.NV.h",
"SPIRV/GLSL.std.450.h",
"SPIRV/NonSemanticDebugPrintf.h",
+ "SPIRV/NonSemanticShaderDebugInfo100.h",
"SPIRV/spirv.hpp",
],
outs = [
"include/SPIRV/GLSL.ext.NV.h",
"include/SPIRV/GLSL.std.450.h",
"include/SPIRV/NonSemanticDebugPrintf.h",
+ "include/SPIRV/NonSemanticShaderDebugInfo100.h",
"include/SPIRV/spirv.hpp",
],
- cmd = "mkdir -p $(@D)/include/SPIRV && cp $(SRCS) $(@D)/include/SPIRV/",
+ cmd_bash = "mkdir -p $(@D)/include/SPIRV && cp $(SRCS) $(@D)/include/SPIRV/",
+ cmd_bat = "(if not exist $(@D)\\include\\SPIRV mkdir $(@D)\\include\\SPIRV) && (for %S in ($(SRCS)) do @xcopy /q %S $(@D)\\include\\SPIRV\\ >NUL)",
)
cc_library(
cc_library(
name = "glslang-default-resource-limits",
srcs = ["StandAlone/ResourceLimits.cpp"],
- hdrs = ["StandAlone/ResourceLimits.h"],
+ hdrs = ["glslang/Public/ResourceLimits.h"],
copts = COMMON_COPTS,
linkstatic = 1,
deps = [":glslang"],
srcs = [
"StandAlone/StandAlone.cpp",
"StandAlone/Worklist.h",
+ ":glslang/glsl_intrinsic_header.h"
],
copts = COMMON_COPTS,
deps = [