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

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

Issue 1929403002: GN: fix bootstrap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/bootstrap/bootstrap.py
diff --git a/tools/gn/bootstrap/bootstrap.py b/tools/gn/bootstrap/bootstrap.py
index 523a3c07a1cd4c2544e08740cca93f940464e5ce..2262ab4a801745012ebe7da7ae15bafdf0bc2f79 100755
--- a/tools/gn/bootstrap/bootstrap.py
+++ b/tools/gn/bootstrap/bootstrap.py
@@ -114,23 +114,32 @@ def main(argv):
return 0
-def build_gn_with_ninja_manually(tempdir, options):
- root_gen_dir = os.path.join(tempdir, 'gen')
- mkdir_p(root_gen_dir)
-
- mkdir_p(os.path.join(root_gen_dir, 'base', 'allocator'))
+def write_buildflag_header_manually(root_gen_dir, header, flags):
+ mkdir_p(os.path.join(root_gen_dir, os.path.dirname(header)))
with tempfile.NamedTemporaryFile() as f:
- f.write('--flags USE_EXPERIMENTAL_ALLOCATOR_SHIM=%s'
- % ('true' if is_linux else 'false'))
+ f.write('--flags')
+ for name,value in flags.items():
+ f.write(' ' + name + '=' + value)
f.flush()
check_call([
os.path.join(SRC_ROOT, 'build', 'write_buildflag_header.py'),
- '--output', 'base/allocator/features.h',
+ '--output', header,
'--gen-dir', root_gen_dir,
'--definitions', f.name,
])
+
+def build_gn_with_ninja_manually(tempdir, options):
+ root_gen_dir = os.path.join(tempdir, 'gen')
+ 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'})
+
+ write_buildflag_header_manually(root_gen_dir, 'base/debug/debugging_flags.h',
+ {'ENABLE_PROFILING': 'false'})
+
if is_mac:
# //base/build_time.cc needs base/generated_build_date.h,
# and this file is only included for Mac builds.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698