diff --git a/libcef_dll/sandbox/sandbox_win.cc b/libcef_dll/sandbox/sandbox_win.cc index c13297074..a81ce9dbe 100644 --- a/libcef_dll/sandbox/sandbox_win.cc +++ b/libcef_dll/sandbox/sandbox_win.cc @@ -39,26 +39,3 @@ void* cef_sandbox_info_create() { void cef_sandbox_info_destroy(void* sandbox_info) { delete static_cast(sandbox_info); } - -#if BUILDFLAG(IS_CEF_SANDBOX_BUILD) -// Avoid bringing in absl dependencies. -namespace absl { - -// From third_party/abseil-cpp/absl/types/bad_optional_access.cc -namespace optional_internal { -void throw_bad_optional_access() { - LOG(FATAL) << "Bad optional access"; - abort(); -} -} // namespace optional_internal - -// From third_party/abseil-cpp/absl/types/bad_variant_access.cc -namespace variant_internal { -void ThrowBadVariantAccess() { - LOG(FATAL) << "Bad variant access"; - abort(); -} -} // namespace variant_internal - -} // namespace absl -#endif // BUILDFLAG(IS_CEF_SANDBOX_BUILD) diff --git a/tools/file_util.py b/tools/file_util.py index 54d79ee5f..810aed9fd 100644 --- a/tools/file_util.py +++ b/tools/file_util.py @@ -6,6 +6,7 @@ from __future__ import absolute_import from glob import iglob from io import open import os +import fnmatch import shutil import sys import time @@ -155,9 +156,28 @@ def make_dir(name, quiet=True): def get_files(search_glob): - """ Returns all files matching the search glob. """ + """ Returns all files matching |search_glob|. """ + recursive_glob = '**' + os.path.sep + if recursive_glob in search_glob: + if sys.version_info >= (3, 5): + result = iglob(search_glob, recursive=True) + else: + # Polyfill for recursive glob pattern matching added in Python 3.5. + result = get_files_recursive(*search_glob.split(recursive_glob)) + else: + result = iglob(search_glob) + # Sort the result for consistency across platforms. - return sorted(iglob(search_glob)) + return sorted(result) + + +def get_files_recursive(directory, pattern): + """ Returns all files in |directory| matching |pattern| recursively. """ + for root, dirs, files in os.walk(directory): + for basename in files: + if fnmatch.fnmatch(basename, pattern): + filename = os.path.join(root, basename) + yield filename def read_version_file(file, args): diff --git a/tools/make_distrib.py b/tools/make_distrib.py index 9bf65c6f0..bb330116f 100644 --- a/tools/make_distrib.py +++ b/tools/make_distrib.py @@ -886,6 +886,12 @@ if platform == 'windows': 'obj\\base\\win\\pe_image.lib', cef_sandbox_lib, 'obj\\sandbox\\win\\sandbox.lib', + 'obj\\third_party\\abseil-cpp\\absl\\base\\**\\*.obj', + 'obj\\third_party\\abseil-cpp\\absl\\debugging\\**\\*.obj', + 'obj\\third_party\\abseil-cpp\\absl\\numeric\\**\\*.obj', + 'obj\\third_party\\abseil-cpp\\absl\\synchronization\\**\\*.obj', + 'obj\\third_party\\abseil-cpp\\absl\\time\\**\\*.obj', + 'obj\\third_party\\abseil-cpp\\absl\\types\\**\\*.obj', ] # Generate the cef_sandbox.lib merged library. A separate *_sandbox build