diff options
Diffstat (limited to 'community/chromium/gn_bootstrap.patch')
-rw-r--r-- | community/chromium/gn_bootstrap.patch | 76 |
1 files changed, 62 insertions, 14 deletions
diff --git a/community/chromium/gn_bootstrap.patch b/community/chromium/gn_bootstrap.patch index 82def2e1a5..5929742125 100644 --- a/community/chromium/gn_bootstrap.patch +++ b/community/chromium/gn_bootstrap.patch @@ -1,8 +1,21 @@ +diff --git a/base/message_loop/message_pump_libevent.cc b/base/message_loop/message_pump_libevent.cc +index dc5efc6..a9f1ec0 100644 +--- base/message_loop/message_pump_libevent.cc ++++ base/message_loop/message_pump_libevent.cc +@@ -14,7 +14,7 @@ + #include "base/files/file_util.h" + #include "base/logging.h" + #include "base/posix/eintr_wrapper.h" +-#include "base/third_party/libevent/event.h" ++#include "event.h" + #include "base/time/time.h" + #include "base/trace_event/trace_event.h" + #include "build/build_config.h" diff --git a/tools/gn/bootstrap/bootstrap.py b/tools/gn/bootstrap/bootstrap.py -index 1390560..5ce7832 100755 +index 2bf25e5..0ddc537 100755 --- tools/gn/bootstrap/bootstrap.py +++ tools/gn/bootstrap/bootstrap.py -@@ -31,6 +32,7 @@ SRC_ROOT = os.path.dirname(os.path.dirname(GN_ROOT)) +@@ -32,6 +32,7 @@ SRC_ROOT = os.path.dirname(os.path.dirname(GN_ROOT)) is_win = sys.platform.startswith('win') is_linux = sys.platform.startswith('linux') @@ -10,16 +23,16 @@ index 1390560..5ce7832 100755 is_mac = sys.platform.startswith('darwin') is_aix = sys.platform.startswith('aix') is_posix = is_linux or is_mac or is_aix -@@ -167,7 +169,7 @@ def build_gn_with_ninja_manually(tempdir, options): - mkdir_p(root_gen_dir) +@@ -184,7 +185,7 @@ def build_gn_with_ninja_manually(tempdir, options): + {'ENABLE_MUTEX_PRIORITY_INHERITANCE': 'false'}) - write_buildflag_header_manually(root_gen_dir, 'base/allocator/features.h', + write_buildflag_header_manually(root_gen_dir, 'base/allocator/buildflags.h', - {'USE_ALLOCATOR_SHIM': 'true' if is_linux else 'false'}) + {'USE_ALLOCATOR_SHIM': 'true' if is_gnu_linux else 'false'}) - write_buildflag_header_manually(root_gen_dir, 'base/debug/debugging_flags.h', - { -@@ -395,8 +397,6 @@ def write_gn_ninja(path, root_gen_dir, options): + write_buildflag_header_manually(root_gen_dir, + 'base/debug/debugging_buildflags.h', +@@ -438,8 +439,6 @@ def write_gn_ninja(path, root_gen_dir, options): 'base/third_party/superfasthash/superfasthash.c', ]) static_libraries['base']['sources'].extend([ @@ -28,19 +41,54 @@ index 1390560..5ce7832 100755 'base/at_exit.cc', 'base/base_paths.cc', 'base/base_switches.cc', -@@ -653,10 +654,11 @@ def write_gn_ninja(path, root_gen_dir, options): - 'base/threading/platform_thread_linux.cc', +@@ -641,26 +640,6 @@ def write_gn_ninja(path, root_gen_dir, options): + 'base/time/time_conversion_posix.cc', + 'base/trace_event/heap_profiler_allocation_register_posix.cc', ]) - if is_linux: +- static_libraries['libevent'] = { +- 'sources': [ +- 'base/third_party/libevent/buffer.c', +- 'base/third_party/libevent/evbuffer.c', +- 'base/third_party/libevent/evdns.c', +- 'base/third_party/libevent/event.c', +- 'base/third_party/libevent/event_tagging.c', +- 'base/third_party/libevent/evrpc.c', +- 'base/third_party/libevent/evutil.c', +- 'base/third_party/libevent/http.c', +- 'base/third_party/libevent/log.c', +- 'base/third_party/libevent/poll.c', +- 'base/third_party/libevent/select.c', +- 'base/third_party/libevent/signal.c', +- 'base/third_party/libevent/strlcpy.c', +- ], +- 'tool': 'cc', +- 'include_dirs': [], +- 'cflags': cflags + ['-DHAVE_CONFIG_H'], +- } + + if is_linux or is_aix: + static_libraries['xdg_user_dirs'] = { +@@ -767,17 +746,12 @@ def write_gn_ninja(path, root_gen_dir, options): + '-D_LIBCXXABI_NO_EXCEPTIONS', + ] + } - static_libraries['base']['sources'].extend([ - 'base/allocator/allocator_shim.cc', - 'base/allocator/allocator_shim_default_dispatch_to_glibc.cc', - ]) +- libs.extend(['-lrt', '-latomic']) +- static_libraries['libevent']['include_dirs'].extend([ +- os.path.join(SRC_ROOT, 'base', 'third_party', 'libevent', 'linux') +- ]) +- static_libraries['libevent']['sources'].extend([ +- 'base/third_party/libevent/epoll.c', +- ]) + if is_gnu_linux: + static_libraries['base']['sources'].extend([ + 'base/allocator/allocator_shim.cc', + 'base/allocator/allocator_shim_default_dispatch_to_glibc.cc', + ]) - libs.extend(['-lrt', '-latomic']) - static_libraries['libevent']['include_dirs'].extend([ - os.path.join(SRC_ROOT, 'base', 'third_party', 'libevent', 'linux') ++ libs.extend(['-lrt', '-levent']) + else: + ldflags.extend(['-pthread']) + libs.extend(['-lrt']) |