2 default_visibility = ["//visibility:public"],
7 # Khronos reference front-end for GLSL and ESSL, and sample SPIR-V generator.
9 licenses(["notice"]) # Mixed: BSD, MIT, Khronos, Apache 2.0
11 exports_files(["LICENSE"])
17 "-Wunused-local-typedefs",
23 "-fvisibility=hidden",
24 "-fvisibility-inlines-hidden",
33 "glslang/GenericCodeGen/*.cpp",
34 "glslang/MachineIndependent/*.cpp",
35 "glslang/MachineIndependent/preprocessor/*.cpp",
39 "glslang/MachineIndependent/pch.cpp",
40 "glslang/MachineIndependent/pch.h",
45 "OGLCompilersDLL/InitializeDll.cpp",
46 "glslang/OSDependent/Unix/ossource.cpp",
49 "glslang/Include/*.h",
50 "glslang/MachineIndependent/*.h",
51 "glslang/MachineIndependent/preprocessor/*.h",
54 "OGLCompilersDLL/InitializeDll.h",
55 "StandAlone/DirStackFileIncluder.h",
56 "glslang/OSDependent/osinclude.h",
57 "glslang/Public/ShaderLang.h",
64 "GLSLANG_OSINCLUDE_UNIX",
75 name = "export_spirv_headers",
77 "SPIRV/GLSL.ext.AMD.h",
78 "SPIRV/GLSL.ext.EXT.h",
79 "SPIRV/GLSL.ext.KHR.h",
80 "SPIRV/GLSL.ext.NV.h",
81 "SPIRV/GLSL.std.450.h",
85 "include/SPIRV/GLSL.ext.AMD.h",
86 "include/SPIRV/GLSL.ext.EXT.h",
87 "include/SPIRV/GLSL.ext.KHR.h",
88 "include/SPIRV/GLSL.ext.NV.h",
89 "include/SPIRV/GLSL.std.450.h",
90 "include/SPIRV/spirv.hpp",
92 cmd = "mkdir -p $(@D)/include/SPIRV && cp $(SRCS) $(@D)/include/SPIRV/",
96 name = "SPIRV_headers",
97 hdrs = [":export_spirv_headers"],
111 "SPIRV/SpvTools.cpp",
115 "SPIRV/GlslangToSpv.h",
117 "SPIRV/SPVRemapper.h",
118 "SPIRV/SpvBuilder.h",
121 "SPIRV/disassemble.h",
126 copts = COMMON_COPTS,
127 includes = ["SPIRV"],
137 name = "glslang-default-resource-limits",
138 srcs = ["StandAlone/ResourceLimits.cpp"],
139 hdrs = ["StandAlone/ResourceLimits.h"],
140 copts = COMMON_COPTS,
146 name = "glslangValidator",
148 "StandAlone/StandAlone.cpp",
149 "StandAlone/Worklist.h",
151 copts = COMMON_COPTS,
155 ":glslang-default-resource-limits",
160 name = "spirv-remap",
161 srcs = ["StandAlone/spirv-remap.cpp"],
162 copts = COMMON_COPTS,
166 ":glslang-default-resource-limits",
176 "Test/glslangValidator",
188 name = "glslang_test_lib",
191 "gtests/HexFloat.cpp",
192 "gtests/Initializer.h",
193 "gtests/Settings.cpp",
195 "gtests/TestFixture.cpp",
196 "gtests/TestFixture.h",
199 copts = COMMON_COPTS,
200 data = [":test_files"],
202 'GLSLANG_TEST_DIRECTORY=\\"\\"',
208 ":glslang-default-resource-limits",
209 "@com_google_googletest//:gtest",
213 GLSLANG_TESTS = glob(
214 ["gtests/*.FromFile.cpp"],
215 # Since we are not building the SPIRV-Tools dependency, the following tests
216 # cannot be performed.
218 "gtests/Hlsl.FromFile.cpp",
219 "gtests/Spv.FromFile.cpp",
224 name = test_file.replace("gtests/", "").replace(".FromFile.cpp", "") + "_test",
228 "$(location :test_dir)",
230 copts = COMMON_COPTS,
240 ) for test_file in GLSLANG_TESTS]