Add an option to use a prebuilt Dart SDK (flutter/engine#26931)

This commit is contained in:
Zachary Anderson
2021-07-08 10:36:34 -07:00
committed by GitHub
parent 9090f0ab56
commit 83066bd45d
10 changed files with 414 additions and 99 deletions

8
DEPS
View File

@@ -713,6 +713,14 @@ hooks = [
'src/build/win/generate_winrt_headers.py',
]
},
{
'name': 'Download prebuilt Dart SDK',
'pattern': '.',
'action': [
'python3',
'src/flutter/tools/download_dart_sdk.py',
]
},
{
'name': 'Setup githooks',
'pattern': '.',

View File

@@ -130,3 +130,6 @@ app.*.symbols
!**/ios/**/default.perspectivev3
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
!/dev/ci/**/Gemfile.lock
# Prebuilt binaries.
/prebuilts/

View File

@@ -6,6 +6,7 @@ import("//flutter/common/config.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")
# Whether to build the dartdevc sdk, libraries, and source files
# required for the flutter web sdk.
@@ -35,6 +36,35 @@ config("export_dynamic_symbols") {
}
}
if (flutter_prebuilt_dart_sdk) {
copy_trees("_copy_trees") {
sources = [
{
target = "copy_dart_sdk"
visibility = [ ":dart_sdk" ]
source = target_prebuilt_dart_sdk
dest = "$root_out_dir/dart-sdk"
ignore_patterns = "{}"
},
]
}
}
# Flutter SDK artifacts should only be built when either doing host builds, or
# for cross-compiled desktop targets.
_build_engine_artifacts =
current_toolchain == host_toolchain || (is_linux && !is_chromeos) || is_mac
group("dart_sdk") {
if (_build_engine_artifacts) {
if (flutter_prebuilt_dart_sdk) {
public_deps = [ ":copy_dart_sdk" ]
} else {
public_deps = [ "//third_party/dart:create_sdk" ]
}
}
}
group("flutter") {
testonly = true
@@ -44,11 +74,6 @@ group("flutter") {
"//flutter/sky",
]
# Flutter SDK artifacts should only be built when either doing host builds, or
# for cross-compiled desktop targets.
build_engine_artifacts = current_toolchain == host_toolchain ||
(is_linux && !is_chromeos) || is_mac
# If enbaled, compile the SDK / snapshot.
if (!is_fuchsia) {
public_deps += [
@@ -56,10 +81,10 @@ group("flutter") {
"//flutter/lib/snapshot:kernel_platform_files",
]
if (build_engine_artifacts) {
if (_build_engine_artifacts) {
public_deps += [
":dart_sdk",
"//flutter/flutter_frontend_server:frontend_server",
"//third_party/dart:create_sdk",
# This must be listed explicitly for desktop cross-builds since
# //flutter/lib/snapshot:generate_snapshot_bin will only build
@@ -73,7 +98,7 @@ group("flutter") {
}
}
if (build_engine_artifacts) {
if (_build_engine_artifacts) {
public_deps += [
"//flutter/shell/testing",
"//flutter/tools/const_finder",

View File

@@ -1,2 +1,2 @@
Signature: b9105737a36020f19487fe9854f4be92
Signature: 6f6132591430df787d08771477f3374d

View File

@@ -19,6 +19,9 @@ declare_args() {
# Whether to use the Skia text shaper module for all text rendering
flutter_always_use_skshaper = false
# Whether to use a prebuilt Dart SDK instead of building one.
flutter_prebuilt_dart_sdk = false
}
# feature_defines_list ---------------------------------------------------------
@@ -62,3 +65,17 @@ if (is_ios || is_mac) {
flutter_cflags_objc_arc = flutter_cflags_objc + [ "-fobjc-arc" ]
flutter_cflags_objcc_arc = flutter_cflags_objc_arc
}
# prebuilt Dart SDK location
if (flutter_prebuilt_dart_sdk) {
_os_name = target_os
if (_os_name == "mac") {
_os_name = "macos"
} else if (_os_name == "win" || _os_name == "winuwp") {
_os_name = "windows"
}
target_prebuilt_dart_sdk =
"//flutter/prebuilts/$_os_name-$target_cpu/dart-sdk"
host_prebuilt_dart_sdk = "//flutter/prebuilts/$_os_name-$host_cpu/dart-sdk"
}

View File

@@ -5,6 +5,7 @@
import("//build/compiled_action.gni")
import("//flutter/common/config.gni")
import("//third_party/dart/build/dart/dart_action.gni")
import("//third_party/dart/sdk_args.gni")
is_aot_test =
flutter_runtime_mode == "profile" || flutter_runtime_mode == "release"
@@ -56,18 +57,23 @@ template("dart_snapshot_kernel") {
dart_action(target_name) {
testonly = true
deps = [
# This generates the Frontend server snapshot used in this Dart action as
# well as the patched SDK.
"//third_party/dart/utils/kernel-service:frontend_server",
]
if (flutter_prebuilt_dart_sdk) {
deps = [ "//flutter:dart_sdk" ]
script =
"$root_out_dir/dart-sdk/bin/snapshots/frontend_server.dart.snapshot"
} else {
deps = [
# This generates the Frontend server snapshot used in this Dart action as
# well as the patched SDK.
"//third_party/dart/utils/kernel-service:frontend_server",
]
script = "$root_out_dir/frontend_server.dart.snapshot"
}
if (is_aot_test) {
deps += [ "//flutter/lib/snapshot:strong_platform" ]
}
script = "$root_out_dir/frontend_server.dart.snapshot"
inputs = [ invoker.dart_main ]
outputs = [ invoker.dart_kernel ]

View File

@@ -0,0 +1,205 @@
#!/usr/bin/env python3
# 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.
# When the environment variable in FLUTTER_PREBUILTS_ENV_VAR below is defined
# and is not '0' or 'false', this script downloads the Dart SDK that matches the
# version in the source tree and puts it in prebuilts/.
#
# The return code of this script will always be 0, even if there is an error,
# unless the --fail-loudly flag is passed.
# TODO(zra): Eliminate this script and download through the DEPS file if/when
# the Dart SDKs pulled by this script are uploaded to cipd.
import argparse
import os
import multiprocessing
import platform
import re
import shutil
import subprocess
import sys
import zipfile
SRC_ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
FLUTTER_DIR = os.path.join(SRC_ROOT, 'flutter')
FLUTTER_PREBUILTS_DIR = os.path.join(FLUTTER_DIR, 'prebuilts')
DART_DIR = os.path.join(SRC_ROOT, 'third_party', 'dart')
DART_VERSION = os.path.join(DART_DIR, 'tools', 'VERSION')
FLUTTER_PREBUILTS_ENV_VAR = 'FLUTTER_PREBUILT_DART_SDK'
# The Dart SDK script is the source of truth about the sematic version.
sys.path.append(os.path.join(DART_DIR, 'tools'))
import utils
# Prints to stderr.
def eprint(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)
# Try to guess the host operating system.
def GuessOS():
os_name = utils.GuessOS()
if os_name == 'win32':
os_name = 'windows'
if os_name not in ['linux', 'macos', 'windows']:
eprint('Could not determine the OS: "%s"' % os_name)
return None
return os_name
# For os `os_name` return a list of architectures for which prebuilts are
# supported. Kepp in sync with `can_use_prebuilt_dart` in //flutter/tools/gn.
def ArchitecturesForOS(os_name):
if os_name == 'linux':
return ['x64', 'arm64']
elif os_name == 'macos':
return ['x64', 'arm64']
elif os_name =='windows':
return ['x64']
eprint('Could not determine architectures for os "%s"' % os_name)
return None
# Downloads a Dart SDK to //flutter/prebuilts.
def DownloadDartSDK(channel, version, os_name, arch):
file = 'dartsdk-{}-{}-release.zip'.format(os_name, arch)
url = 'https://storage.googleapis.com/dart-archive/channels/{}/raw/{}/sdk/{}'.format(
channel, version, file,
)
dest = os.path.join(FLUTTER_PREBUILTS_DIR, file)
stamp_file = '{}.stamp'.format(dest)
version_stamp = None
try:
with open(stamp_file) as fd:
version_stamp = fd.read()
except:
version_stamp = 'none'
if version == version_stamp:
# The prebuilt Dart SDK is already up-to-date. Indicate that the download
# should be skipped by returning the empty string.
return ''
if os.path.isfile(dest):
os.unlink(dest)
curl_command = ['curl', url, '-o', dest]
curl_result = subprocess.run(
curl_command,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
universal_newlines=True,
)
if curl_result.returncode != 0:
eprint('Failed to download: stdout:\n{}\nstderr:\n{}'.format(
curl_result.stdout, curl_result.stderr,
))
return None
return dest
# A custom ZipFile class that preserves file permissions.
class ZipFileWithPermissions(zipfile.ZipFile):
def _extract_member(self, member, targetpath, pwd):
if not isinstance(member, zipfile.ZipInfo):
member = self.getinfo(member)
targetpath = super()._extract_member(member, targetpath, pwd)
attr = member.external_attr >> 16
if attr != 0:
os.chmod(targetpath, attr)
return targetpath
# Extracts a Dart SDK in //fluter/prebuilts
def ExtractDartSDK(archive, os_name, arch):
os_arch = '{}-{}'.format(os_name, arch)
dart_sdk = os.path.join(FLUTTER_PREBUILTS_DIR, os_arch, 'dart-sdk')
if os.path.isdir(dart_sdk):
shutil.rmtree(dart_sdk)
extract_dest = os.path.join(FLUTTER_PREBUILTS_DIR, os_arch)
os.makedirs(extract_dest, exist_ok=True)
with ZipFileWithPermissions(archive, "r") as z:
z.extractall(extract_dest)
def DownloadAndExtract(channel, version, os_name, arch):
archive = DownloadDartSDK(channel, version, os_name, arch)
if archive == None:
return 1
if archive == '':
return 0
ExtractDartSDK(archive, os_name, arch)
try:
stamp_file = '{}.stamp'.format(archive)
with open(stamp_file, "w") as fd:
fd.write(version)
except Exception as e:
eprint('Failed to write Dart SDK version stamp file:\n{}'.format(e))
return 1
return 0
def Main():
parser = argparse.ArgumentParser()
parser.add_argument(
'--fail-loudly',
action='store_true',
default=False,
help="Return an error code if a prebuilt couldn't be fetched and extracted")
args = parser.parse_args()
fail_loudly = 1 if args.fail_loudly else 0
prebuilt_enabled = os.environ.get(FLUTTER_PREBUILTS_ENV_VAR, 'false')
if prebuilt_enabled == '0' or prebuilt_enabled.lower() == 'false':
return 0
os.makedirs(FLUTTER_PREBUILTS_DIR, exist_ok=True)
# Read //third_party/dart/tools/VERSION to extract information about the
# Dart SDK version.
version = utils.ReadVersionFile()
if version == None:
return fail_loudly
channel = version.channel
# A short Dart SDK version string used in the download url.
if channel == 'be':
dart_git_rev = utils.GetGitRevision()
semantic_version = 'hash/{}'.format(dart_git_rev)
semantic_version = utils.GetSemanticSDKVersion()
os_name = GuessOS()
if os_name == None:
return fail_loudly
architectures = ArchitecturesForOS(os_name)
if architectures == None:
return fail_loudly
# Download and extract variants in parallel
pool = multiprocessing.Pool()
tasks = [(channel, semantic_version, os_name, arch) for arch in architectures]
async_results = [pool.apply_async(DownloadAndExtract, t) for t in tasks]
success = True
for async_result in async_results:
result = async_result.get()
success = success and (result == 0)
return 0 if success else fail_loudly
if __name__ == '__main__':
sys.exit(Main())

View File

@@ -85,6 +85,31 @@ def cpu_for_target_arch(arch):
if arch in ['x64', 'arm64', 'simarm64', 'simdbc64', 'armsimdbc64']:
return 'x64'
# Determines whether a prebuilt Dart SDK can be used instead of building one.
# We can use a prebuilt Dart SDK when:
# 1. It is a host build, or a build targeting desktop
# 2. The prebuilt SDK exists under //flutter/prebuilts/$OS-$ARCH.
def can_use_prebuilt_dart(args):
prebuilt = None
if args.target_os == None:
if sys.platform.startswith(('cygwin', 'win')):
prebuilt = 'windows-x64'
elif sys.platform == 'darwin':
prebuilt = 'macos-x64'
else:
prebuilt = 'linux-x64'
elif args.target_os == 'linux' and args.linux_cpu in ['x64', 'arm64']:
prebuilt = 'linux-%s' % args.linux_cpu
elif args.target_os == 'mac' and args.mac_cpu in ['x64', 'arm64']:
prebuilt = 'macos-%s' % args.mac_cpu
elif args.target_os in ['win', 'winuwp'] and args.windows_cpu == 'x64':
prebuilt = 'windows-%s' % args.windows_cpu
prebuilts_dir = None
if prebuilt != None:
prebuilts_dir = os.path.join(SRC_ROOT, 'flutter', 'prebuilts', prebuilt)
return prebuilts_dir != None and os.path.isdir(prebuilts_dir)
def to_gn_args(args):
if args.simulator:
if args.target_os == 'android':
@@ -299,9 +324,20 @@ def to_gn_args(args):
if args.arm_float_abi:
gn_args['arm_float_abi'] = args.arm_float_abi
# dart_platform_sdk is only defined for host builds, linux arm host builds
# specify target_os=linux
if args.target_os is None or args.target_os == 'linux':
# If we have a prebuilt for the Dart SDK for the target architecture, then
# use it instead of building a new one.
if args.prebuilt_dart_sdk:
if can_use_prebuilt_dart(args):
gn_args['flutter_prebuilt_dart_sdk'] = True
gn_args['dart_sdk_output'] = 'built-dart-sdk'
else:
print('--prebuilt-dart-sdk was specified, but an appropriate prebuilt '
'could not be found! Try running '
'flutter/tools/download_dart_sdk.py manually.')
sys.exit(1)
elif args.target_os is None or args.target_os == 'linux':
# dart_platform_sdk is only defined for host builds, linux arm host builds
# specify target_os=linux.
# dart_platform_sdk=True means exclude web-related files, e.g. dart2js,
# dartdevc, web SDK kernel and source files.
gn_args['dart_platform_sdk'] = not args.full_dart_sdk
@@ -443,6 +479,9 @@ def parse_args(args):
help='Strip debug symbols from the output. This defaults to true and has no effect on iOS.')
parser.add_argument('--no-stripped', dest='stripped', action='store_false')
parser.add_argument('--prebuilt-dart-sdk', default=False, action='store_true',
help='Whether to use a prebuilt Dart SDK instead of building one.')
# Sanitizers.
parser.add_argument('--asan', default=False, action='store_true')
parser.add_argument('--lsan', default=False, action='store_true')

View File

@@ -2128,6 +2128,7 @@ class _RepositoryFlutterDirectory extends _RepositoryDirectory {
// None of the web_sdk code is linked into Flutter apps. It's only used
// by engine tests and tools.
&& entry.name != 'web_sdk'
&& entry.name != 'prebuilts'
&& super.shouldRecurse(entry);
}

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/common/config.gni")
import("//third_party/dart/build/dart/dart_action.gni")
import("//third_party/dart/utils/compile_platform.gni")
@@ -100,21 +101,94 @@ copy("web_ui_library") {
outputs = [ "$root_out_dir/flutter_web_sdk/{{source_file_part}}" ]
}
# Compile the unsound DDC SDK's summary.
prebuilt_dart_action("flutter_dartdevc_kernel_sdk_outline") {
deps = [
"//third_party/dart:create_sdk",
"//third_party/dart/pkg:pkg_files_stamp",
"//third_party/dart/utils/dartdevc:dartdevc_files_stamp",
"//third_party/dart/utils/dartdevc:dartdevc_sdk_patch_stamp",
]
# Compiles a Dart program with dartdevc
#
# Parameters:
#
# inputs (required): The inputs to dartdevc
#
# outputs (required): The files generated by dartdevc
#
# args (required): The arguments to pass to dartdevc
template("_dartdevc") {
if (flutter_prebuilt_dart_sdk) {
action(target_name) {
not_needed(invoker, [ "packages" ])
deps = [ "//flutter:dart_sdk" ]
script = "//build/gn_run_binary.py"
inputs = invoker.inputs
outputs = invoker.outputs
dartdevc =
rebase_path("$host_prebuilt_dart_sdk/bin/dartdevc", root_out_dir)
args = [ dartdevc ] + invoker.args
}
} else {
prebuilt_dart_action(target_name) {
forward_variables_from(invoker, "*")
deps = [
"//flutter:dart_sdk",
"//third_party/dart/pkg:pkg_files_stamp",
"//third_party/dart/utils/dartdevc:dartdevc_files_stamp",
"//third_party/dart/utils/dartdevc:dartdevc_sdk_patch_stamp",
]
script = "//third_party/dart/pkg/dev_compiler/bin/dartdevc.dart"
}
}
}
# Compiles a Dart SDK with the kernel_worker
#
# Parameters:
#
# inputs (required): The inputs to the kernel_worker
#
# outputs (required): The files generated by the kernel_worker
#
# args (required): The arguments to pass to the kernel_worker
template("_kernel_worker") {
if (flutter_prebuilt_dart_sdk) {
action(target_name) {
deps = [ "//flutter:dart_sdk" ]
script = "//build/gn_run_binary.py"
inputs = invoker.inputs
outputs = invoker.outputs
dart = rebase_path("$host_prebuilt_dart_sdk/bin/dart", root_out_dir)
kernel_worker = rebase_path(
"$host_prebuilt_dart_sdk/bin/snapshots/kernel_worker.dart.snapshot")
args = [
dart,
kernel_worker,
] + invoker.args
}
} else {
prebuilt_dart_action(target_name) {
forward_variables_from(invoker, "*")
deps = [
"//flutter:dart_sdk",
"//third_party/dart/pkg:pkg_files_stamp",
"//third_party/dart/utils/dartdevc:dartdevc_files_stamp",
"//third_party/dart/utils/dartdevc:dartdevc_sdk_patch_stamp",
]
script = "//third_party/dart/utils/bazel/kernel_worker.dart"
}
}
}
# Compile the unsound DDC SDK's summary.
_kernel_worker("flutter_dartdevc_kernel_sdk_outline") {
inputs = [ "sdk_rewriter.dart" ] + web_ui_sources + web_engine_sources
outputs = [ sdk_dill ]
script = "//third_party/dart/utils/bazel/kernel_worker.dart"
args = [
"--no-sound-null-safety",
"--summary-only",
@@ -142,20 +216,11 @@ prebuilt_dart_action("flutter_dartdevc_kernel_sdk_outline") {
}
# Compiles the unsound html only renderer.
prebuilt_dart_action("flutter_dartdevc_kernel_sdk") {
deps = [
"//third_party/dart:create_sdk",
"//third_party/dart/pkg:pkg_files_stamp",
"//third_party/dart/utils/dartdevc:dartdevc_files_stamp",
"//third_party/dart/utils/dartdevc:dartdevc_sdk_patch_stamp",
]
_dartdevc("flutter_dartdevc_kernel_sdk") {
inputs = [ "sdk_rewriter.dart" ] + web_ui_sources + web_engine_sources
packages = dart_sdk_package_config
script = "//third_party/dart/pkg/dev_compiler/bin/dartdevc.dart"
outputs = [
"$root_out_dir/flutter_web_sdk/kernel/amd/dart_sdk.js",
"$root_out_dir/flutter_web_sdk/kernel/amd/dart_sdk.js.map",
@@ -195,20 +260,11 @@ prebuilt_dart_action("flutter_dartdevc_kernel_sdk") {
}
# Compiles the unsound canvaskit only renderer.
prebuilt_dart_action("flutter_dartdevc_canvaskit_kernel_sdk") {
deps = [
"//third_party/dart:create_sdk",
"//third_party/dart/pkg:pkg_files_stamp",
"//third_party/dart/utils/dartdevc:dartdevc_files_stamp",
"//third_party/dart/utils/dartdevc:dartdevc_sdk_patch_stamp",
]
_dartdevc("flutter_dartdevc_canvaskit_kernel_sdk") {
inputs = [ "sdk_rewriter.dart" ] + web_ui_sources + web_engine_sources
packages = dart_sdk_package_config
script = "//third_party/dart/pkg/dev_compiler/bin/dartdevc.dart"
outputs = [
"$root_out_dir/flutter_web_sdk/kernel/amd-canvaskit/dart_sdk.js",
"$root_out_dir/flutter_web_sdk/kernel/amd-canvaskit/dart_sdk.js.map",
@@ -250,20 +306,11 @@ prebuilt_dart_action("flutter_dartdevc_canvaskit_kernel_sdk") {
}
# Compiles the unsound autodetect renderer.
prebuilt_dart_action("flutter_dartdevc_canvaskit_html_kernel_sdk") {
deps = [
"//third_party/dart:create_sdk",
"//third_party/dart/pkg:pkg_files_stamp",
"//third_party/dart/utils/dartdevc:dartdevc_files_stamp",
"//third_party/dart/utils/dartdevc:dartdevc_sdk_patch_stamp",
]
_dartdevc("flutter_dartdevc_canvaskit_html_kernel_sdk") {
inputs = [ "sdk_rewriter.dart" ] + web_ui_sources + web_engine_sources
packages = dart_sdk_package_config
script = "//third_party/dart/pkg/dev_compiler/bin/dartdevc.dart"
outputs = [
"$root_out_dir/flutter_web_sdk/kernel/amd-canvaskit-html/dart_sdk.js",
"$root_out_dir/flutter_web_sdk/kernel/amd-canvaskit-html/dart_sdk.js.map",
@@ -305,20 +352,11 @@ prebuilt_dart_action("flutter_dartdevc_canvaskit_html_kernel_sdk") {
}
# Compiles the sound html only renderer.
prebuilt_dart_action("flutter_dartdevc_kernel_sdk_sound") {
deps = [
"//third_party/dart:create_sdk",
"//third_party/dart/pkg:pkg_files_stamp",
"//third_party/dart/utils/dartdevc:dartdevc_files_stamp",
"//third_party/dart/utils/dartdevc:dartdevc_sdk_patch_stamp",
]
_dartdevc("flutter_dartdevc_kernel_sdk_sound") {
inputs = [ "sdk_rewriter.dart" ] + web_ui_sources + web_engine_sources
packages = dart_sdk_package_config
script = "//third_party/dart/pkg/dev_compiler/bin/dartdevc.dart"
outputs = [
"$root_out_dir/flutter_web_sdk/kernel/amd-sound/dart_sdk.js",
"$root_out_dir/flutter_web_sdk/kernel/amd-sound/dart_sdk.js.map",
@@ -359,20 +397,11 @@ prebuilt_dart_action("flutter_dartdevc_kernel_sdk_sound") {
}
# Compiles the sound canvaskit only renderer.
prebuilt_dart_action("flutter_dartdevc_canvaskit_kernel_sdk_sound") {
deps = [
"//third_party/dart:create_sdk",
"//third_party/dart/pkg:pkg_files_stamp",
"//third_party/dart/utils/dartdevc:dartdevc_files_stamp",
"//third_party/dart/utils/dartdevc:dartdevc_sdk_patch_stamp",
]
_dartdevc("flutter_dartdevc_canvaskit_kernel_sdk_sound") {
inputs = [ "sdk_rewriter.dart" ] + web_ui_sources + web_engine_sources
packages = dart_sdk_package_config
script = "//third_party/dart/pkg/dev_compiler/bin/dartdevc.dart"
outputs = [
"$root_out_dir/flutter_web_sdk/kernel/amd-canvaskit-sound/dart_sdk.js",
"$root_out_dir/flutter_web_sdk/kernel/amd-canvaskit-sound/dart_sdk.js.map",
@@ -414,20 +443,11 @@ prebuilt_dart_action("flutter_dartdevc_canvaskit_kernel_sdk_sound") {
}
# Compiles the sound autodetect renderer.
prebuilt_dart_action("flutter_dartdevc_canvaskit_html_kernel_sdk_sound") {
deps = [
"//third_party/dart:create_sdk",
"//third_party/dart/pkg:pkg_files_stamp",
"//third_party/dart/utils/dartdevc:dartdevc_files_stamp",
"//third_party/dart/utils/dartdevc:dartdevc_sdk_patch_stamp",
]
_dartdevc("flutter_dartdevc_canvaskit_html_kernel_sdk_sound") {
inputs = [ "sdk_rewriter.dart" ] + web_ui_sources + web_engine_sources
packages = dart_sdk_package_config
script = "//third_party/dart/pkg/dev_compiler/bin/dartdevc.dart"
outputs = [
"$root_out_dir/flutter_web_sdk/kernel/amd-canvaskit-html-sound/dart_sdk.js",
"$root_out_dir/flutter_web_sdk/kernel/amd-canvaskit-html-sound/dart_sdk.js.map",
@@ -469,20 +489,11 @@ prebuilt_dart_action("flutter_dartdevc_canvaskit_html_kernel_sdk_sound") {
}
# Compile the sound DDC SDK's summary.
prebuilt_dart_action("flutter_dartdevc_kernel_sdk_outline_sound") {
deps = [
"//third_party/dart:create_sdk",
"//third_party/dart/pkg:pkg_files_stamp",
"//third_party/dart/utils/dartdevc:dartdevc_files_stamp",
"//third_party/dart/utils/dartdevc:dartdevc_sdk_patch_stamp",
]
_kernel_worker("flutter_dartdevc_kernel_sdk_outline_sound") {
inputs = [ "sdk_rewriter.dart" ] + web_ui_sources + web_engine_sources
outputs = [ sdk_dill_sound ]
script = "//third_party/dart/utils/bazel/kernel_worker.dart"
args = [
"--sound-null-safety",
"--summary-only",