Fix conflicts between ANGLE & Dawn's spirv-cross build config

Recently, BUILD.gn has been added to spirv-cross repo:
https://github.com/KhronosGroup/SPIRV-Cross/blob/master/gn/BUILD.gn

However, it is incomplete, currently only inlcudes small config needed
by ANGLE's metal backend.

When building ANGLE and Dawn together with chromium, errors were thrown:
ERROR at //third_party/spirv-cross/spirv-cross/spirv_common.hpp:21:11: Include not allowed.
#include "spirv_cross_containers.hpp"
          ^-------------------------
It is not in any dependency of
  //third_party/dawn/third_party:spirv_cross
The include file is in the target(s):
  //third_party/spirv-cross/spirv-cross/gn:spirv_cross_sources
which should somehow be reachable.
___________________
ERROR at //third_party/spirv-cross/spirv-cross/spirv_common.hpp:22:11: Include not allowed.
#include "spirv_cross_error_handling.hpp"
          ^-----------------------------
It is not in any dependency of
  //third_party/dawn/third_party:spirv_cross

Bug: angleproject:2634
Change-Id: Idb328643db0b765ab228ee7d59d7996b6e6073e4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13020
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Le Quyen 2019-11-05 09:36:15 +00:00 committed by Commit Bot service account
parent 6df81ebf1d
commit dbf9f7c39c
2 changed files with 5 additions and 1 deletions

2
DEPS
View File

@ -50,7 +50,7 @@ deps = {
# SPIRV-Cross # SPIRV-Cross
'third_party/spirv-cross': { 'third_party/spirv-cross': {
'url': '{chromium_git}/external/github.com/KhronosGroup/SPIRV-Cross@00189b19a5da553c668290a051604209586b2139', 'url': '{chromium_git}/external/github.com/KhronosGroup/SPIRV-Cross@d253f41e17e27285756d031d8ba43bf370264e1f',
'condition': 'dawn_standalone', 'condition': 'dawn_standalone',
}, },

View File

@ -58,6 +58,8 @@ static_library("spirv_cross") {
"${spirv_cross_dir}/spirv_common.hpp", "${spirv_cross_dir}/spirv_common.hpp",
"${spirv_cross_dir}/spirv_cross.cpp", "${spirv_cross_dir}/spirv_cross.cpp",
"${spirv_cross_dir}/spirv_cross.hpp", "${spirv_cross_dir}/spirv_cross.hpp",
"${spirv_cross_dir}/spirv_cross_containers.hpp",
"${spirv_cross_dir}/spirv_cross_error_handling.hpp",
"${spirv_cross_dir}/spirv_cross_parsed_ir.cpp", "${spirv_cross_dir}/spirv_cross_parsed_ir.cpp",
"${spirv_cross_dir}/spirv_cross_parsed_ir.hpp", "${spirv_cross_dir}/spirv_cross_parsed_ir.hpp",
"${spirv_cross_dir}/spirv_parser.cpp", "${spirv_cross_dir}/spirv_parser.cpp",
@ -110,6 +112,8 @@ static_library("spirv_cross_full_for_fuzzers") {
"${spirv_cross_dir}/spirv_common.hpp", "${spirv_cross_dir}/spirv_common.hpp",
"${spirv_cross_dir}/spirv_cross.cpp", "${spirv_cross_dir}/spirv_cross.cpp",
"${spirv_cross_dir}/spirv_cross.hpp", "${spirv_cross_dir}/spirv_cross.hpp",
"${spirv_cross_dir}/spirv_cross_containers.hpp",
"${spirv_cross_dir}/spirv_cross_error_handling.hpp",
"${spirv_cross_dir}/spirv_cross_parsed_ir.cpp", "${spirv_cross_dir}/spirv_cross_parsed_ir.cpp",
"${spirv_cross_dir}/spirv_cross_parsed_ir.hpp", "${spirv_cross_dir}/spirv_cross_parsed_ir.hpp",
"${spirv_cross_dir}/spirv_glsl.cpp", "${spirv_cross_dir}/spirv_glsl.cpp",