Skip to content
Permalink
Browse files

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.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2350583002 .
  • Loading branch information...
zanderso committed Sep 23, 2016
1 parent f87e62e commit 7e1b7e54d735c53af048174f31a49153c678b553
Showing with 2,612 additions and 5,635 deletions.
  1. +14 −0 .gn
  2. +21 −0 BUILD.gn
  3. +86 −8 DEPS
  4. +9 −419 build/config/BUILD.gn
  5. +113 −465 build/config/BUILDCONFIG.gn
  6. +0 −16 build/config/allocator.gni
  7. +1 −3 build/config/android/config.gni
  8. +0 −19 build/config/chrome_build.gni
  9. +1 −1 build/config/clang/clang.gni
  10. +29 −351 build/config/compiler/BUILD.gn
  11. +0 −29 build/config/crypto.gni
  12. +0 −204 build/config/features.gni
  13. +0 −41 build/config/linux/BUILD.gn
  14. +0 −22 build/config/sysroot.gni
  15. +0 −68 build/config/ui.gni
  16. +1 −1 build/config/win/BUILD.gn
  17. +0 −333 build/gyp_chromium
  18. +0 −18 build/gyp_chromium.py
  19. +0 −66 build/gyp_chromium_test.py
  20. +0 −242 build/json_schema_api.gni
  21. +0 −83 build/json_schema_bundle_compile.gypi
  22. +0 −78 build/json_schema_bundle_registration_compile.gypi
  23. +0 −123 build/json_schema_compile.gypi
  24. +0 −53 build/json_to_struct.gypi
  25. +0 −6 build/module_args/dart.gni
  26. +0 −16 build/module_args/mojo.gni
  27. +0 −6 build/module_args/nacl.gni
  28. +0 −13 build/module_args/v8.gni
  29. +0 −54 build/secondary/testing/gmock/BUILD.gn
  30. +0 −135 build/secondary/testing/gtest/BUILD.gn
  31. +0 −221 build/secondary/third_party/libjpeg_turbo/BUILD.gn
  32. +0 −391 build/secondary/third_party/libsrtp/BUILD.gn
  33. +0 −1,211 build/secondary/third_party/nss/BUILD.gn
  34. +0 −27 build/secondary/tools/grit/BUILD.gn
  35. +0 −483 build/secondary/tools/grit/grit_rule.gni
  36. +0 −47 build/secondary/tools/grit/repack.gni
  37. +0 −55 build/secondary/tools/grit/stamp_grit_sources.py
  38. +0 −24 build/toolchain/fnl/BUILD.gn
  39. +30 −22 build/toolchain/linux/BUILD.gn
  40. +127 −35 runtime/BUILD.gn
  41. +337 −192 runtime/bin/BUILD.gn
  42. +4 −4 runtime/bin/bin.gypi
  43. +4 −4 runtime/bin/builtin.cc
  44. +4 −4 runtime/bin/builtin.h
  45. +56 −0 runtime/bin/zlib/BUILD.gn
  46. +1 −1 runtime/observatory/.packages
  47. +62 −30 runtime/observatory/BUILD.gn
  48. +58 −11 runtime/vm/BUILD.gn
  49. +771 −0 tools/clang/scripts/update.py
  50. +724 −0 tools/clang/scripts/update.sh
  51. +159 −0 tools/gn.py
14 .gn
@@ -0,0 +1,14 @@
# Copyright 2016 The Dart project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# This file is used by the gn meta-buildsystem find the root of the source tree
# and to set startup options.

# The location of the build configuration file.
buildconfig = "//build/config/BUILDCONFIG.gn"

# The secondary source root is a parallel directory tree where
# GN build files are placed when they can not be placed directly
# in the source tree, e.g. for third party source trees.
secondary_source = "//build/secondary/"
@@ -0,0 +1,21 @@
# Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.

# This target will be built if no target is specified when invoking ninja.
group("default") {
deps = [
":runtime",
]
}

group("runtime") {
deps = [
"//runtime/bin:dart",
"//runtime/bin:dart_bootstrap($host_toolchain)",
"//runtime/bin:run_vm_tests",
"//runtime/bin:process_test",
"//runtime/bin:test_extension",
"//runtime/bin:sample_extension",
]
}
94 DEPS
@@ -30,8 +30,7 @@ vars = {
"gyp_rev": "@6ee91ad8659871916f9aa840d42e1513befdf638",
"co19_rev": "@d4767b4caea3c5828ad8e053cd051d44a59061af",

# Revisions of GN/Mojo/Flutter related dependencies.
"base_revision": "@672b04e54b937ec899429a6bd5409c5a6300d151",
# Revisions of GN related dependencies.
"buildtools_revision": "@565d04e8741429fb1b4f26d102f2c6c3b849edeb",

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

# Stuff needed for GN/Mojo/Flutter.
Var("dart_root") + "/base":
Var('chromium_git') + '/external/github.com/domokit/base'
+ Var('base_revision'),

# Stuff needed for GN build.
Var("dart_root") + "/buildtools":
Var('chromium_git') + '/chromium/buildtools.git' +
Var('buildtools_revision'),
@@ -363,6 +358,83 @@ deps_os = {
# TODO(iposva): Move the necessary tools so that hooks can be run
# without the runtime being available.
hooks = [
# Pull GN binaries. This needs to be before running GYP below.
{
'name': 'gn_linux64',
'pattern': '.',
'action': [
'download_from_google_storage',
'--no_auth',
'--no_resume',
'--quiet',
'--platform=linux*',
'--bucket',
'chromium-gn',
'-s',
Var('dart_root') + '/buildtools/linux64/gn.sha1',
],
},
{
'name': 'gn_mac',
'pattern': '.',
'action': [
'download_from_google_storage',
'--no_auth',
'--no_resume',
'--quiet',
'--platform=darwin',
'--bucket',
'chromium-gn',
'-s',
Var('dart_root') + '/buildtools/mac/gn.sha1',
],
},
{
'name': 'gn_win',
'pattern': '.',
'action': [
'download_from_google_storage',
'--no_auth',
'--no_resume',
'--quiet',
'--platform=win*',
'--bucket',
'chromium-gn',
'-s',
Var('dart_root') + '/buildtools/win/gn.exe.sha1',
],
},
# Pull clang-format binaries using checked-in hashes.
{
'name': 'clang_format_linux',
'pattern': '.',
'action': [
'download_from_google_storage',
'--no_auth',
'--no_resume',
'--quiet',
'--platform=linux*',
'--bucket',
'chromium-clang-format',
'-s',
Var('dart_root') + '/buildtools/linux64/clang-format.sha1',
],
},
{
'name': 'clang_format_mac',
'pattern': '.',
'action': [
'download_from_google_storage',
'--no_auth',
'--no_resume',
'--quiet',
'--platform=darwin',
'--bucket',
'chromium-clang-format',
'-s',
Var('dart_root') + '/buildtools/mac/clang-format.sha1',
],
},
{
'name': 'd8_testing_binaries',
'pattern': '.',
@@ -497,6 +569,12 @@ hooks = [
Var('dart_root') + "/third_party/clang.tar.gz.sha1",
],
},
{
# Pull clang if needed or requested via GYP_DEFINES.
'name': 'gn_clang',
'pattern': '.',
'action': ['python', 'sdk/tools/clang/scripts/update.py', '--if-needed'],
},
{
"pattern": ".",
"action": ["python", Var("dart_root") + "/tools/gyp_dart.py"],

0 comments on commit 7e1b7e5

Please sign in to comment.
You can’t perform that action at this time.