Revert of Update FlatBuffers to include multiple improvements. (patchset #5 id:80001 of https://codereview.chromium.org/2883063002/ )
Reason for revert:
Fails "Win" build: https://build.chromium.org/p/chromium/builders/Win/builds/55836
Original issue's description:
> Update FlatBuffers to include multiple improvements.
>
> This CL updates FlatBuffers to the latest version 1.6.x. This is necessary to
> include the following changes to the library:
> - d7ac378: Offset<T>::IsNull method.
> - 93c0960: --keep-prefix compiler option.
> - c559eb4: Generate files for empty schemas.
> - aaf5598: Fix path comparison on Windows.
> - fb87c0d: Improve allocator handling (fixes test).
> - 22743ca: Fix --keep-prefix bugs.
> - 642254b: Fix one more --keep-prefix issue.
> - dd05f32: Add tests for nested FlatBuffers.
> - 01c50d5: Get rid of move semantics in VectorIterator.
>
> BUG=611351,713774
>
> Review-Url: https://codereview.chromium.org/2883063002
> Cr-Commit-Position: refs/heads/master@{#477254}
> Committed: https://chromium.googlesource.com/chromium/src/+/387b2a94017449569f0f5b2f865d3331e3646a3a
[email protected],[email protected]
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=611351,713774
Review-Url: https://codereview.chromium.org/2926563002
Cr-Commit-Position: refs/heads/master@{#477258}
diff --git a/DEPS b/DEPS
index 9d77a07..282bad33 100644
--- a/DEPS
+++ b/DEPS
@@ -223,7 +223,7 @@
Var('chromium_git') + '/chromium/deps/flac.git' + '@' + '7d0f5b3a173ffe98db08057d1f52b7787569e0a6',
'src/third_party/flatbuffers/src':
- Var('chromium_git') + '/external/github.com/google/flatbuffers.git' + '@' + '01c50d57a67a52ee3cddd81b54d4647e9123a290',
+ Var('chromium_git') + '/external/github.com/google/flatbuffers.git' + '@' + 'e92ae5199d52fd59540a800bec7eef46cd778257',
'src/third_party/pyftpdlib/src':
Var('chromium_git') + '/external/pyftpdlib.git' + '@' + '2be6d65e31c7ee6320d059f581f05ae8d89d7e45',
diff --git a/third_party/flatbuffers/BUILD.gn b/third_party/flatbuffers/BUILD.gn
index 72bab63..b48a3665 100644
--- a/third_party/flatbuffers/BUILD.gn
+++ b/third_party/flatbuffers/BUILD.gn
@@ -9,45 +9,26 @@
include_dirs = [ "src/include" ]
}
-# The part of FlatBuffers that Chrome is interested in.
source_set("flatbuffers") {
sources = [
"src/include/flatbuffers/flatbuffers.h",
+ "src/include/flatbuffers/hash.h",
]
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
-
public_configs = [ ":flatbuffers_config" ]
}
-# The complete FlatBuffers library, as required to build the flatc compiler and
-# some of the tests.
source_set("compiler_files") {
- include_dirs = [ "src/grpc" ]
sources = [
- "src/grpc/src/compiler/config.h",
- "src/grpc/src/compiler/cpp_generator.cc",
- "src/grpc/src/compiler/cpp_generator.h",
- "src/grpc/src/compiler/go_generator.cc",
- "src/grpc/src/compiler/go_generator.h",
- "src/grpc/src/compiler/schema_interface.h",
"src/include/flatbuffers/code_generators.h",
- "src/include/flatbuffers/flatc.h",
- "src/include/flatbuffers/flexbuffers.h",
- "src/include/flatbuffers/grpc.h",
- "src/include/flatbuffers/hash.h",
"src/include/flatbuffers/idl.h",
- "src/include/flatbuffers/reflection.h",
- "src/include/flatbuffers/reflection_generated.h",
"src/include/flatbuffers/util.h",
- "src/src/code_generators.cpp",
- "src/src/flatc.cpp",
"src/src/idl_gen_cpp.cpp",
"src/src/idl_gen_fbs.cpp",
"src/src/idl_gen_general.cpp",
"src/src/idl_gen_go.cpp",
- "src/src/idl_gen_grpc.cpp",
"src/src/idl_gen_js.cpp",
"src/src/idl_gen_php.cpp",
"src/src/idl_gen_python.cpp",
@@ -64,7 +45,7 @@
executable("flatc") {
sources = [
- "src/src/flatc_main.cpp",
+ "src/src/flatc.cpp",
]
deps = [
":compiler_files",
@@ -79,18 +60,25 @@
testonly = true
sources = [
# Disabled as workaround for crbug.com/611351
- # "src/tests/include_test/include_test1.fbs",
- # "src/tests/include_test/sub/include_test2.fbs",
+ # "src/tests/include_test1.fbs",
+ # "src/tests/include_test2.fbs",
"src/tests/monster_test.fbs",
"src/tests/namespace_test/namespace_test1.fbs",
"src/tests/namespace_test/namespace_test2.fbs",
]
- flatc_include_dirs = [ "src/tests/include_test" ]
}
test("flatbuffers_unittest") {
sources = [
+ # The following files are not included in :flatbuffers
+ # but are listed here because test.cpp tests more than what will
+ # get included into Chrome (reflection and generation).
+ "src/include/reflection.h",
+ "src/include/reflection_generated.h",
+
+ # This is the actual test.
"src/tests/test.cpp",
+ "src/tests/test.h",
]
deps = [
":compiler_files",
@@ -100,5 +88,4 @@
data = [
"src/tests/",
]
- defines = [ "FLATBUFFERS_TRACK_VERIFIER_BUFFER_SIZE" ]
}
diff --git a/third_party/flatbuffers/README.chromium b/third_party/flatbuffers/README.chromium
index 1400e04f..b1e099b 100644
--- a/third_party/flatbuffers/README.chromium
+++ b/third_party/flatbuffers/README.chromium
@@ -1,8 +1,8 @@
Name: FlatBuffers
Short Name: flatbuffers
URL: https://github.com/google/flatbuffers
-Version: 01c50d57a67a52ee3cddd81b54d4647e9123a290
-Date: 2017-06-05
+Version: e92ae5199d52fd59540a800bec7eef46cd778257
+Date: 2016-06-03
License: Apache 2.0
License File: LICENSE
Security Critical: yes
diff --git a/third_party/flatbuffers/flatbuffer.gni b/third_party/flatbuffers/flatbuffer.gni
index f45886d..01527d45 100644
--- a/third_party/flatbuffers/flatbuffer.gni
+++ b/third_party/flatbuffers/flatbuffer.gni
@@ -8,23 +8,12 @@
# Specifies the path suffix that output files are generated under. This
# path will be appended to root_gen_dir.
#
-# Targets that depend on the flatbuffer target will be able to include
-# the resulting FlatBuffers header with an include like:
+# Targets that depend on the proto target will be able to include the
+# resulting flatbuffers header with an include like:
# #include "dir/for/my_flatbuffer/buffer_generated.h"
# If undefined, this defaults to matchign the input directory for each
# .fbs file (you should almost always use the default mode).
#
-# flatc_include_dirs (optional)
-# Specifies the directories which FlatBuffers compiler uses to find
-# included .fbs files in.
-#
-# The directories will be tried in the order given, and if all fail (or,
-# as by default, none are specified) it will try to load relative to the
-# directory of the schema file being parsed.
-#
-# TODO(pkalinnikov): Add repository root to this list, to allow including
-# by absolute path.
-#
# deps (optional)
# Additional dependencies.
#
@@ -79,18 +68,8 @@
"$out_dir/{{source_name_part}}_generated.h",
]
- args = [ "-c" ]
-
- if (defined(invoker.flatc_include_dirs)) {
- foreach(include_dir, invoker.flatc_include_dirs) {
- args += [
- "-I",
- rebase_path(include_dir, "$root_build_dir"),
- ]
- }
- }
-
- args += [
+ args = [
+ "-c",
"-o",
"$out_dir",
"{{source}}",
@@ -122,7 +101,7 @@
public_configs = [ "//third_party/flatbuffers:flatbuffers_config" ]
public_deps = [
- # The generated headers reference headers within FlatBuffers, so
+ # The generated headers reference headers within flatbuffers, so
# dependencies must be able to find those headers too.
"//third_party/flatbuffers",
]