diff --git a/BUILD.gn b/BUILD.gn index e09625e175e88..34b374739b0fe 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -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 ] diff --git a/build/archives/BUILD.gn b/build/archives/BUILD.gn index 002bbeabada90..44ed196f5ba2b 100644 --- a/build/archives/BUILD.gn +++ b/build/archives/BUILD.gn @@ -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 = [ { diff --git a/build/bin_to_obj.gni b/build/bin_to_obj.gni index 1885db6ba2663..a192719a41b9f 100644 --- a/build/bin_to_obj.gni +++ b/build/bin_to_obj.gni @@ -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", diff --git a/build/dart/BUILD.gn b/build/dart/BUILD.gn index 5db2211fffc3d..a8692ab08b15f 100644 --- a/build/dart/BUILD.gn +++ b/build/dart/BUILD.gn @@ -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" ] } } } diff --git a/build/dart/dart.gni b/build/dart/dart.gni new file mode 100644 index 0000000000000..4982d5889d5b5 --- /dev/null +++ b/build/dart/dart.gni @@ -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" +} diff --git a/build/dart/rules.gni b/build/dart/rules.gni index 55c1220df506f..f265793f7e2ce 100644 --- a/build/dart/rules.gni +++ b/build/dart/rules.gni @@ -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 ] diff --git a/build/secondary/third_party/dart/third_party/pkg/matcher/BUILD.gn b/build/secondary/third_party/dart/third_party/pkg/matcher/BUILD.gn index 9bd84e15f70d5..5ed834571018f 100644 --- a/build/secondary/third_party/dart/third_party/pkg/matcher/BUILD.gn +++ b/build/secondary/third_party/dart/third_party/pkg/matcher/BUILD.gn @@ -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", diff --git a/build/secondary/third_party/dart/third_party/pkg/stack_trace/BUILD.gn b/build/secondary/third_party/dart/third_party/pkg/stack_trace/BUILD.gn index 10dd2983dd05a..52d8dd999cf83 100644 --- a/build/secondary/third_party/dart/third_party/pkg/stack_trace/BUILD.gn +++ b/build/secondary/third_party/dart/third_party/pkg/stack_trace/BUILD.gn @@ -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", diff --git a/build/secondary/third_party/pkg/quiver/BUILD.gn b/build/secondary/third_party/pkg/quiver/BUILD.gn index 8917550b30844..c6af91294c095 100644 --- a/build/secondary/third_party/pkg/quiver/BUILD.gn +++ b/build/secondary/third_party/pkg/quiver/BUILD.gn @@ -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 = [ diff --git a/display_list/BUILD.gn b/display_list/BUILD.gn index 2e93c2002b0f5..1d5657b404133 100644 --- a/display_list/BUILD.gn +++ b/display_list/BUILD.gn @@ -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 ] } diff --git a/flow/BUILD.gn b/flow/BUILD.gn index c8a59f4a3c00e..d648e01f392ce 100644 --- a/flow/BUILD.gn +++ b/flow/BUILD.gn @@ -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", ] diff --git a/flutter_frontend_server/BUILD.gn b/flutter_frontend_server/BUILD.gn index 29a50e31b4cda..d79ce9ff99a48 100644 --- a/flutter_frontend_server/BUILD.gn +++ b/flutter_frontend_server/BUILD.gn @@ -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" } diff --git a/fml/BUILD.gn b/fml/BUILD.gn index 088c391bdfdbc..8d70fc1aa4b9b 100644 --- a/fml/BUILD.gn +++ b/fml/BUILD.gn @@ -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", diff --git a/lib/io/BUILD.gn b/lib/io/BUILD.gn index 529872c30d23c..8eaff8ff5c2ea 100644 --- a/lib/io/BUILD.gn +++ b/lib/io/BUILD.gn @@ -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" ] } diff --git a/lib/snapshot/BUILD.gn b/lib/snapshot/BUILD.gn index d7c6eab5c979a..9b8f9ac3ce22a 100644 --- a/lib/snapshot/BUILD.gn +++ b/lib/snapshot/BUILD.gn @@ -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)" ] } } diff --git a/lib/ui/BUILD.gn b/lib/ui/BUILD.gn index 2f4dfccb2b3ab..3af81da7c145e 100644 --- a/lib/ui/BUILD.gn +++ b/lib/ui/BUILD.gn @@ -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. diff --git a/runtime/BUILD.gn b/runtime/BUILD.gn index 160b3f6bc536f..d7eb9ecb95954 100644 --- a/runtime/BUILD.gn +++ b/runtime/BUILD.gn @@ -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", ] } diff --git a/shell/common/BUILD.gn b/shell/common/BUILD.gn index 310b49fa899df..8c60b7e3954cc 100644 --- a/shell/common/BUILD.gn +++ b/shell/common/BUILD.gn @@ -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) { diff --git a/shell/platform/android/BUILD.gn b/shell/platform/android/BUILD.gn index a6c4cb6078bc0..fc02bc223c1e3 100644 --- a/shell/platform/android/BUILD.gn +++ b/shell/platform/android/BUILD.gn @@ -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") diff --git a/shell/platform/common/BUILD.gn b/shell/platform/common/BUILD.gn index f03a032730b57..5ebfb2236d2c5 100644 --- a/shell/platform/common/BUILD.gn +++ b/shell/platform/common/BUILD.gn @@ -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" ] diff --git a/shell/platform/common/client_wrapper/BUILD.gn b/shell/platform/common/client_wrapper/BUILD.gn index 660f44403ef8d..91e7120b65734 100644 --- a/shell/platform/common/client_wrapper/BUILD.gn +++ b/shell/platform/common/client_wrapper/BUILD.gn @@ -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" ] diff --git a/shell/platform/darwin/common/BUILD.gn b/shell/platform/darwin/common/BUILD.gn index 26ea3bd263b25..f86af9017146c 100644 --- a/shell/platform/darwin/common/BUILD.gn +++ b/shell/platform/darwin/common/BUILD.gn @@ -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" ] diff --git a/shell/platform/embedder/BUILD.gn b/shell/platform/embedder/BUILD.gn index e0297c799acd5..adc2ad6c69945 100644 --- a/shell/platform/embedder/BUILD.gn +++ b/shell/platform/embedder/BUILD.gn @@ -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", ] } diff --git a/shell/platform/fuchsia/dart-pkg/zircon_ffi/BUILD.gn b/shell/platform/fuchsia/dart-pkg/zircon_ffi/BUILD.gn index bbce4e82de8e2..5c5e179182a7d 100644 --- a/shell/platform/fuchsia/dart-pkg/zircon_ffi/BUILD.gn +++ b/shell/platform/fuchsia/dart-pkg/zircon_ffi/BUILD.gn @@ -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", ] } diff --git a/shell/platform/fuchsia/dart/BUILD.gn b/shell/platform/fuchsia/dart/BUILD.gn index 826aefacd4a14..566232209e5f8 100644 --- a/shell/platform/fuchsia/dart/BUILD.gn +++ b/shell/platform/fuchsia/dart/BUILD.gn @@ -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("//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("."), + ], + "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" diff --git a/shell/platform/fuchsia/dart_runner/BUILD.gn b/shell/platform/fuchsia/dart_runner/BUILD.gn index 3e8d5a056fd33..2bc29582296eb 100644 --- a/shell/platform/fuchsia/dart_runner/BUILD.gn +++ b/shell/platform/fuchsia/dart_runner/BUILD.gn @@ -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", ] } diff --git a/shell/platform/fuchsia/dart_runner/embedder/BUILD.gn b/shell/platform/fuchsia/dart_runner/embedder/BUILD.gn index 562191cbcf6b0..eb7e0562fbd16 100644 --- a/shell/platform/fuchsia/dart_runner/embedder/BUILD.gn +++ b/shell/platform/fuchsia/dart_runner/embedder/BUILD.gn @@ -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" diff --git a/shell/platform/fuchsia/dart_runner/kernel/BUILD.gn b/shell/platform/fuchsia/dart_runner/kernel/BUILD.gn index c990742404703..5dcbc1e9dfacc 100644 --- a/shell/platform/fuchsia/dart_runner/kernel/BUILD.gn +++ b/shell/platform/fuchsia/dart_runner/kernel/BUILD.gn @@ -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" diff --git a/shell/platform/fuchsia/dart_runner/vmservice/BUILD.gn b/shell/platform/fuchsia/dart_runner/vmservice/BUILD.gn index c299edb5f3f78..12810557c3c8b 100644 --- a/shell/platform/fuchsia/dart_runner/vmservice/BUILD.gn +++ b/shell/platform/fuchsia/dart_runner/vmservice/BUILD.gn @@ -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" diff --git a/shell/platform/fuchsia/flutter/BUILD.gn b/shell/platform/fuchsia/flutter/BUILD.gn index f68c44972e830..e027b1ee82068 100644 --- a/shell/platform/fuchsia/flutter/BUILD.gn +++ b/shell/platform/fuchsia/flutter/BUILD.gn @@ -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 = [ diff --git a/shell/platform/fuchsia/flutter/kernel/BUILD.gn b/shell/platform/fuchsia/flutter/kernel/BUILD.gn index dd77441bfd3cd..b6b254581ffb1 100644 --- a/shell/platform/fuchsia/flutter/kernel/BUILD.gn +++ b/shell/platform/fuchsia/flutter/kernel/BUILD.gn @@ -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" diff --git a/shell/platform/fuchsia/runtime/dart/profiler_symbols/BUILD.gn b/shell/platform/fuchsia/runtime/dart/profiler_symbols/BUILD.gn index 4f4e683ba1b9f..f139ddff98c83 100644 --- a/shell/platform/fuchsia/runtime/dart/profiler_symbols/BUILD.gn +++ b/shell/platform/fuchsia/runtime/dart/profiler_symbols/BUILD.gn @@ -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", diff --git a/shell/platform/fuchsia/runtime/dart/utils/BUILD.gn b/shell/platform/fuchsia/runtime/dart/utils/BUILD.gn index d1898a0531fea..09b31099ef5ee 100644 --- a/shell/platform/fuchsia/runtime/dart/utils/BUILD.gn +++ b/shell/platform/fuchsia/runtime/dart/utils/BUILD.gn @@ -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" ] } diff --git a/shell/platform/glfw/client_wrapper/BUILD.gn b/shell/platform/glfw/client_wrapper/BUILD.gn index fa4209369281e..d9c24fb513307 100644 --- a/shell/platform/glfw/client_wrapper/BUILD.gn +++ b/shell/platform/glfw/client_wrapper/BUILD.gn @@ -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", ] } diff --git a/shell/platform/linux/BUILD.gn b/shell/platform/linux/BUILD.gn index f9e3eab18a544..e0d29566ae2cb 100644 --- a/shell/platform/linux/BUILD.gn +++ b/shell/platform/linux/BUILD.gn @@ -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 = [] diff --git a/shell/platform/windows/client_wrapper/BUILD.gn b/shell/platform/windows/client_wrapper/BUILD.gn index 88d25d75c97be..1d40c3c1314fb 100644 --- a/shell/platform/windows/client_wrapper/BUILD.gn +++ b/shell/platform/windows/client_wrapper/BUILD.gn @@ -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", ] } diff --git a/shell/testing/BUILD.gn b/shell/testing/BUILD.gn index 7685d3a80e589..bb3c852afd40e 100644 --- a/shell/testing/BUILD.gn +++ b/shell/testing/BUILD.gn @@ -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) { diff --git a/shell/version/version.gni b/shell/version/version.gni index 67a4b38cf0daa..c997b7cc977a3 100644 --- a/shell/version/version.gni +++ b/shell/version/version.gni @@ -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] diff --git a/sky/packages/sky_engine/BUILD.gn b/sky/packages/sky_engine/BUILD.gn index 83d3a3aa4d820..f886b9ad7d7a7 100644 --- a/sky/packages/sky_engine/BUILD.gn +++ b/sky/packages/sky_engine/BUILD.gn @@ -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", diff --git a/testing/BUILD.gn b/testing/BUILD.gn index 9eac2945251f4..ef13c07ddafd9 100644 --- a/testing/BUILD.gn +++ b/testing/BUILD.gn @@ -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", ] } diff --git a/testing/scenario_app/ios/BUILD.gn b/testing/scenario_app/ios/BUILD.gn index 605de6f33dce1..089de90141168 100644 --- a/testing/scenario_app/ios/BUILD.gn +++ b/testing/scenario_app/ios/BUILD.gn @@ -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" diff --git a/testing/testing.gni b/testing/testing.gni index cf59753e51dc7..66ac11cffd859 100644 --- a/testing/testing.gni +++ b/testing/testing.gni @@ -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" diff --git a/third_party/accessibility/base/BUILD.gn b/third_party/accessibility/base/BUILD.gn index 673fda743487f..f495debd1ab84 100644 --- a/third_party/accessibility/base/BUILD.gn +++ b/third_party/accessibility/base/BUILD.gn @@ -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", ] } diff --git a/third_party/tonic/BUILD.gn b/third_party/tonic/BUILD.gn index 9a6abda8ba695..ed2930c75560b 100644 --- a/third_party/tonic/BUILD.gn +++ b/third_party/tonic/BUILD.gn @@ -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" ] } diff --git a/third_party/tonic/tests/BUILD.gn b/third_party/tonic/tests/BUILD.gn index 84f1c3ca04321..fe53cce096041 100644 --- a/third_party/tonic/tests/BUILD.gn +++ b/third_party/tonic/tests/BUILD.gn @@ -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", ] diff --git a/tools/fuchsia/dart.gni b/tools/fuchsia/dart.gni index 534acb52eae67..d5289a84b5cfa 100644 --- a/tools/fuchsia/dart.gni +++ b/tools/fuchsia/dart.gni @@ -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 = diff --git a/tools/fuchsia/dart/kernel/BUILD.gn b/tools/fuchsia/dart/kernel/BUILD.gn index d8a538e3933ee..38af886e1af7c 100644 --- a/tools/fuchsia/dart/kernel/BUILD.gn +++ b/tools/fuchsia/dart/kernel/BUILD.gn @@ -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" } diff --git a/tools/fuchsia/dart_kernel.gni b/tools/fuchsia/dart_kernel.gni index 598113eee02e7..49fed728362a6 100644 --- a/tools/fuchsia/dart_kernel.gni +++ b/tools/fuchsia/dart_kernel.gni @@ -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, diff --git a/tools/fuchsia/flutter/flutter_component.gni b/tools/fuchsia/flutter/flutter_component.gni index a2393f649975e..3932ddf354852 100644 --- a/tools/fuchsia/flutter/flutter_component.gni +++ b/tools/fuchsia/flutter/flutter_component.gni @@ -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" ] # } # ``` # diff --git a/web_sdk/BUILD.gn b/web_sdk/BUILD.gn index 0c453a45b5153..f1383ae3216f8 100644 --- a/web_sdk/BUILD.gn +++ b/web_sdk/BUILD.gn @@ -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" } diff --git a/web_sdk/web_sdk.gni b/web_sdk/web_sdk.gni index 89357c7774962..e98ad3b616948 100644 --- a/web_sdk/web_sdk.gni +++ b/web_sdk/web_sdk.gni @@ -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),