[gn + artifacts] dart-sdk mac entitlement configs (flutter/engine#34679)
This commit is contained in:
@@ -127,23 +127,43 @@ zip_bundle("flutter_patched_sdk") {
|
||||
]
|
||||
}
|
||||
|
||||
generated_file("dart_sdk_entitlement_config") {
|
||||
outputs = [ "$target_gen_dir/dart_sdk_entitlements.txt" ]
|
||||
|
||||
# Dart SDK is a prebuilt archive. The rule for building
|
||||
# Dart SDK is https://github.com/flutter/engine/blob/main/BUILD.gn#L61
|
||||
contents = [
|
||||
"dart-sdk/bin/dart",
|
||||
"dart-sdk/bin/dartaotruntime",
|
||||
"dart-sdk/bin/utils/gen_snapshot",
|
||||
]
|
||||
|
||||
deps = []
|
||||
}
|
||||
|
||||
# Flutter consumes the dart sdk as a prebuilt. Rather than regenerating
|
||||
# the zip file we are just copying the original file to the artifacts location.
|
||||
if (build_engine_artifacts && flutter_prebuilt_dart_sdk) {
|
||||
zip_bundle("dart_sdk_archive") {
|
||||
deps = []
|
||||
deps = [ ":dart_sdk_entitlement_config" ]
|
||||
output = "dart-sdk-$full_target_platform_name.zip"
|
||||
if (is_mac) {
|
||||
# Mac artifacts sometimes use mac and sometimes darwin. Standardizing the
|
||||
# names will require changes in the list of artifacts the tool is downloading.
|
||||
output = "dart-sdk-darwin-$target_cpu.zip"
|
||||
}
|
||||
files = [
|
||||
{
|
||||
source = prebuilt_dart_sdk
|
||||
destination = "dart-sdk"
|
||||
},
|
||||
]
|
||||
if (is_mac) {
|
||||
# Mac artifacts sometimes use mac and sometimes darwin. Standardizing the
|
||||
# names will require changes in the list of artifacts the tool is downloading.
|
||||
output = "dart-sdk-darwin-$target_cpu.zip"
|
||||
files += [
|
||||
{
|
||||
source = "$target_gen_dir/dart_sdk_entitlements.txt"
|
||||
destination = "entitlements.txt"
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user