|author||Dan Albert <firstname.lastname@example.org>||Fri Jun 30 13:32:15 2017 -0700|
|committer||Dan Albert <email@example.com>||Fri Jun 30 16:54:46 2017 -0700|
Remove most of locale_support.c. We only need a small handful of these now, and only on LP64. Test: ./run_tests.py Bug: https://github.com/android-ndk/ndk/issues/300 Change-Id: I1e1f956bab4f3a28b6cdd89868d9ed43d8ec1cf9
The latest version of this document is available at https://android.googlesource.com/platform/ndk/+/master/README.md.
Note: This document is for developers of the NDK, not developers that use the NDK.
The NDK allows Android application developers to include native code in their Android application packages, compiled as JNI shared libraries.
Both Linux and Windows host binaries are built on Linux machines. Windows host binaries are built via MinGW cross compiler. Systems without a working MinGW compiler can use
build/tools/build-mingw64-toolchain.sh to generate their own and be added to the
PATH for build scripts to discover.
Building binaries for Mac OS X requires at least 10.8.
Target headers and binaries are built on Linux.
The NDK consists of three parts: host binaries, target prebuilts, and others (build system, docs, samples, tests).
toolchains/contains GCC and Clang toolchains.
$TOOLCHAIN/config.mkcontains ARCH and ABIS this toolchain can handle.
$TOOLCHAIN/setup.mkcontains toolchain-specific default CFLAGS/LDFLAGS when this toolchain is used.
prebuilt/$HOST_TAGcontains build dependencies and additional tools.
ndk-gdbcan also be found here.
platforms/android-$VERSION/arch-$ARCH_NAME/contains headers and libraries for each API level.
--sysrootto one of these directories based on user-specified
sources/cxx-stl/$STLcontains the headers and libraries for the various C++ STLs.
build/contains the ndk-build system and scripts to rebuild NDK.
sources/third_partycontain modules that can be used in apps (cpufeatures, native_app_glue, etc) via
$(call import-module, $MODULE)
Check out the branch
repo init -u https://android.googlesource.com/platform/manifest \ -b master-ndk # Googlers, use repo init -u \ persistent-https://android.git.corp.google.com/platform/manifest \ -b master-ndk
Additional Linux Dependencies (available from apt):
Mac OS X also requires Xcode.
Running tests requires that
adb is in your
PATH. This is provided as part of the Android SDK.
$ python checkbuild.py
$ python checkbuild.py --system windows # Or windows64.
checkbuild.py also accepts a variety of other options to speed up local builds, namely
checkbuild.py will also package the NDK and run basic tests. To skip the packaging step, use the
--no-package flag. Note that running the tests does require the packaging step.
TODO(danalbert): Make package only easy.