Giter Club home page Giter Club logo

flutter-ci's Introduction

flutter engine binaries for armv7, aarch64, x64

This repo contains flutter engine binaries (in the https://github.com/ardera/flutter-engine-binaries-for-arm filesystem layout) for armv7 and aarch64. The binaries come in 2 variants: generic, and tuned for the Pi 4 CPU.

📦 Downloads

🛠️ Build Config and Compiler Invocation

Build Config

The engine build is configured with: 1

$ ./src/flutter/tools/gn \
  --runtime-mode <debug / profile / release> \
  [--unoptimized]
  --target-os linux \
  --linux-cpu <arm / arm64 / x64> \
  [--arm-float-abi hard] \
  --target-dir build \
  --embedder-for-target \
  --disable-desktop-embeddings \
  --no-build-glfw-shell \
  --no-build-embedder-examples \
  --no-goma

After that, the following args are added to the args.gn file for armv7/aarch64 without any CPU-specific tuning:

arm_cpu = "generic"
arm_tune = "generic"

When tuning for pi 3:

arm_cpu = "cortex-a53+nocrypto"
arm_tune = "cortex-a53"

When tuning for pi 4:

arm_cpu = "cortex-a72+nocrypto"
arm_tune = "cortex-a72"

For both armv7 and aarch64, the engine is built against the sysroot provided by the engine build scripts, which is some debian sid sysroot from 2020. (See https://github.com/flutter/buildroot/blob/master/build/linux/sysroot_scripts/install-sysroot.py)

Compiler Invocation

This will result in the clang compiler being invoked with the following args:

artifact compiler arguments
armv7-generic --target=armv7-linux-gnueabihf -mcpu=generic -mtune=generic
pi4 --target=armv7-linux-gnueabihf -mcpu=cortex-a72+nocrypto -mtune=cortex-a722
pi3 --target=armv7-linux-gnueabihf -mcpu=cortex-a53+nocrypto -mtune=cortex-a533
aarch64-generic --target=aarch64-linux-gnu -mcpu=generic -mtune=generic
pi4-64 --target=aarch64-linux-gnu -mcpu=cortex-a72+nocrypto -mtune=cortex-a722
pi3-64 --target=aarch64-linux-gnu -mcpu=cortex-a53+nocrypto -mtune=cortex-a533
x64-generic --target=x86_64-unknown-linux-gnu -mcpu=generic -mtune=generic

Debug Symbols

Some modifications are made to the engine build scripts so it's always built with -ggdb -fdebug-default-version=4. The debug symbols are then split into a separate file using:

$ objcopy --only-keep-debug libflutter_engine.so libflutter_engine.so.dbgsyms
$ objcopy --strip-debug libflutter_engine.so
$ objcopy --add-gnu-debuglink=libflutter_engine.{debug/profile/release/debug_unopt}.dbgsyms libflutter_engine.so

That means you can just later download the debug symbols when you need them and step through the engine source code.

However, the resulting libflutter_engine.so is ~4MBs larger than one that has all (not only debug symbols) stripped. So, if you want to save a few more megabytes you can strip them using:

objcopy --strip-unneeded libflutter_engine.so

Footnotes

  1. --arm-float-abi hard is only specified when building for armv7, --unoptimized is only specified for unoptimized debug builds.

  2. The CPU of the Raspberry Pi 4 is a Cortex-A72. +nocrypto is specified for -mcpu because the A72 in the Pi 4 is (apparently) the only A72 in the world that doesn't support cryptography instructions: https://github.com/ardera/flutter-ci/issues/3#issuecomment-1272330857 2

  3. Pi 3 doesn't support cryptography extensions either. 2

flutter-ci's People

Contributors

ardera avatar jwinarske avatar github-actions[bot] avatar disdis avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.