From: Victor Martinez Date: Mon, 20 Nov 2017 12:04:38 +0000 (+0100) Subject: chromium: add missing patches X-Git-Url: http://gitweb/?a=commitdiff_plain;h=7077c39b09f2f06ef36a952f315e231ee0b5faf8;p=ports%2Fopt-arm.git chromium: add missing patches --- diff --git a/chromium/chromium-gn-bootstrap-r17.patch b/chromium/chromium-gn-bootstrap-r17.patch new file mode 100644 index 0000000..6cfd08d --- /dev/null +++ b/chromium/chromium-gn-bootstrap-r17.patch @@ -0,0 +1,68 @@ +--- a/tools/gn/bootstrap/bootstrap.py ++++ b/tools/gn/bootstrap/bootstrap.py +@@ -179,6 +179,7 @@ def build_gn_with_ninja_manually(tempdir, options): + + write_buildflag_header_manually(root_gen_dir, 'base/debug/debugging_flags.h', + { ++ 'ENABLE_LOCATION_SOURCE': 'false', + 'ENABLE_PROFILING': 'false', + 'CAN_UNWIND_WITH_FRAME_POINTERS': 'false' + }) +@@ -204,7 +205,7 @@ def build_gn_with_ninja_manually(tempdir, options): + + write_gn_ninja(os.path.join(tempdir, 'build.ninja'), + root_gen_dir, options) +- cmd = ['ninja', '-C', tempdir] ++ cmd = ['ninja', '-C', tempdir, '-w', 'dupbuild=err'] + if options.verbose: + cmd.append('-v') + +@@ -458,6 +459,7 @@ def write_gn_ninja(path, root_gen_dir, options): + 'base/metrics/bucket_ranges.cc', + 'base/metrics/field_trial.cc', + 'base/metrics/field_trial_param_associator.cc', ++ 'base/metrics/field_trial_params.cc', + 'base/metrics/histogram.cc', + 'base/metrics/histogram_base.cc', + 'base/metrics/histogram_functions.cc', +@@ -507,6 +509,7 @@ def write_gn_ninja(path, root_gen_dir, options): + 'base/task_scheduler/scheduler_lock_impl.cc', + 'base/task_scheduler/scheduler_single_thread_task_runner_manager.cc', + 'base/task_scheduler/scheduler_worker.cc', ++ 'base/task_scheduler/scheduler_worker_pool.cc', + 'base/task_scheduler/scheduler_worker_pool_impl.cc', + 'base/task_scheduler/scheduler_worker_pool_params.cc', + 'base/task_scheduler/scheduler_worker_stack.cc', +@@ -523,6 +526,7 @@ def write_gn_ninja(path, root_gen_dir, options): + 'base/third_party/icu/icu_utf.cc', + 'base/third_party/nspr/prtime.cc', + 'base/threading/post_task_and_reply_impl.cc', ++ 'base/threading/scoped_blocking_call.cc', + 'base/threading/sequence_local_storage_map.cc', + 'base/threading/sequenced_task_runner_handle.cc', + 'base/threading/sequenced_worker_pool.cc', +@@ -579,7 +583,6 @@ def write_gn_ninja(path, root_gen_dir, options): + 'base/unguessable_token.cc', + 'base/value_iterators.cc', + 'base/values.cc', +- 'base/value_iterators.cc', + 'base/vlog.cc', + ]) + +@@ -652,7 +655,6 @@ def write_gn_ninja(path, root_gen_dir, options): + static_libraries['base']['sources'].extend([ + 'base/memory/shared_memory_handle_posix.cc', + 'base/memory/shared_memory_posix.cc', +- 'base/memory/shared_memory_tracker.cc', + 'base/nix/xdg_util.cc', + 'base/process/internal_linux.cc', + 'base/process/memory_linux.cc', +@@ -827,7 +829,7 @@ def build_gn_with_gn(temp_gn, build_dir, options): + cmd = [temp_gn, 'gen', build_dir, '--args=%s' % gn_gen_args] + check_call(cmd) + +- cmd = ['ninja', '-C', build_dir] ++ cmd = ['ninja', '-C', build_dir, '-w', 'dupbuild=err'] + if options.verbose: + cmd.append('-v') + cmd.append('gn') diff --git a/chromium/crc32c-string-view-check.patch b/chromium/crc32c-string-view-check.patch new file mode 100644 index 0000000..9f53ec0 --- /dev/null +++ b/chromium/crc32c-string-view-check.patch @@ -0,0 +1,74 @@ +From d0f929a5db87cb34d03afb0d8e8bfc95b8f786e3 Mon Sep 17 00:00:00 2001 +From: Victor Costan +Date: Mon, 11 Sep 2017 13:18:27 -0700 +Subject: [PATCH] More conservative check for availability. (#4) + +has_include() does not imply that the header can be +included and will work. The assumption fails on MSVC and libc++ [1, 2]. +Conversely, checking that __cplusplus > 201402L is not sufficient on its +own either, as the toolchain on Mac OS 10.12 passes that check but does +not contain a header. + +[1] https://crbug.com/759349 +[2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79433 +--- + include/crc32c/crc32c.h | 10 +++------- + src/crc32c_unittest.cc | 6 ++---- + 2 files changed, 5 insertions(+), 11 deletions(-) + +diff --git a/include/crc32c/crc32c.h b/include/crc32c/crc32c.h +index 9f1973a..8ecab0d 100644 +--- a/include/crc32c/crc32c.h ++++ b/include/crc32c/crc32c.h +@@ -33,22 +33,18 @@ inline uint32_t Crc32c(const std::string& string) { + string.size()); + } + +-#if defined(__has_include) ++#if __cplusplus > 201402L + #if __has_include() +-// Visual Studio provides a header even in C++11 mode. When +-// included, the header issues an #error. (C1189) +-#if !defined(_MSC_VER) || __cplusplus >= 201703L + #include + +-// Comptues the CRC32C of the bytes in the string_view. ++// Computes the CRC32C of the bytes in the string_view. + inline uint32_t Crc32c(const std::string_view& string_view) { + return Crc32c(reinterpret_cast(string_view.data()), + string_view.size()); + } + +-#endif // !defined(_MSC_VER) || __cplusplus >= 201703L + #endif // __has_include() +-#endif // defined(__has_include) ++#endif // __cplusplus > 201402L + + } // namespace crc32c + +diff --git a/src/crc32c_unittest.cc b/src/crc32c_unittest.cc +index 7a9c765..69babb3 100644 +--- a/src/crc32c_unittest.cc ++++ b/src/crc32c_unittest.cc +@@ -95,9 +95,8 @@ TEST(CRC32CTest, Crc32cStdString) { + EXPECT_EQ(static_cast(0x113fdb5c), crc32c::Crc32c(buf)); + } + +-#if defined(__has_include) ++#if __cplusplus > 201402L + #if __has_include() +-#if !defined(_MSC_VER) || __cplusplus >= 201703L + + TEST(CRC32CTest, Crc32cStdStringView) { + uint8_t buf[32]; +@@ -118,9 +117,8 @@ TEST(CRC32CTest, Crc32cStdStringView) { + EXPECT_EQ(static_cast(0x113fdb5c), crc32c::Crc32c(view)); + } + +-#endif // !defined(_MSC_VER) || __cplusplus >= 201703L + #endif // __has_include() +-#endif // defined(__has_include) ++#endif // __cplusplus > 201402L + + #define TESTED_EXTEND Extend + #include "./crc32c_extend_unittests.h"