aboutsummaryrefslogtreecommitdiffstats
path: root/community/chromium/gn_bootstrap.patch
blob: 662a67f35ff0927f551bd5013667a7da98fe2622 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
--- tools/gn/bootstrap/bootstrap.py.orig	2016-11-17 00:15:29.112867732 +0100
+++ tools/gn/bootstrap/bootstrap.py	2016-11-17 00:43:54.712718406 +0100
@@ -159,7 +159,7 @@
   mkdir_p(root_gen_dir)

   write_buildflag_header_manually(root_gen_dir, 'base/allocator/features.h',
-      {'USE_EXPERIMENTAL_ALLOCATOR_SHIM': 'true' if is_linux else 'false'})
+      {'USE_EXPERIMENTAL_ALLOCATOR_SHIM': 'false'})

   write_buildflag_header_manually(root_gen_dir, 'base/debug/debugging_flags.h',
       {'ENABLE_PROFILING': 'false'})
@@ -366,8 +366,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',
@@ -541,29 +539,9 @@
         'base/time/time_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:
-    libs.extend(['-lrt', '-latomic'])
+    libs.extend(['-lrt', '-levent'])
     ldflags.extend(['-pthread'])

     static_libraries['xdg_user_dirs'] = {
@@ -573,8 +551,6 @@
         'tool': 'cxx',
     }
     static_libraries['base']['sources'].extend([
-        'base/allocator/allocator_shim.cc',
-        'base/allocator/allocator_shim_default_dispatch_to_glibc.cc',
         'base/memory/shared_memory_posix.cc',
         'base/nix/xdg_util.cc',
         'base/process/internal_linux.cc',
@@ -587,12 +563,6 @@
         'base/threading/platform_thread_linux.cc',
         'base/trace_event/malloc_dump_provider.cc',
     ])
-    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_mac:
--- 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"
--- base/native_library_posix.cc.orig	2016-11-17 01:45:50.032002326 +0100
+++ base/native_library_posix.cc	2016-11-17 01:46:23.729001549 +0100
@@ -12,6 +12,10 @@
 #include "base/strings/utf_string_conversions.h"
 #include "base/threading/thread_restrictions.h"

+#ifndef RTLD_DEEPBIND
+#define RTLD_DEEPBIND 0
+#endif
+
 namespace base {

 std::string NativeLibraryLoadError::ToString() const {