| # Copyright 2017 The Fuchsia Authors |
| # |
| # Permission is hereby granted, free of charge, to any person obtaining a |
| # copy of this software and associated documentation files (the "Software"), |
| # to deal in the Software without restriction, including without limitation |
| # the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| # and/or sell copies of the Software, and to permit persons to whom the |
| # Software is furnished to do so, subject to the following conditions: |
| # |
| # The above copyright notice and this permission notice (including the next |
| # paragraph) shall be included in all copies or substantial portions of the |
| # Software. |
| # |
| # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS |
| # IN THE SOFTWARE. |
| |
| config("glslang_config") { |
| include_dirs = [ |
| ".", |
| "glslang/Public", |
| ] |
| } |
| |
| config("glslang_internal_config") { |
| cflags_cc = [ |
| "-Wno-ignored-qualifiers", |
| "-Wno-missing-field-initializers", |
| "-Wno-reorder", |
| "-Wno-unused-function", |
| "-Wno-unused-variable", |
| ] |
| } |
| |
| static_library("glslang") { |
| sources = [ |
| "glslang/GenericCodeGen/CodeGen.cpp", |
| "glslang/GenericCodeGen/Link.cpp", |
| "glslang/MachineIndependent/Constant.cpp", |
| "glslang/MachineIndependent/InfoSink.cpp", |
| "glslang/MachineIndependent/Initialize.cpp", |
| "glslang/MachineIndependent/IntermTraverse.cpp", |
| "glslang/MachineIndependent/Intermediate.cpp", |
| "glslang/MachineIndependent/ParseContextBase.cpp", |
| "glslang/MachineIndependent/ParseHelper.cpp", |
| "glslang/MachineIndependent/PoolAlloc.cpp", |
| "glslang/MachineIndependent/RemoveTree.cpp", |
| "glslang/MachineIndependent/Scan.cpp", |
| "glslang/MachineIndependent/ShaderLang.cpp", |
| "glslang/MachineIndependent/SymbolTable.cpp", |
| "glslang/MachineIndependent/Versions.cpp", |
| "glslang/MachineIndependent/attribute.cpp", |
| "glslang/MachineIndependent/glslang_tab.cpp", |
| "glslang/MachineIndependent/intermOut.cpp", |
| "glslang/MachineIndependent/iomapper.cpp", |
| "glslang/MachineIndependent/limits.cpp", |
| "glslang/MachineIndependent/linkValidate.cpp", |
| "glslang/MachineIndependent/parseConst.cpp", |
| "glslang/MachineIndependent/preprocessor/Pp.cpp", |
| "glslang/MachineIndependent/preprocessor/PpAtom.cpp", |
| "glslang/MachineIndependent/preprocessor/PpContext.cpp", |
| "glslang/MachineIndependent/preprocessor/PpScanner.cpp", |
| "glslang/MachineIndependent/preprocessor/PpTokens.cpp", |
| "glslang/MachineIndependent/propagateNoContraction.cpp", |
| "glslang/MachineIndependent/reflection.cpp", |
| ] |
| deps = [ |
| ":HLSL", |
| ":OGLCompiler", |
| ":OSDependent", |
| ":SPIRV", |
| ":glslang-default-resource-limits", |
| ] |
| public_configs = [ ":glslang_config" ] |
| configs += [ ":glslang_internal_config" ] |
| } |
| static_library("OSDependent") { |
| cflags_cc = [ |
| "-Wno-unused-function", |
| "-Wno-unused-variable", |
| ] |
| sources = [ |
| "glslang/OSDependent/Unix/ossource.cpp", |
| ] |
| public_configs = [ "//third_party/shaderc/fake_sys:config" ] |
| } |
| static_library("OGLCompiler") { |
| sources = [ |
| "OGLCompilersDLL/InitializeDll.cpp", |
| ] |
| } |
| config("HLSL_config") { |
| defines = [ "ENABLE_HLSL" ] |
| } |
| static_library("HLSL") { |
| cflags_cc = [ |
| "-Wno-reorder", |
| "-Wno-inconsistent-missing-override", |
| "-Wno-missing-field-initializers", |
| ] |
| public_configs = [ ":HLSL_config" ] |
| sources = [ |
| "hlsl/hlslAttributes.cpp", |
| "hlsl/hlslGrammar.cpp", |
| "hlsl/hlslOpMap.cpp", |
| "hlsl/hlslParseHelper.cpp", |
| "hlsl/hlslParseables.cpp", |
| "hlsl/hlslScanContext.cpp", |
| "hlsl/hlslTokenStream.cpp", |
| ] |
| } |
| static_library("SPIRV") { |
| cflags_cc = [ |
| "-Wno-reorder", |
| "-Wno-missing-field-initializers", |
| "-Wno-unused-variable", |
| ] |
| sources = [ |
| "SPIRV/GlslangToSpv.cpp", |
| "SPIRV/InReadableOrder.cpp", |
| "SPIRV/Logger.cpp", |
| "SPIRV/SpvBuilder.cpp", |
| "SPIRV/disassemble.cpp", |
| "SPIRV/doc.cpp", |
| ] |
| } |
| static_library("SPVRemapper") { |
| sources = [ |
| "SPIRV/SPVRemapper.cpp", |
| ] |
| } |
| executable("spirv-remap") { |
| sources = [ |
| "StandAlone/spirv-remap.cpp", |
| ] |
| deps = [ |
| ":SPIRV", |
| ":SPVRemapper", |
| ":glslang", |
| ] |
| } |
| static_library("glslang-default-resource-limits") { |
| include_dirs = [ "." ] |
| sources = [ |
| "StandAlone/ResourceLimits.cpp", |
| ] |
| } |
| executable("glslangValidator") { |
| include_dirs = [ "." ] |
| sources = [ |
| "StandAlone/StandAlone.cpp", |
| ] |
| deps = [ |
| ":SPIRV", |
| ":SPVRemapper", |
| ":glslang", |
| ":glslang-default-resource-limits", |
| ] |
| } |