Use a GN variable (dart_src) to reference the location of the Dart checkout. (flutter/engine#50624)

Towards https://github.com/flutter/flutter/issues/143335
This commit is contained in:
Chinmay Garde
2024-02-14 21:12:23 -08:00
committed by GitHub
parent 95e8704f1a
commit 6c17d7bf9d
51 changed files with 221 additions and 208 deletions

View File

@@ -8,7 +8,7 @@ import("//flutter/examples/examples.gni")
import("//flutter/shell/platform/config.gni")
import("//flutter/shell/platform/glfw/config.gni")
import("//flutter/testing/testing.gni")
import("//third_party/dart/build/dart/copy_tree.gni")
import("$dart_src/build/dart/copy_tree.gni")
# Whether to build the dartdevc sdk, libraries, and source files
# required for the flutter web sdk.
@@ -104,7 +104,7 @@ group("flutter") {
# This must be listed explicitly for desktop cross-builds since
# //flutter/lib/snapshot:generate_snapshot_bin will only build
# gen_snapshot for the host and not the target.
"//third_party/dart/runtime/bin:gen_snapshot",
"$dart_src/runtime/bin:gen_snapshot",
# Impeller artifacts - compiler and libtessellator
"//flutter/impeller/compiler:impellerc",
@@ -117,7 +117,7 @@ group("flutter") {
if (host_os == "linux") {
public_deps += [
# Built alongside gen_snapshot for 64 bit targets
"//third_party/dart/runtime/bin:analyze_snapshot",
"$dart_src/runtime/bin:analyze_snapshot",
]
}
@@ -300,8 +300,7 @@ if (is_fuchsia && enable_unittests) {
# Dart tree, and is less ambiguous than specifying the binary to build since
# we can specify the toolchain to use, too.
if (host_os == "win") {
_gen_snapshot_target =
"//third_party/dart/runtime/bin:gen_snapshot($host_toolchain)"
_gen_snapshot_target = "$dart_src/runtime/bin:gen_snapshot($host_toolchain)"
copy("gen_snapshot") {
deps = [ _gen_snapshot_target ]

View File

@@ -24,13 +24,13 @@ generated_file("artifacts_entitlement_config") {
if (build_engine_artifacts && !is_android) {
zip_bundle("artifacts") {
deps = [
"$dart_src/runtime/bin:gen_snapshot",
"//flutter/flutter_frontend_server:frontend_server",
"//flutter/impeller/compiler:impellerc",
"//flutter/impeller/tessellator:tessellator_shared",
"//flutter/lib/snapshot:generate_snapshot_bin",
"//flutter/shell/testing:testing",
"//flutter/tools/path_ops:path_ops",
"//third_party/dart/runtime/bin:gen_snapshot",
]
if (is_mac) {
# TODO(godofredoc): Remove after paths are standardized flutter/flutter#105351.
@@ -196,7 +196,7 @@ if (build_engine_artifacts && flutter_prebuilt_dart_sdk) {
# If there is no prebuilt sdk, create the dart sdk archive from the built sdk.
if (build_engine_artifacts && !flutter_prebuilt_dart_sdk) {
zip_bundle_from_file("dart_sdk_archive") {
deps = [ "//third_party/dart:create_sdk" ]
deps = [ "$dart_src:create_sdk" ]
output = "dart-sdk-$full_target_platform_name.zip"
files = [
{

View File

@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//flutter/build/dart/dart.gni")
# Generates an assembly file defining a given symbol with the bytes from a
# binary file. Places the symbol in a text section if 'executable' is true,
# otherwise places the symbol in a read-only data section.
@@ -13,7 +15,7 @@ template("bin_to_assembly") {
action(target_name) {
deps = invoker.deps
script = "//third_party/dart/runtime/tools/bin_to_assembly.py"
script = "$dart_src/runtime/tools/bin_to_assembly.py"
output = "$target_gen_dir/${invoker.input}.S"
args = [
"--input",
@@ -57,7 +59,7 @@ template("bin_to_coff") {
action(target_name) {
deps = invoker.deps
script = "//third_party/dart/runtime/tools/bin_to_coff.py"
script = "$dart_src/runtime/tools/bin_to_coff.py"
output = "$target_gen_dir/${invoker.input}.o"
args = [
"--input",

View File

@@ -3,8 +3,10 @@
# found in the LICENSE file.
import("//flutter/build/concurrent_jobs.gni")
import("//flutter/build/dart/dart.gni")
import("//flutter/common/config.gni")
import("//third_party/dart/build/dart/copy_tree.gni")
import("$dart_src/build/dart/copy_tree.gni")
declare_args() {
# Maximum number of Dart processes to run in parallel.
@@ -35,7 +37,7 @@ if (build_engine_artifacts) {
}
} else {
group("dart_sdk") {
public_deps = [ "//third_party/dart:create_sdk" ]
public_deps = [ "$dart_src:create_sdk" ]
}
}
}

View File

@@ -0,0 +1,7 @@
# Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
declare_args() {
dart_src = "//third_party/dart"
}

View File

@@ -6,9 +6,11 @@
import("//build/compiled_action.gni")
import("//build/module_args/dart.gni")
import("//flutter/build/dart/dart.gni")
import("//flutter/common/config.gni")
import("//third_party/dart/build/dart/dart_action.gni")
import("//third_party/dart/sdk_args.gni")
import("$dart_src/build/dart/dart_action.gni")
import("$dart_src/sdk_args.gni")
# Generates a Dart kernel snapshot using flutter_frontend_server.
#
@@ -108,7 +110,7 @@ template("flutter_frontend_server") {
[ "pool" ])
deps = common_deps
pool = "//flutter/build/dart:dart_pool"
script = "//third_party/dart/pkg/frontend_server/bin/frontend_server_starter.dart"
script = "$dart_src/pkg/frontend_server/bin/frontend_server_starter.dart"
inputs = [ invoker.main_dart ]
outputs = [ invoker.kernel_output ]
depfile = snapshot_depfile
@@ -179,10 +181,10 @@ template("flutter_snapshot") {
# By default Dart will create a 32-bit gen_snapshot host binary if the target
# platform is 32-bit. Override this to create a 64-bit gen_snapshot for x86
# targets because some host platforms may not support 32-bit binaries.
tool = "//third_party/dart/runtime/bin:gen_snapshot_host_targeting_host"
tool = "$dart_src/runtime/bin:gen_snapshot_host_targeting_host"
toolchain = "//build/toolchain/$host_os:clang_x64"
} else {
tool = "//third_party/dart/runtime/bin:gen_snapshot"
tool = "$dart_src/runtime/bin:gen_snapshot"
}
inputs = [ kernel_output ]

View File

@@ -16,7 +16,7 @@ dart_library("matcher") {
language_version = "2.12"
deps = [ "//third_party/dart/third_party/pkg/stack_trace" ]
deps = [ "$dart_src/third_party/pkg/stack_trace" ]
sources = [
"expect.dart",

View File

@@ -16,7 +16,7 @@ dart_library("stack_trace") {
language_version = "2.12"
deps = [ "//third_party/dart/third_party/pkg/path" ]
deps = [ "$dart_src/third_party/pkg/path" ]
sources = [
"src/chain.dart",

View File

@@ -18,8 +18,8 @@ dart_library("quiver") {
language_version = "2.0"
deps = [
"//third_party/dart/pkg/meta",
"//third_party/dart/third_party/pkg/matcher",
"$dart_src/pkg/meta",
"$dart_src/third_party/pkg/matcher",
]
sources = [

View File

@@ -214,6 +214,7 @@ source_set("display_list_benchmarks_source") {
deps = [
":display_list",
":display_list_fixtures",
"$dart_src/runtime:libdart_jit", # for tracing
"//flutter/benchmarking",
"//flutter/common/graphics",
"//flutter/display_list/testing:display_list_surface_provider",
@@ -222,7 +223,6 @@ source_set("display_list_benchmarks_source") {
"//flutter/skia",
"//flutter/testing:skia",
"//flutter/testing:testing_lib",
"//third_party/dart/runtime:libdart_jit", # for tracing
]
}

View File

@@ -187,6 +187,7 @@ if (enable_unittests) {
":flow",
":flow_fixtures",
":flow_testing",
"$dart_src/runtime:libdart_jit", # for tracing
"//flutter/common/graphics",
"//flutter/display_list/testing:display_list_testing",
"//flutter/fml",
@@ -194,7 +195,6 @@ if (enable_unittests) {
"//flutter/skia",
"//flutter/testing:skia",
"//flutter/testing:testing_lib",
"//third_party/dart/runtime:libdart_jit", # for tracing
"//third_party/googletest:gtest",
]

View File

@@ -9,7 +9,7 @@ copy("frontend_server") {
snapshot =
"$host_prebuilt_dart_sdk/bin/snapshots/frontend_server.dart.snapshot"
} else {
deps = [ "//third_party/dart/utils/kernel-service:frontend_server" ]
deps = [ "$dart_src/utils/kernel-service:frontend_server" ]
snapshot = "$root_out_dir/frontend_server.dart.snapshot"
}

View File

@@ -113,7 +113,7 @@ source_set("fml") {
]
deps = [
"//third_party/dart/runtime:dart_api",
"$dart_src/runtime:dart_api",
# These need to be in sync with the Fuchsia buildroot.
"//third_party/icu",

View File

@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//flutter/build/dart/dart.gni")
source_set("io") {
sources = [
"dart_io.cc",
@@ -9,13 +11,13 @@ source_set("io") {
]
deps = [
"$dart_src/runtime:dart_api",
"$dart_src/runtime/bin:dart_io_api",
"//flutter/fml",
"//flutter/third_party/tonic",
"//third_party/dart/runtime:dart_api",
"//third_party/dart/runtime/bin:dart_io_api",
]
configs += [ "//third_party/dart/runtime:dart_config" ]
configs += [ "$dart_src/runtime:dart_config" ]
public_configs = [ "//flutter:config" ]
}

View File

@@ -8,7 +8,7 @@ import("//flutter/build/bin_to_obj.gni")
import("//flutter/common/config.gni")
import("//flutter/impeller/tools/impeller.gni")
import("//flutter/lib/ui/dart_ui.gni")
import("//third_party/dart/utils/compile_platform.gni")
import("$dart_src/utils/compile_platform.gni")
# Generates the Dart/Flutter core platform files and tools.
#
@@ -39,8 +39,7 @@ group("generate_snapshot_bins") {
# Build analyze_snapshot for 64-bit target CPUs.
if (host_os == "linux" && (target_cpu == "x64" || target_cpu == "arm64")) {
deps +=
[ "//third_party/dart/runtime/bin:analyze_snapshot($host_toolchain)" ]
deps += [ "$dart_src/runtime/bin:analyze_snapshot($host_toolchain)" ]
}
}
@@ -65,10 +64,10 @@ compiled_action("generate_snapshot_bin") {
# By default Dart will create a 32-bit gen_snapshot host binary if the target
# platform is 32-bit. Override this to create a 64-bit gen_snapshot for x86
# targets because some host platforms may not support 32-bit binaries.
tool = "//third_party/dart/runtime/bin:gen_snapshot_host_targeting_host"
tool = "$dart_src/runtime/bin:gen_snapshot_host_targeting_host"
toolchain = "//build/toolchain/$host_os:clang_x64"
} else {
tool = "//third_party/dart/runtime/bin:gen_snapshot"
tool = "$dart_src/runtime/bin:gen_snapshot"
}
platform_kernel = "$root_out_dir/flutter_patched_sdk/platform_strong.dill"
@@ -159,9 +158,9 @@ if (host_os == "mac" && target_os != "mac" &&
copy("create_arm_gen_snapshot") {
# The toolchain-specific output directory. For cross-compiles, this is a
# clang-x64 or clang-arm64 subdirectory of the top-level build directory.
host_output_dir = get_label_info(
"//third_party/dart/runtime/bin:gen_snapshot($host_toolchain)",
"root_out_dir")
host_output_dir =
get_label_info("$dart_src/runtime/bin:gen_snapshot($host_toolchain)",
"root_out_dir")
# Determine suffixed output gen_snapshot name.
target_cpu_suffix = target_cpu
@@ -171,7 +170,7 @@ if (host_os == "mac" && target_os != "mac" &&
sources = [ "${host_output_dir}/gen_snapshot" ]
outputs = [ "${host_output_dir}/gen_snapshot_${target_cpu_suffix}" ]
deps = [ "//third_party/dart/runtime/bin:gen_snapshot($host_toolchain)" ]
deps = [ "$dart_src/runtime/bin:gen_snapshot($host_toolchain)" ]
visibility = [ ":*" ]
}
}
@@ -187,13 +186,13 @@ if (host_os == "mac" && target_os == "mac") {
copy("create_macos_gen_snapshots") {
# The toolchain-specific output directory. For cross-compiles, this is a
# clang-x64 or clang-arm64 subdirectory of the top-level build directory.
host_output_dir = get_label_info(
"//third_party/dart/runtime/bin:gen_snapshot($host_toolchain)",
"root_out_dir")
host_output_dir =
get_label_info("$dart_src/runtime/bin:gen_snapshot($host_toolchain)",
"root_out_dir")
sources = [ "${host_output_dir}/gen_snapshot" ]
outputs = [ "${root_out_dir}/gen_snapshot_${target_cpu}" ]
deps = [ "//third_party/dart/runtime/bin:gen_snapshot($host_toolchain)" ]
deps = [ "$dart_src/runtime/bin:gen_snapshot($host_toolchain)" ]
}
}

View File

@@ -167,6 +167,7 @@ source_set("ui") {
]
deps = [
"$dart_src/runtime/bin:dart_io_api",
"//flutter/assets",
"//flutter/common",
"//flutter/common/graphics",
@@ -178,7 +179,6 @@ source_set("ui") {
"//flutter/skia",
"//flutter/third_party/rapidjson",
"//flutter/third_party/tonic",
"//third_party/dart/runtime/bin:dart_io_api",
"//third_party/zlib:zlib",
]
@@ -282,6 +282,7 @@ if (enable_unittests) {
deps = [
":ui",
":ui_unittests_fixtures",
"$dart_src/runtime/bin:elf_loader",
"//flutter/common",
"//flutter/impeller",
"//flutter/lib/snapshot",
@@ -290,7 +291,6 @@ if (enable_unittests) {
"//flutter/testing:dart",
"//flutter/testing:fixture_test",
"//flutter/third_party/tonic",
"//third_party/dart/runtime/bin:elf_loader",
]
# TODO(https://github.com/flutter/flutter/issues/63837): This test is hard-coded to use a TestGLSurface so it cannot run on fuchsia.

View File

@@ -29,11 +29,11 @@ group("libdart") {
public_deps = []
if (flutter_runtime_mode == "profile" || flutter_runtime_mode == "release") {
public_deps += [ "//third_party/dart/runtime:libdart_precompiled_runtime" ]
public_deps += [ "$dart_src/runtime:libdart_precompiled_runtime" ]
} else {
public_deps += [
"$dart_src/runtime:libdart_jit",
"//flutter/lib/snapshot",
"//third_party/dart/runtime:libdart_jit",
]
}
}
@@ -44,9 +44,9 @@ source_set("dart_plugin_registrant") {
"dart_plugin_registrant.h",
]
deps = [
"$dart_src/runtime:dart_api",
"//flutter/fml",
"//flutter/third_party/tonic",
"//third_party/dart/runtime:dart_api",
]
}
@@ -103,6 +103,8 @@ source_set("runtime") {
deps = [
":dart_plugin_registrant",
":test_font",
"$dart_src/runtime:dart_api",
"$dart_src/runtime/bin:dart_io_api",
"//flutter/assets",
"//flutter/common",
"//flutter/flow",
@@ -112,16 +114,12 @@ source_set("runtime") {
"//flutter/skia",
"//flutter/third_party/tonic",
"//flutter/third_party/txt",
"//third_party/dart/runtime:dart_api",
"//third_party/dart/runtime/bin:dart_io_api",
]
if (flutter_runtime_mode != "release" && !is_fuchsia) {
# Only link in Observatory in non-release modes on non-Fuchsia. Fuchsia
# instead puts Observatory into the runner's package.
deps += [
"//third_party/dart/runtime/observatory:embedded_observatory_archive",
]
deps += [ "$dart_src/runtime/observatory:embedded_observatory_archive" ]
}
}
@@ -147,6 +145,7 @@ if (enable_unittests) {
":libdart",
":runtime",
":runtime_fixtures",
"$dart_src/runtime/bin:elf_loader",
"//flutter/common",
"//flutter/fml",
"//flutter/lib/snapshot",
@@ -155,7 +154,6 @@ if (enable_unittests) {
"//flutter/testing:dart",
"//flutter/testing:fixture_test",
"//flutter/third_party/tonic",
"//third_party/dart/runtime/bin:elf_loader",
]
}

View File

@@ -20,7 +20,7 @@ import("//flutter/testing/testing.gni")
# List datadeps
template("dart_embedder_resources") {
action(target_name) {
script = "//third_party/dart/runtime/tools/create_resources.py"
script = "$dart_src/runtime/tools/create_resources.py"
deps = []
if (defined(invoker.deps)) {
deps += invoker.deps
@@ -136,6 +136,7 @@ source_set("common") {
]
deps = [
"$dart_src/runtime:dart_api",
"//flutter/assets",
"//flutter/common",
"//flutter/common/graphics",
@@ -146,7 +147,6 @@ source_set("common") {
"//flutter/shell/common:base64",
"//flutter/shell/profiling",
"//flutter/skia",
"//third_party/dart/runtime:dart_api",
]
if (impeller_supports_rendering) {

View File

@@ -639,9 +639,9 @@ generated_file("android_entitlement_config") {
if (target_cpu != "x86") {
zip_bundle("gen_snapshot") {
gen_snapshot_bin = "gen_snapshot"
gen_snapshot_out_dir = get_label_info(
"//third_party/dart/runtime/bin:gen_snapshot($host_toolchain)",
"root_out_dir")
gen_snapshot_out_dir =
get_label_info("$dart_src/runtime/bin:gen_snapshot($host_toolchain)",
"root_out_dir")
gen_snapshot_path = rebase_path("$gen_snapshot_out_dir/$gen_snapshot_bin")
if (host_os == "linux") {
@@ -661,7 +661,7 @@ if (target_cpu != "x86") {
},
]
deps = [ "//third_party/dart/runtime/bin:gen_snapshot($host_toolchain)" ]
deps = [ "$dart_src/runtime/bin:gen_snapshot($host_toolchain)" ]
if (host_os == "mac") {
deps += [ ":android_entitlement_config" ]
@@ -678,9 +678,9 @@ if (target_cpu != "x86") {
# BUG: https://github.com/flutter/flutter/issues/105351
zip_bundle("new_gen_snapshot") {
gen_snapshot_bin = "gen_snapshot"
gen_snapshot_out_dir = get_label_info(
"//third_party/dart/runtime/bin:gen_snapshot($host_toolchain)",
"root_out_dir")
gen_snapshot_out_dir =
get_label_info("$dart_src/runtime/bin:gen_snapshot($host_toolchain)",
"root_out_dir")
gen_snapshot_path = rebase_path("$gen_snapshot_out_dir/$gen_snapshot_bin")
if (host_os == "linux") {
@@ -700,7 +700,7 @@ if (target_cpu != "x86") {
},
]
deps = [ "//third_party/dart/runtime/bin:gen_snapshot($host_toolchain)" ]
deps = [ "$dart_src/runtime/bin:gen_snapshot($host_toolchain)" ]
if (host_os == "mac") {
deps += [ ":android_entitlement_config" ]
@@ -716,13 +716,12 @@ if (target_cpu != "x86") {
if (host_os == "linux" && (target_cpu == "x64" || target_cpu == "arm64")) {
zip_bundle("analyze_snapshot") {
deps =
[ "//third_party/dart/runtime/bin:analyze_snapshot($host_toolchain)" ]
deps = [ "$dart_src/runtime/bin:analyze_snapshot($host_toolchain)" ]
analyze_snapshot_bin = "analyze_snapshot"
analyze_snapshot_out_dir =
get_label_info(
"//third_party/dart/runtime/bin:analyze_snapshot($host_toolchain)",
"$dart_src/runtime/bin:analyze_snapshot($host_toolchain)",
"root_out_dir")
analyze_snapshot_path =
rebase_path("$analyze_snapshot_out_dir/$analyze_snapshot_bin")
@@ -748,13 +747,12 @@ if (host_os == "linux" && (target_cpu == "x64" || target_cpu == "arm64")) {
# TODO(godofredoc): Remove analyze_snapshot and rename new_analyze_snapshot when v2 migration is complete.
# BUG: https://github.com/flutter/flutter/issues/105351
zip_bundle("new_analyze_snapshot") {
deps =
[ "//third_party/dart/runtime/bin:analyze_snapshot($host_toolchain)" ]
deps = [ "$dart_src/runtime/bin:analyze_snapshot($host_toolchain)" ]
analyze_snapshot_bin = "analyze_snapshot"
analyze_snapshot_out_dir =
get_label_info(
"//third_party/dart/runtime/bin:analyze_snapshot($host_toolchain)",
"$dart_src/runtime/bin:analyze_snapshot($host_toolchain)",
"root_out_dir")
analyze_snapshot_path =
rebase_path("$analyze_snapshot_out_dir/$analyze_snapshot_bin")

View File

@@ -162,8 +162,8 @@ if (enable_unittests) {
deps = [
":common_cpp_core",
":common_cpp_core_fixtures",
"$dart_src/runtime:libdart_jit",
"//flutter/testing",
"//third_party/dart/runtime:libdart_jit",
]
public_configs = [ "//flutter:config" ]

View File

@@ -62,7 +62,7 @@ executable("client_wrapper_unittests") {
# TODO(chunhtai): Consider refactoring flutter_root/testing so that there's a testing
# target that doesn't require a Dart runtime to be linked in.
# https://github.com/flutter/flutter/issues/41414.
"//third_party/dart/runtime:libdart_jit",
"$dart_src/runtime:libdart_jit",
]
defines = [ "FLUTTER_DESKTOP_LIBRARY" ]

View File

@@ -128,9 +128,9 @@ executable("framework_common_unittests") {
deps = [
":framework_common",
":framework_common_fixtures",
"$dart_src/runtime:libdart_jit",
"//flutter/testing",
"//flutter/third_party/ocmock:ocmock",
"//third_party/dart/runtime:libdart_jit",
]
public_configs = [ "//flutter:config" ]

View File

@@ -100,6 +100,8 @@ template("embedder_source_set") {
public_deps = [ ":embedder_headers" ]
deps = [
":embedder_gpu_configuration",
"$dart_src/runtime/bin:dart_io_api",
"$dart_src/runtime/bin:elf_loader",
"//flutter/assets",
"//flutter/common",
"//flutter/common/graphics",
@@ -110,8 +112,6 @@ template("embedder_source_set") {
"//flutter/shell/common",
"//flutter/skia",
"//flutter/third_party/tonic",
"//third_party/dart/runtime/bin:dart_io_api",
"//third_party/dart/runtime/bin:elf_loader",
]
if (embedder_enable_gl) {
@@ -291,6 +291,7 @@ if (enable_unittests) {
":embedder",
":embedder_gpu_configuration",
":fixtures",
"$dart_src/runtime/bin:elf_loader",
"//flutter/flow",
"//flutter/lib/snapshot",
"//flutter/lib/ui",
@@ -300,7 +301,6 @@ if (enable_unittests) {
"//flutter/testing:dart",
"//flutter/testing:skia",
"//flutter/third_party/tonic",
"//third_party/dart/runtime/bin:elf_loader",
]
if (test_enable_gl) {
@@ -416,7 +416,7 @@ if (enable_unittests) {
#"//flutter/testing:dart",
#"//flutter/testing:skia",
#"//flutter/third_party/tonic",
#"//third_party/dart/runtime/bin:elf_loader",
#"$dart_src/runtime/bin:elf_loader",
#"//flutter/skia",
]
}

View File

@@ -26,8 +26,8 @@ shared_library("zircon_ffi") {
]
deps = [
"$dart_src/runtime:dart_api",
"$fuchsia_sdk_root/pkg:zx",
"//flutter/fml",
"//third_party/dart/runtime:dart_api",
]
}

View File

@@ -10,29 +10,26 @@ application_snapshot("kernel_compiler") {
deps = [ "../flutter/kernel:kernel_platform_files($host_toolchain)" ]
package_config =
rebase_path("//third_party/dart/.dart_tool/package_config.json")
package_config = rebase_path("$dart_src/.dart_tool/package_config.json")
training_args = [
"--train",
rebase_path(main_dart),
]
kernel_compiler_files =
exec_script("//third_party/dart/tools/list_dart_files.py",
[
"absolute",
rebase_path("."),
],
"list lines")
kernel_compiler_files = exec_script("$dart_src/tools/list_dart_files.py",
[
"absolute",
rebase_path("."),
],
"list lines")
kernel_compiler_files +=
exec_script("//third_party/dart/tools/list_dart_files.py",
[
"absolute",
rebase_path("//third_party/dart/pkg"),
],
"list lines")
kernel_compiler_files += exec_script("$dart_src/tools/list_dart_files.py",
[
"absolute",
rebase_path("$dart_src/pkg"),
],
"list lines")
inputs = kernel_compiler_files
}
@@ -40,18 +37,16 @@ application_snapshot("kernel_compiler") {
application_snapshot("_list_libraries_kernel") {
visibility = [ ":*" ]
snapshot_kind = "kernel"
main_dart = "//third_party/dart/pkg/vm/bin/list_libraries.dart"
package_config =
rebase_path("//third_party/dart/.dart_tool/package_config.json")
main_dart = "$dart_src/pkg/vm/bin/list_libraries.dart"
package_config = rebase_path("$dart_src/.dart_tool/package_config.json")
training_args = []
output = "$target_gen_dir/list_libraries.dart.dill"
}
application_snapshot("list_libraries") {
deps = [ ":_list_libraries_kernel" ]
main_dart = "//third_party/dart/pkg/vm/bin/list_libraries.dart"
package_config =
rebase_path("//third_party/dart/.dart_tool/package_config.json")
main_dart = "$dart_src/pkg/vm/bin/list_libraries.dart"
package_config = rebase_path("$dart_src/.dart_tool/package_config.json")
training_args = [
# train against the dill file which is generated for this snapshot.
rebase_path("$target_gen_dir/list_libraries.dart.dill"),
@@ -59,7 +54,7 @@ application_snapshot("list_libraries") {
}
dart_library("async_helper") {
package_root = "//third_party/dart/pkg/async_helper"
package_root = "$dart_src/pkg/async_helper"
package_name = "async_helper"
pubspec = "$package_root/pubspec.yaml"
@@ -73,7 +68,7 @@ dart_library("async_helper") {
}
dart_library("meta") {
package_root = "//third_party/dart/pkg/meta"
package_root = "$dart_src/pkg/meta"
package_name = "meta"
pubspec = "$package_root/pubspec.yaml"
@@ -88,7 +83,7 @@ dart_library("meta") {
}
dart_library("expect") {
package_root = "//third_party/dart/pkg/expect"
package_root = "$dart_src/pkg/expect"
package_name = "expect"
pubspec = "$package_root/pubspec.yaml"
@@ -126,7 +121,7 @@ dart_library("litetest") {
}
dart_library("args") {
package_root = "//third_party/dart/third_party/pkg/args"
package_root = "$dart_src/third_party/pkg/args"
package_name = "args"
pubspec = "$package_root/pubspec.yaml"
@@ -150,7 +145,7 @@ dart_library("args") {
}
dart_library("collection") {
package_root = "//third_party/dart/third_party/pkg/collection"
package_root = "$dart_src/third_party/pkg/collection"
package_name = "collection"
pubspec = "$package_root/pubspec.yaml"
@@ -190,7 +185,7 @@ dart_library("collection") {
}
dart_library("logging") {
package_root = "//third_party/dart/third_party/pkg/logging"
package_root = "$dart_src/third_party/pkg/logging"
package_name = "logging"
pubspec = "$package_root/pubspec.yaml"
@@ -206,7 +201,7 @@ dart_library("logging") {
}
dart_library("path") {
package_root = "//third_party/dart/third_party/pkg/path"
package_root = "$dart_src/third_party/pkg/path"
package_name = "path"
pubspec = "$package_root/pubspec.yaml"
@@ -231,7 +226,7 @@ dart_library("path") {
}
dart_library("stack_trace") {
package_root = "//third_party/dart/third_party/pkg/stack_trace"
package_root = "$dart_src/third_party/pkg/stack_trace"
package_name = "stack_trace"
pubspec = "$package_root/pubspec.yaml"
@@ -253,7 +248,7 @@ dart_library("stack_trace") {
}
dart_library("matcher") {
package_root = "//third_party/dart/third_party/pkg/matcher"
package_root = "$dart_src/third_party/pkg/matcher"
package_name = "matcher"
pubspec = "$package_root/pubspec.yaml"

View File

@@ -32,13 +32,13 @@ template("runner_sources") {
dart_public_deps = []
if (!invoker.product) {
dart_public_deps += [
"$dart_src/runtime/bin:dart_io_api",
"//flutter/shell/platform/fuchsia/runtime/dart/utils:utils",
"//third_party/dart/runtime/bin:dart_io_api",
]
} else {
dart_public_deps += [
"$dart_src/runtime/bin:dart_io_api_product",
"//flutter/shell/platform/fuchsia/runtime/dart/utils:utils_product",
"//third_party/dart/runtime/bin:dart_io_api_product",
]
}
@@ -114,8 +114,8 @@ runner("dart_jit_runner_bin") {
extra_defines += [ "FLUTTER_PROFILE" ]
}
extra_deps = [
"//third_party/dart/runtime:libdart_jit",
"//third_party/dart/runtime/platform:libdart_platform_jit",
"$dart_src/runtime:libdart_jit",
"$dart_src/runtime/platform:libdart_platform_jit",
]
}
@@ -124,8 +124,8 @@ runner("dart_jit_product_runner_bin") {
product = true
extra_defines = [ "DART_PRODUCT" ]
extra_deps = [
"//third_party/dart/runtime:libdart_jit",
"//third_party/dart/runtime/platform:libdart_platform_jit",
"$dart_src/runtime:libdart_jit",
"$dart_src/runtime/platform:libdart_platform_jit",
]
}
@@ -137,9 +137,9 @@ runner("dart_aot_runner_bin") {
extra_defines += [ "FLUTTER_PROFILE" ]
}
extra_deps = [
"$dart_src/runtime:libdart_precompiled_runtime",
"$dart_src/runtime/platform:libdart_platform_precompiled_runtime",
"embedder:dart_aot_snapshot_cc",
"//third_party/dart/runtime:libdart_precompiled_runtime",
"//third_party/dart/runtime/platform:libdart_platform_precompiled_runtime",
]
}
@@ -151,9 +151,9 @@ runner("dart_aot_product_runner_bin") {
"DART_PRODUCT",
]
extra_deps = [
"$dart_src/runtime:libdart_precompiled_runtime",
"$dart_src/runtime/platform:libdart_platform_precompiled_runtime",
"embedder:dart_aot_product_snapshot_cc",
"//third_party/dart/runtime:libdart_precompiled_runtime",
"//third_party/dart/runtime/platform:libdart_platform_precompiled_runtime",
]
}
@@ -171,7 +171,7 @@ template("aot_runner_package") {
"//flutter/shell/platform/fuchsia/runtime/dart/profiler_symbols:dart_aot_runner",
# TODO(kaushikiska): Figure out how to get the profiler symbols for `libdart_precompiled_runtime`
# "//third_party/dart/runtime:libdart_precompiled_runtime",
# "$dart_src/runtime:libdart_precompiled_runtime",
observatory_target,
]
}
@@ -320,9 +320,9 @@ if (enable_unittests) {
deps = [
":jit_runner_sources_for_test",
"$dart_src/runtime:libdart_jit",
"$dart_src/runtime/platform:libdart_platform_jit",
"//flutter/fml",
"//third_party/dart/runtime:libdart_jit",
"//third_party/dart/runtime/platform:libdart_platform_jit",
"//third_party/googletest:gtest_main",
]
}

View File

@@ -5,7 +5,7 @@
import("//build/compiled_action.gni")
import("//flutter/common/fuchsia_config.gni")
import("//flutter/tools/fuchsia/dart_kernel.gni")
import("//third_party/dart/build/dart/dart_action.gni")
import("$dart_src/build/dart/dart_action.gni")
dart_kernel("shim_kernel") {
main_dart = "shim.dart"

View File

@@ -6,7 +6,7 @@ import("//build/compiled_action.gni")
import("//build/fuchsia/sdk.gni")
import("//flutter/common/config.gni")
import("//flutter/tools/fuchsia/dart.gni")
import("//third_party/dart/utils/compile_platform.gni")
import("$dart_src/utils/compile_platform.gni")
compile_platform("kernel_platform_files") {
single_root_scheme = "org-dartlang-sdk"

View File

@@ -7,7 +7,7 @@ import("//build/fuchsia/sdk.gni")
import("//flutter/common/config.gni")
import("//flutter/tools/fuchsia/dart.gni")
import("//flutter/tools/fuchsia/dart_kernel.gni")
import("//third_party/dart/utils/compile_platform.gni")
import("$dart_src/utils/compile_platform.gni")
dart_kernel("vmservice_product_aot_kernel") {
kernel_platform_files = "../kernel:kernel_platform_files"

View File

@@ -255,8 +255,8 @@ flutter_runner("jit") {
product = false
extra_deps = [
"//third_party/dart/runtime:libdart_jit",
"//third_party/dart/runtime/platform:libdart_platform_jit",
"$dart_src/runtime:libdart_jit",
"$dart_src/runtime/platform:libdart_platform_jit",
]
}
@@ -265,8 +265,8 @@ flutter_runner("jit_product") {
product = true
extra_deps = [
"//third_party/dart/runtime:libdart_jit",
"//third_party/dart/runtime/platform:libdart_platform_jit",
"$dart_src/runtime:libdart_jit",
"$dart_src/runtime/platform:libdart_platform_jit",
]
}
@@ -275,8 +275,8 @@ flutter_runner("aot") {
product = false
extra_deps = [
"//third_party/dart/runtime:libdart_precompiled_runtime",
"//third_party/dart/runtime/platform:libdart_platform_precompiled_runtime",
"$dart_src/runtime:libdart_precompiled_runtime",
"$dart_src/runtime/platform:libdart_platform_precompiled_runtime",
]
}
@@ -285,8 +285,8 @@ flutter_runner("aot_product") {
product = true
extra_deps = [
"//third_party/dart/runtime:libdart_precompiled_runtime",
"//third_party/dart/runtime/platform:libdart_platform_precompiled_runtime",
"$dart_src/runtime:libdart_precompiled_runtime",
"$dart_src/runtime/platform:libdart_platform_precompiled_runtime",
]
}
@@ -510,13 +510,13 @@ if (enable_unittests) {
# The use of these dependencies is temporary and will be moved behind the
# embedder API.
flutter_deps = [
"$dart_src/runtime:libdart_jit",
"$dart_src/runtime/platform:libdart_platform_jit",
"//flutter/assets:assets",
"//flutter/common/graphics",
"//flutter/flow",
"//flutter/lib/ui",
"//flutter/shell/common",
"//third_party/dart/runtime:libdart_jit",
"//third_party/dart/runtime/platform:libdart_platform_jit",
]
deps = [
@@ -543,10 +543,10 @@ if (enable_unittests) {
# The use of these dependencies is temporary and will be moved behind the
# embedder API.
flutter_deps = [
"$dart_src/runtime:libdart_jit",
"$dart_src/runtime/platform:libdart_platform_jit",
"//flutter/lib/ui",
"//flutter/shell/platform/common/client_wrapper:client_wrapper_library_stubs",
"//third_party/dart/runtime:libdart_jit",
"//third_party/dart/runtime/platform:libdart_platform_jit",
]
deps = [
@@ -569,10 +569,10 @@ if (enable_unittests) {
# The use of these dependencies is temporary and will be moved behind the
# embedder API.
flutter_deps = [
"$dart_src/runtime:libdart_jit",
"$dart_src/runtime/platform:libdart_platform_jit",
"//flutter/lib/ui",
"//flutter/shell/platform/common/client_wrapper:client_wrapper_library_stubs",
"//third_party/dart/runtime:libdart_jit",
"//third_party/dart/runtime/platform:libdart_platform_jit",
]
deps = [

View File

@@ -6,7 +6,7 @@ import("//build/compiled_action.gni")
import("//build/fuchsia/sdk.gni")
import("//flutter/common/config.gni")
import("//flutter/tools/fuchsia/dart.gni")
import("//third_party/dart/utils/compile_platform.gni")
import("$dart_src/utils/compile_platform.gni")
compile_platform("kernel_platform_files") {
single_root_scheme = "org-dartlang-sdk"

View File

@@ -2,8 +2,10 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//flutter/build/dart/dart.gni")
import("//flutter/tools/fuchsia/clang.gni")
import("//third_party/dart/build/dart/dart_action.gni")
import("$dart_src/build/dart/dart_action.gni")
template("generate_dart_profiler_symbols") {
assert(defined(invoker.library_label), "Must define 'library_label'")
@@ -17,7 +19,7 @@ template("generate_dart_profiler_symbols") {
script = "dart_profiler_symbols.dart"
packages = rebase_path("//third_party/dart/.dart_tool/package_config.json")
packages = rebase_path("$dart_src/.dart_tool/package_config.json")
args = [
"--nm",

View File

@@ -61,7 +61,7 @@ action("generate_build_info_cc_file") {
"build_info_in.cc",
"//flutter/.git/logs/HEAD",
"//fuchsia/sdk/$host_os/meta/manifest.json",
"//third_party/dart/.git/logs/HEAD",
"$dart_src/.git/logs/HEAD",
]
outputs = [ "$target_gen_dir/build_info.cc" ]
@@ -77,7 +77,7 @@ action("generate_build_info_cc_file") {
}
make_utils("utils") {
deps = [ "//third_party/dart/runtime/bin:elf_loader" ]
deps = [ "$dart_src/runtime/bin:elf_loader" ]
}
test_fixtures("utils_fixtures") {
@@ -99,14 +99,14 @@ executable("dart_utils_unittests") {
deps = [
":utils",
":utils_fixtures",
"$dart_src/runtime:libdart_jit",
"$dart_src/runtime/bin:dart_io_api",
"$fuchsia_sdk_root/pkg:inspect_component_cpp",
"$fuchsia_sdk_root/pkg:sys_cpp",
"//flutter/testing",
"//third_party/dart/runtime:libdart_jit",
"//third_party/dart/runtime/bin:dart_io_api",
]
}
make_utils("utils_product") {
deps = [ "//third_party/dart/runtime/bin:elf_loader_product" ]
deps = [ "$dart_src/runtime/bin:elf_loader_product" ]
}

View File

@@ -91,6 +91,6 @@ executable("client_wrapper_glfw_unittests") {
# TODO(chunhtai): Consider refactoring flutter_root/testing so that there's a testing
# target that doesn't require a Dart runtime to be linked in.
# https://github.com/flutter/flutter/issues/41414.
"//third_party/dart/runtime:libdart_jit",
"$dart_src/runtime:libdart_jit",
]
}

View File

@@ -288,7 +288,7 @@ zip_bundle("flutter_gtk") {
deps = [
":flutter_linux_gtk",
":publish_headers_linux",
"//third_party/dart/runtime/bin:gen_snapshot",
"$dart_src/runtime/bin:gen_snapshot",
]
sources = get_target_outputs(":publish_headers_linux")
tmp_files = []

View File

@@ -95,7 +95,7 @@ executable("client_wrapper_windows_unittests") {
# TODO(chunhtai): Consider refactoring flutter_root/testing so that there's a testing
# target that doesn't require a Dart runtime to be linked in.
# https://github.com/flutter/flutter/issues/41414.
"//third_party/dart/runtime:libdart_jit",
"$dart_src/runtime:libdart_jit",
]
}

View File

@@ -33,6 +33,8 @@ executable("testing") {
}
deps = [
"$dart_src/runtime:libdart_jit",
"$dart_src/runtime/bin:dart_io_api",
"//flutter/assets",
"//flutter/common",
"//flutter/flow",
@@ -43,8 +45,6 @@ executable("testing") {
"//flutter/skia",
"//flutter/third_party/tonic",
"//third_party/abseil-cpp/absl/base:no_destructor",
"//third_party/dart/runtime:libdart_jit",
"//third_party/dart/runtime/bin:dart_io_api",
]
if (impeller_supports_rendering) {

View File

@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//flutter/build/dart/dart.gni")
declare_args() {
engine_version = ""
@@ -39,7 +41,7 @@ if (dart_version == "") {
exec_script("//flutter/build/git_revision.py",
[
"--repository",
rebase_path("//third_party/dart", "", _flutter_root),
rebase_path("$dart_src", "", _flutter_root),
],
"list lines")
dart_version = dart_version_lines[0]

View File

@@ -6,29 +6,27 @@ import("//build/fuchsia/sdk.gni")
import("//flutter/build/dart/rules.gni")
import("//flutter/lib/ui/dart_ui.gni")
import("//flutter/web_sdk/web_sdk.gni")
import("//third_party/dart/sdk/lib/_http/http_sources.gni")
import(
"//third_party/dart/sdk/lib/_internal/js_runtime/interceptors_sources.gni")
import("//third_party/dart/sdk/lib/_internal/js_shared/js_types_sources.gni")
import("//third_party/dart/sdk/lib/_internal/vm/lib/vm_internal.gni")
import("//third_party/dart/sdk/lib/async/async_sources.gni")
import("//third_party/dart/sdk/lib/collection/collection_sources.gni")
import("//third_party/dart/sdk/lib/convert/convert_sources.gni")
import("//third_party/dart/sdk/lib/core/core_sources.gni")
import("//third_party/dart/sdk/lib/developer/developer_sources.gni")
import("//third_party/dart/sdk/lib/ffi/ffi_sources.gni")
import("//third_party/dart/sdk/lib/html/html_sources.gni")
import("//third_party/dart/sdk/lib/internal/internal_sources.gni")
import("//third_party/dart/sdk/lib/io/io_sources.gni")
import("//third_party/dart/sdk/lib/isolate/isolate_sources.gni")
import("//third_party/dart/sdk/lib/js/js_annotations_sources.gni")
import("//third_party/dart/sdk/lib/js/js_sources.gni")
import("//third_party/dart/sdk/lib/js_interop/js_interop_sources.gni")
import(
"//third_party/dart/sdk/lib/js_interop_unsafe/js_interop_unsafe_sources.gni")
import("//third_party/dart/sdk/lib/js_util/js_util_sources.gni")
import("//third_party/dart/sdk/lib/math/math_sources.gni")
import("//third_party/dart/sdk/lib/typed_data/typed_data_sources.gni")
import("$dart_src/sdk/lib/_http/http_sources.gni")
import("$dart_src/sdk/lib/_internal/js_runtime/interceptors_sources.gni")
import("$dart_src/sdk/lib/_internal/js_shared/js_types_sources.gni")
import("$dart_src/sdk/lib/_internal/vm/lib/vm_internal.gni")
import("$dart_src/sdk/lib/async/async_sources.gni")
import("$dart_src/sdk/lib/collection/collection_sources.gni")
import("$dart_src/sdk/lib/convert/convert_sources.gni")
import("$dart_src/sdk/lib/core/core_sources.gni")
import("$dart_src/sdk/lib/developer/developer_sources.gni")
import("$dart_src/sdk/lib/ffi/ffi_sources.gni")
import("$dart_src/sdk/lib/html/html_sources.gni")
import("$dart_src/sdk/lib/internal/internal_sources.gni")
import("$dart_src/sdk/lib/io/io_sources.gni")
import("$dart_src/sdk/lib/isolate/isolate_sources.gni")
import("$dart_src/sdk/lib/js/js_annotations_sources.gni")
import("$dart_src/sdk/lib/js/js_sources.gni")
import("$dart_src/sdk/lib/js_interop/js_interop_sources.gni")
import("$dart_src/sdk/lib/js_interop_unsafe/js_interop_unsafe_sources.gni")
import("$dart_src/sdk/lib/js_util/js_util_sources.gni")
import("$dart_src/sdk/lib/math/math_sources.gni")
import("$dart_src/sdk/lib/typed_data/typed_data_sources.gni")
if (!is_fuchsia) {
copy("copy_sky_engine_authors") {
@@ -38,7 +36,7 @@ if (!is_fuchsia) {
}
}
dart_sdk_lib_path = rebase_path("//third_party/dart/sdk/lib")
dart_sdk_lib_path = rebase_path("$dart_src/sdk/lib")
copy("async") {
lib_path = rebase_path("async", "", dart_sdk_lib_path)
@@ -196,7 +194,7 @@ web_ui_ui_web_with_output("copy_dart_ui_web") {
}
copy("copy_allowed_experiments") {
sources = [ "//third_party/dart/sdk/lib/_internal/allowed_experiments.json" ]
sources = [ "$dart_src/sdk/lib/_internal/allowed_experiments.json" ]
outputs = [
"$root_gen_dir/dart-pkg/sky_engine/lib/_internal/allowed_experiments.json",
@@ -288,7 +286,7 @@ dart_pkg("sky_engine") {
deps += [ ":copy_sky_engine_authors" ]
}
service_isolate_dir = "//third_party/dart/sdk/lib/_internal/vm/bin/"
service_isolate_dir = "$dart_src/sdk/lib/_internal/vm/bin/"
sdk_ext_directory = "$root_gen_dir/sky/bindings"
sdk_ext_files = [
"$service_isolate_dir/vmservice_io.dart",

View File

@@ -74,12 +74,12 @@ source_set("dart") {
public_deps = [
":testing_lib",
"$dart_src/runtime/bin:elf_loader",
"//flutter/common",
"//flutter/runtime",
"//flutter/runtime:libdart",
"//flutter/skia",
"//flutter/third_party/tonic",
"//third_party/dart/runtime/bin:elf_loader",
]
}

View File

@@ -2,8 +2,10 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//flutter/build/dart/dart.gni")
import("//flutter/testing/rules/runtime_mode.gni")
import("//third_party/dart/build/dart/copy_tree.gni")
import("$dart_src/build/dart/copy_tree.gni")
_app_framework_dir = "$root_out_dir/scenario_app/Scenarios/App.framework"

View File

@@ -106,7 +106,7 @@ template("dart_snapshot_aot") {
compiled_action(target_name) {
testonly = true
tool = "//third_party/dart/runtime/bin:gen_snapshot"
tool = "$dart_src/runtime/bin:gen_snapshot"
pool = "//flutter/build/dart:dart_pool"

View File

@@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//flutter/build/dart/dart.gni")
import("//flutter/common/config.gni")
source_set("base") {
@@ -49,9 +50,9 @@ source_set("base") {
}
public_deps = [
"$dart_src/third_party/double-conversion/src:libdouble_conversion",
"numerics",
"//flutter/fml:string_conversion",
"//flutter/third_party/accessibility/ax_build",
"//third_party/dart/third_party/double-conversion/src:libdouble_conversion",
]
}

View File

@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//flutter/build/dart/dart.gni")
config("config") {
include_dirs = [
"//flutter/third_party",
@@ -86,7 +88,7 @@ source_set("tonic") {
]
}
public_deps = [ "//third_party/dart/runtime:dart_api" ]
public_deps = [ "$dart_src/runtime:dart_api" ]
public_configs = [ ":config" ]
}

View File

@@ -24,12 +24,12 @@ executable("tonic_unittests") {
public_deps = [
":tonic_fixtures",
"$dart_src/runtime:dart_api",
"//flutter/lib/snapshot",
"//flutter/runtime:libdart",
"//flutter/runtime:runtime",
"//flutter/testing",
"//flutter/testing:fixture_test",
"//third_party/dart/runtime:dart_api",
"//third_party/googletest:gtest",
]

View File

@@ -2,13 +2,14 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
gen_snapshot = "//third_party/dart/runtime/bin:gen_snapshot"
gen_snapshot_product = "//third_party/dart/runtime/bin:gen_snapshot_product"
import("//flutter/build/dart/dart.gni")
prebuilt_dart = "//third_party/dart/tools/sdks/dart-sdk/bin/dart"
gen_snapshot = "$dart_src/runtime/bin:gen_snapshot"
gen_snapshot_product = "$dart_src/runtime/bin:gen_snapshot_product"
observatory_target =
"//third_party/dart/runtime/observatory:observatory_archive"
prebuilt_dart = "$dart_src/tools/sdks/dart-sdk/bin/dart"
observatory_target = "$dart_src/runtime/observatory:observatory_archive"
observatory_archive_dir = get_label_info(observatory_target, "target_gen_dir")
observatory_archive_name = get_label_info(observatory_target, "name")
observatory_archive_file =

View File

@@ -5,5 +5,5 @@
import("//flutter/tools/fuchsia/dart/dart_tool.gni")
dart_prebuilt_tool("gen_kernel") {
snapshot = "//third_party/dart/pkg/vm/bin/gen_kernel.dart"
snapshot = "$dart_src/pkg/vm/bin/gen_kernel.dart"
}

View File

@@ -4,7 +4,7 @@
import("//flutter/common/fuchsia_config.gni")
import("//flutter/tools/fuchsia/dart.gni")
import("//third_party/dart/build/dart/dart_action.gni")
import("$dart_src/build/dart/dart_action.gni")
template("dart_kernel") {
prebuilt_dart_action(target_name) {
@@ -16,11 +16,10 @@ template("dart_kernel") {
deps = [ invoker.kernel_platform_files ]
gen_kernel_script = "//third_party/dart/pkg/vm/bin/gen_kernel.dart"
gen_kernel_script = "$dart_src/pkg/vm/bin/gen_kernel.dart"
platform_dill = "$root_out_dir/dart_runner_patched_sdk/platform_strong.dill"
dot_packages =
rebase_path("//third_party/dart/.dart_tool/package_config.json")
dot_packages = rebase_path("$dart_src/.dart_tool/package_config.json")
inputs = [
platform_dill,

View File

@@ -16,7 +16,7 @@ import("//flutter/tools/fuchsia/flutter/internal/flutter_dart_component.gni")
# dart_library("lib") {
# package_name = "my_library"
# sources = [ "main.dart" ]
# deps = [ "//third_party/dart-pkg/git/flutter/packages/flutter" ]
# deps = [ "$dart_src-pkg/git/flutter/packages/flutter" ]
# }
# ```
#

View File

@@ -6,9 +6,9 @@ import("//flutter/build/zip_bundle.gni")
import("//flutter/common/config.gni")
import("//flutter/lib/web_ui/flutter_js/sources.gni")
import("//flutter/web_sdk/web_sdk.gni")
import("//third_party/dart/build/dart/dart_action.gni")
import("$dart_src/build/dart/dart_action.gni")
web_ui_sources = exec_script("//third_party/dart/tools/list_dart_files.py",
web_ui_sources = exec_script("$dart_src/tools/list_dart_files.py",
[
"absolute",
rebase_path("//flutter/lib/web_ui/lib"),
@@ -139,13 +139,13 @@ template("_dartdevc") {
forward_variables_from(invoker, "*")
deps = web_engine_libraries + [
"//third_party/dart:create_sdk",
"//third_party/dart/pkg:pkg_files_stamp",
"//third_party/dart/utils/ddc:ddc_files_stamp",
"//third_party/dart/utils/ddc:ddc_sdk_patch_stamp",
"$dart_src:create_sdk",
"$dart_src/pkg:pkg_files_stamp",
"$dart_src/utils/ddc:ddc_files_stamp",
"$dart_src/utils/ddc:ddc_sdk_patch_stamp",
]
script = "//third_party/dart/pkg/dev_compiler/bin/dartdevc.dart"
script = "$dart_src/pkg/dev_compiler/bin/dartdevc.dart"
pool = "//flutter/build/dart:dart_pool"
}
@@ -190,13 +190,13 @@ template("_kernel_worker") {
forward_variables_from(invoker, "*")
deps = web_engine_libraries + [
"//third_party/dart:create_sdk",
"//third_party/dart/pkg:pkg_files_stamp",
"//third_party/dart/utils/ddc:ddc_files_stamp",
"//third_party/dart/utils/ddc:ddc_sdk_patch_stamp",
"$dart_src:create_sdk",
"$dart_src/pkg:pkg_files_stamp",
"$dart_src/utils/ddc:ddc_files_stamp",
"$dart_src/utils/ddc:ddc_sdk_patch_stamp",
]
script = "//third_party/dart/utils/bazel/kernel_worker.dart"
script = "$dart_src/utils/bazel/kernel_worker.dart"
pool = "//flutter/build/dart:dart_pool"
}

View File

@@ -2,10 +2,12 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//flutter/build/dart/dart.gni")
import("//flutter/common/config.gni")
import("//third_party/dart/build/dart/dart_action.gni")
dart_sdk_package_config = "//third_party/dart/.dart_tool/package_config.json"
import("$dart_src/build/dart/dart_action.gni")
dart_sdk_package_config = "$dart_src/.dart_tool/package_config.json"
template("sdk_rewriter") {
ui = defined(invoker.ui) && invoker.ui
@@ -16,7 +18,7 @@ template("sdk_rewriter") {
assert(defined(invoker.input_dir), "Must pass 'input_dir'")
assert(defined(invoker.output_dir), "Must pass 'output_dir'")
source_dart_files = exec_script("//third_party/dart/tools/list_dart_files.py",
source_dart_files = exec_script("$dart_src/tools/list_dart_files.py",
[
"absolute",
rebase_path(invoker.input_dir),