Improve ResourceLimits interface to be more forward compatible
[platform/upstream/glslang.git] / BUILD.bazel
index e8cf6a8..45efbd3 100644 (file)
@@ -49,6 +49,11 @@ py_binary(
     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"],
@@ -58,6 +63,14 @@ genrule(
     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": [
@@ -133,6 +146,7 @@ genrule(
         "SPIRV/GLSL.ext.NV.h",
         "SPIRV/GLSL.std.450.h",
         "SPIRV/NonSemanticDebugPrintf.h",
+        "SPIRV/NonSemanticShaderDebugInfo100.h",
         "SPIRV/spirv.hpp",
     ],
     outs = [
@@ -142,6 +156,7 @@ genrule(
         "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_bash = "mkdir -p $(@D)/include/SPIRV && cp $(SRCS) $(@D)/include/SPIRV/",
@@ -195,7 +210,7 @@ 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"],
@@ -206,6 +221,7 @@ cc_binary(
     srcs = [
         "StandAlone/StandAlone.cpp",
         "StandAlone/Worklist.h",
+        ":glslang/glsl_intrinsic_header.h"
     ],
     copts = COMMON_COPTS,
     deps = [