diff --git a/engine/src/flutter/build/archives/BUILD.gn b/engine/src/flutter/build/archives/BUILD.gn index f91ca65bec7..e09d101afca 100644 --- a/engine/src/flutter/build/archives/BUILD.gn +++ b/engine/src/flutter/build/archives/BUILD.gn @@ -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" + }, + ] + } } } diff --git a/engine/src/flutter/impeller/compiler/BUILD.gn b/engine/src/flutter/impeller/compiler/BUILD.gn index 54f2b8560b7..9bd3ffda346 100644 --- a/engine/src/flutter/impeller/compiler/BUILD.gn +++ b/engine/src/flutter/impeller/compiler/BUILD.gn @@ -89,6 +89,10 @@ impeller_component("impellerc") { sources = [ "impellerc_main.cc" ] deps = [ ":compiler_lib" ] + + metadata = { + entitlement_file_path = [ "impellerc" ] + } } group("compiler") { diff --git a/engine/src/flutter/impeller/tessellator/BUILD.gn b/engine/src/flutter/impeller/tessellator/BUILD.gn index a3d1b3ef1c4..d3915f99966 100644 --- a/engine/src/flutter/impeller/tessellator/BUILD.gn +++ b/engine/src/flutter/impeller/tessellator/BUILD.gn @@ -34,6 +34,10 @@ impeller_component("tessellator_shared") { "../geometry", "//third_party/libtess2", ] + + metadata = { + entitlement_file_path = [ "libtessellator.dylib" ] + } } impeller_component("tessellator_unittests") { diff --git a/engine/src/flutter/lib/snapshot/BUILD.gn b/engine/src/flutter/lib/snapshot/BUILD.gn index 01cbbc12277..f78ff9f98d0 100644 --- a/engine/src/flutter/lib/snapshot/BUILD.gn +++ b/engine/src/flutter/lib/snapshot/BUILD.gn @@ -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 diff --git a/engine/src/flutter/shell/testing/BUILD.gn b/engine/src/flutter/shell/testing/BUILD.gn index 247b168bae9..ec6400ce076 100644 --- a/engine/src/flutter/shell/testing/BUILD.gn +++ b/engine/src/flutter/shell/testing/BUILD.gn @@ -35,4 +35,8 @@ executable("testing") { "//third_party/dart/runtime/bin:dart_io_api", "//third_party/skia", ] + + metadata = { + entitlement_file_path = [ "flutter_tester" ] + } }