[gn] use generated_files to encode entitlement information (flutter/engine#34216)

* generated_files

* for debugging push

* format files

* formate files

* trigger build

* add deps
This commit is contained in:
Xilai Zhang 2022-06-27 09:09:29 -07:00 committed by GitHub
parent 4eb93fed5a
commit 9bbaf6212e
5 changed files with 40 additions and 0 deletions

View File

@ -5,6 +5,21 @@
import("//flutter/build/zip_bundle.gni")
import("//flutter/common/config.gni")
generated_file("artifacts_entitlement_config") {
outputs = [ "$target_gen_dir/entitlements.txt" ]
data_keys = [ "entitlement_file_path" ]
deps = [ "//flutter/lib/snapshot:generate_snapshot_bin" ]
if (flutter_runtime_mode == "debug") {
deps += [
"//flutter/impeller/compiler:impellerc",
"//flutter/impeller/tessellator:tessellator_shared",
"//flutter/shell/testing:testing",
]
}
}
if (build_engine_artifacts) {
zip_bundle("artifacts") {
deps = [
@ -69,6 +84,15 @@ if (build_engine_artifacts) {
destination = "libtessellator$dll"
},
]
if (host_os == "mac") {
deps += [ ":artifacts_entitlement_config" ]
files += [
{
source = "$target_gen_dir/entitlements.txt"
destination = "entitlements.txt"
},
]
}
}
}

View File

@ -89,6 +89,10 @@ impeller_component("impellerc") {
sources = [ "impellerc_main.cc" ]
deps = [ ":compiler_lib" ]
metadata = {
entitlement_file_path = [ "impellerc" ]
}
}
group("compiler") {

View File

@ -34,6 +34,10 @@ impeller_component("tessellator_shared") {
"../geometry",
"//third_party/libtess2",
]
metadata = {
entitlement_file_path = [ "libtessellator.dylib" ]
}
}
impeller_component("tessellator_unittests") {

View File

@ -67,6 +67,10 @@ compiled_action("generate_snapshot_bin") {
}
args += [ rebase_path(platform_kernel) ]
metadata = {
entitlement_file_path = [ "gen_snapshot" ]
}
}
# Generates an assembly file defining a given symbol with the bytes from a

View File

@ -35,4 +35,8 @@ executable("testing") {
"//third_party/dart/runtime/bin:dart_io_api",
"//third_party/skia",
]
metadata = {
entitlement_file_path = [ "flutter_tester" ]
}
}