tint/cmake: Always build Tint as a static library

The shared library build of Tint is currently broken with CMake, since
we set -fvisibility=hidden and do not export any of Tint's publicly
used APIs.

Change-Id: I7e4478a3a060fef3e5775dc32bae944363188ec5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90740
Commit-Queue: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7a5bd6d..b6733f5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -565,7 +565,14 @@
 ################################################################################
 
 add_subdirectory(third_party)
+
+# TODO(crbug.com/tint/455): Tint does not currently build with CMake when
+# BUILD_SHARED_LIBS=1, so always build it as static for now.
+set(BUILD_SHARED_LIBS_SAVED ${BUILD_SHARED_LIBS})
+set(BUILD_SHARED_LIBS 0)
 add_subdirectory(src/tint)
+set(BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_SAVED})
+
 add_subdirectory(generator)
 add_subdirectory(src/dawn)