aboutsummaryrefslogtreecommitdiffstats
path: root/community/chromium/gn_bootstrap.patch
blob: 82def2e1a56741a3c18a8a0d1488874d462164d4 (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
diff --git a/tools/gn/bootstrap/bootstrap.py b/tools/gn/bootstrap/bootstrap.py
index 1390560..5ce7832 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))
 
 is_win = sys.platform.startswith('win')
 is_linux = sys.platform.startswith('linux')
+is_gnu_linux = is_linux and platform.libc_ver()[0].startswith('glibc')
 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)
 
   write_buildflag_header_manually(root_gen_dir, 'base/allocator/features.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):
       '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',
@@ -653,10 +654,11 @@ def write_gn_ninja(path, root_gen_dir, options):
         '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',
-      ])
+      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')