Only build "common" on supported systems

src/common/BUILD.gn contains common dawn configs and will be discovered
by all Chromium builds. "common" doesn't build on all system, for
example Fuchsia so we only expose the target if we are on a supported
system.

BUG=dawn:61

Change-Id: Ib12b1bd3e32529e1969fdc2fc50af05f8e97e7df
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/5360
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Corentin Wallez 2019-03-07 13:39:50 +00:00 committed by Commit Bot service account
parent 579cf621f3
commit aa9d6ad09d
1 changed files with 31 additions and 26 deletions

View File

@ -71,30 +71,35 @@ config("dawn_internal") {
# Common dawn library # Common dawn library
############################################################################### ###############################################################################
static_library("common") { # This GN file is discovered by all Chromium builds, but common doesn't support
sources = [ # all of Chromium's OSes so we explicitly make the target visible only on
"Assert.cpp", # systems we know Dawn is able to compile on.
"Assert.h", if (is_win || is_linux || is_mac) {
"BitSetIterator.h", static_library("common") {
"Compiler.h", sources = [
"DynamicLib.cpp", "Assert.cpp",
"DynamicLib.h", "Assert.h",
"HashUtils.h", "BitSetIterator.h",
"Math.cpp", "Compiler.h",
"Math.h", "DynamicLib.cpp",
"Platform.h", "DynamicLib.h",
"Result.h", "HashUtils.h",
"Serial.h", "Math.cpp",
"SerialMap.h", "Math.h",
"SerialQueue.h", "Platform.h",
"SerialStorage.h", "Result.h",
"SwapChainUtils.h", "Serial.h",
"vulkan_platform.h", "SerialMap.h",
"windows_with_undefs.h", "SerialQueue.h",
] "SerialStorage.h",
"SwapChainUtils.h",
configs += [ ":dawn_internal" ] "vulkan_platform.h",
deps = [ "windows_with_undefs.h",
"${dawn_root}/src/dawn:dawn_headers", ]
]
configs += [ ":dawn_internal" ]
deps = [
"${dawn_root}/src/dawn:dawn_headers",
]
}
} }