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

Unified Diff: runtime/observatory/BUILD.gn

Issue 2023703002: Beginning work on GN build (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Really add //build. Add dart_bootstrap rule. Created 4 years, 7 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 | « runtime/bin/builtin.cc ('k') | runtime/vm/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/BUILD.gn
diff --git a/runtime/observatory/BUILD.gn b/runtime/observatory/BUILD.gn
index 98cfe319f5ef525912382acc0242a38f90321ebb..94859bbc6ac26dfdab0a606ece5f9b09350e1782 100644
--- a/runtime/observatory/BUILD.gn
+++ b/runtime/observatory/BUILD.gn
@@ -17,9 +17,9 @@ declare_args() {
observatory_sources_gypi =
exec_script("../../tools/gypi_to_gn.py",
[ rebase_path(
- "//dart/runtime/observatory/observatory_sources.gypi") ],
+ "observatory_sources.gypi") ],
"scope",
- [ "//dart/runtime/observatory/observatory_sources.gypi" ])
+ [ "observatory_sources.gypi" ])
copy("copy_observatory") {
sources = rebase_path(observatory_sources_gypi.sources,
@@ -35,7 +35,7 @@ action("write_observatory_pubspec_yaml") {
":copy_observatory",
]
- script = "../../tools/observatory_tool.py"
+ script = rebase_path("../../tools/observatory_tool.py")
inputs = [
rebase_path("pubspec.yaml"),
@@ -46,18 +46,18 @@ action("write_observatory_pubspec_yaml") {
"--pub-executable",
dart_host_pub_exe,
"--directory",
- rebase_path("$root_gen_dir/observatory_copy/dart/runtime/observatory/"),
+ rebase_path("$root_gen_dir/observatory_copy/runtime/observatory/"),
"--command",
"rewrite",
- rebase_path("//dart/runtime/observatory/pubspec.yaml"),
+ rebase_path("pubspec.yaml"),
rebase_path(
- "$root_gen_dir/observatory_copy/dart/runtime/observatory/pubspec.yaml"),
+ "$root_gen_dir/observatory_copy/runtime/observatory/pubspec.yaml"),
"../../third_party/",
- rebase_path("../../../dart/third_party/"),
+ rebase_path("../../third_party/"),
]
outputs = [
- "$root_gen_dir/observatory_copy/dart/runtime/observatory/pubspec.yaml",
+ "$root_gen_dir/observatory_copy/runtime/observatory/pubspec.yaml",
]
}
@@ -66,11 +66,11 @@ action("copy_observatory_deps") {
":write_observatory_pubspec_yaml",
]
- script = "//dart/tools/observatory_tool.py"
+ script = "../../tools/observatory_tool.py"
inputs = [
script,
- "$root_gen_dir/observatory_copy/dart/runtime/observatory/pubspec.yaml",
+ "$root_gen_dir/observatory_copy/runtime/observatory/pubspec.yaml",
]
args = [
@@ -78,15 +78,15 @@ action("copy_observatory_deps") {
"--pub-executable",
dart_host_pub_exe,
"--stamp",
- rebase_path("$root_gen_dir/observatory_copy/dart/runtime/observatory/packages.stamp"),
+ rebase_path("$root_gen_dir/observatory_copy/runtime/observatory/packages.stamp"),
"--directory",
- rebase_path("$root_gen_dir/observatory_copy/dart/runtime/observatory/"),
+ rebase_path("$root_gen_dir/observatory_copy/runtime/observatory/"),
"--command",
"get",
]
outputs = [
- "$root_gen_dir/observatory_copy/dart/runtime/observatory/packages.stamp",
+ "$root_gen_dir/observatory_copy/runtime/observatory/packages.stamp",
]
}
@@ -94,18 +94,18 @@ action("pub_build_observatory") {
sources =
rebase_path(observatory_sources_gypi.sources,
"",
- "$root_gen_dir/observatory_copy/dart/runtime/observatory")
+ "$root_gen_dir/observatory_copy/runtime/observatory")
deps = [
":copy_observatory",
":copy_observatory_deps",
]
- script = "//dart/tools/observatory_tool.py"
+ script = "../../tools/observatory_tool.py"
inputs = [
script,
- "$root_gen_dir/observatory_copy/dart/runtime/observatory/packages.stamp",
+ "$root_gen_dir/observatory_copy/runtime/observatory/packages.stamp",
]
inputs += sources
@@ -114,7 +114,7 @@ action("pub_build_observatory") {
"--pub-executable",
dart_host_pub_exe,
"--directory",
- rebase_path("$root_gen_dir/observatory_copy/dart/runtime/observatory/"),
+ rebase_path("$root_gen_dir/observatory_copy/runtime/observatory/"),
"--command",
"build",
rebase_path("$root_out_dir/observatory/build"),
@@ -130,7 +130,7 @@ action("deploy_observatory") {
":pub_build_observatory",
]
- script = "//dart/tools/observatory_tool.py"
+ script = "../../tools/observatory_tool.py"
inputs = [
script,
@@ -152,41 +152,68 @@ action("deploy_observatory") {
]
}
-action("archive_observatory") {
- deps = [
- ":deploy_observatory",
- ]
+template("observatory_archive") {
+ assert(defined(invoker.inner_namespace), "Need inner_namespace in $target_name")
+ assert(defined(invoker.outer_namespace), "Need outer_namespace in $target_name")
+ action(target_name) {
+ deps = [
+ ":deploy_observatory",
+ ]
+
+ script = "../tools/create_archive.py"
+
+ inputs = [
+ script,
+ "$root_out_dir/observatory/deployed/web/index.html.polymer.bootstrap.dart.js",
+ ]
+
+ inner_namespace = invoker.inner_namespace
+ outer_namespace = invoker.outer_namespace
+ output_name = target_name
+ args = [
+ "--output",
+ rebase_path("$root_gen_dir/observatory/${output_name}.cc"),
+ "--tar_output",
+ rebase_path("$root_gen_dir/observatory/${output_name}.tar"),
+ "--outer_namespace", outer_namespace,
+ "--inner_namespace", inner_namespace,
+ "--name", "observatory_assets_archive",
+ "--client_root", rebase_path("$root_out_dir/observatory/deployed/web/"),
+ ]
+
+ outputs = [
+ "$root_gen_dir/observatory/${output_name}.cc",
+ "$root_gen_dir/observatory/${output_name}.tar",
+ ]
+ }
+}
- script = "//dart/runtime/tools/create_archive.py"
+observatory_archive("embedded_archive_observatory") {
+ outer_namespace = "dart"
+ inner_namespace = "observatory"
+}
- inputs = [
- script,
- "$root_out_dir/observatory/deployed/web/index.html.polymer.bootstrap.dart.js",
+source_set("embedded_observatory_archive") {
+ deps = [
+ ":embedded_archive_observatory",
]
- args = [
- "--output",
- rebase_path("$root_gen_dir/observatory/observatory_archive.cc"),
- "--tar_output",
- rebase_path("$root_gen_dir/observatory/observatory_archive.tar"),
- "--outer_namespace", "dart",
- "--inner_namespace", "observatory",
- "--name", "observatory_assets_archive",
- "--client_root", rebase_path("$root_out_dir/observatory/deployed/web/"),
+ sources = [
+ rebase_path("$root_gen_dir/observatory/embedded_archive_observatory.cc"),
]
+}
- outputs = [
- "$root_gen_dir/observatory/observatory_archive.cc",
- "$root_gen_dir/observatory/observatory_archive.tar",
- ]
+observatory_archive("standalone_archive_observatory") {
+ outer_namespace = "dart"
+ inner_namespace = "bin"
}
-source_set("embedded_observatory_archive") {
+source_set("standalone_observatory_archive") {
deps = [
- ":archive_observatory",
+ ":standalone_archive_observatory",
]
sources = [
- rebase_path("$root_gen_dir/observatory/observatory_archive.cc"),
+ rebase_path("$root_gen_dir/observatory/standalone_archive_observatory.cc"),
]
}
« no previous file with comments | « runtime/bin/builtin.cc ('k') | runtime/vm/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698