commit | 4b485bf4fbd62ce2be8f45958cd223230a5be538 | [log] [tgz] |
---|---|---|
author | Dan Albert <[email protected]> | Thu Sep 24 10:28:36 2015 -0700 |
committer | Dan Albert <[email protected]> | Fri Oct 02 13:44:20 2015 -0700 |
tree | ddc2ea5a0893ef3cf8fb878f875ef6935bc7c034 | |
parent | fb0e997e4d54b8d75b4102ecc31f3c2d963e5dad [diff] |
Add test_config.py for better test disabling. Each test directory can contain a "test_config.py" file that describes the configurations a test is not expected to pass for. Previously this information could be captured in one of two places: the Application.mk file, or a BROKEN_BUILD/BROKEN_RUN file. Application.mk was used to state that a test was only to be run for a specific platform version, specific toolchain, or a set of ABIs. Unfortunately Application.mk could only specify a single toolchain or platform, not a set. BROKEN_BUILD/BROKEN_RUN files were too general. An empty file meant the test should always be skipped regardless of configuration. Any change that would put a test in that situation should be reverted immediately. These also didn't make it clear if the test was actually broken (and thus should be fixed) or just not applicable. A test_config.py file is more flexible. It is a Python module that defines the functions `match_broken` and `match_unsupported`. These functions respectively identify if a test is broken or unsupported for the given configuration. Change-Id: Ibffcef610a32c49efef17eba1154f6a9f4dcf565
The NDK allows Android application developers to include native code in their Android application packages, compiled as JNI shared libraries.
See the Getting Started Guide for an introduction.
See the changelist for a list of changes since the previous release.
Finally, discussions related to the Android NDK happen on the android-ndk Google Group.
Note: This document is for developers of the NDK, not developers that use the NDK.
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, Clang, and Renderscript toolchains.$TOOLCHAIN/config.mk
contains ARCH and ABIS this toolchain can handle.$TOOLCHAIN/setup.mk
contains toolchain-specific default CFLAGS/LDFLAGS when this toolchain is used.prebuilt/$HOST_ARCH/
contains various tools to make the build system hermetic.ndk-depends
and ndk-stack
should probably go in prebuilt/
to avoid collisions between host variants.platforms/android-N/arch-$ARCH_NAME/
contains headers and libraries for each API level.--sysroot
to one of these directories based on user-specified APP_ABI
and APP_PLATFORM
.sources/cxx-stl/$STL/$ABI/
contains the headers and libraries for the various C++ STLs.prebuilt/android-$ARCH/gdbserver/
contains gdbserver.build/
contains the ndk-build system and scripts to rebuild NDK.docs/
samples/
sources/
contains modules useful in samples and apps via $(call import-module, $MODULE)
tests/
Check out the branch master-ndk
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
The only difference between the NDK branch and master is that the NDK repository already has the toolchain repository checked out and patched.
Additional Linux Dependencies (available from apt):
Mac OS X also requires Xcode.
$ python checkbuild.py --no-package
$ python checkbuild.py --system windows
The simplest way to package an NDK on Linux is to just omit the --no-package
flag when running checkbuild.py
. This will take a little longer though, so it may not be desired for day to day development.
To package the NDK for Windows or Darwin (or if more control over the packaging process is needed), invoke build/tools/package-release.sh
directly. This process will be improved in a future commit.
build/tools/dev-cleanup.sh
which erases all prebuilts.$PREBUILT_PATH
. It runs build/tools/build-docs.sh
which produces no tarball in $PREBUILT_PATH
.