Wrap all uses of SPIRV-Cross in #define.

Put all cross-platform code references to Spirv-Cross behind
ifdef DAWN_USE_SPIRV_CROSS. Hide build dependencies behind
dawn_use_spirv_cross, which itself is set from dawn_enable_opengl,
since it is the only backend which is still using SPIRV-Cross.

Bug: dawn:1036

Change-Id: Id61512230b50a32c63827a16fece40d7899968d8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/61400
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
Stephen White
2021-08-10 18:30:55 +00:00
committed by Dawn LUCI CQ
parent ec9b81142f
commit 5d17ed6541
7 changed files with 36 additions and 58 deletions

View File

@@ -85,6 +85,10 @@ config("dawn_internal") {
defines += [ "DAWN_USE_X11" ]
}
if (dawn_use_spirv_cross) {
defines += [ "DAWN_USE_SPIRV_CROSS" ]
}
if (dawn_enable_error_injection) {
defines += [ "DAWN_ENABLE_ERROR_INJECTION" ]
}