
DragonTC is a build system for compiling custom clang toolchains. These toolchains contain some AOSP patches(where applicable) and things not included in AOSP clang, such as LTO and Gold plugins, and OpenMP, Polly compiled and automatically linked into tools, improved krait optimizations (-mcpu=krait2), and annoying flags such as -Werror, -Wfatal-errors, and -Weverything internally disabled for non-default parameters. DragonTC compilers are also built with -O3, -pthread, and -fopenmp in order to reduce compile time when used for ROMs. DragonTC has been around for a few months now, but now that some testers have helped me work out the bugs and make it close to stable, I've decided to make an XDA thread.
Why use custom Clang?
Google has been slowly moving away from GCC for a while now, so we believe that we should get ahead of the toolchain game and start now! Furthermore, AOSP modules that are compiled with clang can easily be optimized with the new LTO and Polly options.
How do I build DragonTC?
It's simple! Run the following commands in bash to get set up:
Code:
$ mkdir dtc
$ cd dtc
$ repo init -u https://github.com/dragon-tc/DragonTC -b master
$ repo sync -j(# of cores) -c -f
Code:
sudo aptitude install build-essential git git-svn bc binfmt-support libllvm-3.6-ocaml-dev llvm-3.6 llvm-3.6-dev llvm-3.6-runtime cmake automake autogen autoconf autotools-dev libtool shtool python m4 gcc libtool zlib1g-dev
Code:
$ cd build
$ ./version
To optimize the toolchain for your local system, run with the 'opt' argument. Example:
Code:
$ ./3.7 opt
- Either clone a prebuilt or build your own toolchain and place it in prebuilts/clang/linux-x86/host/your_version (3.7 is the prefered version)
- Change the version in build/core/clang/config.mk to reflect the directory you placed it in.
- Either clone ours, or cherry-pick our changes to prebuilts/ndk and frameworks/rs.
- Cherry-pick our DragonTC support commit in build.
You can get links to all of the prebuilts and when they were last updated here.
XDA:DevDB Information
DragonTC, Tool/Utility for the Android General
Contributors
frap129, xanaxdroid, xboxfanj
Source Code: https://github.com/dragon-tc
Version Information
Status: Beta
Created 2016-02-19
Last Updated 2016-02-19