Skip to content

Commit c96c9d4

Browse files
maruelMarc-Antoine Ruel
andauthored
fuchsia: do not read json unless enabled (flutter#725)
Otherwise this causes GN to read JSON files that are irrelevant. Co-authored-by: Marc-Antoine Ruel <maruel@google.com>
1 parent d648d26 commit c96c9d4

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

build/fuchsia/sdk.gni

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,12 +244,9 @@ template("fuchsia_sdk") {
244244
foreach(part, meta_json.parts) {
245245
part_meta_json = {
246246
}
247-
248247
part_meta = part.meta
249248
part_meta_rebased = "$_fuchsia_sdk_path/$part_meta"
250249

251-
part_meta_json = read_file(part_meta_rebased, "json")
252-
253250
# Check if the part is using `part.element_type` or `part.type`.
254251
part_type = ""
255252
if (defined(part.element_type)) {
@@ -261,6 +258,7 @@ template("fuchsia_sdk") {
261258
# Check if the part type is in `invoker.enabled_parts`.
262259
if (invoker.enabled_parts + [ part_type ] - [ part_type ] !=
263260
invoker.enabled_parts) {
261+
part_meta_json = read_file(part_meta_rebased, "json")
264262
subtarget_name = part_meta_json.name
265263

266264
if (part_type == "cc_source_library") {

0 commit comments

Comments
 (0)