--- tools/gn/bootstrap/bootstrap.py.orig	2017-07-27 13:55:19.732276359 +0000
+++ tools/gn/bootstrap/bootstrap.py	2017-07-27 13:59:19.903262044 +0000
@@ -167,7 +167,7 @@
   mkdir_p(root_gen_dir)
 
   write_buildflag_header_manually(root_gen_dir, 'base/allocator/features.h',
-      {'USE_ALLOCATOR_SHIM': 'true' if is_linux else 'false'})
+      {'USE_ALLOCATOR_SHIM': 'false' })
 
   write_buildflag_header_manually(root_gen_dir, 'base/debug/debugging_flags.h',
       {
@@ -396,8 +396,6 @@
       'base/third_party/superfasthash/superfasthash.c',
   ])
   static_libraries['base']['sources'].extend([
-      'base/allocator/allocator_check.cc',
-      'base/allocator/allocator_extension.cc',
       'base/at_exit.cc',
       'base/base_paths.cc',
       'base/base_switches.cc',
@@ -607,26 +605,6 @@
         'base/time/time_now_posix.cc',
         'base/trace_event/heap_profiler_allocation_register_posix.cc',
     ])
-    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:
     ldflags.extend(['-pthread'])
@@ -654,17 +632,7 @@
         'base/threading/platform_thread_linux.cc',
     ])
     if is_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')
-      ])
-      static_libraries['libevent']['sources'].extend([
-         'base/third_party/libevent/epoll.c',
-      ])
+      libs.extend(['-lrt', '-levent'])
     else:
       libs.extend(['-lrt'])
       static_libraries['base']['sources'].extend([
--- base/message_loop/message_pump_libevent.cc.orig	2016-11-17 01:07:57.633819544 +0100
+++ base/message_loop/message_pump_libevent.cc	2016-11-17 01:08:38.985851678 +0100
@@ -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"
