Skip to content

Commit

Permalink
Only depend on FML for tracing when building executables. (flutter#72)
Browse files Browse the repository at this point in the history
Otherwise, depending on Impeller will cause an explicit dependency on
whatever VM variant :libdart picks. And, some other unit-test in the
engine explicitly link in the JIT variant which leads to duplicate
symbol errors in profile and release modes.
  • Loading branch information
chinmaygarde authored and dnfield committed Apr 27, 2022
1 parent 597c10e commit e46345d
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 45 deletions.
4 changes: 4 additions & 0 deletions impeller/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,9 @@ executable("impeller_unittests") {
"playground",
"renderer:renderer_unittests",
"typographer:typographer_unittests",

# FML depends on the Dart VM for tracing and getting the current
# timepoint.
"//flutter/runtime:libdart",
]
}
8 changes: 1 addition & 7 deletions impeller/aiks/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,7 @@ impeller_component("aiks") {
"../geometry",
]

deps = [
"//flutter/fml",

# FML depends on the Dart VM for tracing and getting the current
# timepoint.
"//flutter/runtime:libdart",
]
deps = [ "//flutter/fml" ]
}

impeller_component("aiks_unittests") {
Expand Down
4 changes: 0 additions & 4 deletions impeller/archivist/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ impeller_component("archivist") {

deps = [
"//flutter/fml",

# FML depends on the Dart VM for tracing and getting the current
# timepoint.
"//flutter/runtime:libdart",
"//third_party/sqlite",
]
}
Expand Down
8 changes: 1 addition & 7 deletions impeller/base/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,7 @@ impeller_component("base") {
"validation.h",
]

deps = [
"//flutter/fml",

# FML depends on the Dart VM for tracing and getting the current
# timepoint.
"//flutter/runtime:libdart",
]
deps = [ "//flutter/fml" ]
}

impeller_component("base_unittests") {
Expand Down
9 changes: 7 additions & 2 deletions impeller/compiler/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ impeller_component("compiler_lib") {
"../base",
"../geometry",
"//flutter/fml",
"//flutter/runtime:libdart",
"//third_party/inja",
"//third_party/shaderc_flutter",
"//third_party/spirv_cross_flutter",
Expand All @@ -35,7 +34,13 @@ impeller_component("impellerc") {

sources = [ "impellerc_main.cc" ]

deps = [ ":compiler_lib" ]
deps = [
":compiler_lib",

# FML depends on the Dart VM for tracing and getting the current
# timepoint.
"//flutter/runtime:libdart",
]
}

group("compiler") {
Expand Down
8 changes: 1 addition & 7 deletions impeller/entity/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,7 @@ impeller_component("entity") {
"../typographer",
]

deps = [
"//flutter/fml",

# FML depends on the Dart VM for tracing and getting the current
# timepoint.
"//flutter/runtime:libdart",
]
deps = [ "//flutter/fml" ]
}

impeller_component("entity_unittests") {
Expand Down
4 changes: 0 additions & 4 deletions impeller/image/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ impeller_component("image") {

deps = [
"//flutter/fml",

# FML depends on the Dart VM for tracing and getting the current
# timepoint.
"//flutter/runtime:libdart",
"//third_party/skia",
]
}
Expand Down
8 changes: 1 addition & 7 deletions impeller/renderer/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,7 @@ impeller_component("renderer") {
"../tessellator",
]

deps = [
"//flutter/fml",

# FML depends on the Dart VM for tracing and getting the current
# timepoint.
"//flutter/runtime:libdart",
]
deps = [ "//flutter/fml" ]

frameworks = [ "Metal.framework" ]
}
Expand Down
8 changes: 1 addition & 7 deletions impeller/typographer/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,7 @@ impeller_component("typographer") {
"//third_party/skia",
]

deps = [
"//flutter/fml",

# FML depends on the Dart VM for tracing and getting the current
# timepoint.
"//flutter/runtime:libdart",
]
deps = [ "//flutter/fml" ]
}

impeller_component("typographer_unittests") {
Expand Down

0 comments on commit e46345d

Please sign in to comment.