From eb2b57bdb7bc9adced54479c1390e6b1c1c5b4e5 Mon Sep 17 00:00:00 2001 From: Xilai Zhang Date: Tue, 2 Aug 2022 08:52:04 -0700 Subject: [PATCH] [gn] Mac entitlement config for font subset (#34989) --- tools/font-subset/BUILD.gn | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tools/font-subset/BUILD.gn b/tools/font-subset/BUILD.gn index e12e3025bb54b..53df3e102e74e 100644 --- a/tools/font-subset/BUILD.gn +++ b/tools/font-subset/BUILD.gn @@ -22,6 +22,10 @@ executable("_font-subset") { "CoreText.framework", ] } + + metadata = { + font_subset_without_entitlement = [ "font-subset" ] + } } generated_file("_font-subset-license") { @@ -40,6 +44,14 @@ generated_file("_font-subset-license") { ] } +generated_file("font_entitlement_config") { + outputs = [ "$target_gen_dir/font_subset_without_entitlements.txt" ] + + data_keys = [ "font_subset_without_entitlement" ] + + deps = [ ":_font-subset" ] +} + zip_bundle("font-subset") { if (is_mac) { # Mac artifacts sometimes use mac and sometimes darwin. Standardizing the @@ -74,4 +86,13 @@ zip_bundle("font-subset") { ":_font-subset-license", "//flutter/tools/const_finder", ] + if (is_mac) { + deps += [ ":font_entitlement_config" ] + files += [ + { + source = "$target_gen_dir/font_subset_without_entitlements.txt" + destination = "without_entitlements.txt" + }, + ] + } }