Dan Sinclair | 257b25c | 2018-09-24 16:35:44 -0400 | [diff] [blame] | 1 | # Copyright (C) 2018 Google, Inc. |
| 2 | # |
| 3 | # All rights reserved. |
| 4 | # |
| 5 | # Redistribution and use in source and binary forms, with or without |
| 6 | # modification, are permitted provided that the following conditions |
| 7 | # are met: |
| 8 | # |
| 9 | # Redistributions of source code must retain the above copyright |
| 10 | # notice, this list of conditions and the following disclaimer. |
| 11 | # |
| 12 | # Redistributions in binary form must reproduce the above |
| 13 | # copyright notice, this list of conditions and the following |
| 14 | # disclaimer in the documentation and/or other materials provided |
| 15 | # with the distribution. |
| 16 | # |
| 17 | # Neither the name of Google Inc. nor the names of its |
| 18 | # contributors may be used to endorse or promote products derived |
| 19 | # from this software without specific prior written permission. |
| 20 | # |
| 21 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 22 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 23 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
| 24 | # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
| 25 | # COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
| 26 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
| 27 | # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 28 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| 29 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 30 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN |
| 31 | # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 32 | # POSSIBILITY OF SUCH DAMAGE. |
| 33 | |
| 34 | import("//build_overrides/glslang.gni") |
| 35 | |
David Turner | a3f0da5 | 2019-10-23 16:07:19 +0200 | [diff] [blame] | 36 | # Both Chromium and Fuchsia use by default a set of warning errors |
| 37 | # that is far too strict to compile this project. These are also |
| 38 | # typically appended after |cflags|, overriding target-specific |
| 39 | # definitions. To work around this, determine which configs to |
| 40 | # add and remove in order to succesfully build the project. |
| 41 | if (defined(is_fuchsia_tree) && is_fuchsia_tree) { |
| 42 | _configs_to_remove = [ "//build/config:default_warnings" ] |
| 43 | _configs_to_add = [] |
| 44 | } else { |
| 45 | _configs_to_remove = [ "//build/config/compiler:chromium_code" ] |
| 46 | _configs_to_add = [ "//build/config/compiler:no_chromium_code" ] |
| 47 | } |
| 48 | |
Ben Clayton | fbe9a23 | 2020-06-17 11:17:19 +0100 | [diff] [blame] | 49 | action("glslang_build_info") { |
| 50 | script = "build_info.py" |
| 51 | |
| 52 | src_dir = "." |
| 53 | changes_file = "CHANGES.md" |
| 54 | template_file = "build_info.h.tmpl" |
| 55 | out_file = "${target_gen_dir}/include/glslang/build_info.h" |
| 56 | |
| 57 | inputs = [ |
| 58 | changes_file, |
| 59 | script, |
| 60 | template_file, |
| 61 | ] |
Jamie Madill | bb52b5e | 2020-08-26 00:54:50 -0400 | [diff] [blame] | 62 | outputs = [ out_file ] |
Ben Clayton | fbe9a23 | 2020-06-17 11:17:19 +0100 | [diff] [blame] | 63 | args = [ |
| 64 | rebase_path(src_dir, root_build_dir), |
Jamie Madill | bb52b5e | 2020-08-26 00:54:50 -0400 | [diff] [blame] | 65 | "-i", |
| 66 | rebase_path(template_file, root_build_dir), |
| 67 | "-o", |
| 68 | rebase_path(out_file, root_build_dir), |
Ben Clayton | fbe9a23 | 2020-06-17 11:17:19 +0100 | [diff] [blame] | 69 | ] |
| 70 | } |
| 71 | |
Dan Sinclair | 257b25c | 2018-09-24 16:35:44 -0400 | [diff] [blame] | 72 | spirv_tools_dir = glslang_spirv_tools_dir |
Ryan Harrison | eab46cf | 2020-07-07 11:45:02 -0400 | [diff] [blame] | 73 | if (!defined(glslang_angle)) { |
| 74 | glslang_angle = false |
| 75 | } |
Dan Sinclair | 257b25c | 2018-09-24 16:35:44 -0400 | [diff] [blame] | 76 | |
| 77 | config("glslang_public") { |
| 78 | include_dirs = [ "." ] |
jonahryandavis | 3ce1486 | 2020-10-07 13:32:49 -0400 | [diff] [blame] | 79 | if (!is_win || is_clang) { |
| 80 | cflags = [ "-Wno-conversion" ] |
| 81 | } |
Shahbaz Youssefi | a55029d | 2020-07-05 16:48:34 -0400 | [diff] [blame] | 82 | } |
Corentin Wallez | 9757da4 | 2019-08-26 14:13:54 +0200 | [diff] [blame] | 83 | |
Shahbaz Youssefi | a55029d | 2020-07-05 16:48:34 -0400 | [diff] [blame] | 84 | config("glslang_hlsl") { |
| 85 | defines = [ "ENABLE_HLSL=1" ] |
Dan Sinclair | 257b25c | 2018-09-24 16:35:44 -0400 | [diff] [blame] | 86 | } |
| 87 | |
Shahbaz Youssefi | 8f8f1bc | 2020-07-03 12:34:06 -0400 | [diff] [blame] | 88 | template("glslang_sources_common") { |
| 89 | source_set(target_name) { |
| 90 | public_configs = [ ":glslang_public" ] |
Corentin Wallez | 6857c23 | 2018-10-03 13:15:23 -0400 | [diff] [blame] | 91 | |
Shahbaz Youssefi | a55029d | 2020-07-05 16:48:34 -0400 | [diff] [blame] | 92 | if (invoker.enable_hlsl) { |
| 93 | public_configs += [ ":glslang_hlsl" ] |
| 94 | } |
| 95 | |
Shahbaz Youssefi | 8f8f1bc | 2020-07-03 12:34:06 -0400 | [diff] [blame] | 96 | sources = [ |
| 97 | "OGLCompilersDLL/InitializeDll.cpp", |
| 98 | "OGLCompilersDLL/InitializeDll.h", |
| 99 | "SPIRV/GLSL.ext.AMD.h", |
| 100 | "SPIRV/GLSL.ext.EXT.h", |
| 101 | "SPIRV/GLSL.ext.KHR.h", |
| 102 | "SPIRV/GLSL.ext.NV.h", |
| 103 | "SPIRV/GLSL.std.450.h", |
| 104 | "SPIRV/GlslangToSpv.cpp", |
| 105 | "SPIRV/GlslangToSpv.h", |
| 106 | "SPIRV/InReadableOrder.cpp", |
| 107 | "SPIRV/Logger.cpp", |
| 108 | "SPIRV/Logger.h", |
| 109 | "SPIRV/NonSemanticDebugPrintf.h", |
| 110 | "SPIRV/SPVRemapper.cpp", |
| 111 | "SPIRV/SPVRemapper.h", |
| 112 | "SPIRV/SpvBuilder.cpp", |
| 113 | "SPIRV/SpvBuilder.h", |
| 114 | "SPIRV/SpvPostProcess.cpp", |
Shahbaz Youssefi | 8f8f1bc | 2020-07-03 12:34:06 -0400 | [diff] [blame] | 115 | "SPIRV/SpvTools.h", |
| 116 | "SPIRV/bitutils.h", |
| 117 | "SPIRV/disassemble.cpp", |
| 118 | "SPIRV/disassemble.h", |
| 119 | "SPIRV/doc.cpp", |
| 120 | "SPIRV/doc.h", |
| 121 | "SPIRV/hex_float.h", |
| 122 | "SPIRV/spirv.hpp", |
| 123 | "SPIRV/spvIR.h", |
| 124 | "glslang/GenericCodeGen/CodeGen.cpp", |
| 125 | "glslang/GenericCodeGen/Link.cpp", |
| 126 | "glslang/Include/BaseTypes.h", |
| 127 | "glslang/Include/Common.h", |
| 128 | "glslang/Include/ConstantUnion.h", |
| 129 | "glslang/Include/InfoSink.h", |
| 130 | "glslang/Include/InitializeGlobals.h", |
| 131 | "glslang/Include/PoolAlloc.h", |
| 132 | "glslang/Include/ResourceLimits.h", |
| 133 | "glslang/Include/ShHandle.h", |
| 134 | "glslang/Include/Types.h", |
| 135 | "glslang/Include/arrays.h", |
| 136 | "glslang/Include/intermediate.h", |
Shahbaz Youssefi | 8f8f1bc | 2020-07-03 12:34:06 -0400 | [diff] [blame] | 137 | "glslang/MachineIndependent/Constant.cpp", |
| 138 | "glslang/MachineIndependent/InfoSink.cpp", |
| 139 | "glslang/MachineIndependent/Initialize.cpp", |
| 140 | "glslang/MachineIndependent/Initialize.h", |
| 141 | "glslang/MachineIndependent/IntermTraverse.cpp", |
| 142 | "glslang/MachineIndependent/Intermediate.cpp", |
| 143 | "glslang/MachineIndependent/LiveTraverser.h", |
| 144 | "glslang/MachineIndependent/ParseContextBase.cpp", |
| 145 | "glslang/MachineIndependent/ParseHelper.cpp", |
| 146 | "glslang/MachineIndependent/ParseHelper.h", |
| 147 | "glslang/MachineIndependent/PoolAlloc.cpp", |
| 148 | "glslang/MachineIndependent/RemoveTree.cpp", |
| 149 | "glslang/MachineIndependent/RemoveTree.h", |
| 150 | "glslang/MachineIndependent/Scan.cpp", |
| 151 | "glslang/MachineIndependent/Scan.h", |
| 152 | "glslang/MachineIndependent/ScanContext.h", |
| 153 | "glslang/MachineIndependent/ShaderLang.cpp", |
| 154 | "glslang/MachineIndependent/SymbolTable.cpp", |
| 155 | "glslang/MachineIndependent/SymbolTable.h", |
| 156 | "glslang/MachineIndependent/Versions.cpp", |
| 157 | "glslang/MachineIndependent/Versions.h", |
| 158 | "glslang/MachineIndependent/attribute.cpp", |
| 159 | "glslang/MachineIndependent/attribute.h", |
| 160 | "glslang/MachineIndependent/gl_types.h", |
John Kessenich | 4f32f93 | 2020-07-13 03:39:08 -0600 | [diff] [blame] | 161 | "glslang/MachineIndependent/glslang_tab.cpp", |
Shahbaz Youssefi | 8f8f1bc | 2020-07-03 12:34:06 -0400 | [diff] [blame] | 162 | "glslang/MachineIndependent/glslang_tab.cpp.h", |
| 163 | "glslang/MachineIndependent/intermOut.cpp", |
| 164 | "glslang/MachineIndependent/iomapper.cpp", |
| 165 | "glslang/MachineIndependent/iomapper.h", |
| 166 | "glslang/MachineIndependent/limits.cpp", |
| 167 | "glslang/MachineIndependent/linkValidate.cpp", |
| 168 | "glslang/MachineIndependent/localintermediate.h", |
| 169 | "glslang/MachineIndependent/parseConst.cpp", |
| 170 | "glslang/MachineIndependent/parseVersions.h", |
| 171 | "glslang/MachineIndependent/preprocessor/Pp.cpp", |
| 172 | "glslang/MachineIndependent/preprocessor/PpAtom.cpp", |
| 173 | "glslang/MachineIndependent/preprocessor/PpContext.cpp", |
| 174 | "glslang/MachineIndependent/preprocessor/PpContext.h", |
| 175 | "glslang/MachineIndependent/preprocessor/PpScanner.cpp", |
| 176 | "glslang/MachineIndependent/preprocessor/PpTokens.cpp", |
| 177 | "glslang/MachineIndependent/preprocessor/PpTokens.h", |
| 178 | "glslang/MachineIndependent/propagateNoContraction.cpp", |
| 179 | "glslang/MachineIndependent/propagateNoContraction.h", |
| 180 | "glslang/MachineIndependent/reflection.cpp", |
| 181 | "glslang/MachineIndependent/reflection.h", |
| 182 | "glslang/OSDependent/osinclude.h", |
| 183 | "glslang/Public/ShaderLang.h", |
Dan Sinclair | 257b25c | 2018-09-24 16:35:44 -0400 | [diff] [blame] | 184 | ] |
Dan Sinclair | 257b25c | 2018-09-24 16:35:44 -0400 | [diff] [blame] | 185 | |
Shahbaz Youssefi | a55029d | 2020-07-05 16:48:34 -0400 | [diff] [blame] | 186 | # Workaround gn issue complaining about these not being allowed even though GLSLANG_HLSL is not |
| 187 | # defined. |
| 188 | sources += [ |
| 189 | "glslang/HLSL/hlslParseHelper.h", |
| 190 | "glslang/HLSL/hlslParseables.h", |
| 191 | "glslang/HLSL/hlslScanContext.h", |
| 192 | "glslang/HLSL/hlslTokens.h", |
| 193 | ] |
| 194 | |
| 195 | if (invoker.enable_hlsl) { |
Shahbaz Youssefi | 8f8f1bc | 2020-07-03 12:34:06 -0400 | [diff] [blame] | 196 | sources += [ |
| 197 | "glslang/HLSL/hlslAttributes.cpp", |
| 198 | "glslang/HLSL/hlslAttributes.h", |
| 199 | "glslang/HLSL/hlslGrammar.cpp", |
| 200 | "glslang/HLSL/hlslGrammar.h", |
| 201 | "glslang/HLSL/hlslOpMap.cpp", |
| 202 | "glslang/HLSL/hlslOpMap.h", |
Shahbaz Youssefi | 8f8f1bc | 2020-07-03 12:34:06 -0400 | [diff] [blame] | 203 | "glslang/HLSL/hlslParseHelper.cpp", |
Shahbaz Youssefi | a55029d | 2020-07-05 16:48:34 -0400 | [diff] [blame] | 204 | "glslang/HLSL/hlslParseables.cpp", |
Shahbaz Youssefi | 8f8f1bc | 2020-07-03 12:34:06 -0400 | [diff] [blame] | 205 | "glslang/HLSL/hlslScanContext.cpp", |
Shahbaz Youssefi | 8f8f1bc | 2020-07-03 12:34:06 -0400 | [diff] [blame] | 206 | "glslang/HLSL/hlslTokenStream.cpp", |
| 207 | "glslang/HLSL/hlslTokenStream.h", |
| 208 | ] |
| 209 | } |
Ryan Harrison | 1aeceae | 2019-10-15 11:17:53 -0400 | [diff] [blame] | 210 | |
Shahbaz Youssefi | 8f8f1bc | 2020-07-03 12:34:06 -0400 | [diff] [blame] | 211 | defines = [] |
| 212 | if (invoker.enable_opt) { |
Shahbaz Youssefi | 1ef2e25 | 2020-07-03 15:42:53 -0400 | [diff] [blame] | 213 | sources += [ "SPIRV/SpvTools.cpp" ] |
Shahbaz Youssefi | 8f8f1bc | 2020-07-03 12:34:06 -0400 | [diff] [blame] | 214 | defines += [ "ENABLE_OPT=1" ] |
| 215 | } |
Shahbaz Youssefi | 1ef2e25 | 2020-07-03 15:42:53 -0400 | [diff] [blame] | 216 | if (invoker.is_angle) { |
| 217 | defines += [ "GLSLANG_ANGLE" ] |
| 218 | } |
Shahbaz Youssefi | 8f8f1bc | 2020-07-03 12:34:06 -0400 | [diff] [blame] | 219 | |
| 220 | if (is_win) { |
| 221 | sources += [ "glslang/OSDependent/Windows/ossource.cpp" ] |
| 222 | defines += [ "GLSLANG_OSINCLUDE_WIN32" ] |
| 223 | } else { |
| 224 | sources += [ "glslang/OSDependent/Unix/ossource.cpp" ] |
| 225 | defines += [ "GLSLANG_OSINCLUDE_UNIX" ] |
| 226 | } |
| 227 | |
| 228 | if (is_clang) { |
| 229 | cflags = [ |
| 230 | "-Wno-extra-semi", |
| 231 | "-Wno-ignored-qualifiers", |
| 232 | "-Wno-implicit-fallthrough", |
| 233 | "-Wno-inconsistent-missing-override", |
Shahbaz Youssefi | 8f8f1bc | 2020-07-03 12:34:06 -0400 | [diff] [blame] | 234 | "-Wno-missing-field-initializers", |
| 235 | "-Wno-newline-eof", |
Jamie Madill | bb52b5e | 2020-08-26 00:54:50 -0400 | [diff] [blame] | 236 | "-Wno-sign-compare", |
| 237 | "-Wno-suggest-destructor-override", |
| 238 | "-Wno-suggest-override", |
| 239 | "-Wno-unused-variable", |
Shahbaz Youssefi | 8f8f1bc | 2020-07-03 12:34:06 -0400 | [diff] [blame] | 240 | ] |
| 241 | } |
| 242 | if (is_win && !is_clang) { |
| 243 | cflags = [ |
| 244 | "/wd4018", # signed/unsigned mismatch |
| 245 | "/wd4189", # local variable is initialized but not referenced |
| 246 | ] |
| 247 | } |
| 248 | |
pheonix | c897c3b | 2020-11-02 13:40:50 -0800 | [diff] [blame^] | 249 | include_dirs = [ "${target_gen_dir}/include" ] |
| 250 | |
Ben Clayton | fbe9a23 | 2020-06-17 11:17:19 +0100 | [diff] [blame] | 251 | deps = [ ":glslang_build_info" ] |
| 252 | |
Shahbaz Youssefi | 8f8f1bc | 2020-07-03 12:34:06 -0400 | [diff] [blame] | 253 | if (invoker.enable_opt) { |
Ben Clayton | fbe9a23 | 2020-06-17 11:17:19 +0100 | [diff] [blame] | 254 | deps += [ |
Shahbaz Youssefi | 8f8f1bc | 2020-07-03 12:34:06 -0400 | [diff] [blame] | 255 | "${spirv_tools_dir}:spvtools_opt", |
Shahbaz Youssefi | a55029d | 2020-07-05 16:48:34 -0400 | [diff] [blame] | 256 | "${spirv_tools_dir}:spvtools_val", |
Shahbaz Youssefi | 8f8f1bc | 2020-07-03 12:34:06 -0400 | [diff] [blame] | 257 | ] |
pheonix | c897c3b | 2020-11-02 13:40:50 -0800 | [diff] [blame^] | 258 | include_dirs += [ "${spirv_tools_dir}/include" ] |
Shahbaz Youssefi | 8f8f1bc | 2020-07-03 12:34:06 -0400 | [diff] [blame] | 259 | } |
| 260 | |
| 261 | configs -= _configs_to_remove |
| 262 | configs += _configs_to_add |
| 263 | } |
| 264 | } |
| 265 | |
Shahbaz Youssefi | a55029d | 2020-07-05 16:48:34 -0400 | [diff] [blame] | 266 | glslang_sources_common("glslang_lib_sources") { |
Shahbaz Youssefi | 8f8f1bc | 2020-07-03 12:34:06 -0400 | [diff] [blame] | 267 | enable_opt = !glslang_angle |
Shahbaz Youssefi | a55029d | 2020-07-05 16:48:34 -0400 | [diff] [blame] | 268 | enable_hlsl = !glslang_angle |
Shahbaz Youssefi | 1ef2e25 | 2020-07-03 15:42:53 -0400 | [diff] [blame] | 269 | is_angle = glslang_angle |
Shahbaz Youssefi | 8f8f1bc | 2020-07-03 12:34:06 -0400 | [diff] [blame] | 270 | } |
| 271 | |
Shahbaz Youssefi | a55029d | 2020-07-05 16:48:34 -0400 | [diff] [blame] | 272 | glslang_sources_common("glslang_sources") { |
Shahbaz Youssefi | 8f8f1bc | 2020-07-03 12:34:06 -0400 | [diff] [blame] | 273 | enable_opt = true |
Shahbaz Youssefi | a55029d | 2020-07-05 16:48:34 -0400 | [diff] [blame] | 274 | enable_hlsl = true |
Shahbaz Youssefi | 1ef2e25 | 2020-07-03 15:42:53 -0400 | [diff] [blame] | 275 | is_angle = false |
Dan Sinclair | b29c58e | 2018-09-24 18:40:38 -0400 | [diff] [blame] | 276 | } |
Jamie Madill | 0ceaebc | 2019-01-18 14:53:31 -0500 | [diff] [blame] | 277 | |
| 278 | source_set("glslang_default_resource_limits_sources") { |
| 279 | sources = [ |
| 280 | "StandAlone/ResourceLimits.cpp", |
| 281 | "StandAlone/ResourceLimits.h", |
Shahbaz Youssefi | a55029d | 2020-07-05 16:48:34 -0400 | [diff] [blame] | 282 | "glslang/Include/ResourceLimits.h", |
Jamie Madill | 0ceaebc | 2019-01-18 14:53:31 -0500 | [diff] [blame] | 283 | ] |
Jamie Madill | 0ceaebc | 2019-01-18 14:53:31 -0500 | [diff] [blame] | 284 | public_configs = [ ":glslang_public" ] |
Ryan Harrison | 1aeceae | 2019-10-15 11:17:53 -0400 | [diff] [blame] | 285 | |
David Turner | a3f0da5 | 2019-10-23 16:07:19 +0200 | [diff] [blame] | 286 | configs -= _configs_to_remove |
| 287 | configs += _configs_to_add |
Jamie Madill | 0ceaebc | 2019-01-18 14:53:31 -0500 | [diff] [blame] | 288 | } |
| 289 | |
Jamie Madill | e880e96 | 2019-03-11 15:45:31 -0400 | [diff] [blame] | 290 | executable("glslang_validator") { |
Jamie Madill | 0ceaebc | 2019-01-18 14:53:31 -0500 | [diff] [blame] | 291 | sources = [ |
| 292 | "StandAlone/DirStackFileIncluder.h", |
| 293 | "StandAlone/StandAlone.cpp", |
| 294 | ] |
| 295 | if (!is_win) { |
| 296 | cflags = [ "-Woverflow" ] |
| 297 | } |
Shahbaz Youssefi | 741fc4a | 2019-05-16 23:53:15 -0400 | [diff] [blame] | 298 | defines = [ "ENABLE_OPT=1" ] |
Jamie Madill | 0ceaebc | 2019-01-18 14:53:31 -0500 | [diff] [blame] | 299 | deps = [ |
Jamie Madill | bb52b5e | 2020-08-26 00:54:50 -0400 | [diff] [blame] | 300 | ":glslang_build_info", |
Jamie Madill | 0ceaebc | 2019-01-18 14:53:31 -0500 | [diff] [blame] | 301 | ":glslang_default_resource_limits_sources", |
Shahbaz Youssefi | a55029d | 2020-07-05 16:48:34 -0400 | [diff] [blame] | 302 | ":glslang_sources", |
Jamie Madill | 0ceaebc | 2019-01-18 14:53:31 -0500 | [diff] [blame] | 303 | ] |
Shahbaz Youssefi | a55029d | 2020-07-05 16:48:34 -0400 | [diff] [blame] | 304 | public_configs = [ ":glslang_hlsl" ] |
Ryan Harrison | 1aeceae | 2019-10-15 11:17:53 -0400 | [diff] [blame] | 305 | |
pheonix | c897c3b | 2020-11-02 13:40:50 -0800 | [diff] [blame^] | 306 | include_dirs = [ |
| 307 | "${target_gen_dir}/include", |
| 308 | "${spirv_tools_dir}/include", |
| 309 | ] |
Ben Clayton | fbe9a23 | 2020-06-17 11:17:19 +0100 | [diff] [blame] | 310 | |
David Turner | a3f0da5 | 2019-10-23 16:07:19 +0200 | [diff] [blame] | 311 | configs -= _configs_to_remove |
| 312 | configs += _configs_to_add |
Jamie Madill | 0ceaebc | 2019-01-18 14:53:31 -0500 | [diff] [blame] | 313 | } |
David 'Digit' Turner | 1f5799c | 2019-06-21 14:58:30 +0200 | [diff] [blame] | 314 | |
| 315 | executable("spirv-remap") { |
Shahbaz Youssefi | a55029d | 2020-07-05 16:48:34 -0400 | [diff] [blame] | 316 | sources = [ "StandAlone/spirv-remap.cpp" ] |
David 'Digit' Turner | 1f5799c | 2019-06-21 14:58:30 +0200 | [diff] [blame] | 317 | defines = [ "ENABLE_OPT=1" ] |
Shahbaz Youssefi | a55029d | 2020-07-05 16:48:34 -0400 | [diff] [blame] | 318 | deps = [ ":glslang_sources" ] |
Ryan Harrison | 1aeceae | 2019-10-15 11:17:53 -0400 | [diff] [blame] | 319 | |
pheonix | c897c3b | 2020-11-02 13:40:50 -0800 | [diff] [blame^] | 320 | include_dirs += [ "${spirv_tools_dir}/include" ] |
| 321 | |
David Turner | a3f0da5 | 2019-10-23 16:07:19 +0200 | [diff] [blame] | 322 | configs -= _configs_to_remove |
| 323 | configs += _configs_to_add |
David 'Digit' Turner | 1f5799c | 2019-06-21 14:58:30 +0200 | [diff] [blame] | 324 | } |