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
|
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
@@ -20,6 +20,7 @@ import errno
import logging
import optparse
import os
+import platform
import shutil
import subprocess
import sys
@@ -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',
@@ -449,6 +449,7 @@ def write_gn_ninja(path, root_gen_dir, options):
'base/metrics/histogram_base.cc',
'base/metrics/histogram_functions.cc',
'base/metrics/histogram_samples.cc',
+ 'base/metrics/histogram_snapshot_manager.cc',
'base/metrics/metrics_hashes.cc',
'base/metrics/persistent_histogram_allocator.cc',
'base/metrics/persistent_memory_allocator.cc',
@@ -534,7 +535,7 @@ def write_gn_ninja(path, root_gen_dir, options):
'base/trace_event/heap_profiler_allocation_context_tracker.cc',
'base/trace_event/heap_profiler_allocation_register.cc',
'base/trace_event/heap_profiler_event_filter.cc',
- 'base/trace_event/heap_profiler_event_writer.cc',
+ 'base/trace_event/heap_profiler_heap_dump_writer.cc',
'base/trace_event/heap_profiler_serialization_state.cc',
'base/trace_event/heap_profiler_stack_frame_deduplicator.cc',
'base/trace_event/heap_profiler_type_name_deduplicator.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')
|