File tree Expand file tree Collapse file tree 2 files changed +17
-19
lines changed
Expand file tree Collapse file tree 2 files changed +17
-19
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,13 @@ def __init__(self, conf='build.toml'):
5656 # TODO: detect host
5757 self .host = 'linux-x86_64'
5858 self .repo = repo or 'https://github.com/flutter/flutter'
59- self .arch = arch or 'arm64'
59+ if not arch :
60+ arch = ['arm64' ]
61+ elif isinstance (arch , str ):
62+ arch = [arch ]
63+ if any (utils .termux_arch (it ) != 'aarch64' for it in arch ):
64+ raise ValueError ('only arm64/aarch64 Termux builds are supported' )
65+ self .arch = arch
6066 self .mode = mode or 'debug'
6167 self .sysroot = Sysroot (path = path / syspath , ** sysroot )
6268 self .root = path / root
@@ -162,6 +168,7 @@ def configure(
162168 '--gn-args' , 'is_termux=true' ,
163169 '--gn-args' , f'is_termux_host={ utils .__TERMUX__ } ' ,
164170 '--gn-args' , f'termux_api_level={ api } ' ,
171+ '--gn-args' , f'termux_enabled_archs=["{ arch } "]' ,
165172 '--gn-args' , 'extra_ldflags=["-lEGL", "-lGLESv2"]' ,
166173 '--gn-args' , f'extra_cflags_cc=["-I{ toolchain } /../../../sources/third_party/vulkan/include"]' ,
167174 ]
Original file line number Diff line number Diff line change @@ -376,20 +376,21 @@ new file mode 100644
376376index 0000000..0d97976
377377--- /dev/null
378378+++ b/engine/src/build/config/termux/termux.gni
379- @@ -0,0 +1,6 @@
379+ @@ -0,0 +1,7 @@
380380+ declare_args() {
381381+ termux_api_level = 26
382382+
383383+ is_termux = false
384384+ is_termux_host = false
385+ + termux_enabled_archs = [ "arm64" ]
385386+ }
386387+
387388diff --git a/engine/src/build/toolchain/termux/BUILD.gn b/engine/src/build/toolchain/termux/BUILD.gn
388389new file mode 100644
389- index 0000000..564c582
390+ index 0000000..6f2f9fd
390391--- /dev/null
391392+++ b/engine/src/build/toolchain/termux/BUILD.gn
392- @@ -0,0 +1,40 @@
393+ @@ -0,0 +1,34 @@
393394+ import("//build/toolchain/gcc_toolchain.gni")
394395+ import("//build/config/android/config.gni")
395396+ import("//build/config/termux/termux.gni")
@@ -415,23 +416,13 @@ index 0000000..564c582
415416+ }
416417+ }
417418+
418- + termux_toolchain("arm64"){
419- + toolchain_cpu = "arm64"
420- + }
421- +
422- + termux_toolchain("arm"){
423- + toolchain_cpu = "arm"
424- + }
425- +
426- + termux_toolchain("x64"){
427- + toolchain_cpu = "x64"
428- + }
429- +
430- + termux_toolchain("x86"){
431- + toolchain_cpu = "x86"
419+ + foreach(arch, termux_enabled_archs) {
420+ + termux_toolchain(arch) {
421+ + toolchain_cpu = arch
422+ + }
432423+ }
433424
434- metadata = {
425+ metadata = {
435426diff --git a/engine/src/flutter/build/secondary/third_party/inja/BUILD.gn b/engine/src/flutter/build/secondary/third_party/inja/BUILD.gn
436427--- a/engine/src/flutter/build/secondary/third_party/inja/BUILD.gn
437428+++ b/engine/src/flutter/build/secondary/third_party/inja/BUILD.gn
You can’t perform that action at this time.
0 commit comments