blob: 13eba118c0c8f0785a8af0af010ebf54600b3b82 [file] [log] [blame]
# Copyright 2017 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/dart/toolchain.gni")
import("//build/toolchain/basic_toolchain.gni")
import("//build/toolchain/concurrent_jobs.gni")
declare_args() {
# Maximum number of Dart processes to run in parallel.
#
# Dart analyzer uses a lot of memory which may cause issues when building
# with many parallel jobs e.g. when using goma. To avoid out-of-memory
# errors we explicitly reduce the number of jobs.
concurrent_dart_jobs = default_concurrent_jobs.dart
}
group("disable_strict_deps_check_allowlist") {
# ________ _________ ________ ________
# |\ ____\|\___ ___\\ __ \|\ __ \
# \ \ \___|\|___ \ \_\ \ \|\ \ \ \|\ \
# \ \_____ \ \ \ \ \ \ \\\ \ \ ____\
# \|____|\ \ \ \ \ \ \ \\\ \ \ \___|
# ____\_\ \ \ \__\ \ \_______\ \__\
# |\_________\ \|__| \|_______|\|__|
# \|_________|
# This is an allowlist of packages that do not pass the Dart strict deps
# check, i.e. they import packages but do not specify them as GN deps.
# This is only intended to be used as a temporary allowlist. Do not add to this list.
visibility = [
"//cts/util/pm",
"//garnet/tests/acts_tests:acts_astro_wifi_fiber_test_dart_library",
"//garnet/tests/acts_tests:acts_astro_wifi_test_dart_library",
"//garnet/tests/acts_tests:acts_bt1_test_dart_library",
"//garnet/tests/acts_tests:acts_bt2_test_dart_library",
"//garnet/tests/acts_tests:acts_wifi_test_dart_library",
"//scripts/fxtest:fxtest_tests_dart_library",
"//scripts/fxtest:test_runner_test_dart_library",
"//sdk/testing/sl4f/flutter_driver_sl4f",
"//src/diagnostics/lib/streams/dart:fuchsia-diagnostic-streams-unittests_dart_library",
"//src/experiences/bin/simple_browser_internationalization:internationalization",
"//src/experiences/bin/simple_browser:simple_browser_dart_library",
"//src/experiences/bin/simple_browser:simple_browser_target_test_dart_library",
"//src/experiences/bin/simple_browser:simple_browser_unittests_library",
"//src/experiences/examples/hello_experiences:hello_experiences_unittests_library",
"//src/experiences/examples/localized_flutter/localized_flutter_app",
"//src/experiences/examples/localized_flutter/localized_flutter_app:localized_flutter_app_unittests_library",
"//src/experiences/examples/spinning_cube:spinning_cube_dart_library",
"//src/experiences/lib/quickui:quickui_unittests_dart_library",
"//src/experiences/session_shells/ermine/internationalization",
"//src/experiences/session_shells/ermine/keyboard_shortcuts",
"//src/experiences/session_shells/ermine/keyboard_shortcuts:keyboard_shortcuts_unittests_library",
"//src/experiences/session_shells/ermine/settings",
"//src/experiences/session_shells/ermine/settings:ermine_settings_unittests_library",
"//src/experiences/session_shells/ermine/shell:ermine_dart_library",
"//src/experiences/session_shells/ermine/shell:ermine_unittests_library",
"//src/experiences/session_shells/ermine/tiler:tiler_unittests_library",
"//src/experiences/settings/lib/settings",
"//src/experiences/settings/lib/widgets",
"//src/experiences/settings/lib/widgets:dart_widget_tests_library",
"//src/experiences/tests/e2e:experiences_ermine_session_shell_e2e_test_dart_library",
"//src/tests/end_to_end/copy_files:copy_files_test_dart_library",
"//src/tests/end_to_end/package_manager:package_manager_test_dart_library",
"//src/tests/end_to_end/perf:button_flutter_benchmarks_test_dart_library",
"//src/tests/end_to_end/perf:clockface_flutter_benchmarks_test_dart_library",
"//src/tests/end_to_end/perf:dart_inspect_benchmarks_test_dart_library",
"//src/tests/end_to_end/perf:fidl_microbenchmarks_test_shard_0_dart_library",
"//src/tests/end_to_end/perf:fidl_microbenchmarks_test_shard_1_dart_library",
"//src/tests/end_to_end/perf:fidl_microbenchmarks_test_shard_2_dart_library",
"//src/tests/end_to_end/perf:fidl_microbenchmarks_test_shard_3_dart_library",
"//src/tests/end_to_end/perf:fidl_microbenchmarks_test_shard_4_dart_library",
"//src/tests/end_to_end/perf:fidl_microbenchmarks_test_shard_5_dart_library",
"//src/tests/end_to_end/perf:fidl_microbenchmarks_test_shard_6_dart_library",
"//src/tests/end_to_end/perf:fidl_microbenchmarks_test_shard_7_dart_library",
"//src/tests/end_to_end/perf:flutter_startup_time_metric_test_dart_library",
"//src/tests/end_to_end/perf:garnet_input_latency_benchmarks_test_dart_library",
"//src/tests/end_to_end/perf:kernel_boot_timeline_test_dart_library",
"//src/tests/end_to_end/perf:microbenchmarks_test_dart_library",
"//src/tests/end_to_end/perf:netstack_benchmarks_test_dart_library",
"//src/tests/end_to_end/perf:netstack_iperf_test_dart_library",
"//src/tests/end_to_end/perf:rust_inspect_benchmarks_test_dart_library",
"//src/tests/end_to_end/perf:rust_inspect_reader_benchmarks_test_dart_library",
"//src/tests/end_to_end/perf:scroll_flutter_benchmarks_test_dart_library",
"//src/tests/end_to_end/perf:touch_input_latency_benchmarks_test_dart_library",
"//src/tests/end_to_end/perf:touch_input_latency_metric_test_dart_library",
"//src/tests/end_to_end/screen_is_not_black:screen_is_not_black_no_basemgr_test_dart_library",
"//src/tests/end_to_end/screen_is_not_black:screen_is_not_black_test_dart_library",
"//src/tests/end_to_end/sl4f:sl4f_test_dart_library",
"//src/ui/scenic/lib/gfx/tests/rotated_square_test:rotated_square_test_dart_library",
"//src/ui/tests/e2e_input_tests/touch/one-flutter:one-flutter_dart_library",
"//tools/dart-strict-deps:dart_strict_deps_tests_dart_library",
"//tools/doc_checker:doc_checker_dart_library",
"//tools/doc_checker:doc-checker-tests_dart_library",
"//topaz/bin/fidl_bindings_test/test:fidl_bindings_test_dart_library",
"//topaz/bin/fidl_compatibility_test/dart:fidl_dart_compatibility_test_server_dart_library",
"//topaz/examples/fidl/client:echo-dart-client_dart_library",
"//topaz/examples/fidl/request_pipelining/client:echo-launcher-dart-client_dart_library",
"//topaz/examples/fidl/request_pipelining/server:echo-launcher-dart-server_dart_library",
"//topaz/examples/fidl/test:examples-integration-test-dart_dart_library",
"//topaz/public/dart/fuchsia_inspect",
"//topaz/public/dart/fuchsia_inspect/codelab/client:bin_dart_library",
"//topaz/public/dart/fuchsia_inspect/codelab/part_1:bin_dart_library",
"//topaz/public/dart/fuchsia_inspect/codelab/part_1:inspect_dart_codelab_part_1_integration_tests_dart_library",
"//topaz/public/dart/fuchsia_inspect/codelab/part_1:inspect_dart_codelab_part_1_unittests_dart_library",
"//topaz/public/dart/fuchsia_inspect/codelab/part_2:bin_dart_library",
"//topaz/public/dart/fuchsia_inspect/codelab/part_2:inspect_dart_codelab_part_2_integration_tests_dart_library",
"//topaz/public/dart/fuchsia_inspect/codelab/part_2:inspect_dart_codelab_part_2_unittests_dart_library",
"//topaz/public/dart/fuchsia_inspect/codelab/part_3:bin_dart_library",
"//topaz/public/dart/fuchsia_inspect/codelab/part_3:inspect_dart_codelab_part_3_integration_tests_dart_library",
"//topaz/public/dart/fuchsia_inspect/codelab/part_3:inspect_dart_codelab_part_3_unittests_dart_library",
"//topaz/public/dart/fuchsia_inspect/codelab/part_4:bin_dart_library",
"//topaz/public/dart/fuchsia_inspect/codelab/part_4:inspect_dart_codelab_part_4_integration_tests_dart_library",
"//topaz/public/dart/fuchsia_inspect/codelab/part_4:inspect_dart_codelab_part_4_unittests_dart_library",
"//topaz/public/dart/fuchsia_inspect/codelab/part_5:bin_dart_library",
"//topaz/public/dart/fuchsia_inspect/codelab/part_5:inspect_dart_codelab_part_5_integration_tests_dart_library",
"//topaz/public/dart/fuchsia_inspect/codelab/part_5:inspect_dart_codelab_part_5_unittests_dart_library",
"//topaz/public/dart/fuchsia_inspect/codelab/shared",
"//topaz/public/dart/fuchsia_inspect/examples/inspect_mod:inspect_mod_dart_library",
"//topaz/public/dart/fuchsia_inspect_flutter",
"//topaz/public/dart/fuchsia_inspect_flutter/examples/torus15",
"//topaz/public/dart/fuchsia_inspect_flutter/examples/torus15:torus15_dart_test_dart_library",
"//topaz/public/dart/fuchsia_inspect_flutter/examples/torus15:torus15_flutter_dart_library",
"//topaz/public/dart/fuchsia_inspect_flutter/examples/torus15:torus15_flutter_test_library",
"//topaz/public/dart/fuchsia_inspect_flutter:inspect_flutter_test_library",
"//topaz/public/dart/fuchsia_inspect:fuchsia_inspect_package_unittests_dart_library",
"//topaz/public/dart/fuchsia_inspect/test/inspect_flutter_integration_tester:inspect_dart_integration_test_driver_dart_library",
"//topaz/public/dart/fuchsia_inspect/test/inspect_flutter_integration_tester:inspect_flutter_integration_tester_dart_library",
"//topaz/public/dart/fuchsia_internationalization_flutter",
"//topaz/public/dart/fuchsia_internationalization_flutter:fuchsia_internationalization_flutter_unittests_library",
"//topaz/public/dart/fuchsia_logger",
"//topaz/public/dart/fuchsia_logger:fuchsia_logger_package_unittests_dart_library",
"//topaz/public/dart/fuchsia_logger/test/integration:fuchsia-logger-package-integration-test_dart_library",
"//topaz/public/dart/fuchsia_modular",
"//topaz/public/dart/fuchsia_modular/examples/slider_mod:slider_mod_dart_library",
"//topaz/public/dart/fuchsia_modular/examples/slider_mod:slider_mod_tests_dart_library",
"//topaz/public/dart/fuchsia_modular:fuchsia_modular_package_integration_tests_dart_library",
"//topaz/public/dart/fuchsia_modular:fuchsia_modular_package_unittests_library",
"//topaz/public/dart/fuchsia_modular_testing",
"//topaz/public/dart/fuchsia_modular_testing:fuchsia_modular_testing_package_integration_tests_dart_library",
"//topaz/public/dart/fuchsia_services:fuchsia_services_package_integration_tests_dart_library",
"//topaz/public/dart/fuchsia_vfs:fuchsia_vfs_package_unittests_dart_library",
"//topaz/public/dart/fuchsia_webview_flutter",
"//topaz/public/dart/fuchsia_webview_flutter/examples/webview_mod:webview_mod_dart_library",
"//topaz/public/dart/fuchsia_webview_flutter:fuchsia_webview_flutter_unittests_library",
"//topaz/runtime/dart_runner/integration:dart_aot_runner_test_dart_library",
"//topaz/runtime/dart_runner/integration:dart_jit_runner_test_dart_library",
"//topaz/tests/dart-inspect-benchmarks:dart-inspect-benchmarks_dart_library",
"//topaz/tools/protobuf/protoc_gen_dart:protoc_gen_dart_dart_library",
]
}
# Copies the patched SDK files for the dart runner
# NOTE: copies to an _nnbd directory to allow for soft transition
copy("platform_files") {
sources = [
"//prebuilt/third_party/flutter/$target_cpu/release/aot/dart_runner_patched_sdk/platform_strong.dill",
"//prebuilt/third_party/flutter/$target_cpu/release/aot/dart_runner_patched_sdk/platform_strong.dill.d",
"//prebuilt/third_party/flutter/$target_cpu/release/aot/dart_runner_patched_sdk/vm_outline_strong.dill",
]
outputs =
[ "$root_out_dir/dart_runner_patched_sdk_nnbd/{{source_file_part}}" ]
}
if (current_toolchain == dart_toolchain) {
pool("dart_pool") {
depth = concurrent_dart_jobs
}
} else {
# A toolchain dedicated to processing and analyzing Dart packages.
# The only targets in this toolchain are action() targets, so it
# has no real tools. But every toolchain needs stamp and copy.
basic_toolchain("dartlang") {
expected_label = dart_toolchain
}
}