aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2017-06-13 16:53:45 -0700
committerDan Albert <danalbert@google.com>2017-06-14 14:52:00 -0700
commitdb043a5bb339a5cfff7214fd8acd726ea93021b1 (patch)
tree2ab1f58681eef2d8cd6cc08e7cac7b827e2b3e67
parent0f857c683c6a5b75ea9f0b561ebf5dece7ffcdec (diff)
downloadndk-db043a5bb339a5cfff7214fd8acd726ea93021b1.tar.gz
Remove support for the deprecated headers.
Test: ./checkbuild.py && ./run_tests.py Bug: None Change-Id: Icf3af28f80023dad4a8c2d3abc2e52353417db7b
-rw-r--r--build/cmake/android.toolchain.cmake76
-rw-r--r--build/core/build-binary.mk5
-rw-r--r--build/core/definitions.mk1
-rw-r--r--build/core/setup-toolchain.mk34
-rw-r--r--build/core/toolchains/arm-linux-androideabi-clang/setup.mk10
-rwxr-xr-xbuild/tools/gen-platforms.sh98
-rwxr-xr-xbuild/tools/make_standalone_toolchain.py57
-rw-r--r--docs/Testing.md6
-rw-r--r--docs/UnifiedHeaders.md75
-rw-r--r--docs/user/standalone_toolchain.md13
-rw-r--r--ndk/test/builder.py26
-rw-r--r--ndk/test/spec.py31
-rw-r--r--ndk/test/test_spec.py15
-rwxr-xr-xrun_tests.py11
-rwxr-xr-xtest_libcxx.py5
-rw-r--r--tests/build/standalone_toolchain_deprecated_headers/__init__.py0
-rw-r--r--tests/build/standalone_toolchain_deprecated_headers/foo.cpp19
-rw-r--r--tests/build/standalone_toolchain_deprecated_headers/test.py22
-rw-r--r--tests/build/standalone_toolchain_deprecated_headers/test_config.py11
-rw-r--r--tests/build/standalone_toolchain_gnustl_deprecated_headers/__init__.py0
-rw-r--r--tests/build/standalone_toolchain_gnustl_deprecated_headers/foo.cpp19
-rw-r--r--tests/build/standalone_toolchain_gnustl_deprecated_headers/test.py22
-rw-r--r--tests/testlib.py43
23 files changed, 111 insertions, 488 deletions
diff --git a/build/cmake/android.toolchain.cmake b/build/cmake/android.toolchain.cmake
index 36b13b2f9..3ec10555c 100644
--- a/build/cmake/android.toolchain.cmake
+++ b/build/cmake/android.toolchain.cmake
@@ -193,8 +193,7 @@ set(CMAKE_TRY_COMPILE_PLATFORM_VARIABLES
ANDROID_DISABLE_NO_EXECUTE
ANDROID_DISABLE_RELRO
ANDROID_DISABLE_FORMAT_STRING_CHECKS
- ANDROID_CCACHE
- ANDROID_DEPRECATED_HEADERS)
+ ANDROID_CCACHE)
# Standard cross-compiling stuff.
set(ANDROID TRUE)
@@ -308,49 +307,42 @@ endif()
# https://cmake.org/cmake/help/v3.8/variable/CMAKE_FIND_ROOT_PATH.html
#
# In theory this should just be our sysroot, but since we don't have a single
-# sysroot that is correct for unified headers (there's only one set of headers,
-# but multiple locations for libraries that need to be handled differently).
-# Some day we'll want to move all the libraries into ${ANDROID_NDK}/sysroot, but
-# we'll need to make some fixes to Clang, various build systems, and possibly
-# CMake itself to get that working.
+# sysroot that is correct (there's only one set of headers, but multiple
+# locations for libraries that need to be handled differently). Some day we'll
+# want to move all the libraries into ${ANDROID_NDK}/sysroot, but we'll need to
+# make some fixes to Clang, various build systems, and possibly CMake itself to
+# get that working.
list(APPEND CMAKE_FIND_ROOT_PATH "${ANDROID_NDK}")
# Sysroot.
-if(ANDROID_DEPRECATED_HEADERS)
- set(CMAKE_SYSROOT
- "${ANDROID_NDK}/platforms/${ANDROID_PLATFORM}/arch-${ANDROID_SYSROOT_ABI}")
-else()
- set(CMAKE_SYSROOT "${ANDROID_NDK}/sysroot")
- # The compiler driver doesn't check any arch specific include locations
- # (though maybe we should add that). Architecture specific headers like asm/
- # and machine/ are installed to an arch-$ARCH subdirectory of the sysroot.
- list(APPEND ANDROID_COMPILER_FLAGS
- "-isystem ${CMAKE_SYSROOT}/usr/include/${ANDROID_HEADER_TRIPLE}")
- list(APPEND ANDROID_COMPILER_FLAGS
- "-D__ANDROID_API__=${ANDROID_PLATFORM_LEVEL}")
-
- # We need different sysroots for linking and compiling when using unified
- # headers, but cmake doesn't support that. Pass the sysroot flag manually when
- # linking.
- set(ANDROID_SYSTEM_LIBRARY_PATH
- "${ANDROID_NDK}/platforms/${ANDROID_PLATFORM}/arch-${ANDROID_SYSROOT_ABI}")
- list(APPEND ANDROID_LINKER_FLAGS "--sysroot ${ANDROID_SYSTEM_LIBRARY_PATH}")
-
- # find_library searches a handful of paths as described by
- # https://cmake.org/cmake/help/v3.6/command/find_library.html. Before unified
- # headers, we found NDK libraries in the CMAKE_SYSROOT. With unified headers,
- # we don't have libraries in the CMAKE_SYSROOT any more. Set up
- # CMAKE_SYSTEM_LIBRARY_PATH
- # (https://cmake.org/cmake/help/v3.6/variable/CMAKE_SYSTEM_LIBRARY_PATH.html)
- # instead.
- #
- # NB: The suffix is just lib here instead of dealing with lib64 because
- # apparently CMake does some automatic rewriting of that? I've been testing
- # by building my own CMake with a bunch of logging added, and that seems to be
- # the case.
- list(APPEND CMAKE_SYSTEM_LIBRARY_PATH
- "${ANDROID_SYSTEM_LIBRARY_PATH}/usr/lib")
-endif()
+set(CMAKE_SYSROOT "${ANDROID_NDK}/sysroot")
+# The compiler driver doesn't check any arch specific include locations (though
+# maybe we should add that). Architecture specific headers like asm/ and
+# machine/ are installed to an arch-$ARCH subdirectory of the sysroot.
+list(APPEND ANDROID_COMPILER_FLAGS
+ "-isystem ${CMAKE_SYSROOT}/usr/include/${ANDROID_HEADER_TRIPLE}")
+list(APPEND ANDROID_COMPILER_FLAGS
+ "-D__ANDROID_API__=${ANDROID_PLATFORM_LEVEL}")
+
+# We need different sysroots for linking and compiling, but cmake doesn't
+# support that. Pass the sysroot flag manually when linking.
+set(ANDROID_SYSTEM_LIBRARY_PATH
+ "${ANDROID_NDK}/platforms/${ANDROID_PLATFORM}/arch-${ANDROID_SYSROOT_ABI}")
+list(APPEND ANDROID_LINKER_FLAGS "--sysroot ${ANDROID_SYSTEM_LIBRARY_PATH}")
+
+# find_library searches a handful of paths as described by
+# https://cmake.org/cmake/help/v3.6/command/find_library.html. Since libraries
+# are per-API level and headers aren't, We don't have libraries in the
+# CMAKE_SYSROOT. Set up CMAKE_SYSTEM_LIBRARY_PATH
+# (https://cmake.org/cmake/help/v3.6/variable/CMAKE_SYSTEM_LIBRARY_PATH.html)
+# instead.
+#
+# NB: The suffix is just lib here instead of dealing with lib64 because
+# apparently CMake does some automatic rewriting of that? I've been testing by
+# building my own CMake with a bunch of logging added, and that seems to be the
+# case.
+list(APPEND CMAKE_SYSTEM_LIBRARY_PATH
+ "${ANDROID_SYSTEM_LIBRARY_PATH}/usr/lib")
# Toolchain.
if(CMAKE_HOST_SYSTEM_NAME STREQUAL Linux)
diff --git a/build/core/build-binary.mk b/build/core/build-binary.mk
index 47bfaf483..f7320ac74 100644
--- a/build/core/build-binary.mk
+++ b/build/core/build-binary.mk
@@ -143,10 +143,7 @@ LOCAL_RS_OBJECTS :=
# always define ANDROID when building binaries
#
LOCAL_CFLAGS := -DANDROID $(LOCAL_CFLAGS)
-
-ifneq ($(APP_DEPRECATED_HEADERS),true)
- LOCAL_CFLAGS += -D__ANDROID_API__=$(TARGET_PLATFORM_LEVEL)
-endif
+LOCAL_CFLAGS += -D__ANDROID_API__=$(TARGET_PLATFORM_LEVEL)
#
# Add the default system shared libraries to the build
diff --git a/build/core/definitions.mk b/build/core/definitions.mk
index bd6091324..ba45dd558 100644
--- a/build/core/definitions.mk
+++ b/build/core/definitions.mk
@@ -1304,7 +1304,6 @@ NDK_APP_VARS_OPTIONAL := \
APP_SHORT_COMMANDS \
APP_STL \
APP_THIN_ARCHIVE \
- APP_DEPRECATED_HEADERS \
# the list of all variables that may appear in an Application.mk file
# or defined by the build scripts.
diff --git a/build/core/setup-toolchain.mk b/build/core/setup-toolchain.mk
index e7e773663..1f5f26fee 100644
--- a/build/core/setup-toolchain.mk
+++ b/build/core/setup-toolchain.mk
@@ -113,8 +113,6 @@ include $(NDK_TOOLCHAIN.$(TARGET_TOOLCHAIN).setup)
# linking the generated target files properly.
SYSROOT_BASE := $(NDK_PLATFORMS_ROOT)/$(TARGET_PLATFORM)/arch-$(TARGET_ARCH)
SYSROOT_INC := $(SYSROOT_BASE)
-# Arch specific headers are already in the non-unified sysroot.
-SYSROOT_ARCH_INC_ARG :=
# TODO(danalbert): Use the new libraries.
# This still points at the old tree for the libraries. We need to either:
@@ -131,24 +129,22 @@ SYSROOT_ARCH_INC_ARG :=
# things they actually don't).
SYSROOT_LINK := $(SYSROOT_BASE)
-ifneq ($(APP_DEPRECATED_HEADERS),true)
- ifndef NDK_UNIFIED_SYSROOT_PATH
- NDK_UNIFIED_SYSROOT_PATH := $(NDK_ROOT)/sysroot
- endif
- SYSROOT_INC := $(NDK_UNIFIED_SYSROOT_PATH)
-
- # The compiler driver doesn't check any arch specific include locations
- # (though maybe we should add that). Architecture specific headers like asm/
- # and machine/ are installed to an arch-$ARCH subdirectory of the sysroot.
- header_triple_arm := arm-linux-androideabi
- header_triple_arm64 := aarch64-linux-android
- header_triple_mips := mipsel-linux-android
- header_triple_mips64 := mips64el-linux-android
- header_triple_x86 := i686-linux-android
- header_triple_x86_64 := x86_64-linux-android
- SYSROOT_ARCH_INC_ARG := \
- -isystem $(SYSROOT_INC)/usr/include/$(header_triple_$(TARGET_ARCH))
+ifndef NDK_UNIFIED_SYSROOT_PATH
+ NDK_UNIFIED_SYSROOT_PATH := $(NDK_ROOT)/sysroot
endif
+SYSROOT_INC := $(NDK_UNIFIED_SYSROOT_PATH)
+
+# The compiler driver doesn't check any arch specific include locations
+# (though maybe we should add that). Architecture specific headers like asm/
+# and machine/ are installed to an arch-$ARCH subdirectory of the sysroot.
+header_triple_arm := arm-linux-androideabi
+header_triple_arm64 := aarch64-linux-android
+header_triple_mips := mipsel-linux-android
+header_triple_mips64 := mips64el-linux-android
+header_triple_x86 := i686-linux-android
+header_triple_x86_64 := x86_64-linux-android
+SYSROOT_ARCH_INC_ARG := \
+ -isystem $(SYSROOT_INC)/usr/include/$(header_triple_$(TARGET_ARCH))
clean-installed-binaries::
diff --git a/build/core/toolchains/arm-linux-androideabi-clang/setup.mk b/build/core/toolchains/arm-linux-androideabi-clang/setup.mk
index 9aec43dd7..0b93b355f 100644
--- a/build/core/toolchains/arm-linux-androideabi-clang/setup.mk
+++ b/build/core/toolchains/arm-linux-androideabi-clang/setup.mk
@@ -57,10 +57,7 @@ TARGET_LDFLAGS += \
-no-canonical-prefixes
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
- LLVM_TRIPLE := armv7-none-linux-androideabi
- ifneq ($(APP_DEPRECATED_HEADERS),true)
- LLVM_TRIPLE := $(LLVM_TRIPLE)$(APP_PLATFORM_LEVEL)
- endif
+ LLVM_TRIPLE := armv7-none-linux-androideabi$(APP_PLATFORM_LEVEL)
TARGET_CFLAGS += -target $(LLVM_TRIPLE) \
-march=armv7-a \
@@ -72,10 +69,7 @@ ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
GCCLIB_SUBDIR := armv7-a
else ifeq ($(TARGET_ARCH_ABI),armeabi)
- LLVM_TRIPLE := armv5te-none-linux-androideabi
- ifneq ($(APP_DEPRECATED_HEADERS),true)
- LLVM_TRIPLE := $(LLVM_TRIPLE)$(APP_PLATFORM_LEVEL)
- endif
+ LLVM_TRIPLE := armv5te-none-linux-androideabi$(APP_PLATFORM_LEVEL)
TARGET_CFLAGS += -target $(LLVM_TRIPLE) \
-march=armv5te \
diff --git a/build/tools/gen-platforms.sh b/build/tools/gen-platforms.sh
index 39e79303b..5e4760a7b 100755
--- a/build/tools/gen-platforms.sh
+++ b/build/tools/gen-platforms.sh
@@ -438,53 +438,6 @@ gen_crt_objects ()
done
}
-# $1: platform number
-# $2: architecture
-# $3: target NDK directory
-generate_api_level ()
-{
- local API=$1
- local ARCH=$2
- local HEADER="platforms/android-$API/arch-$ARCH/usr/include/android/api-level.h"
- log "Generating: $HEADER"
- rm -f "$3/$HEADER" # Remove symlink if any.
- cat > "$3/$HEADER" <<EOF
-/*
- * Copyright (C) 2008 The Android Open Source Project
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-#ifndef ANDROID_API_LEVEL_H
-#define ANDROID_API_LEVEL_H
-
-#define __ANDROID_API__ $API
-
-#endif /* ANDROID_API_LEVEL_H */
-EOF
-}
-
# Copy platform sysroot into your destination
#
@@ -531,44 +484,6 @@ for ARCH in $ARCHS; do
fi
fi
- # If this is the first destination directory, copy the common
- # files from previous platform directories into this one.
- # This helps copy the common headers from android-3 to android-8
- # into the x86 and mips android-9 directories.
- if [ -z "$PREV_SYSROOT_DST" ]; then
- for OLD_PLATFORM in $PLATFORMS; do
- if [ "$OLD_PLATFORM" = "$PLATFORM" ]; then
- break
- fi
- copy_src_directory platforms/android-$OLD_PLATFORM/include \
- $SYSROOT_DST/include \
- "common android-$OLD_PLATFORM headers"
- done
- fi
-
- # There are two set of bionic headers: the original ones haven't been updated since
- # gingerbread except for bug fixing, and the new ones in android-$FIRST_API64_LEVEL
- # with 64-bit support. Before the old bionic headers are deprecated/removed, we need
- # to remove stale old headers when createing platform = $FIRST_API64_LEVEL
- if [ "$PLATFORM" = "$FIRST_API64_LEVEL" ]; then
- log "Removing stale bionic headers in \$DST/$SYSROOT_DST/include"
- nonbionic_files="android EGL GLES GLES2 GLES3 KHR media OMXAL SLES jni.h thread_db.h zconf.h zlib.h"
- if [ -d "$DSTDIR/$SYSROOT_DST/include/" ]; then
- files=$(cd "$DSTDIR/$SYSROOT_DST/include/" && ls)
- for file in $files; do
- if [ "$nonbionic_files" = "${nonbionic_files%%${file}*}" ]; then
- rm -rf "$DSTDIR/$SYSROOT_DST/include/$file"
- fi
- done
- fi
- fi
-
- # Now copy over all non-arch specific include files
- copy_src_directory $PLATFORM_SRC/include $SYSROOT_DST/include "common system headers"
- copy_src_directory $PLATFORM_SRC/arch-$ARCH/include $SYSROOT_DST/include "$ARCH system headers"
-
- generate_api_level "$PLATFORM" "$ARCH" "$DSTDIR"
-
# Copy the prebuilt static libraries. We need full set for multilib compiler for some arch
case "$ARCH" in
x86_64)
@@ -623,21 +538,10 @@ for ARCH in $ARCHS; do
done
if [ "$PACKAGE_DIR" ]; then
- # Remove "duplicate" files for case-insensitive platforms.
- if [ "$OPTION_CASE_INSENSITIVE" = "yes" ]; then
- find "$DSTDIR/platforms" | sort -f | uniq -di | xargs rm
- fi
-
make_repo_prop "$DSTDIR/platforms"
NOTICE="$DSTDIR/platforms/NOTICE"
- cat "$ANDROID_BUILD_TOP/bionic/libc/NOTICE" >> $NOTICE
- echo >> $NOTICE
- cat "$ANDROID_BUILD_TOP/bionic/libm/NOTICE" >> $NOTICE
- echo >> $NOTICE
- cat "$ANDROID_BUILD_TOP/bionic/libdl/NOTICE" >> $NOTICE
- echo >> $NOTICE
- cat "$ANDROID_BUILD_TOP/bionic/libstdc++/NOTICE" >> $NOTICE
+ cp "$ANDROID_BUILD_TOP/bionic/libc/NOTICE" >> $NOTICE
mkdir -p "$PACKAGE_DIR"
fail_panic "Could not create package directory: $PACKAGE_DIR"
diff --git a/build/tools/make_standalone_toolchain.py b/build/tools/make_standalone_toolchain.py
index a32b188d9..ae20dbc34 100755
--- a/build/tools/make_standalone_toolchain.py
+++ b/build/tools/make_standalone_toolchain.py
@@ -180,7 +180,7 @@ def copy_directory_contents(src, dst):
shutil.copy2(src_file, dst_dir)
-def make_clang_scripts(install_dir, triple, api, windows, unified_headers):
+def make_clang_scripts(install_dir, triple, api, windows):
"""Creates Clang wrapper scripts.
The Clang in standalone toolchains historically was designed to be used as
@@ -214,9 +214,7 @@ def make_clang_scripts(install_dir, triple, api, windows, unified_headers):
target = '-'.join([arch, 'none', os_name, env])
flags = '-target {} --sysroot `dirname $0`/../sysroot'.format(target)
-
- if unified_headers:
- flags += ' -D__ANDROID_API__={}'.format(api)
+ flags += ' -D__ANDROID_API__={}'.format(api)
clang_path = os.path.join(install_dir, 'bin/clang')
with open(clang_path, 'w') as clang:
@@ -255,8 +253,7 @@ def make_clang_scripts(install_dir, triple, api, windows, unified_headers):
if windows:
flags = '-target {} --sysroot %~dp0\\..\\sysroot'.format(target)
- if unified_headers:
- flags += ' -D__ANDROID_API__={}'.format(api)
+ flags += ' -D__ANDROID_API__={}'.format(api)
clangbat_path = os.path.join(install_dir, 'bin/clang.cmd')
with open(clangbat_path, 'w') as clangbat:
@@ -364,35 +361,31 @@ def copy_stlport_libs(src_dir, dst_dir, triple, abi):
def create_toolchain(install_path, arch, api, gcc_path, clang_path,
- sysroot_path, stl, host_tag, unified_headers):
+ sysroot_path, stl, host_tag):
"""Create a standalone toolchain."""
copy_directory_contents(gcc_path, install_path)
copy_directory_contents(clang_path, install_path)
triple = get_triple(arch)
make_clang_scripts(
- install_path, triple, api, host_tag.startswith('windows'),
- unified_headers)
+ install_path, triple, api, host_tag.startswith('windows'))
- if unified_headers:
- unified_sysroot = os.path.join(NDK_DIR, 'sysroot')
- install_sysroot = os.path.join(install_path, 'sysroot')
- shutil.copytree(unified_sysroot, install_sysroot)
+ sysroot = os.path.join(NDK_DIR, 'sysroot')
+ install_sysroot = os.path.join(install_path, 'sysroot')
+ shutil.copytree(sysroot, install_sysroot)
- arch_headers = os.path.join(unified_sysroot, 'usr/include', triple)
- copy_directory_contents(
- arch_headers, os.path.join(install_sysroot, 'usr/include'))
+ arch_headers = os.path.join(sysroot, 'usr/include', triple)
+ copy_directory_contents(
+ arch_headers, os.path.join(install_sysroot, 'usr/include'))
- lib_path = os.path.join(sysroot_path, 'usr/lib')
- lib_install = os.path.join(install_sysroot, 'usr/lib')
- if os.path.exists(lib_path):
- shutil.copytree(lib_path, lib_install)
+ lib_path = os.path.join(sysroot_path, 'usr/lib')
+ lib_install = os.path.join(install_sysroot, 'usr/lib')
+ if os.path.exists(lib_path):
+ shutil.copytree(lib_path, lib_install)
- lib64_path = os.path.join(sysroot_path, 'usr/lib64')
- lib64_install = os.path.join(install_sysroot, 'usr/lib64')
- if os.path.exists(lib64_path):
- shutil.copytree(lib64_path, lib64_install)
- else:
- shutil.copytree(sysroot_path, os.path.join(install_path, 'sysroot'))
+ lib64_path = os.path.join(sysroot_path, 'usr/lib64')
+ lib64_install = os.path.join(install_sysroot, 'usr/lib64')
+ if os.path.exists(lib64_path):
+ shutil.copytree(lib64_path, lib64_install)
prebuilt_path = os.path.join(NDK_DIR, 'prebuilt', host_tag)
copy_directory_contents(prebuilt_path, install_path)
@@ -537,16 +530,6 @@ def parse_args():
'--stl', choices=('gnustl', 'libc++', 'stlport'), default='gnustl',
help='C++ STL to use.')
- headers_option_group = parser.add_mutually_exclusive_group()
-
- headers_option_group.add_argument(
- '--unified-headers', action='store_true', default=True,
- help='Use unified headers (default).')
-
- headers_option_group.add_argument(
- '--deprecated-headers', action='store_false', dest='unified_headers',
- help='Force the use of the deprecated headers (not recommended).')
-
parser.add_argument(
'--force', action='store_true',
help='Remove existing installation directory if it exists.')
@@ -613,7 +596,7 @@ def main():
install_path = os.path.join(tempdir, triple)
create_toolchain(install_path, args.arch, api, gcc_path, clang_path,
- sysroot_path, args.stl, host_tag, args.unified_headers)
+ sysroot_path, args.stl, host_tag)
if args.install_dir is None:
if host_tag.startswith('windows'):
diff --git a/docs/Testing.md b/docs/Testing.md
index 3f4d2a7a6..eee454b3e 100644
--- a/docs/Testing.md
+++ b/docs/Testing.md
@@ -57,7 +57,6 @@ the matching entry in the config file, but otherwise the config file is obeyed):
$ ./run_tests.py --rebuild \
--abi armeabi-v7a \
--toolchain clang \
- --headers unified \
--pie true
```
@@ -75,14 +74,13 @@ Test filters support wildcards (as implemented by Python's `fnmatch.fnmatch`).
The filter flag may be combined with the build configuration flags.
Putting this all together, a single test can be rebuilt and run for just
-armeabi-v7a, using only Clang, only unified headers, and only PIE executables
-with the following command:
+armeabi-v7a, using only Clang, and only PIE executables with the following
+command:
```bash
$ ./run_tests.py --rebuild \
--abi armeabi-v7a \
--toolchain clang \
- --headers unified \
--pie true \
--filter test-googletest-full
```
diff --git a/docs/UnifiedHeaders.md b/docs/UnifiedHeaders.md
index 6996d8d66..b84f7bac3 100644
--- a/docs/UnifiedHeaders.md
+++ b/docs/UnifiedHeaders.md
@@ -8,9 +8,9 @@ these headers were incorrect. Many exposed APIs that didn't exist, and others
didn't expose APIs that did.
In NDK r14 (as an opt in feature) we unified these into a single set of headers.
-In r15 these are used by default. This single header path is used for *every*
-platform level. API level guards are handled with `#ifdef`. These headers can
-be found in [prebuilts/ndk/headers].
+In r15 these are used by default. In r16, the old headers have been removed.
+This single header path is used for *every* platform level. API level guards are
+handled with `#ifdef`. These headers can be found in [prebuilts/ndk/headers].
Unified headers are built directly from the Android platform, so they be up to
date and correct (or at the very least, any bugs in the NDK headers will also be
@@ -35,75 +35,6 @@ Known Issues
[bug 394]: https://github.com/android-ndk/ndk/issues/394
-Using Unified Headers
----------------------
-
-Unified headers are enabled by default starting with NDK r15. If your build is
-not yet compatible with unified headers, you can revert to the deprecated
-headers. The way to do so depends on your build system.
-
-**Warning:** The deprecated headers will be removed from the NDK in r16. If you
-need to revert to the deprecated headers, make sure you're working on fixing
-your build or filing bugs.
-
-### ndk-build
-
-Add the following to your Android.mk:
-
-```makefile
-APP_DEPRECATED_HEADERS := true
-```
-
-### CMake
-
-```bash
-cmake -DANDROID_DEPRECATED_HEADERS=ON ...
-```
-
-### Standalone Toolchains
-
-```bash
-$NDK/build/tools/make_standalone_toolchain.py --deprecated-headers ...
-```
-
-For general standalone toolchain documentation, see
-https://developer.android.com/ndk/guides/standalone_toolchain.html
-
-### Gradle Experimental Plugin
-
-```gradle
-model {
- android {
- ndk {
- useUnifiedHeaders false
- }
- }
-}
-```
-
-
-Using unified headers with `configure && make`
-----------------------------------------------
-
-If you're trying to build a traditional open-source `configure && make`
-style project with the NDK, unified headers are your best choice. The
-basic steps look like this (here for 32-bit ARM):
-
-```bash
-$ $NDK/build/tools/make_standalone_toolchain.py --unified-headers \
- --arch arm --api 21 --install-dir /tmp/ndk-arm-21
-$ cd <project>
-$ export CC=/tmp/ndk-arm-21/arm-linux-androideabi-clang
-$ export LDFLAGS="-pie"
-$ ./configure --host=arm-linux-androideabi
-$ make
-```
-
-Replace "arm" and "arm-linux-androideabi" with the appropriate pair for
-the architecture you actually want to build for, and 21 with the API
-level you want to target.
-
-
Supporting Unified Headers in Your Build System
-----------------------------------------------
diff --git a/docs/user/standalone_toolchain.md b/docs/user/standalone_toolchain.md
index 15f33ac45..9b56af4c1 100644
--- a/docs/user/standalone_toolchain.md
+++ b/docs/user/standalone_toolchain.md
@@ -110,19 +110,6 @@ in a different directory by using `--package-dir`.
For more options and details, use `--help`.
-### Unified Headers
-
-Unified headers are the up to date platform headers that are shipped alongside
-the deprecated headers in NDK r14:
-https://android.googlesource.com/platform/ndk/+/master/docs/UnifiedHeaders.md
-
-To use unified headers with standalone toolchains, pass `--unified-headers` when
-creating your toolchain.
-
-Note: Unified headers with standalone toolchains do not work as well for GCC.
-See the [r14 changelog] for a list of issues.
-
-[r14 changelog]: https://android.googlesource.com/platform/ndk/+/ndk-r14-release/CHANGELOG.md#Won_t-Fix
Working with Clang
------------------
diff --git a/ndk/test/builder.py b/ndk/test/builder.py
index 5326bda9f..6f08fa5d0 100644
--- a/ndk/test/builder.py
+++ b/ndk/test/builder.py
@@ -40,22 +40,10 @@ def test_spec_from_config(test_config):
"""Returns a TestSpec based on the test config file."""
abis = test_config.get('abis', build.lib.build_support.ALL_ABIS)
toolchains = test_config.get('toolchains', ['clang', '4.9'])
- headers_configs = test_config.get('headers', ['unified', 'deprecated'])
pie_configs = test_config.get('pie', [True, False])
suites = test_config.get('suites', testlib.ALL_SUITES)
- # Duplicate this so we don't modify the list in test_config.
- headers_configs = list(headers_configs)
- for i, headers_config in enumerate(headers_configs):
- if headers_config == 'unified':
- headers_configs[i] = False
- elif headers_config == 'deprecated':
- headers_configs[i] = True
- else:
- raise ValueError('Invalid headers config: ' + headers_config)
-
- return ndk.test.spec.TestSpec(
- abis, toolchains, headers_configs, pie_configs, suites)
+ return ndk.test.spec.TestSpec(abis, toolchains, pie_configs, suites)
def build_test_runner(test_spec, test_options, printer):
@@ -64,13 +52,12 @@ def build_test_runner(test_spec, test_options, printer):
build_configs = itertools.product(
test_spec.abis,
test_spec.toolchains,
- test_spec.headers_config,
test_spec.pie_config)
scanner = testlib.BuildTestScanner()
nodist_scanner = testlib.BuildTestScanner(dist=False)
libcxx_scanner = testlib.LibcxxTestScanner(test_options.ndk_path)
- for abi, toolchain, headers_config, pie_config in build_configs:
+ for abi, toolchain, pie_config in build_configs:
if pie_config and abi in ndk.abis.LP64_ABIS:
# We don't need to build both PIE configurations for LP64 ABIs
# since all of them support PIE. Just build the default
@@ -82,24 +69,21 @@ def build_test_runner(test_spec, test_options, printer):
None, # Build API level, always default.
toolchain,
pie_config,
- test_options.verbose_build,
- headers_config)
+ test_options.verbose_build)
nodist_scanner.add_build_configuration(
abi,
None, # Build API level, always default.
toolchain,
pie_config,
- test_options.verbose_build,
- headers_config)
+ test_options.verbose_build)
libcxx_scanner.add_build_configuration(
abi,
None, # Build API level, always default.
toolchain,
pie_config,
- test_options.verbose_build,
- headers_config)
+ test_options.verbose_build)
if 'build' in test_spec.suites:
runner.add_suite('build', 'tests/build', nodist_scanner)
diff --git a/ndk/test/spec.py b/ndk/test/spec.py
index 159daf638..1364bb651 100644
--- a/ndk/test/spec.py
+++ b/ndk/test/spec.py
@@ -40,10 +40,9 @@ class TestOptions(object):
class TestSpec(object):
"""Configuration for which tests should be run."""
- def __init__(self, abis, toolchains, headers_config, pie_config, suites):
+ def __init__(self, abis, toolchains, pie_config, suites):
self.abis = abis
self.toolchains = toolchains
- self.headers_config = headers_config
self.pie_config = pie_config
self.suites = suites
@@ -54,14 +53,12 @@ class BuildConfiguration(object):
A TestSpec describes which BuildConfigurations should be included in a test
run.
"""
- def __init__(self, abi, api, toolchain, force_pie, verbose,
- force_deprecated_headers):
+ def __init__(self, abi, api, toolchain, force_pie, verbose):
self.abi = abi
self.api = api
self.toolchain = toolchain
self.force_pie = force_pie
self.verbose = verbose
- self.force_deprecated_headers = force_deprecated_headers
def __eq__(self, other):
if self.abi != other.abi:
@@ -74,8 +71,6 @@ class BuildConfiguration(object):
return False
if self.verbose != other.verbose:
return False
- if self.force_deprecated_headers != other.force_deprecated_headers:
- return False
return True
def __str__(self):
@@ -83,12 +78,8 @@ class BuildConfiguration(object):
if self.force_pie:
pie_option = 'force-pie'
- headers_option = 'unified-headers'
- if self.force_deprecated_headers:
- headers_option = 'deprecated-headers'
-
- return '{}-{}-{}-{}-{}'.format(
- self.abi, self.api, self.toolchain, pie_option, headers_option)
+ return '{}-{}-{}-{}'.format(
+ self.abi, self.api, self.toolchain, pie_option)
def __hash__(self):
return hash(str(self))
@@ -130,15 +121,7 @@ class BuildConfiguration(object):
else:
raise ValueError('Invalid PIE config:'.format(config_string))
- if rest == 'unified-headers':
- force_deprecated_headers = False
- elif rest.startswith('deprecated-headers'):
- force_deprecated_headers = True
- else:
- raise ValueError('Invalid headers config:'.format(config_string))
-
- return BuildConfiguration(
- abi, api, toolchain, force_pie, False, force_deprecated_headers)
+ return BuildConfiguration(abi, api, toolchain, force_pie, False)
def get_extra_ndk_build_flags(self):
extra_flags = []
@@ -146,8 +129,6 @@ class BuildConfiguration(object):
extra_flags.append('APP_PIE=true')
if self.verbose:
extra_flags.append('V=1')
- if self.force_deprecated_headers:
- extra_flags.append('APP_DEPRECATED_HEADERS=true')
return extra_flags
def get_extra_cmake_flags(self):
@@ -156,6 +137,4 @@ class BuildConfiguration(object):
extra_flags.append('-DANDROID_PIE=TRUE')
if self.verbose:
extra_flags.append('-DCMAKE_VERBOSE_MAKEFILE=ON')
- if self.force_deprecated_headers:
- extra_flags.append('-DANDROID_DEPRECATED_HEADERS=ON')
return extra_flags
diff --git a/ndk/test/test_spec.py b/ndk/test/test_spec.py
index 8d7750abc..3f3c3ddfc 100644
--- a/ndk/test/test_spec.py
+++ b/ndk/test/test_spec.py
@@ -21,41 +21,36 @@ import ndk.test.spec
class BuildConfigurationTest(unittest.TestCase):
def test_from_string(self):
config = ndk.test.spec.BuildConfiguration.from_string(
- 'armeabi-14-clang-default-pie-unified-headers')
+ 'armeabi-14-clang-default-pie')
self.assertEqual('armeabi', config.abi)
self.assertEqual(14, config.api)
self.assertEqual('clang', config.toolchain)
self.assertEqual(False, config.force_pie)
- self.assertEqual(False, config.force_deprecated_headers)
config = ndk.test.spec.BuildConfiguration.from_string(
- 'armeabi-v7a-14-gcc-force-pie-deprecated-headers')
+ 'armeabi-v7a-14-gcc-force-pie')
self.assertEqual('armeabi-v7a', config.abi)
self.assertEqual(14, config.api)
self.assertEqual('gcc', config.toolchain)
self.assertEqual(True, config.force_pie)
- self.assertEqual(True, config.force_deprecated_headers)
config = ndk.test.spec.BuildConfiguration.from_string(
- 'arm64-v8a-21-clang-default-pie-unified-headers')
+ 'arm64-v8a-21-clang-default-pie')
self.assertEqual('arm64-v8a', config.abi)
self.assertEqual(21, config.api)
self.assertEqual('clang', config.toolchain)
self.assertEqual(False, config.force_pie)
- self.assertEqual(False, config.force_deprecated_headers)
config = ndk.test.spec.BuildConfiguration.from_string(
- 'x86-14-clang-default-pie-unified-headers')
+ 'x86-14-clang-default-pie')
self.assertEqual('x86', config.abi)
self.assertEqual(14, config.api)
self.assertEqual('clang', config.toolchain)
self.assertEqual(False, config.force_pie)
- self.assertEqual(False, config.force_deprecated_headers)
config = ndk.test.spec.BuildConfiguration.from_string(
- 'x86_64-21-clang-default-pie-unified-headers')
+ 'x86_64-21-clang-default-pie')
self.assertEqual('x86_64', config.abi)
self.assertEqual(21, config.api)
self.assertEqual('clang', config.toolchain)
self.assertEqual(False, config.force_pie)
- self.assertEqual(False, config.force_deprecated_headers)
diff --git a/run_tests.py b/run_tests.py
index 8f31f58e1..b286e1f69 100755
--- a/run_tests.py
+++ b/run_tests.py
@@ -508,15 +508,13 @@ def restart_flaky_tests(report, workqueue):
workqueue.add_task(run_test, report.result.test)
-def get_config_dict(config, abis, toolchains, headers, pie):
+def get_config_dict(config, abis, toolchains, pie):
with open(config) as test_config_file:
test_config = json.load(test_config_file)
if abis is not None:
test_config['abis'] = abis
if toolchains is not None:
test_config['toolchains'] = toolchains
- if headers is not None:
- test_config['headers'] = headers
if pie is not None:
test_config['pie'] = pie
return test_config
@@ -546,9 +544,6 @@ def parse_args():
'--toolchain', action='append', choices=('clang', 'gcc'),
help='Test only the given toolchains.')
config_options.add_argument(
- '--headers', action='append', choices=('unified', 'deprecated'),
- help='Test only the given header configurations.')
- config_options.add_argument(
'--pie', action='append', choices=(True, False), type=str_to_bool,
help='Test only the given PIE configurations.')
config_options.add_argument(
@@ -602,14 +597,12 @@ class ConfigFilter(object):
self.config_tuples = list(itertools.product(
test_spec.abis,
test_spec.toolchains,
- test_spec.headers_config,
test_spec.pie_config))
def filter(self, build_config):
config_tuple = (
build_config.abi,
build_config.toolchain,
- build_config.force_deprecated_headers,
build_config.force_pie
)
@@ -631,7 +624,7 @@ def main():
sys.exit('Test directory does not exist: {}'.format(args.test_dir))
test_config = get_config_dict(
- args.config, args.abi, args.toolchain, args.headers, args.pie)
+ args.config, args.abi, args.toolchain, args.pie)
printer = printers.StdoutPrinter(show_all=args.show_all)
if args.rebuild:
diff --git a/test_libcxx.py b/test_libcxx.py
index 6f2103a82..dd83c234e 100755
--- a/test_libcxx.py
+++ b/test_libcxx.py
@@ -49,9 +49,6 @@ def parse_args():
'-p', '--platform', required=True, type=int,
help='API level to build against.')
parser.add_argument(
- '--deprecated-headers', action='store_true', default=False,
- help='Use NDK deprecated headers.')
- parser.add_argument(
'--pie', action='store_true', default=False,
help='Force building with PIE.')
parser.add_argument(
@@ -129,7 +126,7 @@ def main():
lit_args = [
lit_path, '-sv', '--param=device_dir=' + device_dir,
- '--param=unified_headers={}'.format(not args.deprecated_headers),
+ '--param=unified_headers=True',
] + lit_cfg_args + extra_args
if args.build_only:
diff --git a/tests/build/standalone_toolchain_deprecated_headers/__init__.py b/tests/build/standalone_toolchain_deprecated_headers/__init__.py
deleted file mode 100644
index e69de29bb..000000000
--- a/tests/build/standalone_toolchain_deprecated_headers/__init__.py
+++ /dev/null
diff --git a/tests/build/standalone_toolchain_deprecated_headers/foo.cpp b/tests/build/standalone_toolchain_deprecated_headers/foo.cpp
deleted file mode 100644
index 256218b48..000000000
--- a/tests/build/standalone_toolchain_deprecated_headers/foo.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-#include <stdio.h>
-
-// Make sure we're not clobbering libc++ headers with libandroid_support.
-#include <cmath>
-
-// If std::strings don't work then there's really no point :)
-#include <string>
-
-void foo(const std::string& s) {
- // Using new makes sure we get libc++abi/libsupc++, using std::string makes
- // sure the STL works at all.
- std::string* copy = new std::string(s);
- printf("%s\n", copy->c_str());
- delete copy;
-}
-
-int main(int, char**) {
- foo("Hello, world!");
-}
diff --git a/tests/build/standalone_toolchain_deprecated_headers/test.py b/tests/build/standalone_toolchain_deprecated_headers/test.py
deleted file mode 100644
index c35494cc1..000000000
--- a/tests/build/standalone_toolchain_deprecated_headers/test.py
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# Copyright (C) 2017 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-import ndk.testing.standalone_toolchain
-
-
-def run_test(abi, api, toolchain, _build_flags):
- return ndk.testing.standalone_toolchain.run_test(
- abi, api, toolchain, 'foo.cpp',
- ['--stl=libc++', '--deprecated-headers'])
diff --git a/tests/build/standalone_toolchain_deprecated_headers/test_config.py b/tests/build/standalone_toolchain_deprecated_headers/test_config.py
deleted file mode 100644
index 58b7b0c93..000000000
--- a/tests/build/standalone_toolchain_deprecated_headers/test_config.py
+++ /dev/null
@@ -1,11 +0,0 @@
-# Shut up a warning about us not being a real package.
-from __future__ import absolute_import
-
-
-def build_broken(_abi, _api_level, toolchain):
- if toolchain == '4.9':
- # GCC's default include ordering is wrong, preventing the C++ stdlib
- # from overriding compiler headers. In this case we can't include
- # <cstddef> because the include_next can't find the compiler's header.
- return toolchain, 'http://b/30096326'
- return None, None
diff --git a/tests/build/standalone_toolchain_gnustl_deprecated_headers/__init__.py b/tests/build/standalone_toolchain_gnustl_deprecated_headers/__init__.py
deleted file mode 100644
index e69de29bb..000000000
--- a/tests/build/standalone_toolchain_gnustl_deprecated_headers/__init__.py
+++ /dev/null
diff --git a/tests/build/standalone_toolchain_gnustl_deprecated_headers/foo.cpp b/tests/build/standalone_toolchain_gnustl_deprecated_headers/foo.cpp
deleted file mode 100644
index 256218b48..000000000
--- a/tests/build/standalone_toolchain_gnustl_deprecated_headers/foo.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-#include <stdio.h>
-
-// Make sure we're not clobbering libc++ headers with libandroid_support.
-#include <cmath>
-
-// If std::strings don't work then there's really no point :)
-#include <string>
-
-void foo(const std::string& s) {
- // Using new makes sure we get libc++abi/libsupc++, using std::string makes
- // sure the STL works at all.
- std::string* copy = new std::string(s);
- printf("%s\n", copy->c_str());
- delete copy;
-}
-
-int main(int, char**) {
- foo("Hello, world!");
-}
diff --git a/tests/build/standalone_toolchain_gnustl_deprecated_headers/test.py b/tests/build/standalone_toolchain_gnustl_deprecated_headers/test.py
deleted file mode 100644
index e461a28d8..000000000
--- a/tests/build/standalone_toolchain_gnustl_deprecated_headers/test.py
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# Copyright (C) 2017 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-import ndk.testing.standalone_toolchain
-
-
-def run_test(abi, api, toolchain, _build_flags):
- return ndk.testing.standalone_toolchain.run_test(
- abi, api, toolchain, 'foo.cpp',
- ['--stl=gnustl', '--deprecated-headers'])
diff --git a/tests/testlib.py b/tests/testlib.py
index cb98c268d..0bf4646d3 100644
--- a/tests/testlib.py
+++ b/tests/testlib.py
@@ -86,10 +86,10 @@ class TestScanner(object):
class DeviceConfiguration(ndk.test.spec.BuildConfiguration):
- def __init__(self, abi, api, toolchain, force_pie, verbose,
- force_deprecated_headers, device, device_api, skip_run):
+ def __init__(self, abi, api, toolchain, force_pie, verbose, device,
+ device_api, skip_run):
super(DeviceConfiguration, self).__init__(
- abi, api, toolchain, force_pie, verbose, force_deprecated_headers)
+ abi, api, toolchain, force_pie, verbose)
self.device = device
self.device_api = device_api
self.skip_run = skip_run
@@ -116,10 +116,9 @@ class BuildTestScanner(TestScanner):
self.dist = dist
self.build_configurations = set()
- def add_build_configuration(self, abi, api, toolchain, force_pie, verbose,
- force_deprecated_headers):
+ def add_build_configuration(self, abi, api, toolchain, force_pie, verbose):
self.build_configurations.add(ndk.test.spec.BuildConfiguration(
- abi, api, toolchain, force_pie, verbose, force_deprecated_headers))
+ abi, api, toolchain, force_pie, verbose))
def find_tests(self, path, name):
# If we have a build.sh, that takes precedence over the Android.mk.
@@ -173,11 +172,10 @@ class DeviceTestScanner(TestScanner):
self.device_configurations = set()
def add_device_configuration(self, abi, api, toolchain, force_pie, verbose,
- force_deprecated_headers, device, device_api,
- skip_run):
+ device, device_api, skip_run):
self.device_configurations.add(DeviceConfiguration(
- abi, api, toolchain, force_pie, verbose, force_deprecated_headers,
- device, device_api, skip_run))
+ abi, api, toolchain, force_pie, verbose, device, device_api,
+ skip_run))
def find_tests(self, path, name):
# If we have a build.sh, that takes precedence over the Android.mk.
@@ -211,10 +209,9 @@ class LibcxxTestScanner(TestScanner):
self.build_configurations = set()
LibcxxTestScanner.find_all_libcxx_tests(ndk_path)
- def add_build_configuration(self, abi, api, toolchain, force_pie,
- verbose, force_deprecated_headers):
+ def add_build_configuration(self, abi, api, toolchain, force_pie, verbose):
self.build_configurations.add(ndk.test.spec.BuildConfiguration(
- abi, api, toolchain, force_pie, verbose, force_deprecated_headers))
+ abi, api, toolchain, force_pie, verbose))
def find_tests(self, path, name):
tests = []
@@ -852,7 +849,7 @@ class PythonBuildTest(BuildTest):
api = build.lib.build_support.minimum_platform_level(config.abi)
config = ndk.test.spec.BuildConfiguration(
config.abi, api, config.toolchain, config.force_pie,
- config.verbose, config.force_deprecated_headers)
+ config.verbose)
super(PythonBuildTest, self).__init__(name, test_dir, config)
if self.abi not in build.lib.build_support.ALL_ABIS:
@@ -896,7 +893,7 @@ class ShellBuildTest(BuildTest):
api = build.lib.build_support.minimum_platform_level(config.abi)
config = ndk.test.spec.BuildConfiguration(
config.abi, api, config.toolchain, config.force_pie,
- config.verbose, config.force_deprecated_headers)
+ config.verbose)
super(ShellBuildTest, self).__init__(name, test_dir, config)
def get_build_dir(self, out_dir):
@@ -980,7 +977,7 @@ class NdkBuildTest(BuildTest):
api = _get_or_infer_app_platform(config.api, test_dir, config.abi)
config = ndk.test.spec.BuildConfiguration(
config.abi, api, config.toolchain, config.force_pie,
- config.verbose, config.force_deprecated_headers)
+ config.verbose)
super(NdkBuildTest, self).__init__(name, test_dir, config)
self.dist = dist
@@ -1008,7 +1005,7 @@ class CMakeBuildTest(BuildTest):
api = _get_or_infer_app_platform(config.api, test_dir, config.abi)
config = ndk.test.spec.BuildConfiguration(
config.abi, api, config.toolchain, config.force_pie,
- config.verbose, config.force_deprecated_headers)
+ config.verbose)
super(CMakeBuildTest, self).__init__(name, test_dir, config)
self.dist = dist
@@ -1051,8 +1048,7 @@ class DeviceTest(Test):
api = _get_or_infer_app_platform(config.api, test_dir, config.abi)
config = DeviceConfiguration(
config.abi, api, config.toolchain, config.force_pie,
- config.verbose, config.force_deprecated_headers, config.device,
- config.device_api, config.skip_run)
+ config.verbose, config.device, config.device_api, config.skip_run)
super(DeviceTest, self).__init__(name, test_dir, config)
@property
@@ -1362,10 +1358,6 @@ class LibcxxTest(Test):
def toolchain(self):
return self.config.toolchain
- @property
- def force_deprecated_headers(self):
- return self.config.force_deprecated_headers
-
def get_build_dir(self, out_dir):
return os.path.join(out_dir, str(self.config), 'libcxx', self.name)
@@ -1406,9 +1398,6 @@ class LibcxxTest(Test):
if self.config.force_pie or self.abi in ndk.abis.LP64_ABIS:
cmd.append('--pie')
- if self.force_deprecated_headers:
- cmd.append('--deprecated-headers')
-
# The libc++ test runner's filters are path based. Assemble the path to
# the test based on the late_filters (early filters for a libc++ test
# would be simply "libc++", so that's not interesting at this stage).
@@ -1473,8 +1462,6 @@ class LibcxxTest(Test):
# on it. The tests have never been 100% passing. We're going to only
# enable it for a handful of configurations as support falls in to
# place.
- if self.force_deprecated_headers:
- return 'legacy headers'
if self.toolchain == '4.9':
return '4.9'