Use spvc's rules for spirv-cross
Switch over to using the rule for building spirv-cross from spvc. This
allows GN to avoid double symbol issues in future patches.
Roll third_party/shaderc/ 1d6155d86..30f0559dd (2 commits)
https://chromium.googlesource.com/external/github.com/google/shaderc/+log/1d6155d8679a..30f0559dd278
$ git log 1d6155d86..30f0559dd --date=short --no-merges --format='%ad %ae %s'
2019-11-27 rharrison Remove spvc's dependency on shaderc's util library (#914)
2019-11-27 rharrison Clean up how include dirs are propegated for spirv_cross (#912)
Created with:
roll-dep third_party/shaderc
BUG=dawn:281
Change-Id: I49cf237dcab884e84180f83cbbb21acfa549fe61
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14121
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
diff --git a/BUILD.gn b/BUILD.gn
index 68e63d1..5081a4c 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -134,8 +134,8 @@
":libdawn_native_headers",
":libdawn_native_utils_gen",
"${dawn_root}/src/common",
+ "${dawn_shaderc_dir}:spirv_cross",
"${dawn_spirv_tools_dir}:spvtools_val",
- "third_party:spirv_cross",
]
defines = []
libs = []
diff --git a/DEPS b/DEPS
index f0d8909..4caea44 100644
--- a/DEPS
+++ b/DEPS
@@ -69,7 +69,7 @@
'condition': 'dawn_standalone',
},
'third_party/shaderc': {
- 'url': '{chromium_git}/external/github.com/google/shaderc@1d6155d8679a7775f7323cbb356cfd9e63400256',
+ 'url': '{chromium_git}/external/github.com/google/shaderc@30f0559dd2782b3c65ad3840da2bf8e81711e9b7',
'condition': 'dawn_standalone',
},
diff --git a/third_party/BUILD.gn b/third_party/BUILD.gn
index 7325852..1004136 100644
--- a/third_party/BUILD.gn
+++ b/third_party/BUILD.gn
@@ -22,84 +22,6 @@
# Third-party dependencies needed by libdawn_native
###############################################################################
-# SPIRV-Cross
-spirv_cross_dir = dawn_spirv_cross_dir
-
-config("spirv_cross_public") {
- include_dirs = [
- "${spirv_cross_dir}",
- "${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" ]
- }
-}
-
-static_library("spirv_cross") {
- 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_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.hpp",
- "${spirv_cross_dir}/spirv_parser.cpp",
- "${spirv_cross_dir}/spirv_parser.hpp",
- ]
-
- need_glsl_cross = dawn_enable_opengl || dawn_enable_cross_reflection
- need_reflection_cross = dawn_enable_cross_reflection
-
- if (dawn_enable_d3d12) {
- sources += [
- "${spirv_cross_dir}/spirv_hlsl.cpp",
- "${spirv_cross_dir}/spirv_hlsl.hpp",
- ]
- need_glsl_cross = true
- }
-
- if (dawn_enable_metal) {
- sources += [
- "${spirv_cross_dir}/spirv_msl.cpp",
- "${spirv_cross_dir}/spirv_msl.hpp",
- ]
- need_glsl_cross = true
- }
-
- if (need_glsl_cross) {
- sources += [
- "${spirv_cross_dir}/spirv_glsl.cpp",
- "${spirv_cross_dir}/spirv_glsl.hpp",
- ]
- }
-
- if (need_reflection_cross) {
- sources += [
- "${spirv_cross_dir}/spirv_reflect.cpp",
- "${spirv_cross_dir}/spirv_reflect.hpp",
- ]
- }
-}
-
# Empty targets to add the include dirs and list the sources of Khronos headers for header inclusion check.
config("khronos_headers_public") {
include_dirs = [ "khronos" ]