Use upstream SPIRV-Cross GN files.
Previously spirv-cross didn't have its own sources files but this changed recently so we should use them. This will ultimately allow sharing targets between multiple components in Chromium. Bug: chromium:1179277 Change-Id: Ib4bb1884b9ba9c4c3804e96d8adbb8905c60c9a3 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/41725 Auto-Submit: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Peng Huang <penghuang@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
76d0e38bd7
commit
9fdbb74072
|
@ -143,7 +143,7 @@ source_set("dawn_native_sources") {
|
||||||
":dawn_native_headers",
|
":dawn_native_headers",
|
||||||
":dawn_native_utils_gen",
|
":dawn_native_utils_gen",
|
||||||
"${dawn_root}/src/common",
|
"${dawn_root}/src/common",
|
||||||
"${dawn_root}/third_party/gn/spirv_cross:spirv_cross",
|
"${dawn_spirv_cross_dir}/gn:spirv_cross_sources",
|
||||||
"${dawn_spirv_tools_dir}:spvtools_opt",
|
"${dawn_spirv_tools_dir}:spvtools_opt",
|
||||||
"${dawn_spirv_tools_dir}:spvtools_val",
|
"${dawn_spirv_tools_dir}:spvtools_val",
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,70 +0,0 @@
|
||||||
# Copyright 2020 The Dawn Authors
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
import("../../../scripts/dawn_overrides_with_defaults.gni")
|
|
||||||
|
|
||||||
import("//build_overrides/build.gni")
|
|
||||||
|
|
||||||
# SPIRV_Cross does not have BUILD.gn rules, so implement our own.
|
|
||||||
is_msvc = is_win && !is_clang
|
|
||||||
|
|
||||||
config("spirv_cross_public") {
|
|
||||||
include_dirs = [
|
|
||||||
"${dawn_spirv_cross_dir}",
|
|
||||||
"${dawn_spirv_cross_dir}/..",
|
|
||||||
]
|
|
||||||
defines = [ "SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
config("spirv_cross_internal") {
|
|
||||||
if (!is_msvc) {
|
|
||||||
cflags_cc = [
|
|
||||||
"-Wno-implicit-fallthrough",
|
|
||||||
"-Wno-return-type",
|
|
||||||
"-Wno-sign-compare",
|
|
||||||
]
|
|
||||||
} else {
|
|
||||||
# Disable "not all control paths return a value" warning.
|
|
||||||
cflags_cc = [ "/wd4715" ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
source_set("spirv_cross") {
|
|
||||||
public_configs = [ ":spirv_cross_public" ]
|
|
||||||
configs += [ ":spirv_cross_internal" ]
|
|
||||||
|
|
||||||
sources = [
|
|
||||||
"${dawn_spirv_cross_dir}/GLSL.std.450.h",
|
|
||||||
"${dawn_spirv_cross_dir}/spirv.hpp",
|
|
||||||
"${dawn_spirv_cross_dir}/spirv_cfg.cpp",
|
|
||||||
"${dawn_spirv_cross_dir}/spirv_cfg.hpp",
|
|
||||||
"${dawn_spirv_cross_dir}/spirv_common.hpp",
|
|
||||||
"${dawn_spirv_cross_dir}/spirv_cross.cpp",
|
|
||||||
"${dawn_spirv_cross_dir}/spirv_cross.hpp",
|
|
||||||
"${dawn_spirv_cross_dir}/spirv_cross_containers.hpp",
|
|
||||||
"${dawn_spirv_cross_dir}/spirv_cross_error_handling.hpp",
|
|
||||||
"${dawn_spirv_cross_dir}/spirv_cross_parsed_ir.cpp",
|
|
||||||
"${dawn_spirv_cross_dir}/spirv_cross_parsed_ir.hpp",
|
|
||||||
"${dawn_spirv_cross_dir}/spirv_glsl.cpp",
|
|
||||||
"${dawn_spirv_cross_dir}/spirv_glsl.hpp",
|
|
||||||
"${dawn_spirv_cross_dir}/spirv_hlsl.cpp",
|
|
||||||
"${dawn_spirv_cross_dir}/spirv_hlsl.hpp",
|
|
||||||
"${dawn_spirv_cross_dir}/spirv_msl.cpp",
|
|
||||||
"${dawn_spirv_cross_dir}/spirv_msl.hpp",
|
|
||||||
"${dawn_spirv_cross_dir}/spirv_parser.cpp",
|
|
||||||
"${dawn_spirv_cross_dir}/spirv_parser.hpp",
|
|
||||||
"${dawn_spirv_cross_dir}/spirv_reflect.cpp",
|
|
||||||
"${dawn_spirv_cross_dir}/spirv_reflect.hpp",
|
|
||||||
]
|
|
||||||
}
|
|
Loading…
Reference in New Issue