Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(330)

Unified Diff: tools/gn/bootstrap/bootstrap.py

Issue 1692303004: Update GN bootstrap build (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use real BUILD_DATE Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/gn/bootstrap/bootstrap.py
diff --git a/tools/gn/bootstrap/bootstrap.py b/tools/gn/bootstrap/bootstrap.py
index 2f5e99597f8dd623a5b7f21d1aee9c7684daf18c..db41d50ab7b7f8d0dd933c2d6b72d016504e6e1d 100755
--- a/tools/gn/bootstrap/bootstrap.py
+++ b/tools/gn/bootstrap/bootstrap.py
@@ -16,7 +16,9 @@ it with its own BUILD.gn to the final destination.
"""
import contextlib
+import datetime
import errno
+import locale
import logging
import optparse
import os
@@ -129,9 +131,11 @@ def write_ninja(path, options):
cflags_cc = os.environ.get('CXXFLAGS', '').split()
ld = os.environ.get('LD', cxx)
ldflags = os.environ.get('LDFLAGS', '').split()
- include_dirs = [SRC_ROOT]
+ include_dirs = [BOOTSTRAP_DIR, SRC_ROOT]
libs = []
+ cflags.extend(['-DNO_TCMALLOC'])
+
if is_posix:
if options.debug:
cflags.extend(['-O0', '-g'])
@@ -141,6 +145,14 @@ def write_ninja(path, options):
cflags.extend(['-D_FILE_OFFSET_BITS=64', '-pthread', '-pipe'])
cflags_cc.extend(['-std=c++11', '-Wno-c++11-narrowing'])
+ if is_mac:
+ # base/build_time.cc needs this to be defined
+ # it must be in the format "Mmm DD YYYY" (e.g "Feb 13 2016")
+ # strftime() is influenced by the current locale
+ locale.setlocale(locale.LC_TIME, 'en_US')
+ build_date = datetime.datetime.now().strftime('%b %d %Y')
+ cflags.extend(['-DBUILD_DATE="\\"' + build_date + '\\""'])
+
static_libraries = {
'base': {'sources': [], 'tool': 'cxx'},
'dynamic_annotations': {'sources': [], 'tool': 'cc'},
@@ -179,6 +191,7 @@ def write_ninja(path, options):
'base/files/file_path_constants.cc',
'base/files/file_tracing.cc',
'base/files/file_util.cc',
+ 'base/files/memory_mapped_file.cc',
'base/files/scoped_file.cc',
'base/hash.cc',
'base/json/json_parser.cc',
@@ -202,8 +215,10 @@ def write_ninja(path, options):
'base/metrics/bucket_ranges.cc',
'base/metrics/histogram.cc',
'base/metrics/histogram_base.cc',
+ 'base/metrics/histogram_persistence.cc',
'base/metrics/histogram_samples.cc',
'base/metrics/metrics_hashes.cc',
+ 'base/metrics/persistent_memory_allocator.cc',
'base/metrics/sample_map.cc',
'base/metrics/sample_vector.cc',
'base/metrics/sparse_histogram.cc',
@@ -214,6 +229,8 @@ def write_ninja(path, options):
'base/process/kill.cc',
'base/process/process_iterator.cc',
'base/process/process_metrics.cc',
+ 'base/profiler/scoped_profile.cc',
+ 'base/profiler/scoped_tracker.cc',
'base/profiler/tracked_time.cc',
'base/run_loop.cc',
'base/sequence_checker_impl.cc',
@@ -264,7 +281,6 @@ def write_ninja(path, options):
'base/trace_event/process_memory_dump.cc',
'base/trace_event/process_memory_maps.cc',
'base/trace_event/process_memory_totals.cc',
- 'base/trace_event/process_memory_totals_dump_provider.cc',
'base/trace_event/trace_buffer.cc',
'base/trace_event/trace_config.cc',
'base/trace_event/trace_event_argument.cc',
@@ -289,6 +305,7 @@ def write_ninja(path, options):
'base/files/file_enumerator_posix.cc',
'base/files/file_posix.cc',
'base/files/file_util_posix.cc',
+ 'base/files/memory_mapped_file_posix.cc',
'base/message_loop/message_pump_libevent.cc',
'base/posix/file_descriptor_shuffle.cc',
'base/posix/safe_strerror.cc',
@@ -340,6 +357,7 @@ def write_ninja(path, options):
'tool': 'cxx',
}
static_libraries['base']['sources'].extend([
+ 'base/memory/shared_memory_posix.cc',
'base/nix/xdg_util.cc',
'base/process/internal_linux.cc',
'base/process/process_handle_linux.cc',
@@ -350,7 +368,6 @@ def write_ninja(path, options):
'base/sys_info_linux.cc',
'base/threading/platform_thread_linux.cc',
'base/trace_event/malloc_dump_provider.cc',
- 'base/trace_event/process_memory_maps_dump_provider.cc',
])
static_libraries['libevent']['include_dirs'].extend([
os.path.join(SRC_ROOT, 'base', 'third_party', 'libevent', 'linux')
@@ -363,6 +380,9 @@ def write_ninja(path, options):
if is_mac:
static_libraries['base']['sources'].extend([
'base/base_paths_mac.mm',
+ 'base/build_time.cc',
+ 'base/rand_util.cc',
+ 'base/rand_util_posix.cc',
'base/files/file_util_mac.mm',
'base/mac/bundle_locations.mm',
'base/mac/call_with_eh_frame.cc',
@@ -370,8 +390,12 @@ def write_ninja(path, options):
'base/mac/foundation_util.mm',
'base/mac/mach_logging.cc',
'base/mac/scoped_mach_port.cc',
+ 'base/mac/scoped_mach_vm.cc',
'base/mac/scoped_nsautorelease_pool.mm',
+ 'base/memory/shared_memory_handle_mac.cc',
+ 'base/memory/shared_memory_mac.cc',
'base/message_loop/message_pump_mac.mm',
+ 'base/metrics/field_trial.cc',
'base/process/process_handle_mac.cc',
'base/process/process_iterator_mac.cc',
'base/process/process_metrics_mac.cc',

Powered by Google App Engine
This is Rietveld 408576698