Skip to content

Commit

Permalink
Merge branch 'main' into separate_blend
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahwilliams authored Feb 27, 2024
2 parents ed8e432 + 8940ea0 commit 8547119
Show file tree
Hide file tree
Showing 113 changed files with 3,480 additions and 2,027 deletions.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,16 @@ app.*.symbols
# Prebuilt binaries.
/prebuilts/

# TODO(67373): This entry is temporarily disabled, but can be restored once the
# buildmoot is completed.
# GN build support for protobufs vended by Fuchsia.
/build/secondary/third_party/protobuf
# /build/secondary/third_party/protobuf

# RBE support configurations and scripts vended from CIPD
/build/rbe

# The test-scripts from Chromium and managed by DEPS and gclient.
/tools/fuchsia/test_scripts

# The gn-sdk from Chromium and managed by DEPS and gclient.
/tools/fuchsia/gn-sdk
26 changes: 21 additions & 5 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ vars = {
'flutter_git': 'https://flutter.googlesource.com',
'skia_git': 'https://skia.googlesource.com',
'llvm_git': 'https://llvm.googlesource.com',
'skia_revision': '2f2a718b27f7fe706d739ed097abce9301a14b32',
'skia_revision': '1beae57ea0dd7f29a9a7c154f6975f3c2507fd4e',

# WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY
# See `lib/web_ui/README.md` for how to roll CanvasKit to a new version.
Expand Down Expand Up @@ -62,7 +62,7 @@ vars = {
# Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS
# You can use //tools/dart/create_updated_flutter_deps.py to produce
# updated revision list of existing dependencies.
'dart_revision': '67b2a250747b9c25c64b901ffbf17bdf36987331',
'dart_revision': 'be6be2b9ba6e7352edc509cd8358caad6c199ee5',

# WARNING: DO NOT EDIT MANUALLY
# The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py
Expand Down Expand Up @@ -254,6 +254,10 @@ vars = {
# will be used altogether with fuchsia-sdk to setup the build / test
# environment.
'fuchsia_test_scripts_version': 'vf8imeAzGv_gjYQDoqub2laI-6nkB3gQNiGuVaFForMC',

# The version / instance id of the cipd:chromium/fuchsia/gn-sdk which will be
# used altogether with fuchsia-sdk to generate gn based build rules.
'fuchsia_gn_sdk_version': 'l8zShEOXGGjtLYRulEX5CjT2RemKvUPOT6L-uXy41tMC',
}

gclient_gn_args_file = 'src/third_party/dart/build/config/gclient_args.gni'
Expand Down Expand Up @@ -328,11 +332,13 @@ deps = {
'src/third_party/perfetto':
Var('flutter_git') + "/third_party/perfetto" + '@' + Var('dart_perfetto_rev'),

'src/third_party/protobuf':
'src/flutter/third_party/protobuf':
Var('flutter_git') + '/third_party/protobuf' + '@' + Var('dart_libprotobuf_rev'),

'src/flutter/build/secondary/third_party/protobuf':
Var('flutter_git') + '/third_party/protobuf-gn' + '@' + Var('dart_protobuf_gn_rev'),
# TODO(67373): These are temporarily checked in, but this dep can be restored
# once the buildmoot is completed.
# 'src/flutter/build/secondary/third_party/protobuf':
# Var('flutter_git') + '/third_party/protobuf-gn' + '@' + Var('dart_protobuf_gn_rev'),

'src/third_party/dart':
Var('dart_git') + '/sdk.git' + '@' + Var('dart_revision'),
Expand Down Expand Up @@ -1018,6 +1024,16 @@ deps = {
'dep_type': 'cipd',
},

'src/flutter/tools/fuchsia/gn-sdk': {
'packages': [
{
'package': 'chromium/fuchsia/gn-sdk',
'version': Var('fuchsia_gn_sdk_version'),
}
],
'dep_type': 'cipd',
},

'src/third_party/impeller-cmake-example': {
'url': Var('flutter_git') + '/third_party/impeller-cmake-example.git' + '@' + 'c44e8093972c969acf171be72591e408a85fdc53',
'condition': 'download_impeller_cmake_example',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,14 @@ if (fuchsia_sdk_id == "") {
_meta = read_file(fuchsia_sdk_manifest_file, "json")
fuchsia_sdk_id = _meta.id
}

declare_args() {
# Specify a readelf_exec path to use. If not specified, the host's system
# executable will be used. Passed to populate_build_id_dir.py and
# prepare_package_inputs.py via the --readelf-exec flag.
# Must be a GN path (not an absolute path) since it is adjusted with
# rebase_path().
if (!defined(fuchsia_sdk_readelf_exec)) {
fuchsia_sdk_readelf_exec = ""
}
}
8 changes: 8 additions & 0 deletions build/secondary/third_party/protobuf/AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This is the list of Fuchsia Authors.

# Names should be added to this file as one of
# Organization's name
# Individual's name <submission email address>
# Individual's name <submission email address> <email2> <emailN>

Google LLC.
536 changes: 536 additions & 0 deletions build/secondary/third_party/protobuf/BUILD.gn

Large diffs are not rendered by default.

211 changes: 211 additions & 0 deletions build/secondary/third_party/protobuf/BUILD.input.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
# Copyright 2017 The Fuchsia Authors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

import("//build/test.gni")
import("//third_party/protobuf/proto_library.gni")

config("protobuf_config") {
include_dirs = [ "src" ]
defines = [
"GOOGLE_PROTOBUF_NO_RTTI",
"HAVE_PTHREAD",
]
cflags = []
if (is_clang) {
cflags += [
# Needed to support PROTOBUF_INTERNAL_CHECK_CLASS_SIZE in descriptor.h
"-Wno-c++98-compat-extra-semi",

# There are implicit conversions in parse_context.h
"-Wno-shorten-64-to-32",
]
}
}

config("protobuf_warnings") {
cflags = []

if (is_clang) {
# These are all needed as of https://github.com/protocolbuffers/protobuf/releases/tag/v3.21.12
cflags += [
"-Wno-deprecated-pragma",
"-Wno-enum-enum-conversion",
"-Wno-extra-semi",
"-Wno-float-conversion",
"-Wno-implicit-float-conversion",
"-Wno-implicit-int-conversion",
"-Wno-implicit-int-float-conversion",
"-Wno-invalid-noreturn",
"-Wno-missing-field-initializers",
"-Wno-sign-compare",
"-Wno-unused-function",
"-Wno-unused-private-field",
]
}
}

# This config should be applied to targets using generated code from the proto
# compiler. It sets up the include directories properly.
config("using_proto") {
include_dirs = [
"src",
"$root_gen_dir",
]
}

static_library("protobuf_lite") {
sources = [
"src/google/protobuf/any_lite.cc",
"src/google/protobuf/arena.cc",
"src/google/protobuf/arenastring.cc",
"src/google/protobuf/arenaz_sampler.cc",
"src/google/protobuf/extension_set.cc",
"src/google/protobuf/generated_enum_util.cc",
"src/google/protobuf/generated_message_tctable_lite.cc",
"src/google/protobuf/generated_message_util.cc",
"src/google/protobuf/implicit_weak_message.cc",
"src/google/protobuf/inlined_string_field.cc",
"src/google/protobuf/io/coded_stream.cc",
"src/google/protobuf/io/io_win32.cc",
"src/google/protobuf/io/strtod.cc",
"src/google/protobuf/io/zero_copy_stream.cc",
"src/google/protobuf/io/zero_copy_stream_impl.cc",
"src/google/protobuf/io/zero_copy_stream_impl_lite.cc",
"src/google/protobuf/map.cc",
"src/google/protobuf/message_lite.cc",
"src/google/protobuf/parse_context.cc",
"src/google/protobuf/repeated_field.cc",
"src/google/protobuf/repeated_ptr_field.cc",
"src/google/protobuf/stubs/bytestream.cc",
"src/google/protobuf/stubs/common.cc",
"src/google/protobuf/stubs/int128.cc",
"src/google/protobuf/stubs/status.cc",
"src/google/protobuf/stubs/statusor.cc",
"src/google/protobuf/stubs/stringpiece.cc",
"src/google/protobuf/stubs/stringprintf.cc",
"src/google/protobuf/stubs/structurally_valid.cc",
"src/google/protobuf/stubs/strutil.cc",
"src/google/protobuf/stubs/time.cc",
"src/google/protobuf/wire_format_lite.cc",
]

# git ls-files -- ':!*/compiler/*' ':!*/testing/*' ':!*/util/*' 'src/google/protobuf/*.h' | sed 's/^/"/' | sed 's/$/",/'
public = [ PROTOBUF_LITE_PUBLIC ]
configs += [ ":protobuf_warnings" ]
public_configs = [ ":protobuf_config" ]
}

# This is the full, heavy protobuf lib that's needed for c++ .protos that don't
# specify the LITE_RUNTIME option. The protocol compiler itself (protoc) falls
# into that category.
static_library("protobuf_full") {
sources = [
"src/google/protobuf/any.cc",
"src/google/protobuf/any.pb.cc",
"src/google/protobuf/api.pb.cc",
"src/google/protobuf/compiler/importer.cc",
"src/google/protobuf/compiler/parser.cc",
"src/google/protobuf/descriptor.cc",
"src/google/protobuf/descriptor.pb.cc",
"src/google/protobuf/descriptor_database.cc",
"src/google/protobuf/duration.pb.cc",
"src/google/protobuf/dynamic_message.cc",
"src/google/protobuf/empty.pb.cc",
"src/google/protobuf/extension_set_heavy.cc",
"src/google/protobuf/field_mask.pb.cc",
"src/google/protobuf/generated_message_bases.cc",
"src/google/protobuf/generated_message_reflection.cc",
"src/google/protobuf/generated_message_tctable_full.cc",

# gzip_stream.cc pulls in zlib, but it's not actually used by protoc, just
# by test code, so instead of compiling zlib for the host, let's just
# exclude this.
# "src/google/protobuf/io/gzip_stream.cc",

"src/google/protobuf/io/printer.cc",
"src/google/protobuf/io/tokenizer.cc",
"src/google/protobuf/map_field.cc",
"src/google/protobuf/message.cc",
"src/google/protobuf/reflection_ops.cc",
"src/google/protobuf/service.cc",
"src/google/protobuf/source_context.pb.cc",
"src/google/protobuf/struct.pb.cc",
"src/google/protobuf/stubs/substitute.cc",
"src/google/protobuf/text_format.cc",
"src/google/protobuf/timestamp.pb.cc",
"src/google/protobuf/type.pb.cc",
"src/google/protobuf/unknown_field_set.cc",
"src/google/protobuf/util/delimited_message_util.cc",
"src/google/protobuf/util/field_comparator.cc",
"src/google/protobuf/util/field_mask_util.cc",
"src/google/protobuf/util/internal/datapiece.cc",
"src/google/protobuf/util/internal/default_value_objectwriter.cc",
"src/google/protobuf/util/internal/error_listener.cc",
"src/google/protobuf/util/internal/field_mask_utility.cc",
"src/google/protobuf/util/internal/json_escaping.cc",
"src/google/protobuf/util/internal/json_objectwriter.cc",
"src/google/protobuf/util/internal/json_stream_parser.cc",
"src/google/protobuf/util/internal/object_writer.cc",
"src/google/protobuf/util/internal/proto_writer.cc",
"src/google/protobuf/util/internal/protostream_objectsource.cc",
"src/google/protobuf/util/internal/protostream_objectwriter.cc",
"src/google/protobuf/util/internal/type_info.cc",
"src/google/protobuf/util/internal/utility.cc",
"src/google/protobuf/util/json_util.cc",
"src/google/protobuf/util/message_differencer.cc",
"src/google/protobuf/util/time_util.cc",
"src/google/protobuf/util/type_resolver_util.cc",
"src/google/protobuf/wire_format.cc",
"src/google/protobuf/wrappers.pb.cc",
]

# git ls-files -- ':!*/compiler/*' ':!*/testing/*' 'src/google/protobuf/*.h' | sed 's/^/"/' | sed 's/$/",/'
public = [ PROTOBUF_FULL_PUBLIC ]
configs += [ ":protobuf_warnings" ]
public_configs = [ ":protobuf_config" ]
deps = [ ":protobuf_lite" ]
}

# Only compile the compiler for the host architecture.
if (current_toolchain == host_toolchain) {
# protoc compiler is separated into protoc library and executable targets to
# support protoc plugins that need to link libprotoc, but not the main()
# itself. See src/google/protobuf/compiler/plugin.h
#
# git ls-files -- ':!*/main.cc' ':!*test*' ':!*mock*' 'src/google/protobuf/compiler/*.cc' | sed 's/^/"/' | sed 's/$/",/'
static_library("protoc_lib") {
sources = [ PROTOC_LIB_SOURCES ]
configs += [ ":protobuf_warnings" ]
public_deps = [ ":protobuf_full" ]
}

executable("protoc") {
sources = [ "src/google/protobuf/compiler/main.cc" ]
deps = [ ":protoc_lib" ]
}
}
34 changes: 34 additions & 0 deletions build/secondary/third_party/protobuf/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Contributing to Fuchsia

Fuchsia lets anyone contribute to the project, regardless of their employer.
The Fuchsia project reviews and encourages well-tested, high-quality
contributions from anyone who wants to contribute to Fuchsia.

## Contributor License Agreement

Contributions to this project must be accompanied by a Contributor License
Agreement (CLA).

To see any Contributor License Agreements on file or to sign a CLA, go to <https://cla.developers.google.com/>.

For more information about the Google CLA, see [Contributor License Agreements](https://cla.developers.google.com/about).

## Contributing changes and submitting code reviews

All changes require review, including changes by project members.

For detailed instructions on how to contribute changes,
see [Contribute changes](/docs/development/source_code/contribute_changes.md).

## Community guidelines

This project observes the following community guidelines:

* [Google's Open Source Community Guidelines](https://opensource.google/conduct/)

* [Fuchsia Code of Conduct](/docs/CODE_OF_CONDUCT.md)

## Governance

Review Fuchsia's [Governance](/docs/contribute/governance/governance.md)
statement.
24 changes: 24 additions & 0 deletions build/secondary/third_party/protobuf/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Copyright 2021 The Fuchsia Authors.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5 changes: 5 additions & 0 deletions build/secondary/third_party/protobuf/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
azani@google.com
camrdale@google.com
frousseau@google.com
stevefung@google.com
zmbush@google.com
Loading

0 comments on commit 8547119

Please sign in to comment.