Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit cf5d76c

Browse files
authored
[fuchsia] Add support for libs in packages (#10081)
1 parent c4c6489 commit cf5d76c

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

shell/platform/fuchsia/flutter/BUILD.gn

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,35 @@ template("jit_runner") {
193193
},
194194
]
195195

196+
fuchsia_sdk_lib = "//fuchsia/sdk/$host_os/arch/$host_cpu/lib"
197+
198+
libraries = [
199+
{
200+
name = "libasync-default.so"
201+
path = rebase_path("$fuchsia_sdk_lib")
202+
},
203+
{
204+
name = "libtrace-engine.so"
205+
path = rebase_path("$fuchsia_sdk_lib")
206+
},
207+
{
208+
name = "libfdio.so"
209+
path = rebase_path("$fuchsia_sdk_lib")
210+
},
211+
{
212+
name = "libmemfs.so"
213+
path = rebase_path("$fuchsia_sdk_lib")
214+
},
215+
{
216+
name = "libsyslog.so"
217+
path = rebase_path("$fuchsia_sdk_lib")
218+
},
219+
{
220+
name = "libvulkan.so"
221+
path = rebase_path("$fuchsia_sdk_lib")
222+
},
223+
]
224+
196225
meta = [
197226
{
198227
path = rebase_path("meta/flutter_jit${product_suffix}_runner.cmx")

tools/fuchsia/package_dir.gni

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ template("package_dir") {
1717
"deps",
1818
"meta",
1919
"resources",
20+
"libraries",
2021
])
2122
if (!defined(package_name)) {
2223
package_name = pkg_target_name
@@ -30,6 +31,9 @@ template("package_dir") {
3031
if (!defined(resources)) {
3132
resources = []
3233
}
34+
if (!defined(libraries)) {
35+
libraries = []
36+
}
3337
}
3438

3539
far_base_dir = "$root_out_dir/${pkg_target_name}_far"
@@ -42,6 +46,11 @@ template("package_dir") {
4246
copy_outputs += [ "$far_base_dir/data/${res.dest}" ]
4347
}
4448

49+
foreach(lib, pkg.libraries) {
50+
copy_sources += [ "${lib.path}/${lib.name}" ]
51+
copy_outputs += [ "$far_base_dir/lib/${lib.name}" ]
52+
}
53+
4554
action(target_name) {
4655
script = "$flutter_root/tools/fuchsia/copy_path.py"
4756
response_file_contents = rebase_path(copy_sources + copy_outputs)

0 commit comments

Comments
 (0)