Coder Social home page Coder Social logo

tizen_tools's Introduction

tizen_tools

Tizen cross-compilation toolchain for building the Flutter engine.

Installing the toolchain

You need a Linux x64 host to build the Flutter engine for Tizen devices.

Building the toolchain from source (recommended)

Run the following commands to build LLVM 14 from source.

# Install prerequisites for build. We use ninja and clang-11 for the build.
sudo apt update
sudo apt install git zip build-essential cmake ninja-build clang-11

# Run the build script.
./build-llvm.sh

# Install extra packages required by the linker.
sudo apt install binutils-arm-linux-gnueabi binutils-aarch64-linux-gnu binutils-i686-linux-gnu

Using Tizen Studio's built-in toolchain (deprecated)

Run the following commands in this directory. We assume that Tizen Studio is already installed to the default location ($HOME) on your local drive. The required package (NativeToolchain-Gcc-9.2) must also be installed.

rm -rf toolchains && mkdir -p toolchains
cp -r ~/tizen-studio/tools/llvm-10/* toolchains

# For arm.
cp ~/tizen-studio/tools/arm-linux-gnueabi-gcc-9.2/bin/arm-linux-gnueabi-* toolchains/bin

# For arm64.
cp ~/tizen-studio/tools/aarch64-linux-gnu-gcc-9.2/bin/aarch64-linux-gnu-* toolchains/bin

# For x86.
for f in ~/tizen-studio/tools/i586-linux-gnueabi-gcc-9.2/bin/i586-linux-gnueabi-*; do
  b=`basename $f`
  cp $f toolchains/bin/i686-linux-gnu-${b:19}
done

The toolchain shipped with Tizen Studio (LLVM 10) is pretty old. You need to disable the following unsupported compile options before running the engine build.

--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -617,17 +617,13 @@ if (is_win) {

  if (!use_xcode) {
    default_warning_flags += [
-      "-Wno-unused-but-set-parameter",
-      "-Wno-unused-but-set-variable",
      "-Wno-implicit-int-float-conversion",
      "-Wno-c99-designator",
      "-Wno-deprecated-copy",
      # Needed for compiling Skia with clang-12
-      "-Wno-psabi",
    ]
    if (!is_fuchsia) {
      default_warning_flags += [
-        "-Wno-non-c-typedef-for-linkage",
        "-Wno-range-loop-construct",
      ]
    }

Constructing a sysroot

Run build-rootfs.py to generate a sysroot for each target architecture. You have to re-run the command whenever this repo is updated.

# For arm.
sysroot/build-rootfs.py --arch arm

# For arm64.
sysroot/build-rootfs.py --arch arm64

# For x86.
sysroot/build-rootfs.py --arch x86

tizen_tools's People

Contributors

bbrto21 avatar pkosko avatar pwasowski2 avatar swift-kim avatar wanchao-xu avatar wonyoungchoi avatar xiaowei-guan avatar

Watchers

 avatar  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.