Skip to content

Commit 7e1b7e5

Browse files
committed
Starting work on full GN build
This change: - Sucks in gn binaries - Sucks in a version of llvm that the GN build likes - Adds tools/gn.py to invoke gn - Adds a root BUILD.gn and .gn file - Removes chrome boilerplate we don't need - etc. This lets us do a standalone build of the 'runtime' target for x64, ia32, arm, arm64, mips, and the simulators on Linux, and arm and arm64 on Android. It does not include tcmalloc, and hasn't been tested on Mac or Windows. That work and more cleanup of chrome boilerplate will come in follow-up CLs. [email protected] Review URL: https://codereview.chromium.org/2350583002 .
1 parent f87e62e commit 7e1b7e5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2612
-5635
lines changed

.gn

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright 2016 The Dart project authors. All rights reserved.
2+
# Use of this source code is governed by a BSD-style license that can be
3+
# found in the LICENSE file.
4+
5+
# This file is used by the gn meta-buildsystem find the root of the source tree
6+
# and to set startup options.
7+
8+
# The location of the build configuration file.
9+
buildconfig = "//build/config/BUILDCONFIG.gn"
10+
11+
# The secondary source root is a parallel directory tree where
12+
# GN build files are placed when they can not be placed directly
13+
# in the source tree, e.g. for third party source trees.
14+
secondary_source = "//build/secondary/"

BUILD.gn

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2+
# for details. All rights reserved. Use of this source code is governed by a
3+
# BSD-style license that can be found in the LICENSE file.
4+
5+
# This target will be built if no target is specified when invoking ninja.
6+
group("default") {
7+
deps = [
8+
":runtime",
9+
]
10+
}
11+
12+
group("runtime") {
13+
deps = [
14+
"//runtime/bin:dart",
15+
"//runtime/bin:dart_bootstrap($host_toolchain)",
16+
"//runtime/bin:run_vm_tests",
17+
"//runtime/bin:process_test",
18+
"//runtime/bin:test_extension",
19+
"//runtime/bin:sample_extension",
20+
]
21+
}

DEPS

Lines changed: 86 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ vars = {
3030
"gyp_rev": "@6ee91ad8659871916f9aa840d42e1513befdf638",
3131
"co19_rev": "@d4767b4caea3c5828ad8e053cd051d44a59061af",
3232

33-
# Revisions of GN/Mojo/Flutter related dependencies.
34-
"base_revision": "@672b04e54b937ec899429a6bd5409c5a6300d151",
33+
# Revisions of GN related dependencies.
3534
"buildtools_revision": "@565d04e8741429fb1b4f26d102f2c6c3b849edeb",
3635

3736
"gperftools_revision": "@7822b5b0b9fa7e016e1f6b46ea86f26f4691a457",
@@ -45,7 +44,7 @@ vars = {
4544
"barback_tag" : "@0.15.2+9",
4645
"bazel_worker_tag": "@0.1.1",
4746
"boolean_selector_tag" : "@1.0.2",
48-
"boringssl_gen_rev": "@ef64e76254a12ee08a7142c825aa59ea32005958",
47+
"boringssl_gen_rev": "@1e8e5da213d0d5b1d50fcc1356c4783091bcc20d",
4948
"boringssl_rev" : "@8d343b44bbab829d1a28fdef650ca95f7db4412e",
5049
"charcode_tag": "@1.1.0",
5150
"chrome_rev" : "@19997",
@@ -131,11 +130,7 @@ deps = {
131130
Var("dart_root") + "/third_party/gyp":
132131
Var('chromium_git') + '/external/gyp.git' + Var("gyp_rev"),
133132

134-
# Stuff needed for GN/Mojo/Flutter.
135-
Var("dart_root") + "/base":
136-
Var('chromium_git') + '/external/github.com/domokit/base'
137-
+ Var('base_revision'),
138-
133+
# Stuff needed for GN build.
139134
Var("dart_root") + "/buildtools":
140135
Var('chromium_git') + '/chromium/buildtools.git' +
141136
Var('buildtools_revision'),
@@ -363,6 +358,83 @@ deps_os = {
363358
# TODO(iposva): Move the necessary tools so that hooks can be run
364359
# without the runtime being available.
365360
hooks = [
361+
# Pull GN binaries. This needs to be before running GYP below.
362+
{
363+
'name': 'gn_linux64',
364+
'pattern': '.',
365+
'action': [
366+
'download_from_google_storage',
367+
'--no_auth',
368+
'--no_resume',
369+
'--quiet',
370+
'--platform=linux*',
371+
'--bucket',
372+
'chromium-gn',
373+
'-s',
374+
Var('dart_root') + '/buildtools/linux64/gn.sha1',
375+
],
376+
},
377+
{
378+
'name': 'gn_mac',
379+
'pattern': '.',
380+
'action': [
381+
'download_from_google_storage',
382+
'--no_auth',
383+
'--no_resume',
384+
'--quiet',
385+
'--platform=darwin',
386+
'--bucket',
387+
'chromium-gn',
388+
'-s',
389+
Var('dart_root') + '/buildtools/mac/gn.sha1',
390+
],
391+
},
392+
{
393+
'name': 'gn_win',
394+
'pattern': '.',
395+
'action': [
396+
'download_from_google_storage',
397+
'--no_auth',
398+
'--no_resume',
399+
'--quiet',
400+
'--platform=win*',
401+
'--bucket',
402+
'chromium-gn',
403+
'-s',
404+
Var('dart_root') + '/buildtools/win/gn.exe.sha1',
405+
],
406+
},
407+
# Pull clang-format binaries using checked-in hashes.
408+
{
409+
'name': 'clang_format_linux',
410+
'pattern': '.',
411+
'action': [
412+
'download_from_google_storage',
413+
'--no_auth',
414+
'--no_resume',
415+
'--quiet',
416+
'--platform=linux*',
417+
'--bucket',
418+
'chromium-clang-format',
419+
'-s',
420+
Var('dart_root') + '/buildtools/linux64/clang-format.sha1',
421+
],
422+
},
423+
{
424+
'name': 'clang_format_mac',
425+
'pattern': '.',
426+
'action': [
427+
'download_from_google_storage',
428+
'--no_auth',
429+
'--no_resume',
430+
'--quiet',
431+
'--platform=darwin',
432+
'--bucket',
433+
'chromium-clang-format',
434+
'-s',
435+
Var('dart_root') + '/buildtools/mac/clang-format.sha1',
436+
],
437+
},
366438
{
367439
'name': 'd8_testing_binaries',
368440
'pattern': '.',
@@ -497,6 +569,12 @@ hooks = [
497569
Var('dart_root') + "/third_party/clang.tar.gz.sha1",
498570
],
499571
},
572+
{
573+
# Pull clang if needed or requested via GYP_DEFINES.
574+
'name': 'gn_clang',
575+
'pattern': '.',
576+
'action': ['python', 'sdk/tools/clang/scripts/update.py', '--if-needed'],
577+
},
500578
{
501579
"pattern": ".",
502580
"action": ["python", Var("dart_root") + "/tools/gyp_dart.py"],

0 commit comments

Comments
 (0)