Skip to content

Commit

Permalink
[gn] Mac entitlement config for font subset (flutter#34989)
Browse files Browse the repository at this point in the history
  • Loading branch information
XilaiZhang authored Aug 2, 2022
1 parent 4aa66bd commit eb2b57b
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tools/font-subset/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ executable("_font-subset") {
"CoreText.framework",
]
}

metadata = {
font_subset_without_entitlement = [ "font-subset" ]
}
}

generated_file("_font-subset-license") {
Expand All @@ -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
Expand Down Expand Up @@ -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"
},
]
}
}

0 comments on commit eb2b57b

Please sign in to comment.