diff --git a/shell/platform/fuchsia/flutter/BUILD.gn b/shell/platform/fuchsia/flutter/BUILD.gn index af89c2c10177165c75b531cd384fb83a3fc8b122..2f90dd295189bd585c7a92405a3a48be53808f53 100644 --- a/shell/platform/fuchsia/flutter/BUILD.gn +++ b/shell/platform/fuchsia/flutter/BUILD.gn @@ -193,6 +193,35 @@ template("jit_runner") { }, ] + fuchsia_sdk_lib = "//fuchsia/sdk/$host_os/arch/$host_cpu/lib" + + libraries = [ + { + name = "libasync-default.so" + path = rebase_path("$fuchsia_sdk_lib") + }, + { + name = "libtrace-engine.so" + path = rebase_path("$fuchsia_sdk_lib") + }, + { + name = "libfdio.so" + path = rebase_path("$fuchsia_sdk_lib") + }, + { + name = "libmemfs.so" + path = rebase_path("$fuchsia_sdk_lib") + }, + { + name = "libsyslog.so" + path = rebase_path("$fuchsia_sdk_lib") + }, + { + name = "libvulkan.so" + path = rebase_path("$fuchsia_sdk_lib") + }, + ] + meta = [ { path = rebase_path("meta/flutter_jit${product_suffix}_runner.cmx") diff --git a/tools/fuchsia/package_dir.gni b/tools/fuchsia/package_dir.gni index b7f6b5361c5c7aa7774310739957070e3a8b67b1..f927d97a41e9e0fefbae99a427a688459a7ce5da 100644 --- a/tools/fuchsia/package_dir.gni +++ b/tools/fuchsia/package_dir.gni @@ -17,6 +17,7 @@ template("package_dir") { "deps", "meta", "resources", + "libraries", ]) if (!defined(package_name)) { package_name = pkg_target_name @@ -30,6 +31,9 @@ template("package_dir") { if (!defined(resources)) { resources = [] } + if (!defined(libraries)) { + libraries = [] + } } far_base_dir = "$root_out_dir/${pkg_target_name}_far" @@ -42,6 +46,11 @@ template("package_dir") { copy_outputs += [ "$far_base_dir/data/${res.dest}" ] } + foreach(lib, pkg.libraries) { + copy_sources += [ "${lib.path}/${lib.name}" ] + copy_outputs += [ "$far_base_dir/lib/${lib.name}" ] + } + action(target_name) { script = "$flutter_root/tools/fuchsia/copy_path.py" response_file_contents = rebase_path(copy_sources + copy_outputs)