Fix the build with only the OpenGL and Null backends enabled
BUG=chromium:914375 Change-Id: I07dbdbdb7518ac6b9800483f570fe97c16f08ee1 Reviewed-on: https://dawn-review.googlesource.com/c/3243 Reviewed-by: Stephen White <senorblanco@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
ff9562f792
commit
fd3717fa7c
|
@ -76,7 +76,7 @@ static_library("dawn_spirv_cross_fuzzer_common") {
|
||||||
"DawnSPIRVCrossFuzzer.h",
|
"DawnSPIRVCrossFuzzer.h",
|
||||||
]
|
]
|
||||||
public_deps = [
|
public_deps = [
|
||||||
"${dawn_top_level}/third_party:spirv_cross",
|
"${dawn_top_level}/third_party:spirv_cross_full_for_fuzzers",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,10 +16,6 @@ import("../scripts/dawn_overrides_with_defaults.gni")
|
||||||
import("../scripts/dawn_features.gni")
|
import("../scripts/dawn_features.gni")
|
||||||
import("//build_overrides/build.gni")
|
import("//build_overrides/build.gni")
|
||||||
|
|
||||||
if (build_with_chromium) {
|
|
||||||
import("//testing/libfuzzer/fuzzer_test.gni")
|
|
||||||
}
|
|
||||||
|
|
||||||
is_msvc = is_win && !is_clang
|
is_msvc = is_win && !is_clang
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
@ -49,9 +45,7 @@ config("spirv_cross_public") {
|
||||||
defines = [ "SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS" ]
|
defines = [ "SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
static_library("spirv_cross") {
|
config("spirv_cross_internal") {
|
||||||
public_configs = [ ":spirv_cross_public" ]
|
|
||||||
|
|
||||||
if (!is_msvc) {
|
if (!is_msvc) {
|
||||||
cflags_cc = [
|
cflags_cc = [
|
||||||
"-Wno-implicit-fallthrough",
|
"-Wno-implicit-fallthrough",
|
||||||
|
@ -62,6 +56,11 @@ static_library("spirv_cross") {
|
||||||
# Disable "not all control paths return a value" warning.
|
# Disable "not all control paths return a value" warning.
|
||||||
cflags_cc = [ "/wd4715" ]
|
cflags_cc = [ "/wd4715" ]
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static_library("spirv_cross") {
|
||||||
|
public_configs = [ ":spirv_cross_public" ]
|
||||||
|
configs += [ ":spirv_cross_internal" ]
|
||||||
|
|
||||||
sources = [
|
sources = [
|
||||||
"${spirv_cross_dir}/GLSL.std.450.h",
|
"${spirv_cross_dir}/GLSL.std.450.h",
|
||||||
|
@ -75,12 +74,7 @@ static_library("spirv_cross") {
|
||||||
|
|
||||||
need_glsl_cross = dawn_enable_opengl
|
need_glsl_cross = dawn_enable_opengl
|
||||||
|
|
||||||
is_fuzzing = false
|
if (dawn_enable_d3d12) {
|
||||||
if (build_with_chromium) {
|
|
||||||
is_fuzzing = use_fuzzing_engine
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dawn_enable_d3d12 || is_fuzzing) {
|
|
||||||
sources += [
|
sources += [
|
||||||
"${spirv_cross_dir}/spirv_hlsl.cpp",
|
"${spirv_cross_dir}/spirv_hlsl.cpp",
|
||||||
"${spirv_cross_dir}/spirv_hlsl.hpp",
|
"${spirv_cross_dir}/spirv_hlsl.hpp",
|
||||||
|
@ -88,7 +82,7 @@ static_library("spirv_cross") {
|
||||||
need_glsl_cross = true
|
need_glsl_cross = true
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dawn_enable_metal || is_fuzzing) {
|
if (dawn_enable_metal) {
|
||||||
sources += [
|
sources += [
|
||||||
"${spirv_cross_dir}/spirv_msl.cpp",
|
"${spirv_cross_dir}/spirv_msl.cpp",
|
||||||
"${spirv_cross_dir}/spirv_msl.hpp",
|
"${spirv_cross_dir}/spirv_msl.hpp",
|
||||||
|
@ -96,7 +90,7 @@ static_library("spirv_cross") {
|
||||||
need_glsl_cross = true
|
need_glsl_cross = true
|
||||||
}
|
}
|
||||||
|
|
||||||
if (need_glsl_cross || is_fuzzing) {
|
if (need_glsl_cross) {
|
||||||
sources += [
|
sources += [
|
||||||
"${spirv_cross_dir}/spirv_glsl.cpp",
|
"${spirv_cross_dir}/spirv_glsl.cpp",
|
||||||
"${spirv_cross_dir}/spirv_glsl.hpp",
|
"${spirv_cross_dir}/spirv_glsl.hpp",
|
||||||
|
@ -104,6 +98,27 @@ static_library("spirv_cross") {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static_library("spirv_cross_full_for_fuzzers") {
|
||||||
|
public_configs = [ ":spirv_cross_public" ]
|
||||||
|
configs += [ ":spirv_cross_internal" ]
|
||||||
|
|
||||||
|
sources = [
|
||||||
|
"${spirv_cross_dir}/GLSL.std.450.h",
|
||||||
|
"${spirv_cross_dir}/spirv.hpp",
|
||||||
|
"${spirv_cross_dir}/spirv_cfg.cpp",
|
||||||
|
"${spirv_cross_dir}/spirv_cfg.hpp",
|
||||||
|
"${spirv_cross_dir}/spirv_common.hpp",
|
||||||
|
"${spirv_cross_dir}/spirv_cross.cpp",
|
||||||
|
"${spirv_cross_dir}/spirv_cross.hpp",
|
||||||
|
"${spirv_cross_dir}/spirv_glsl.cpp",
|
||||||
|
"${spirv_cross_dir}/spirv_glsl.hpp",
|
||||||
|
"${spirv_cross_dir}/spirv_hlsl.cpp",
|
||||||
|
"${spirv_cross_dir}/spirv_hlsl.hpp",
|
||||||
|
"${spirv_cross_dir}/spirv_msl.cpp",
|
||||||
|
"${spirv_cross_dir}/spirv_msl.hpp",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
# An empty Vulkan target to add the include dirs and list the sources
|
# An empty Vulkan target to add the include dirs and list the sources
|
||||||
# for the header inclusion check.
|
# for the header inclusion check.
|
||||||
config("vulkan_headers_public") {
|
config("vulkan_headers_public") {
|
||||||
|
|
Loading…
Reference in New Issue