[tint] Add DEPS & build support for jsoncpp, langsvr
These are the two dependencies of tintd - the WGSL language server.
Bug: tint:2127
Change-Id: I2f2631d799f8ce8472ec9822ea45b6e4571a7a08
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/174880
Kokoro: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
diff --git a/.gitmodules b/.gitmodules
index b4ef47f..fb93a00 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -122,6 +122,14 @@
path = tools/protoc_wrapper
url = https://chromium.googlesource.com/chromium/src/tools/protoc_wrapper
gclient-condition = dawn_standalone
+[submodule "third_party/jsoncpp"]
+ path = third_party/jsoncpp
+ url = https://github.com/open-source-parsers/jsoncpp
+ gclient-condition = dawn_standalone
+[submodule "third_party/langsvr"]
+ path = third_party/langsvr
+ url = https://github.com/google/langsvr
+ gclient-condition = dawn_standalone
[submodule "third_party/partition_alloc"]
path = third_party/partition_alloc
url = https://chromium.googlesource.com/chromium/src/base/allocator/partition_allocator
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1a3980d..c9e7c06 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -240,6 +240,9 @@
option_if_not_defined(TINT_BUILD_TESTS "Build tests" ON)
option_if_not_defined(TINT_BUILD_AS_OTHER_OS "Override OS detection to force building of *_other.cc files" OFF)
+option_if_not_defined(TINT_BUILD_TINTD "Build the WGSL language server" OFF)
+option_if_not_defined(TINT_INSTALL_TINTD "Install the WGSL language server" OFF)
+
set_if_not_defined(TINT_EXTERNAL_BENCHMARK_CORPUS_DIR "" "Directory that holds a corpus of external shaders to benchmark.")
option_if_not_defined(TINT_ENABLE_BREAK_IN_DEBUGGER "Enable tint::debugger::Break()" OFF)
diff --git a/DEPS b/DEPS
index c2f731c..98d58ce 100644
--- a/DEPS
+++ b/DEPS
@@ -291,6 +291,17 @@
'condition': 'dawn_standalone',
},
+ # Dependencies for tintd.
+ 'third_party/jsoncpp': {
+ 'url': '{github_git}/open-source-parsers/jsoncpp.git@69098a18b9af0c47549d9a271c054d13ca92b006',
+ 'condition': 'dawn_standalone',
+ },
+
+ 'third_party/langsvr': {
+ 'url': '{github_git}/google/langsvr.git@8999ea9fc9bbf2e09b7233d0cede2a629ff33e98',
+ 'condition': 'dawn_standalone',
+ },
+
# Dependencies for PartitionAlloc.
# Doc: https://docs.google.com/document/d/1wz45t0alQthsIU9P7_rQcfQyqnrBMXzrOjSzdQo-V-A
'third_party/partition_alloc': {
diff --git a/scripts/tint_overrides_with_defaults.gni b/scripts/tint_overrides_with_defaults.gni
index de64173..ec98511 100644
--- a/scripts/tint_overrides_with_defaults.gni
+++ b/scripts/tint_overrides_with_defaults.gni
@@ -124,6 +124,11 @@
tint_build_ir_binary = tint_has_protobuf
}
+ # Build the tintd language server
+ if (!defined(tint_build_tintd)) {
+ tint_build_tintd = false
+ }
+
# Build unittests
if (!defined(tint_build_unittests)) {
tint_build_unittests = true
diff --git a/src/tint/BUILD.bazel b/src/tint/BUILD.bazel
index b3151e0..a7d7852 100644
--- a/src/tint/BUILD.bazel
+++ b/src/tint/BUILD.bazel
@@ -30,13 +30,14 @@
load(":flags.bzl", "declare_bool_flag", "declare_os_flag")
# Declares the 'tint_build_*' flags that control what parts of Tint get built
-declare_bool_flag(name = "tint_build_glsl_writer", default = False)
declare_bool_flag(name = "tint_build_glsl_validator", default = False)
+declare_bool_flag(name = "tint_build_glsl_writer", default = False)
declare_bool_flag(name = "tint_build_hlsl_writer", default = True)
declare_bool_flag(name = "tint_build_ir", default = True)
declare_bool_flag(name = "tint_build_msl_writer", default = True)
declare_bool_flag(name = "tint_build_spv_reader", default = True)
declare_bool_flag(name = "tint_build_spv_writer", default = True)
+declare_bool_flag(name = "tint_build_tintd", default = False)
declare_bool_flag(name = "tint_build_wgsl_reader", default = True)
declare_bool_flag(name = "tint_build_wgsl_writer", default = True)
diff --git a/src/tint/BUILD.gn b/src/tint/BUILD.gn
index 294d33c..d39bd62 100644
--- a/src/tint/BUILD.gn
+++ b/src/tint/BUILD.gn
@@ -284,6 +284,9 @@
"${tint_src_dir}/cmd/tint",
]
}
+ if (tint_build_tintd) {
+ deps += [ "${tint_src_dir}/cmd/tintd" ]
+ }
}
group("fuzzers") {
diff --git a/src/tint/CMakeLists.txt b/src/tint/CMakeLists.txt
index eb95b38..f52eae2 100644
--- a/src/tint/CMakeLists.txt
+++ b/src/tint/CMakeLists.txt
@@ -66,6 +66,7 @@
target_compile_definitions(${TARGET} PUBLIC -DTINT_BUILD_SYNTAX_TREE_WRITER=$<BOOL:${TINT_BUILD_SYNTAX_TREE_WRITER}>)
target_compile_definitions(${TARGET} PUBLIC -DTINT_BUILD_WGSL_READER=$<BOOL:${TINT_BUILD_WGSL_READER}>)
target_compile_definitions(${TARGET} PUBLIC -DTINT_BUILD_WGSL_WRITER=$<BOOL:${TINT_BUILD_WGSL_WRITER}>)
+ target_compile_definitions(${TARGET} PUBLIC -DTINT_BUILD_TINTD=$<BOOL:${TINT_BUILD_TINTD}>)
if(TINT_BUILD_FUZZERS)
target_compile_options(${TARGET} PRIVATE "-fsanitize=fuzzer")
@@ -500,6 +501,10 @@
target_link_libraries(${TARGET} PRIVATE
absl_strings
)
+ elseif(${DEPENDENCY} STREQUAL "jsoncpp")
+ target_link_libraries(${TARGET} PRIVATE jsoncpp_static)
+ elseif(${DEPENDENCY} STREQUAL "langsvr")
+ target_link_libraries(${TARGET} PRIVATE langsvr)
elseif(${DEPENDENCY} STREQUAL "glslang")
target_link_libraries(${TARGET} PRIVATE glslang)
if(NOT MSVC)
@@ -654,12 +659,28 @@
################################################################################
+# tintd (VSCode WGSL language server)
+################################################################################
+if(TINT_INSTALL_TINTD)
+ set(VSCODE_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmd/tintd/vscode")
+ set(VSCODE_DST_DIR "${DAWN_BUILD_GEN_DIR}/vscode")
+
+ file(GLOB VSCODE_ASSETS RELATIVE "${VSCODE_SRC_DIR}" "${VSCODE_SRC_DIR}/*")
+ foreach(FILE ${VSCODE_ASSETS})
+ configure_file("${VSCODE_SRC_DIR}/${FILE}" "${VSCODE_DST_DIR}/${FILE}" COPYONLY)
+ endforeach()
+ set_target_properties(tint_cmd_tintd_cmd PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${VSCODE_DST_DIR}")
+endif(TINT_INSTALL_TINTD)
+
+
+################################################################################
# Bespoke target settings
################################################################################
-if (MSVC)
+if(MSVC)
target_sources(tint_api PRIVATE tint.natvis)
endif()
+
################################################################################
# Additional fuzzer tests
################################################################################
diff --git a/src/tint/cmd/BUILD.cmake b/src/tint/cmd/BUILD.cmake
index cdee1d2..a7b4bcc 100644
--- a/src/tint/cmd/BUILD.cmake
+++ b/src/tint/cmd/BUILD.cmake
@@ -42,3 +42,4 @@
include(cmd/remote_compile/BUILD.cmake)
include(cmd/test/BUILD.cmake)
include(cmd/tint/BUILD.cmake)
+include(cmd/tintd/BUILD.cmake)
diff --git a/src/tint/cmd/tintd/BUILD.bazel b/src/tint/cmd/tintd/BUILD.bazel
new file mode 100644
index 0000000..0416234
--- /dev/null
+++ b/src/tint/cmd/tintd/BUILD.bazel
@@ -0,0 +1,67 @@
+# Copyright 2024 The Dawn & Tint Authors
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice, this
+# list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# 3. Neither the name of the copyright holder nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+################################################################################
+# File generated by 'tools/src/cmd/gen' using the template:
+# tools/src/cmd/gen/build/BUILD.bazel.tmpl
+#
+# To regenerate run: './tools/run gen'
+#
+# Do not modify this file directly
+################################################################################
+
+load("//src/tint:flags.bzl", "COPTS")
+load("@bazel_skylib//lib:selects.bzl", "selects")
+cc_binary(
+ name = "cmd",
+ srcs = [
+ "main.cc",
+ ],
+ deps = [
+ ],
+ copts = COPTS,
+ visibility = ["//visibility:public"],
+)
+
+alias(
+ name = "tint_build_tintd",
+ actual = "//src/tint:tint_build_tintd_true",
+)
+
+alias(
+ name = "tint_build_wgsl_reader",
+ actual = "//src/tint:tint_build_wgsl_reader_true",
+)
+
+selects.config_setting_group(
+ name = "tint_build_tintd_and_tint_build_wgsl_reader",
+ match_all = [
+ ":tint_build_tintd",
+ ":tint_build_wgsl_reader",
+ ],
+)
+
diff --git a/src/tint/cmd/tintd/BUILD.cfg b/src/tint/cmd/tintd/BUILD.cfg
new file mode 100644
index 0000000..b103301
--- /dev/null
+++ b/src/tint/cmd/tintd/BUILD.cfg
@@ -0,0 +1,4 @@
+{
+ "cmd": { "OutputName": "tintd" },
+ "condition": "tint_build_tintd && tint_build_wgsl_reader"
+}
diff --git a/src/tint/cmd/tintd/BUILD.cmake b/src/tint/cmd/tintd/BUILD.cmake
new file mode 100644
index 0000000..3b02917
--- /dev/null
+++ b/src/tint/cmd/tintd/BUILD.cmake
@@ -0,0 +1,49 @@
+# Copyright 2024 The Dawn & Tint Authors
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice, this
+# list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# 3. Neither the name of the copyright holder nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+################################################################################
+# File generated by 'tools/src/cmd/gen' using the template:
+# tools/src/cmd/gen/build/BUILD.cmake.tmpl
+#
+# To regenerate run: './tools/run gen'
+#
+# Do not modify this file directly
+################################################################################
+
+if(TINT_BUILD_TINTD AND TINT_BUILD_WGSL_READER)
+################################################################################
+# Target: tint_cmd_tintd_cmd
+# Kind: cmd
+# Condition: TINT_BUILD_TINTD AND TINT_BUILD_WGSL_READER
+################################################################################
+tint_add_target(tint_cmd_tintd_cmd cmd
+ cmd/tintd/main.cc
+)
+
+tint_target_set_output_name(tint_cmd_tintd_cmd cmd "tintd")
+
+endif(TINT_BUILD_TINTD AND TINT_BUILD_WGSL_READER)
\ No newline at end of file
diff --git a/src/tint/cmd/tintd/BUILD.gn b/src/tint/cmd/tintd/BUILD.gn
new file mode 100644
index 0000000..f656d63
--- /dev/null
+++ b/src/tint/cmd/tintd/BUILD.gn
@@ -0,0 +1,46 @@
+# Copyright 2024 The Dawn & Tint Authors
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice, this
+# list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# 3. Neither the name of the copyright holder nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+################################################################################
+# File generated by 'tools/src/cmd/gen' using the template:
+# tools/src/cmd/gen/build/BUILD.gn.tmpl
+#
+# To regenerate run: './tools/run gen'
+#
+# Do not modify this file directly
+################################################################################
+
+import("../../../../scripts/tint_overrides_with_defaults.gni")
+
+import("${tint_src_dir}/tint.gni")
+if (tint_build_tintd && tint_build_wgsl_reader) {
+ tint_executable("tintd") {
+ output_name = "tintd"
+ sources = [ "main.cc" ]
+ deps = []
+ }
+}
diff --git a/src/tint/cmd/tintd/main.cc b/src/tint/cmd/tintd/main.cc
new file mode 100644
index 0000000..b8e03bf
--- /dev/null
+++ b/src/tint/cmd/tintd/main.cc
@@ -0,0 +1,31 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+// list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+int main() {
+ // TODO(crbug.com/tint/2127): Stub.
+ return 0;
+}
diff --git a/src/tint/externals.json b/src/tint/externals.json
index dd5d1df..dbdf96d 100644
--- a/src/tint/externals.json
+++ b/src/tint/externals.json
@@ -13,57 +13,69 @@
"benchmark/benchmark.h"
]
},
+ "jsoncpp": {
+ "IncludePatterns": [
+ "json/**"
+ ],
+ "Condition": "tint_build_tintd"
+ },
+ "langsvr": {
+ "IncludePatterns": [
+ "langsvr/**"
+ ],
+ "Condition": "tint_build_tintd"
+ },
"metal": {
"IncludePatterns": [
"Metal/Metal.h"
],
- "Condition": "tint_build_is_mac",
+ "Condition": "tint_build_is_mac"
},
"thread": {
"IncludePatterns": [
"thread"
- ],
+ ]
},
"spirv-tools": {
"IncludePatterns": [
"spirv-tools/**"
],
- "Condition": "tint_build_spv_reader || tint_build_spv_writer",
+ "Condition": "tint_build_spv_reader || tint_build_spv_writer"
},
"spirv-headers": {
"IncludePatterns": [
"spirv/**"
],
- "Condition": "tint_build_spv_reader || tint_build_spv_writer",
+ "Condition": "tint_build_spv_reader || tint_build_spv_writer"
},
"spirv-opt-internal": {
"IncludePatterns": [
"source/opt/**"
],
- "Condition": "tint_build_spv_reader || tint_build_spv_writer",
+ "Condition": "tint_build_spv_reader || tint_build_spv_writer"
},
"glslang": {
"IncludePatterns": [
"glslang/Public/ShaderLang.h"
],
- "Condition": "tint_build_glsl_validator",
+ "Condition": "tint_build_glsl_validator"
},
"glslang-res-limits": {
"IncludePatterns": [
"glslang/Public/ResourceLimits.h"
],
- "Condition": "tint_build_glsl_validator",
+ "Condition": "tint_build_glsl_validator"
},
"gtest": {
"IncludePatterns": [
"gtest/**",
- "gmock/**",
- ],
+ "gmock/**"
+ ]
},
"winsock": {
"IncludePatterns": [
"winsock2.h"
],
- "Condition": "tint_build_is_win",
- },
+ "Condition": "tint_build_is_win"
+ }
}
diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt
index e042516..c7592e3 100644
--- a/third_party/CMakeLists.txt
+++ b/third_party/CMakeLists.txt
@@ -260,3 +260,9 @@
if (DAWN_USE_BUILT_DXC)
AddSubdirectoryDXC()
endif()
+
+if (TINT_BUILD_TINTD)
+ set(LANGSVR_JSON_LIB_DIR "${CMAKE_CURRENT_SOURCE_DIR}/jsoncpp")
+ add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/jsoncpp" EXCLUDE_FROM_ALL)
+ add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/langsvr" EXCLUDE_FROM_ALL)
+endif()
diff --git a/third_party/jsoncpp b/third_party/jsoncpp
new file mode 160000
index 0000000..69098a1
--- /dev/null
+++ b/third_party/jsoncpp
@@ -0,0 +1 @@
+Subproject commit 69098a18b9af0c47549d9a271c054d13ca92b006
diff --git a/third_party/langsvr b/third_party/langsvr
new file mode 160000
index 0000000..8999ea9
--- /dev/null
+++ b/third_party/langsvr
@@ -0,0 +1 @@
+Subproject commit 8999ea9fc9bbf2e09b7233d0cede2a629ff33e98
diff --git a/tools/src/cmd/gen/build/BUILD.bazel.tmpl b/tools/src/cmd/gen/build/BUILD.bazel.tmpl
index 1ad11c4..b2537e5 100644
--- a/tools/src/cmd/gen/build/BUILD.bazel.tmpl
+++ b/tools/src/cmd/gen/build/BUILD.bazel.tmpl
@@ -146,6 +146,8 @@
{{- else if eq $.Name "gmock" -}}"@gtest",
{{- else if eq $.Name "google-benchmark" -}}"@benchmark",
{{- else if eq $.Name "gtest" -}}"@gtest",
+{{- else if eq $.Name "jsoncpp" -}}{{/* unsupported */}}
+{{- else if eq $.Name "langsvr" -}}{{/* unsupported */}}
{{- else if eq $.Name "metal" -}}{{/* unsupported */}}
{{- else if eq $.Name "spirv-headers" -}}"@spirv_headers//:spirv_cpp11_headers", "@spirv_headers//:spirv_c_headers",
{{- else if eq $.Name "spirv-opt-internal" -}}"@spirv_tools//:spirv_tools_opt",
diff --git a/tools/src/cmd/gen/build/BUILD.gn.tmpl b/tools/src/cmd/gen/build/BUILD.gn.tmpl
index 6e156f2..1b299eb 100644
--- a/tools/src/cmd/gen/build/BUILD.gn.tmpl
+++ b/tools/src/cmd/gen/build/BUILD.gn.tmpl
@@ -169,6 +169,8 @@
{{- else if eq $.Name "glslang" -}}"${tint_glslang_dir}:glslang_lib_sources",
{{- else if eq $.Name "google-benchmark" -}}"${tint_src_dir}:google_benchmark",
{{- else if eq $.Name "gtest" -}}"${tint_src_dir}:gmock_and_gtest",
+{{- else if eq $.Name "jsoncpp" -}}"${tint_src_dir}:jsoncpp",
+{{- else if eq $.Name "langsvr" -}}"${tint_src_dir}:langsvr",
{{- else if eq $.Name "metal" -}}"${tint_src_dir}:metal",
{{- else if eq $.Name "spirv-headers" -}}"${tint_spirv_headers_dir}:spv_headers",
{{- else if eq $.Name "spirv-opt-internal" -}}"${tint_spirv_tools_dir}:spvtools", "${tint_spirv_tools_dir}:spvtools_opt", "${tint_spirv_tools_dir}:spvtools_val",