- Android NDK Game Development Cookbook
- Sergey Kosarevsky Viktor Latypov
- 202字
- 2021-07-21 18:21:22
Switching NDK toolchains
A toolchain is a set of tools that are used to build your project. A toolchain usually consists of a compiler, an assembler, and a linker. Android NDK comes with different toolchains—GCC and Clang—of different versions. It has a convenient and simple way to switch between them.
Getting ready
Look through the list of the available toolchains before proceeding. You can find all the available toolchains in the $(NDK_ROOT)/toolchains/
folder.
How to do it...
The parameter NDK_TOOLCHAIN_VERSION
in Application.mk
corresponds to one of the available toolchains. In NDK r9b, you can switch between three GCC versions—4.6, and 4.7, which are marked as deprecated and will be removed from the next NDK releases, and 4.8. And two Clang versions—Clang3.2, which is also marked as deprecated, and Clang3.3. The default toolchain in the NDK r9b is still GCC 4.6.
Starting from the NDK r8e, you can just specify clang
as the value of NDK_TOOLCHAIN_VERSION
. This option will select the most recent version of the available Clang toolchain.
There's more...
The toolchains are discovered by the $(NDK_ROOT)/build/core/init.mk
script, so you can define your own toolchain in a folder named <ABI>-<ToolchainName>
and use it in Application.mk
.
- Raspberry Pi 3 Cookbook for Python Programmers
- 深入理解Spring Cloud與實戰
- 基于Proteus和Keil的C51程序設計項目教程(第2版):理論、仿真、實踐相融合
- 施耐德SoMachine控制器應用及編程指南
- 電腦組裝、維護、維修全能一本通(全彩版)
- 平衡掌控者:游戲數值經濟設計
- 從零開始學51單片機C語言
- R Deep Learning Essentials
- 筆記本電腦維修實踐教程
- Hands-On Artificial Intelligence for Banking
- LPC1100系列處理器原理及應用
- Managing Data and Media in Microsoft Silverlight 4:A mashup of chapters from Packt's bestselling Silverlight books
- Java Deep Learning Cookbook
- FL Studio Cookbook
- Intel FPGA權威設計指南:基于Quartus Prime Pro 19集成開發環境