mirror of
https://github.com/dart-lang/sdk
synced 2024-10-03 00:29:50 +00:00
GN: Relativize occurrances of //dart
The Dart root in the Dart tree is at //, not //dart. But in the Dart tree we can refer to the root with a relative path. R=asiva@google.com Review URL: https://codereview.chromium.org/2301833003 .
This commit is contained in:
parent
c15bac4812
commit
4024fe154a
|
@ -31,7 +31,7 @@ action("gen_resources_cc") {
|
|||
# the Dart runtime to gn, this path might need to be updated.
|
||||
sources = rebase_path(resources_sources_gypi.sources,
|
||||
"",
|
||||
"//dart/runtime/bin/vmservice/")
|
||||
"../bin/vmservice/")
|
||||
outputs = [ "$target_gen_dir/resources_gen.cc" ]
|
||||
args = [
|
||||
"--output",
|
||||
|
|
|
@ -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/observatory_sources.gypi") ],
|
||||
"scope",
|
||||
[ "//dart/runtime/observatory/observatory_sources.gypi" ])
|
||||
[ "../observatory/observatory_sources.gypi" ])
|
||||
|
||||
copy("copy_observatory") {
|
||||
sources = rebase_path(observatory_sources_gypi.sources,
|
||||
|
@ -49,11 +49,11 @@ action("write_observatory_pubspec_yaml") {
|
|||
rebase_path("$root_gen_dir/observatory_copy/dart/runtime/observatory/"),
|
||||
"--command",
|
||||
"rewrite",
|
||||
rebase_path("//dart/runtime/observatory/pubspec.yaml"),
|
||||
rebase_path("../observatory/pubspec.yaml"),
|
||||
rebase_path(
|
||||
"$root_gen_dir/observatory_copy/dart/runtime/observatory/pubspec.yaml"),
|
||||
"../../third_party/",
|
||||
rebase_path("../../../dart/third_party/"),
|
||||
rebase_path("../../third_party/"),
|
||||
]
|
||||
|
||||
outputs = [
|
||||
|
@ -66,7 +66,7 @@ action("copy_observatory_deps") {
|
|||
":write_observatory_pubspec_yaml",
|
||||
]
|
||||
|
||||
script = "//dart/tools/observatory_tool.py"
|
||||
script = "../../tools/observatory_tool.py"
|
||||
|
||||
inputs = [
|
||||
script,
|
||||
|
@ -101,7 +101,7 @@ action("pub_build_observatory") {
|
|||
":copy_observatory_deps",
|
||||
]
|
||||
|
||||
script = "//dart/tools/observatory_tool.py"
|
||||
script = "../../tools/observatory_tool.py"
|
||||
|
||||
inputs = [
|
||||
script,
|
||||
|
@ -130,7 +130,7 @@ action("deploy_observatory") {
|
|||
":pub_build_observatory",
|
||||
]
|
||||
|
||||
script = "//dart/tools/observatory_tool.py"
|
||||
script = "../../tools/observatory_tool.py"
|
||||
|
||||
inputs = [
|
||||
script,
|
||||
|
@ -157,7 +157,7 @@ action("archive_observatory") {
|
|||
":deploy_observatory",
|
||||
]
|
||||
|
||||
script = "//dart/runtime/tools/create_archive.py"
|
||||
script = "../tools/create_archive.py"
|
||||
|
||||
inputs = [
|
||||
script,
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
# 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.
|
||||
|
||||
default_dart_root = rebase_path("../..")
|
||||
|
||||
# This build rule will copy the source for one Dart SDK library.
|
||||
#
|
||||
# Required arguments:
|
||||
|
@ -13,7 +15,7 @@
|
|||
# Base path to copy sources. Default value is "$root_gen_dir/dart_sdk".
|
||||
#
|
||||
# dart_root
|
||||
# Path to the Dart SDK source root. Default value is "//dart".
|
||||
# Path to the Dart SDK source root. Default value is "../..".
|
||||
#
|
||||
# The sources will be copied into $root_gen_dir/dart_sdk/$sdk_lib_name/.
|
||||
#
|
||||
|
@ -22,7 +24,7 @@ template("dart_sdk_lib_copy") {
|
|||
if (defined(invoker.dart_root)) {
|
||||
dart_root = rebase_path(invoker.dart_root)
|
||||
} else {
|
||||
dart_root = rebase_path("//dart")
|
||||
dart_root = default_dart_root
|
||||
}
|
||||
if (defined(invoker.destination)) {
|
||||
destination = invoker.destination
|
||||
|
|
Loading…
Reference in a new issue