Presented by
Date
Event
AOSP Toolchain Evolution
and Experimental
Languages in AOSP
Bernhard “Bero” Rosenkränzer
BKK16-407 March 10, 2016
Linaro Connect BKK16
Big toolchain changes ahead...
AOSP is moving towards clang based
toolchains rather than gcc.
Current AOSP master already builds
completely with clang 3.8 by default.
Kernels and some HAL layers for old
devices remain on gcc for now.
What is Linaro doing to help?
● Initial “make it build with clang”
patches came from Linaro
● Fix up assembly code so we don’t
have to use -no-integrated-as
with clang (for ARMv7 and ARMv8)
● Test newer clang builds
● Make sure building with newer gcc
versions keeps working as well
Other related changes in AOSP
● Build system changes: OpenJDK 8
required, javac being replaced with
jack, ninja replacing GNU make
● Currently, kati converts Makefiles
to Ninja files
● Future: Android.mk files being
replaced with JSON-like files for a
new tool, Soong
Soong
● Soong is a Makefile generator
replacement written in go - it
handles simple stuff by itself,
complex functionality can be added
by writing a go module…
Go
● Yet, there are no signs of any
official support for Android
applications written in Go
● That may be worth fixing,
especially if we want to…
Make AOSP self-hosting
● Step 1: Get toolchain and build
tools to work on aarch64 Linux (in
progress)
● Step 2: Get it to run on AOSP -
adding missing command line tools
as we go
Let’s make
devices like
this one as
useful as
they could be…
Other languages that could be
useful
SWIFT - recently Open Sourced,
already running on ARM Linux. Based
on clang, which already has Android
support and ARM support. Android
port in progress...
Useful for people porting code from
that other mobile OS?
Other languages that could be
useful - Swift
Are we trading away freedom?
● Improvements and Extensions to
the language is in the open
● Projects roles open to anyone
(even commit and lead!)
Other languages that could be
useful - SWIFT
Challenges:
● Need to port/implement the UI
libraries to be really useful for
cross-platform mobile applications.
Other languages that could be
useful
Objective-C/Objective-C++
The next thing from that other mobile
OS that comes to mind…tho it’s use
is falling...
And it already works.
Other languages that could be
useful
Rust (http://rust-lang.org/)
● In many ways similar to swift
● Based on clang - AOSP support is
easy to get.
Other languages that could be
useful
C/C++
● Already possible - but there’s room
for improvements.
○ Libraries doing the JNI wrapping for
talking to AOSP components written in
Java would be useful
○ Qt for Android (esp. Qt Creator) may
need some changes to work well after
Questions? Comments?
Talk to us... Or email:
bero@linaro.org

BKK16-407 AOSP Toolchain Evolution and experimental languages on AOSP

  • 1.
    Presented by Date Event AOSP ToolchainEvolution and Experimental Languages in AOSP Bernhard “Bero” Rosenkränzer BKK16-407 March 10, 2016 Linaro Connect BKK16
  • 2.
    Big toolchain changesahead... AOSP is moving towards clang based toolchains rather than gcc. Current AOSP master already builds completely with clang 3.8 by default. Kernels and some HAL layers for old devices remain on gcc for now.
  • 3.
    What is Linarodoing to help? ● Initial “make it build with clang” patches came from Linaro ● Fix up assembly code so we don’t have to use -no-integrated-as with clang (for ARMv7 and ARMv8) ● Test newer clang builds ● Make sure building with newer gcc versions keeps working as well
  • 4.
    Other related changesin AOSP ● Build system changes: OpenJDK 8 required, javac being replaced with jack, ninja replacing GNU make ● Currently, kati converts Makefiles to Ninja files ● Future: Android.mk files being replaced with JSON-like files for a new tool, Soong
  • 5.
    Soong ● Soong isa Makefile generator replacement written in go - it handles simple stuff by itself, complex functionality can be added by writing a go module…
  • 6.
    Go ● Yet, thereare no signs of any official support for Android applications written in Go ● That may be worth fixing, especially if we want to…
  • 7.
    Make AOSP self-hosting ●Step 1: Get toolchain and build tools to work on aarch64 Linux (in progress) ● Step 2: Get it to run on AOSP - adding missing command line tools as we go
  • 8.
    Let’s make devices like thisone as useful as they could be…
  • 9.
    Other languages thatcould be useful SWIFT - recently Open Sourced, already running on ARM Linux. Based on clang, which already has Android support and ARM support. Android port in progress... Useful for people porting code from that other mobile OS?
  • 10.
    Other languages thatcould be useful - Swift Are we trading away freedom? ● Improvements and Extensions to the language is in the open ● Projects roles open to anyone (even commit and lead!)
  • 11.
    Other languages thatcould be useful - SWIFT Challenges: ● Need to port/implement the UI libraries to be really useful for cross-platform mobile applications.
  • 12.
    Other languages thatcould be useful Objective-C/Objective-C++ The next thing from that other mobile OS that comes to mind…tho it’s use is falling... And it already works.
  • 13.
    Other languages thatcould be useful Rust (http://rust-lang.org/) ● In many ways similar to swift ● Based on clang - AOSP support is easy to get.
  • 14.
    Other languages thatcould be useful C/C++ ● Already possible - but there’s room for improvements. ○ Libraries doing the JNI wrapping for talking to AOSP components written in Java would be useful ○ Qt for Android (esp. Qt Creator) may need some changes to work well after
  • 15.
    Questions? Comments? Talk tous... Or email: bero@linaro.org