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>
This commit is contained in:
James Price 2022-05-22 00:41:53 +00:00 committed by Dawn LUCI CQ
parent 5f61c95432
commit 8d9adb0219
1 changed files with 7 additions and 0 deletions

View File

@ -565,7 +565,14 @@ endfunction()
################################################################################
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)