From 7b819aa162403eceb22133de44c15f20e3bcd862 Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Tue, 7 Jul 2020 19:11:07 +0000 Subject: [PATCH] Multiple fixes to get BUILD.gn builds working again Change-Id: I00c8050d85e25c4e926c06b4df1381434de92f34 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/24460 Reviewed-by: dan sinclair --- BUILD.gn | 2 +- DEPS | 10 ++++++++++ src/writer/msl/generator.cc | 8 ++++++++ src/writer/msl/generator.h | 4 ++-- src/writer/wgsl/generator.cc | 8 ++++++++ src/writer/wgsl/generator.h | 4 ++-- 6 files changed, 31 insertions(+), 5 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index f51c89950f..67beeeb4e1 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -493,7 +493,7 @@ source_set("libtint_msl_writer_src") { ] configs += [ ":tint_common_config" ] - public_configs += [ ":tint_public_config" ] + public_configs = [ ":tint_public_config" ] if (build_with_chromium) { configs -= [ "//build/config/compiler:chromium_code" ] diff --git a/DEPS b/DEPS index f2a4d2a8ea..479929c563 100644 --- a/DEPS +++ b/DEPS @@ -1,6 +1,16 @@ use_relative_paths = True +gclient_gn_args_file = 'build/config/gclient_args.gni' +gclient_gn_args = [ + 'mac_xcode_version', +] + vars = { + # This can be overridden, e.g. with custom_vars, to download a nonstandard + # Xcode version in build/mac_toolchain.py + # instead of downloading the prebuilt pinned revision. + 'mac_xcode_version': 'default', + 'chromium_git': 'https://chromium.googlesource.com', 'github': '/external/github.com', diff --git a/src/writer/msl/generator.cc b/src/writer/msl/generator.cc index 113c841a8d..a62c706fa9 100644 --- a/src/writer/msl/generator.cc +++ b/src/writer/msl/generator.cc @@ -32,6 +32,14 @@ bool Generator::Generate() { return ret; } +std::string Generator::result() const { + return impl_.result(); +} + +std::string Generator::error() const { + return impl_.error(); +} + } // namespace msl } // namespace writer } // namespace tint diff --git a/src/writer/msl/generator.h b/src/writer/msl/generator.h index 2e5a577875..c062b3dd5e 100644 --- a/src/writer/msl/generator.h +++ b/src/writer/msl/generator.h @@ -37,10 +37,10 @@ class Generator : public Text { bool Generate() override; /// @returns the result data - std::string result() const override { return impl_.result(); } + std::string result() const override; /// @returns the error - std::string error() const { return impl_.error(); } + std::string error() const; private: GeneratorImpl impl_; diff --git a/src/writer/wgsl/generator.cc b/src/writer/wgsl/generator.cc index 342688723e..d077e2256a 100644 --- a/src/writer/wgsl/generator.cc +++ b/src/writer/wgsl/generator.cc @@ -32,6 +32,14 @@ bool Generator::Generate() { return ret; } +std::string Generator::result() const { + return impl_.result(); +} + +std::string Generator::error() const { + return impl_.error(); +} + } // namespace wgsl } // namespace writer } // namespace tint diff --git a/src/writer/wgsl/generator.h b/src/writer/wgsl/generator.h index 4a89f9ac5d..a9d170ad6b 100644 --- a/src/writer/wgsl/generator.h +++ b/src/writer/wgsl/generator.h @@ -37,10 +37,10 @@ class Generator : public Text { bool Generate() override; /// @returns the result data - std::string result() const override { return impl_.result(); } + std::string result() const override; /// @returns the error - std::string error() const { return impl_.error(); } + std::string error() const; private: GeneratorImpl impl_;