(Requires Git if not previously installed: sudo apt install git) cd ~/ armnn - devenv For example, if your ANDROID_API is 27 then the compiler will be aarch64-linux-android27-clang++. Note: You can specify the ‘Android_API’ version you want. with - test - with - log - with - program_options - j16 Toolset = clang - arm link = static cxxflags =- fPIC \ b2 install - user - config = $HOME / armnn - devenv / boost / user - config. sh - prefix = $HOME / armnn - devenv / boost / install jamĬd ~/ armnn - devenv / boost / boost_1_64_0 (Requires clang if not previously installed: sudo apt-get install clang) echo "using clang : arm : aarch64-linux-android-clang++ " > $HOME / armnn - devenv / boost / user - config. Android’s current preference is for you to just specify the architecture and operating system while setting the compiler and just use the ndk directory.ĭownload Boost version 1.64: mkdir ~/ armnn - devenv / boost With the android ndk-20b, you don‘t need to use the make_standalone_toolchain script to create a toolchain for a specific version of android. You may want to append the above export variables commands to your ~/.bashrc (or ~/.bash_profile in Mac OS). zipĮxport NDK =~/ armnn - devenv / android - ndk - r20bĮxport NDK_TOOLCHAIN_ROOT = $NDK / toolchains / llvm / prebuilt / linux - x86_64Įxport PATH = $NDK_TOOLCHAIN_ROOT / bin /: $PATH Unzip android - ndk - r20b - linux - x86_64. com / android / repository / android - ndk - r20b - linux - x86_64.
# For Mac OS, change the NDK download link accordingly. Download the Android NDK and make a standalone toolchainĭownload the Android NDK from the official website: mkdir - p ~/ armnn - devenv / toolchains All downloaded or generated files will be saved inside the ~/armnn-devenv directory.
The instructions show how to build the ArmNN core library and the optional TensorFlow parser. They have been tested on a clean install of Ubuntu 18.04, and should also work with other OS versions. These are step by step instructions for using the Android NDK to build ArmNN. Run ArmNN UnitTests on an Android device.Download the Android NDK and make a standalone toolchain.
How to use the Android NDK to build ArmNN