Repository: crystax/android-platform-ndk Branch: master Commit: d86e23c82617 Files: 3568 Total size: 25.6 MB Directory structure: gitextract_s5vlq68o/ ├── .gitignore ├── Android.mk ├── BACKERS.md ├── CHANGELOG.md ├── CleanSpec.mk ├── OWNERS ├── README.md ├── build/ │ ├── NOTICE │ ├── awk/ │ │ ├── check-awk.awk │ │ ├── extract-debuggable.awk │ │ ├── extract-launchable.awk │ │ ├── extract-minsdkversion.awk │ │ ├── extract-package-name.awk │ │ ├── extract-pid.awk │ │ ├── extract-platform.awk │ │ ├── gen-cygwin-deps-converter.awk │ │ ├── gen-windows-host-path.awk │ │ └── xml.awk │ ├── core/ │ │ ├── add-application.mk │ │ ├── add-platform.mk │ │ ├── add-toolchain.mk │ │ ├── build-all.mk │ │ ├── build-binary.mk │ │ ├── build-executable.mk │ │ ├── build-local.mk │ │ ├── build-module.mk │ │ ├── build-shared-library.mk │ │ ├── build-static-library.mk │ │ ├── check-cygwin-make.mk │ │ ├── clear-vars.mk │ │ ├── default-application.mk │ │ ├── default-build-commands.mk │ │ ├── defaults.mk │ │ ├── definitions-graph.mk │ │ ├── definitions-host.mk │ │ ├── definitions-tests.mk │ │ ├── definitions-utils.mk │ │ ├── definitions.mk │ │ ├── import-locals.mk │ │ ├── init.mk │ │ ├── main.mk │ │ ├── prebuilt-library.mk │ │ ├── prebuilt-shared-library.mk │ │ ├── prebuilt-static-library.mk │ │ ├── setup-abi.mk │ │ ├── setup-app.mk │ │ ├── setup-imports.mk │ │ └── setup-toolchain.mk │ ├── gmsl/ │ │ ├── README │ │ ├── __gmsl │ │ ├── gmsl │ │ ├── gmsl-tests │ │ └── index.html │ ├── instruments/ │ │ ├── README.md │ │ ├── build-analyzer.sh │ │ ├── build-boost.sh │ │ ├── build-ccache.sh │ │ ├── build-cocotron.sh │ │ ├── build-compiler-rt.sh │ │ ├── build-crystax.sh │ │ ├── build-docs.sh │ │ ├── build-gcc.sh │ │ ├── build-gdb-stub.sh │ │ ├── build-gdbserver.sh │ │ ├── build-gnu-libstdc++.sh │ │ ├── build-gnustep-libobjc2.sh │ │ ├── build-host-awk.sh │ │ ├── build-host-gdb.sh │ │ ├── build-host-make.sh │ │ ├── build-host-prebuilts.sh │ │ ├── build-host-python.sh │ │ ├── build-host-toolbox.sh │ │ ├── build-host-yasm.sh │ │ ├── build-icu.sh │ │ ├── build-libjpeg-turbo.sh │ │ ├── build-libjpeg.sh │ │ ├── build-libpng.sh │ │ ├── build-libtiff.sh │ │ ├── build-llvm-libc++.sh │ │ ├── build-llvm.py │ │ ├── build-llvm.sh │ │ ├── build-mingw64-toolchain.sh │ │ ├── build-ndk-stack.sh │ │ ├── build-ndk-sysroot.sh │ │ ├── build-python/ │ │ │ ├── _sitebuiltins.py │ │ │ ├── _sysconfigdata.py │ │ │ ├── android.mk.2.7 │ │ │ ├── android.mk.3.5 │ │ │ ├── build_stdlib.py │ │ │ ├── config.c.2.7 │ │ │ ├── config.c.3.5 │ │ │ ├── freeze_stdlib.py │ │ │ ├── frozen.c.2.7 │ │ │ ├── frozen.c.3.x │ │ │ ├── getpath.c.2.7 │ │ │ ├── getpath.c.3.x │ │ │ ├── host/ │ │ │ │ ├── CMakeLists.txt.2.7 │ │ │ │ ├── CMakeLists.txt.3.5 │ │ │ │ ├── callproc.c.2.7.mingw.patch │ │ │ │ ├── callproc.c.3.5.mingw.patch │ │ │ │ ├── config.c.2.7 │ │ │ │ ├── config.c.3.5 │ │ │ │ ├── dynload_win.c.2.7.mingw.patch │ │ │ │ ├── dynload_win.c.3.5.mingw.patch │ │ │ │ ├── getpath.c.2.7 │ │ │ │ ├── getpath.c.3.x │ │ │ │ ├── interpreter-posix.c.2.7 │ │ │ │ ├── interpreter-posix.c.3.x │ │ │ │ ├── interpreter-winapi.c.2.7 │ │ │ │ ├── interpreter-winapi.c.3.x │ │ │ │ ├── posixmodule.c.2.7.mingw.patch │ │ │ │ ├── posixmodule.c.3.5.1.mingw.patch │ │ │ │ ├── posixmodule.c.3.5.x.mingw.patch │ │ │ │ ├── pyconfig.h.2.7.mingw.patch │ │ │ │ └── pyconfig.h.3.5.mingw.patch │ │ │ ├── interpreter-static.c.2.7 │ │ │ ├── interpreter-static.c.3.x │ │ │ ├── pyconfig.h │ │ │ ├── site.py │ │ │ ├── stdlib.config │ │ │ └── sysconfig.py │ │ ├── build-renderscript.sh │ │ ├── build-sqlite3.sh │ │ ├── build-support.sh │ │ ├── build-target-bash.sh │ │ ├── build-target-cpulimit.sh │ │ ├── build-target-ffmpeg.sh │ │ ├── build-target-gnu-coreutils.sh │ │ ├── build-target-gnu-grep.sh │ │ ├── build-target-gnu-less.sh │ │ ├── build-target-gnu-sed.sh │ │ ├── build-target-gnu-tar.sh │ │ ├── build-target-gnu-which.sh │ │ ├── build-target-gnu-zip.sh │ │ ├── build-target-htop.sh │ │ ├── build-target-info-unzip.sh │ │ ├── build-target-info-zip.sh │ │ ├── build-target-ncurses.sh │ │ ├── build-target-net-tools.sh │ │ ├── build-target-openssh.sh │ │ ├── build-target-openssl.sh │ │ ├── build-target-prebuilts.sh │ │ ├── build-target-procps-ng.sh │ │ ├── build-target-python.sh │ │ ├── build-target-vim.sh │ │ ├── build-target-x264.sh │ │ ├── build-vendor-host-python.sh │ │ ├── builder-funcs.sh │ │ ├── check-glibc.sh │ │ ├── cleanup-apps.sh │ │ ├── common-build-host-funcs.sh │ │ ├── dev-defaults.sh │ │ ├── dev-platform-compress.sh │ │ ├── dev-platform-expand-all.sh │ │ ├── dev-platform-expand.sh │ │ ├── dev-platform-import.sh │ │ ├── dev-system-import.sh │ │ ├── find-case-duplicates.sh │ │ ├── gen-platforms.sh │ │ ├── gen-system-symbols.sh │ │ ├── gen-toolchain-wrapper.sh │ │ ├── make-release.sh │ │ ├── ndk-ccache-g++.sh │ │ ├── ndk-ccache-gcc.sh │ │ ├── ndk-common.sh │ │ ├── package-platforms.sh │ │ ├── package-release.sh │ │ ├── patch-sources.sh │ │ ├── prebuilt-common.sh │ │ ├── rebuild-all-prebuilt.sh │ │ ├── regenerate-platforms │ │ ├── toolchain-licenses/ │ │ │ ├── COPYING │ │ │ ├── COPYING.LIB │ │ │ ├── COPYING.RUNTIME │ │ │ ├── COPYING3 │ │ │ └── COPYING3.LIB │ │ ├── toolchain-patches-host/ │ │ │ └── mingw-w64/ │ │ │ └── mingw-w64-widl.patch │ │ ├── unpack-build-cache │ │ ├── unwanted-symbols/ │ │ │ ├── arm/ │ │ │ │ ├── libc.so.functions.txt │ │ │ │ ├── libc.so.variables.txt │ │ │ │ ├── libgcc.a.functions.txt │ │ │ │ └── libgcc.a.variables.txt │ │ │ ├── arm64/ │ │ │ │ ├── libc.so.functions.txt │ │ │ │ ├── libc.so.variables.txt │ │ │ │ ├── libgcc.a.functions.txt │ │ │ │ └── libgcc.a.variables.txt │ │ │ ├── mips/ │ │ │ │ ├── libc.so.functions.txt │ │ │ │ ├── libc.so.variables.txt │ │ │ │ ├── libgcc.a.functions.txt │ │ │ │ └── libgcc.a.variables.txt │ │ │ ├── mips64/ │ │ │ │ ├── libc.so.functions.txt │ │ │ │ ├── libc.so.variables.txt │ │ │ │ ├── libgcc.a.functions.txt │ │ │ │ └── libgcc.a.variables.txt │ │ │ ├── x86/ │ │ │ │ ├── libc.so.functions.txt │ │ │ │ ├── libc.so.variables.txt │ │ │ │ ├── libgcc.a.functions.txt │ │ │ │ └── libgcc.a.variables.txt │ │ │ └── x86_64/ │ │ │ ├── libc.so.functions.txt │ │ │ ├── libc.so.variables.txt │ │ │ ├── libgcc.a.functions.txt │ │ │ └── libgcc.a.variables.txt │ │ └── update-build-cache │ ├── lib/ │ │ └── build_support.py │ ├── ndk-build │ ├── ndk-build.cmd │ ├── scripts/ │ │ ├── build-crew-utils │ │ ├── build-curl │ │ ├── build-host-gcc │ │ ├── build-libarchive │ │ ├── build-ruby │ │ ├── build-xz │ │ ├── builder.rb │ │ ├── cache.rb │ │ ├── commander.rb │ │ ├── common.rb │ │ ├── exceptions.rb │ │ ├── install-crew │ │ ├── install-crew-utils │ │ ├── logger.rb │ │ ├── options.rb │ │ ├── ruby │ │ └── ruby.cmd │ └── tools/ │ ├── README.md │ ├── build-analyzer.sh │ ├── build-boost.sh │ ├── build-cocotron.sh │ ├── build-compiler-rt.sh │ ├── build-crystax.sh │ ├── build-gcc.py │ ├── build-gdb-stub.sh │ ├── build-gdbserver.py │ ├── build-gdbserver.sh │ ├── build-gnustep-libobjc2.sh │ ├── build-icu.sh │ ├── build-libjpeg-turbo.sh │ ├── build-libjpeg.sh │ ├── build-libpng.sh │ ├── build-libtiff.sh │ ├── build-llvm-libc++.sh │ ├── build-llvm.py │ ├── build-llvm.sh │ ├── build-platforms.py │ ├── build-renderscript.sh │ ├── build-shader-tools.py │ ├── build-sqlite3.sh │ ├── builder-funcs.sh │ ├── common-build-host-funcs.sh │ ├── dev-defaults.sh │ ├── gen-platforms.sh │ ├── gen-toolchain-wrapper.sh │ ├── make-release.sh │ ├── make-standalone-toolchain.sh │ ├── ndk-ccache-g++.sh │ ├── ndk-ccache-gcc.sh │ ├── ndk-common.sh │ ├── package-platforms.sh │ ├── package.py │ ├── prebuilt-common.sh │ ├── regenerate-platforms │ ├── toolchain-licenses/ │ │ ├── COPYING │ │ ├── COPYING.LIB │ │ ├── COPYING.RUNTIME │ │ ├── COPYING3 │ │ └── COPYING3.LIB │ ├── unpack-build-cache │ ├── unwanted-symbols/ │ │ ├── arm/ │ │ │ ├── libgcc.a.functions.txt │ │ │ └── libgcc.a.variables.txt │ │ ├── arm64/ │ │ │ ├── libgcc.a.functions.txt │ │ │ └── libgcc.a.variables.txt │ │ ├── mips/ │ │ │ ├── libgcc.a.functions.txt │ │ │ └── libgcc.a.variables.txt │ │ ├── mips64/ │ │ │ ├── libgcc.a.functions.txt │ │ │ └── libgcc.a.variables.txt │ │ ├── x86/ │ │ │ ├── libgcc.a.functions.txt │ │ │ └── libgcc.a.variables.txt │ │ └── x86_64/ │ │ ├── libgcc.a.functions.txt │ │ └── libgcc.a.variables.txt │ └── update-build-cache ├── checkbuild.py ├── cmake/ │ ├── modules/ │ │ ├── FindBZip2.cmake │ │ ├── FindBoost.cmake │ │ ├── FindJNI.cmake │ │ ├── FindThreads.cmake │ │ └── FindZLIB.cmake │ └── toolchain.cmake ├── config.py ├── crew ├── crew.cmd ├── docs/ │ ├── GeneratingSysroots.md │ ├── Testing.md │ └── Toolchains.md ├── ndk-build ├── ndk-build.cmd ├── ndk-gdb ├── ndk-gdb.cmd ├── ndk-gdb.py ├── ndk-which ├── prebuilt/ │ └── common/ │ └── gdb/ │ └── common.setup ├── samples/ │ ├── .gitignore │ ├── README.md │ └── test-debug/ │ ├── .gitignore │ ├── AndroidManifest.xml │ ├── jni/ │ │ ├── Android.mk │ │ ├── Application.mk │ │ └── testdebug.c │ ├── proguard-project.txt │ ├── project.properties │ ├── res/ │ │ └── values/ │ │ └── strings.xml │ └── src/ │ └── com/ │ └── example/ │ └── testdebug/ │ └── TestDebug.java ├── sources/ │ ├── android/ │ │ ├── .gitignore │ │ ├── compiler-rt/ │ │ │ └── Android.mk │ │ ├── cpufeatures/ │ │ │ ├── Android.mk │ │ │ ├── NOTICE │ │ │ ├── cpu-features.c │ │ │ └── cpu-features.h │ │ ├── libthread_db/ │ │ │ ├── README │ │ │ ├── gdb-7.7/ │ │ │ │ ├── libthread_db.c │ │ │ │ └── thread_db.h │ │ │ ├── libthread_db.c │ │ │ └── thread_db.h │ │ └── support/ │ │ └── NOTICE │ ├── cpufeatures/ │ │ ├── Android.mk │ │ └── README.TXT │ ├── crystax/ │ │ ├── .gitignore │ │ ├── .syntastic/ │ │ │ └── c │ │ ├── GNUmakefile │ │ ├── LICENSE │ │ ├── bin/ │ │ │ ├── check-symbols │ │ │ ├── config │ │ │ ├── gen-arith │ │ │ ├── gen-bionic-sources │ │ │ ├── gen-bsd-sources │ │ │ ├── gen-compiler-rt-headers │ │ │ ├── gen-libkqueue-sources │ │ │ ├── gen-libpwq-sources │ │ │ ├── gen-locales │ │ │ ├── gen-musl-sources │ │ │ ├── gen-sources │ │ │ ├── gen-system-core-headers │ │ │ └── patch-sysroot │ │ ├── crazy_linker/ │ │ │ ├── Android.mk │ │ │ ├── DESIGN.TXT │ │ │ ├── LICENSE │ │ │ ├── README.TXT │ │ │ ├── include/ │ │ │ │ └── crazy_linker.h │ │ │ ├── minitest/ │ │ │ │ ├── minitest.cc │ │ │ │ └── minitest.h │ │ │ ├── src/ │ │ │ │ ├── crazy_linker_api.cpp │ │ │ │ ├── crazy_linker_ashmem.cpp │ │ │ │ ├── crazy_linker_ashmem.h │ │ │ │ ├── crazy_linker_ashmem_unittest.cpp │ │ │ │ ├── crazy_linker_debug.cpp │ │ │ │ ├── crazy_linker_debug.h │ │ │ │ ├── crazy_linker_elf_loader.cpp │ │ │ │ ├── crazy_linker_elf_loader.h │ │ │ │ ├── crazy_linker_elf_relocations.cpp │ │ │ │ ├── crazy_linker_elf_relocations.h │ │ │ │ ├── crazy_linker_elf_relro.cpp │ │ │ │ ├── crazy_linker_elf_relro.h │ │ │ │ ├── crazy_linker_elf_symbols.cpp │ │ │ │ ├── crazy_linker_elf_symbols.h │ │ │ │ ├── crazy_linker_elf_view.cpp │ │ │ │ ├── crazy_linker_elf_view.h │ │ │ │ ├── crazy_linker_error.cpp │ │ │ │ ├── crazy_linker_error.h │ │ │ │ ├── crazy_linker_error_unittest.cpp │ │ │ │ ├── crazy_linker_globals.cpp │ │ │ │ ├── crazy_linker_globals.h │ │ │ │ ├── crazy_linker_globals_unittest.cpp │ │ │ │ ├── crazy_linker_library_list.cpp │ │ │ │ ├── crazy_linker_library_list.h │ │ │ │ ├── crazy_linker_library_view.cpp │ │ │ │ ├── crazy_linker_library_view.h │ │ │ │ ├── crazy_linker_line_reader.cpp │ │ │ │ ├── crazy_linker_line_reader.h │ │ │ │ ├── crazy_linker_line_reader_unittest.cpp │ │ │ │ ├── crazy_linker_memory_mapping.h │ │ │ │ ├── crazy_linker_proc_maps.cpp │ │ │ │ ├── crazy_linker_proc_maps.h │ │ │ │ ├── crazy_linker_proc_maps_unittest.cpp │ │ │ │ ├── crazy_linker_rdebug.cpp │ │ │ │ ├── crazy_linker_rdebug.h │ │ │ │ ├── crazy_linker_search_path_list.cpp │ │ │ │ ├── crazy_linker_search_path_list.h │ │ │ │ ├── crazy_linker_search_path_list_unittest.cpp │ │ │ │ ├── crazy_linker_shared_library.cpp │ │ │ │ ├── crazy_linker_shared_library.h │ │ │ │ ├── crazy_linker_system.cpp │ │ │ │ ├── crazy_linker_system.h │ │ │ │ ├── crazy_linker_system_mock.cpp │ │ │ │ ├── crazy_linker_system_mock.h │ │ │ │ ├── crazy_linker_system_unittest.cpp │ │ │ │ ├── crazy_linker_thread.cpp │ │ │ │ ├── crazy_linker_thread.h │ │ │ │ ├── crazy_linker_thread_unittest.cpp │ │ │ │ ├── crazy_linker_util.cpp │ │ │ │ ├── crazy_linker_util.h │ │ │ │ ├── crazy_linker_util_unittest.cpp │ │ │ │ ├── crazy_linker_wrappers.cpp │ │ │ │ ├── crazy_linker_wrappers.h │ │ │ │ ├── elf_traits.h │ │ │ │ ├── linker_phdr.cpp │ │ │ │ └── linker_phdr.h │ │ │ └── tests/ │ │ │ ├── Android.mk │ │ │ ├── bar.cpp │ │ │ ├── bar_with_relro.cpp │ │ │ ├── bench_load_library.cpp │ │ │ ├── foo.cpp │ │ │ ├── foo2.cpp │ │ │ ├── foo_with_relro.cpp │ │ │ ├── foo_with_static_constructor.cpp │ │ │ ├── jni_lib.cpp │ │ │ ├── test_constructors_destructors.cpp │ │ │ ├── test_dl_wrappers.cpp │ │ │ ├── test_jni_hooks.cpp │ │ │ ├── test_load_library.cpp │ │ │ ├── test_load_library_callbacks.cpp │ │ │ ├── test_load_library_depends.cpp │ │ │ ├── test_relocated_shared_relro.cpp │ │ │ ├── test_search_path_list.cpp │ │ │ ├── test_shared_relro.cpp │ │ │ ├── test_two_shared_relros.cpp │ │ │ ├── test_util.h │ │ │ └── zoo.cpp │ │ ├── empty/ │ │ │ └── libcrystax.a │ │ ├── include/ │ │ │ ├── OpenGLES/ │ │ │ │ ├── ES1/ │ │ │ │ │ ├── gl.h │ │ │ │ │ └── glext.h │ │ │ │ ├── ES2/ │ │ │ │ │ ├── gl.h │ │ │ │ │ └── glext.h │ │ │ │ └── ES3/ │ │ │ │ ├── gl.h │ │ │ │ └── glext.h │ │ │ ├── alloca.h │ │ │ ├── asm/ │ │ │ │ ├── bitsperlong.h │ │ │ │ ├── posix_types.h │ │ │ │ ├── siginfo.h │ │ │ │ ├── signal.h │ │ │ │ ├── unistd.h │ │ │ │ ├── unistd_32.h │ │ │ │ ├── unistd_64.h │ │ │ │ └── unistd_x32.h │ │ │ ├── crystax/ │ │ │ │ ├── arm/ │ │ │ │ │ └── fenv.h │ │ │ │ ├── arm64/ │ │ │ │ │ ├── _inttypes.h │ │ │ │ │ ├── _limits.h │ │ │ │ │ ├── _stdint.h │ │ │ │ │ ├── endian.h │ │ │ │ │ └── fenv.h │ │ │ │ ├── common.hpp │ │ │ │ ├── ctassert.h │ │ │ │ ├── details/ │ │ │ │ │ └── jni.inc │ │ │ │ ├── freebsd.h │ │ │ │ ├── id.h │ │ │ │ ├── jutils/ │ │ │ │ │ ├── class.hpp │ │ │ │ │ ├── exceptions.hpp │ │ │ │ │ ├── field.hpp │ │ │ │ │ ├── helper.hpp │ │ │ │ │ ├── jcast.hpp │ │ │ │ │ ├── jholder.hpp │ │ │ │ │ ├── jni.hpp │ │ │ │ │ └── method.hpp │ │ │ │ ├── jutils.hpp │ │ │ │ ├── list.hpp │ │ │ │ ├── log.h │ │ │ │ ├── memory.hpp │ │ │ │ ├── mips/ │ │ │ │ │ └── fenv.h │ │ │ │ ├── mips64/ │ │ │ │ │ ├── _inttypes.h │ │ │ │ │ ├── _limits.h │ │ │ │ │ ├── _stdint.h │ │ │ │ │ ├── endian.h │ │ │ │ │ └── fenv.h │ │ │ │ ├── path.hpp │ │ │ │ ├── sys/ │ │ │ │ │ ├── ctype.h │ │ │ │ │ ├── endian.h │ │ │ │ │ ├── fenvsoft.h │ │ │ │ │ ├── fpmath.h │ │ │ │ │ ├── inttypes.h │ │ │ │ │ ├── langinfo.h │ │ │ │ │ ├── limits.h │ │ │ │ │ ├── locale.h │ │ │ │ │ ├── math.h │ │ │ │ │ ├── monetary.h │ │ │ │ │ ├── stdio.h │ │ │ │ │ ├── stdlib.h │ │ │ │ │ ├── string.h │ │ │ │ │ ├── strings.h │ │ │ │ │ ├── time.h │ │ │ │ │ ├── tls.h │ │ │ │ │ ├── wait.h │ │ │ │ │ ├── wchar.h │ │ │ │ │ └── wctype.h │ │ │ │ ├── system.h │ │ │ │ ├── x86/ │ │ │ │ │ └── fenv.h │ │ │ │ └── x86_64/ │ │ │ │ └── fenv.h │ │ │ ├── crystax.h │ │ │ ├── dlfcn.h │ │ │ ├── elf.h │ │ │ ├── endian.h │ │ │ ├── errno.h │ │ │ ├── fcntl.h │ │ │ ├── fenv.h │ │ │ ├── getrrsetbyname.h │ │ │ ├── grp.h │ │ │ ├── ieeefp.h │ │ │ ├── linux/ │ │ │ │ ├── elf.h │ │ │ │ ├── in.h │ │ │ │ ├── shm.h │ │ │ │ └── sysctl.h │ │ │ ├── machine/ │ │ │ │ ├── _align.h │ │ │ │ ├── _types.h │ │ │ │ ├── atomic.h │ │ │ │ ├── fenv.h │ │ │ │ ├── limits.h │ │ │ │ └── wchar_limits.h │ │ │ ├── malloc.h │ │ │ ├── netinet/ │ │ │ │ └── tcp.h │ │ │ ├── paths.h │ │ │ ├── pthread_np.h │ │ │ ├── semaphore.h │ │ │ ├── stdint.h │ │ │ ├── sys/ │ │ │ │ ├── _types.h │ │ │ │ ├── cdefs.h │ │ │ │ ├── fcntl.h │ │ │ │ ├── mman.h │ │ │ │ ├── param.h │ │ │ │ ├── shm.h │ │ │ │ ├── socket.h │ │ │ │ ├── sysctl.h │ │ │ │ ├── syslimits.h │ │ │ │ ├── syslog.h │ │ │ │ ├── timeb.h │ │ │ │ ├── timespec.h │ │ │ │ ├── types.h │ │ │ │ └── wait.h │ │ │ ├── syscall.h │ │ │ ├── termios.h │ │ │ ├── timeb.h │ │ │ └── xlocale.h │ │ ├── src/ │ │ │ ├── __get_thread.cpp │ │ │ ├── __wait4.c │ │ │ ├── bsd_signal.c │ │ │ ├── bzip2/ │ │ │ │ └── error.c │ │ │ ├── crystax/ │ │ │ │ ├── android.cpp │ │ │ │ ├── android_jni.cpp │ │ │ │ ├── crystax_posix_base.c │ │ │ │ ├── fenvimpl.c │ │ │ │ ├── isthreaded.c │ │ │ │ ├── jutils/ │ │ │ │ │ ├── exceptions.cpp │ │ │ │ │ ├── helper.cpp │ │ │ │ │ ├── jcast.cpp │ │ │ │ │ └── rethrow.cpp │ │ │ │ ├── locale/ │ │ │ │ │ ├── locale.c │ │ │ │ │ └── localeinit.c │ │ │ │ ├── lock.cpp │ │ │ │ ├── log.c │ │ │ │ ├── logcat.c │ │ │ │ ├── pthread_workqueue_impl.c │ │ │ │ ├── rawargs.cpp │ │ │ │ └── system.cpp │ │ │ ├── domainname.c │ │ │ ├── execve.c │ │ │ ├── fcntl/ │ │ │ │ └── fcntl.c │ │ │ ├── fdprintf.c │ │ │ ├── ftime.c │ │ │ ├── futex.c │ │ │ ├── getdents.c │ │ │ ├── getdtablesize.c │ │ │ ├── getnetgrent.c │ │ │ ├── getrlimit64.c │ │ │ ├── grent.c │ │ │ ├── include/ │ │ │ │ ├── crystax/ │ │ │ │ │ ├── arm/ │ │ │ │ │ │ ├── arith.h │ │ │ │ │ │ └── gd_qnan.h │ │ │ │ │ ├── arm64/ │ │ │ │ │ │ ├── arith.h │ │ │ │ │ │ └── gd_qnan.h │ │ │ │ │ ├── atomic.h │ │ │ │ │ ├── fenvimpl.h │ │ │ │ │ ├── internal.h │ │ │ │ │ ├── localeimpl.h │ │ │ │ │ ├── lock.hpp │ │ │ │ │ ├── mips/ │ │ │ │ │ │ ├── arith.h │ │ │ │ │ │ └── gd_qnan.h │ │ │ │ │ ├── mips64/ │ │ │ │ │ │ ├── arith.h │ │ │ │ │ │ └── gd_qnan.h │ │ │ │ │ ├── private.h │ │ │ │ │ ├── pthread_workqueue_impl.h │ │ │ │ │ ├── x86/ │ │ │ │ │ │ ├── arith.h │ │ │ │ │ │ └── gd_qnan.h │ │ │ │ │ └── x86_64/ │ │ │ │ │ ├── arith.h │ │ │ │ │ └── gd_qnan.h │ │ │ │ └── jemalloc_defs.h │ │ │ ├── issetugid.c │ │ │ ├── lchmod.c │ │ │ ├── lseek64.cpp │ │ │ ├── makedev.c │ │ │ ├── math/ │ │ │ │ ├── complex.c │ │ │ │ ├── fenvsoft.c │ │ │ │ ├── math.c │ │ │ │ └── sincos.c │ │ │ ├── memswap.c │ │ │ ├── msgcat.c │ │ │ ├── openbsd/ │ │ │ │ └── getrrsetbyname.c │ │ │ ├── posix_fadvise.c │ │ │ ├── posix_fallocate.c │ │ │ ├── pread.c │ │ │ ├── progname.c │ │ │ ├── pthread_attr_getstackaddr.c │ │ │ ├── pthread_gettid.c │ │ │ ├── pthread_main_np.cpp │ │ │ ├── pwent.c │ │ │ ├── pwrite.c │ │ │ ├── shmat.c │ │ │ ├── shmctl.c │ │ │ ├── shmdt.c │ │ │ ├── shmget.c │ │ │ ├── stdlib/ │ │ │ │ ├── abort.c │ │ │ │ └── rand.c │ │ │ ├── string/ │ │ │ │ └── strerror.c │ │ │ ├── strntoimax.c │ │ │ ├── strverscmp.c │ │ │ ├── swapxx.c │ │ │ ├── sysctl.c │ │ │ ├── sysv_signal.cpp │ │ │ ├── tkill.c │ │ │ ├── tls.c │ │ │ ├── uname.c │ │ │ ├── usershell.c │ │ │ ├── vfdprintf.c │ │ │ ├── wait3.c │ │ │ ├── wcswcs.c │ │ │ └── write.c │ │ └── vfs/ │ │ ├── accept.cpp │ │ ├── access.cpp │ │ ├── android.cpp │ │ ├── android_jni.cpp │ │ ├── assets/ │ │ │ ├── adriver.cpp │ │ │ └── driver.hpp │ │ ├── bind.cpp │ │ ├── chdir.cpp │ │ ├── chown.cpp │ │ ├── chroot.cpp │ │ ├── close.cpp │ │ ├── closedir.cpp │ │ ├── connect.cpp │ │ ├── dirfd.cpp │ │ ├── dup.cpp │ │ ├── dup2.cpp │ │ ├── fchdir.cpp │ │ ├── fchown.cpp │ │ ├── fcntl.cpp │ │ ├── fdatasync.cpp │ │ ├── fdopendir.cpp │ │ ├── fileio/ │ │ │ ├── api.hpp │ │ │ ├── common.hpp │ │ │ └── driver.hpp │ │ ├── fileio.cpp │ │ ├── flock.cpp │ │ ├── fstat.cpp │ │ ├── fsync.cpp │ │ ├── ftruncate.cpp │ │ ├── futils.cpp │ │ ├── getcwd.cpp │ │ ├── getdents.cpp │ │ ├── getsockname.cpp │ │ ├── getsockopt.cpp │ │ ├── include/ │ │ │ └── crystax/ │ │ │ └── vfs.h │ │ ├── ioctl.cpp │ │ ├── lchown.cpp │ │ ├── link.cpp │ │ ├── listen.cpp │ │ ├── lseek.cpp │ │ ├── lseek64.cpp │ │ ├── lstat.cpp │ │ ├── mkdir.cpp │ │ ├── mmap.cpp │ │ ├── mount.cpp │ │ ├── open.cpp │ │ ├── opendir.cpp │ │ ├── osfs/ │ │ │ ├── asyncsocketclosemonitor.cpp │ │ │ ├── asyncsocketclosemonitor.h │ │ │ ├── osfs.cpp │ │ │ ├── osfs.hpp │ │ │ ├── osfs_eclair.cpp │ │ │ ├── osfs_froyo.cpp │ │ │ ├── osfs_gingerbread.cpp │ │ │ └── osfs_ics.cpp │ │ ├── pipe.cpp │ │ ├── pread.cpp │ │ ├── pwrite.cpp │ │ ├── read.cpp │ │ ├── readdir.cpp │ │ ├── readdir_r.cpp │ │ ├── readlink.cpp │ │ ├── readv.cpp │ │ ├── recv.cpp │ │ ├── recvfrom.cpp │ │ ├── recvmsg.cpp │ │ ├── remove.cpp │ │ ├── rename.cpp │ │ ├── rewinddir.cpp │ │ ├── rmdir.cpp │ │ ├── scandir.cpp │ │ ├── seekdir.cpp │ │ ├── select.cpp │ │ ├── send.cpp │ │ ├── sendmsg.cpp │ │ ├── sendto.cpp │ │ ├── setsockopt.cpp │ │ ├── shutdown.cpp │ │ ├── socket.cpp │ │ ├── stat.cpp │ │ ├── symlink.cpp │ │ ├── system/ │ │ │ ├── driver.hpp │ │ │ └── sdriver.cpp │ │ ├── telldir.cpp │ │ ├── unlink.cpp │ │ ├── write.cpp │ │ └── writev.cpp │ ├── cxx-stl/ │ │ ├── gabi++/ │ │ │ └── NOTICE │ │ ├── gnu-libstdc++/ │ │ │ ├── .gitignore │ │ │ ├── Android.mk │ │ │ ├── README │ │ │ ├── build-gnu-libstdc++.sh │ │ │ └── build.py │ │ ├── llvm-libc++/ │ │ │ ├── .gitignore │ │ │ ├── Android.mk │ │ │ ├── README.NDK │ │ │ ├── build.py │ │ │ ├── export_symbols.txt │ │ │ └── test/ │ │ │ ├── Android.mk │ │ │ └── test_1.cc │ │ ├── llvm-libc++abi/ │ │ │ ├── libcxxabi/ │ │ │ │ ├── CREDITS.TXT │ │ │ │ ├── LICENSE.TXT │ │ │ │ ├── include/ │ │ │ │ │ ├── __cxxabi_config.h │ │ │ │ │ ├── cxxabi.h │ │ │ │ │ ├── libunwind.h │ │ │ │ │ ├── mach-o/ │ │ │ │ │ │ └── compact_unwind_encoding.h │ │ │ │ │ └── unwind.h │ │ │ │ ├── lib/ │ │ │ │ │ └── buildit │ │ │ │ ├── src/ │ │ │ │ │ ├── Unwind/ │ │ │ │ │ │ ├── AddressSpace.hpp │ │ │ │ │ │ ├── CompactUnwinder.hpp │ │ │ │ │ │ ├── DwarfInstructions.hpp │ │ │ │ │ │ ├── DwarfParser.hpp │ │ │ │ │ │ ├── EHHeaderParser.hpp │ │ │ │ │ │ ├── Registers.hpp │ │ │ │ │ │ ├── Unwind-EHABI.cpp │ │ │ │ │ │ ├── Unwind-EHABI.h │ │ │ │ │ │ ├── Unwind-sjlj.c │ │ │ │ │ │ ├── UnwindCursor.hpp │ │ │ │ │ │ ├── UnwindLevel1-gcc-ext.c │ │ │ │ │ │ ├── UnwindLevel1.c │ │ │ │ │ │ ├── UnwindRegistersRestore.S │ │ │ │ │ │ ├── UnwindRegistersSave.S │ │ │ │ │ │ ├── Unwind_AppleExtras.cpp │ │ │ │ │ │ ├── assembly.h │ │ │ │ │ │ ├── config.h │ │ │ │ │ │ ├── dwarf2.h │ │ │ │ │ │ ├── libunwind.cpp │ │ │ │ │ │ ├── libunwind_ext.h │ │ │ │ │ │ └── unwind_ext.h │ │ │ │ │ ├── abort_message.cpp │ │ │ │ │ ├── abort_message.h │ │ │ │ │ ├── config.h │ │ │ │ │ ├── cxa_aux_runtime.cpp │ │ │ │ │ ├── cxa_default_handlers.cpp │ │ │ │ │ ├── cxa_demangle.cpp │ │ │ │ │ ├── cxa_exception.cpp │ │ │ │ │ ├── cxa_exception.hpp │ │ │ │ │ ├── cxa_exception_storage.cpp │ │ │ │ │ ├── cxa_guard.cpp │ │ │ │ │ ├── cxa_handlers.cpp │ │ │ │ │ ├── cxa_handlers.hpp │ │ │ │ │ ├── cxa_new_delete.cpp │ │ │ │ │ ├── cxa_personality.cpp │ │ │ │ │ ├── cxa_thread_atexit.cpp │ │ │ │ │ ├── cxa_unexpected.cpp │ │ │ │ │ ├── cxa_vector.cpp │ │ │ │ │ ├── cxa_virtual.cpp │ │ │ │ │ ├── exception.cpp │ │ │ │ │ ├── fallback_malloc.ipp │ │ │ │ │ ├── private_typeinfo.cpp │ │ │ │ │ ├── private_typeinfo.h │ │ │ │ │ ├── stdexcept.cpp │ │ │ │ │ └── typeinfo.cpp │ │ │ │ └── test/ │ │ │ │ ├── backtrace_test.pass.cpp │ │ │ │ ├── catch_array_01.pass.cpp │ │ │ │ ├── catch_array_02.pass.cpp │ │ │ │ ├── catch_class_01.pass.cpp │ │ │ │ ├── catch_class_02.pass.cpp │ │ │ │ ├── catch_class_03.pass.cpp │ │ │ │ ├── catch_class_04.pass.cpp │ │ │ │ ├── catch_const_pointer_nullptr.pass.cpp │ │ │ │ ├── catch_function_01.pass.cpp │ │ │ │ ├── catch_function_02.pass.cpp │ │ │ │ ├── catch_in_noexcept.pass.cpp │ │ │ │ ├── catch_member_data_pointer_01.pass.cpp │ │ │ │ ├── catch_member_function_pointer_01.pass.cpp │ │ │ │ ├── catch_member_pointer_nullptr.pass.cpp │ │ │ │ ├── catch_pointer_nullptr.pass.cpp │ │ │ │ ├── catch_pointer_reference.pass.cpp │ │ │ │ ├── catch_ptr.pass.cpp │ │ │ │ ├── catch_ptr_02.pass.cpp │ │ │ │ ├── cxa_thread_atexit_test.pass.cpp │ │ │ │ ├── dynamic_cast14.pass.cpp │ │ │ │ ├── dynamic_cast3.pass.cpp │ │ │ │ ├── dynamic_cast5.pass.cpp │ │ │ │ ├── dynamic_cast_stress.pass.cpp │ │ │ │ ├── inherited_exception.pass.cpp │ │ │ │ ├── libcxxabi/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── test/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── config.py │ │ │ │ ├── lit.cfg │ │ │ │ ├── lit.site.cfg.in │ │ │ │ ├── support/ │ │ │ │ │ └── timer.hpp │ │ │ │ ├── test_aux_runtime.pass.cpp │ │ │ │ ├── test_aux_runtime_op_array_new.pass.cpp │ │ │ │ ├── test_demangle.pass.cpp │ │ │ │ ├── test_exception_storage.pass.cpp │ │ │ │ ├── test_fallback_malloc.pass.cpp │ │ │ │ ├── test_guard.pass.cpp │ │ │ │ ├── test_vector1.pass.cpp │ │ │ │ ├── test_vector2.pass.cpp │ │ │ │ ├── test_vector3.pass.cpp │ │ │ │ ├── testit │ │ │ │ ├── testit_android │ │ │ │ ├── unwind_01.pass.cpp │ │ │ │ ├── unwind_02.pass.cpp │ │ │ │ ├── unwind_03.pass.cpp │ │ │ │ ├── unwind_04.pass.cpp │ │ │ │ ├── unwind_05.pass.cpp │ │ │ │ └── unwind_06.pass.cpp │ │ │ └── sources.mk │ │ └── system/ │ │ ├── Android.mk │ │ ├── MODULE_LICENSE_BSD │ │ ├── NOTICE │ │ ├── include/ │ │ │ ├── cassert │ │ │ ├── cctype │ │ │ ├── cerrno │ │ │ ├── cfloat │ │ │ ├── climits │ │ │ ├── cmath │ │ │ ├── csetjmp │ │ │ ├── csignal │ │ │ ├── cstddef │ │ │ ├── cstdint │ │ │ ├── cstdio │ │ │ ├── cstdlib │ │ │ ├── cstring │ │ │ ├── ctime │ │ │ ├── cwchar │ │ │ ├── cwctype_is_not_supported │ │ │ ├── new │ │ │ ├── stl_pair.h │ │ │ ├── typeinfo │ │ │ └── utility │ │ └── setup.mk │ ├── host-tools/ │ │ ├── gdb-pretty-printers/ │ │ │ └── stlport/ │ │ │ └── gppfs-0.2/ │ │ │ ├── COPYING │ │ │ ├── ChangeLog │ │ │ ├── README │ │ │ ├── stlport/ │ │ │ │ ├── __init__.py │ │ │ │ └── printers.py │ │ │ └── test/ │ │ │ ├── .gdbinit │ │ │ ├── Makefile │ │ │ ├── script │ │ │ └── test.cpp │ │ ├── gdb-stub/ │ │ │ └── gdb-stub.c │ │ ├── make-3.81/ │ │ │ ├── ABOUT-NLS │ │ │ ├── AUTHORS │ │ │ ├── COPYING │ │ │ ├── ChangeLog │ │ │ ├── INSTALL │ │ │ ├── Makefile.DOS │ │ │ ├── Makefile.am │ │ │ ├── Makefile.ami │ │ │ ├── Makefile.in │ │ │ ├── NEWS │ │ │ ├── NMakefile │ │ │ ├── README │ │ │ ├── README.Amiga │ │ │ ├── README.DOS │ │ │ ├── README.OS2 │ │ │ ├── README.W32 │ │ │ ├── README.customs │ │ │ ├── SCOPTIONS │ │ │ ├── SMakefile │ │ │ ├── acinclude.m4 │ │ │ ├── aclocal.m4 │ │ │ ├── alloca.c │ │ │ ├── amiga.c │ │ │ ├── amiga.h │ │ │ ├── ansi2knr.1 │ │ │ ├── ansi2knr.c │ │ │ ├── ar.c │ │ │ ├── arscan.c │ │ │ ├── autom4te.cache/ │ │ │ │ ├── output.0 │ │ │ │ ├── requests │ │ │ │ └── traces.0 │ │ │ ├── build-make.sh │ │ │ ├── build.py │ │ │ ├── build.sh.in │ │ │ ├── build_w32.bat │ │ │ ├── commands.c │ │ │ ├── commands.h │ │ │ ├── config/ │ │ │ │ ├── ChangeLog │ │ │ │ ├── Makefile.am │ │ │ │ ├── Makefile.in │ │ │ │ ├── codeset.m4 │ │ │ │ ├── compile │ │ │ │ ├── config.guess │ │ │ │ ├── config.rpath │ │ │ │ ├── config.sub │ │ │ │ ├── depcomp │ │ │ │ ├── dospaths.m4 │ │ │ │ ├── gettext.m4 │ │ │ │ ├── glibc21.m4 │ │ │ │ ├── iconv.m4 │ │ │ │ ├── install-sh │ │ │ │ ├── intdiv0.m4 │ │ │ │ ├── intmax.m4 │ │ │ │ ├── inttypes-pri.m4 │ │ │ │ ├── inttypes.m4 │ │ │ │ ├── inttypes_h.m4 │ │ │ │ ├── isc-posix.m4 │ │ │ │ ├── lcmessage.m4 │ │ │ │ ├── lib-ld.m4 │ │ │ │ ├── lib-link.m4 │ │ │ │ ├── lib-prefix.m4 │ │ │ │ ├── longdouble.m4 │ │ │ │ ├── longlong.m4 │ │ │ │ ├── mdate-sh │ │ │ │ ├── missing │ │ │ │ ├── mkinstalldirs │ │ │ │ ├── nls.m4 │ │ │ │ ├── po.m4 │ │ │ │ ├── printf-posix.m4 │ │ │ │ ├── progtest.m4 │ │ │ │ ├── signed.m4 │ │ │ │ ├── size_max.m4 │ │ │ │ ├── stdint_h.m4 │ │ │ │ ├── texinfo.tex │ │ │ │ ├── uintmax_t.m4 │ │ │ │ ├── ulonglong.m4 │ │ │ │ ├── wchar_t.m4 │ │ │ │ ├── wint_t.m4 │ │ │ │ └── xsize.m4 │ │ │ ├── config.ami │ │ │ ├── config.h-vms │ │ │ ├── config.h.W32 │ │ │ ├── config.h.in │ │ │ ├── config.log │ │ │ ├── configh.dos │ │ │ ├── configure │ │ │ ├── configure.bat │ │ │ ├── configure.in │ │ │ ├── debug.h │ │ │ ├── default.c │ │ │ ├── dep.h │ │ │ ├── dir.c │ │ │ ├── doc/ │ │ │ │ ├── Makefile.am │ │ │ │ ├── Makefile.in │ │ │ │ ├── fdl.texi │ │ │ │ ├── make-stds.texi │ │ │ │ ├── make.info │ │ │ │ ├── make.info-1 │ │ │ │ ├── make.info-2 │ │ │ │ ├── make.texi │ │ │ │ ├── stamp-vti │ │ │ │ └── version.texi │ │ │ ├── dosbuild.bat │ │ │ ├── expand.c │ │ │ ├── file.c │ │ │ ├── filedef.h │ │ │ ├── function.c │ │ │ ├── getloadavg.c │ │ │ ├── getopt.c │ │ │ ├── getopt.h │ │ │ ├── getopt1.c │ │ │ ├── gettext.h │ │ │ ├── glob/ │ │ │ │ ├── COPYING.LIB │ │ │ │ ├── ChangeLog │ │ │ │ ├── Makefile.am │ │ │ │ ├── Makefile.ami │ │ │ │ ├── Makefile.in │ │ │ │ ├── SCOPTIONS │ │ │ │ ├── SMakefile │ │ │ │ ├── configure.bat │ │ │ │ ├── fnmatch.c │ │ │ │ ├── fnmatch.h │ │ │ │ ├── glob.c │ │ │ │ └── glob.h │ │ │ ├── hash.c │ │ │ ├── hash.h │ │ │ ├── implicit.c │ │ │ ├── job.c │ │ │ ├── job.h │ │ │ ├── main.c │ │ │ ├── make.1 │ │ │ ├── make.h │ │ │ ├── make.lnk │ │ │ ├── make_msvc_net2003.sln │ │ │ ├── make_msvc_net2003.vcproj │ │ │ ├── makefile.com │ │ │ ├── makefile.vms │ │ │ ├── misc.c │ │ │ ├── po/ │ │ │ │ ├── ChangeLog │ │ │ │ ├── LINGUAS │ │ │ │ ├── Makefile.in.in │ │ │ │ ├── Makevars │ │ │ │ ├── POTFILES.in │ │ │ │ ├── Rules-quot │ │ │ │ ├── be.gmo │ │ │ │ ├── be.po │ │ │ │ ├── boldquot.sed │ │ │ │ ├── da.gmo │ │ │ │ ├── da.po │ │ │ │ ├── de.gmo │ │ │ │ ├── de.po │ │ │ │ ├── en@boldquot.header │ │ │ │ ├── en@quot.header │ │ │ │ ├── es.gmo │ │ │ │ ├── es.po │ │ │ │ ├── fi.gmo │ │ │ │ ├── fi.po │ │ │ │ ├── fr.gmo │ │ │ │ ├── fr.po │ │ │ │ ├── ga.gmo │ │ │ │ ├── ga.po │ │ │ │ ├── gl.gmo │ │ │ │ ├── gl.po │ │ │ │ ├── he.gmo │ │ │ │ ├── he.po │ │ │ │ ├── hr.gmo │ │ │ │ ├── hr.po │ │ │ │ ├── id.gmo │ │ │ │ ├── id.po │ │ │ │ ├── insert-header.sin │ │ │ │ ├── ja.gmo │ │ │ │ ├── ja.po │ │ │ │ ├── ko.gmo │ │ │ │ ├── ko.po │ │ │ │ ├── make.pot │ │ │ │ ├── nl.gmo │ │ │ │ ├── nl.po │ │ │ │ ├── pl.gmo │ │ │ │ ├── pl.po │ │ │ │ ├── pt_BR.gmo │ │ │ │ ├── pt_BR.po │ │ │ │ ├── quot.sed │ │ │ │ ├── remove-potcdate.sin │ │ │ │ ├── ru.gmo │ │ │ │ ├── ru.po │ │ │ │ ├── rw.gmo │ │ │ │ ├── rw.po │ │ │ │ ├── stamp-po │ │ │ │ ├── sv.gmo │ │ │ │ ├── sv.po │ │ │ │ ├── tr.gmo │ │ │ │ ├── tr.po │ │ │ │ ├── uk.gmo │ │ │ │ ├── uk.po │ │ │ │ ├── vi.gmo │ │ │ │ ├── vi.po │ │ │ │ ├── zh_CN.gmo │ │ │ │ └── zh_CN.po │ │ │ ├── read.c │ │ │ ├── readme.vms │ │ │ ├── remake.c │ │ │ ├── remote-cstms.c │ │ │ ├── remote-stub.c │ │ │ ├── rule.c │ │ │ ├── rule.h │ │ │ ├── signame.c │ │ │ ├── strcache.c │ │ │ ├── subproc.bat │ │ │ ├── tests/ │ │ │ │ ├── COPYING │ │ │ │ ├── ChangeLog │ │ │ │ ├── NEWS │ │ │ │ ├── README │ │ │ │ ├── mkshadow │ │ │ │ ├── run_make_tests │ │ │ │ ├── run_make_tests.pl │ │ │ │ ├── scripts/ │ │ │ │ │ ├── features/ │ │ │ │ │ │ ├── comments │ │ │ │ │ │ ├── conditionals │ │ │ │ │ │ ├── default_names │ │ │ │ │ │ ├── double_colon │ │ │ │ │ │ ├── echoing │ │ │ │ │ │ ├── errors │ │ │ │ │ │ ├── escape │ │ │ │ │ │ ├── export │ │ │ │ │ │ ├── include │ │ │ │ │ │ ├── mult_rules │ │ │ │ │ │ ├── mult_targets │ │ │ │ │ │ ├── order_only │ │ │ │ │ │ ├── override │ │ │ │ │ │ ├── parallelism │ │ │ │ │ │ ├── patspecific_vars │ │ │ │ │ │ ├── patternrules │ │ │ │ │ │ ├── quoting │ │ │ │ │ │ ├── recursion │ │ │ │ │ │ ├── reinvoke │ │ │ │ │ │ ├── se_explicit │ │ │ │ │ │ ├── se_implicit │ │ │ │ │ │ ├── se_statpat │ │ │ │ │ │ ├── statipattrules │ │ │ │ │ │ ├── targetvars │ │ │ │ │ │ ├── varnesting │ │ │ │ │ │ ├── vpath │ │ │ │ │ │ ├── vpath2 │ │ │ │ │ │ ├── vpathgpath │ │ │ │ │ │ └── vpathplus │ │ │ │ │ ├── functions/ │ │ │ │ │ │ ├── abspath │ │ │ │ │ │ ├── addprefix │ │ │ │ │ │ ├── addsuffix │ │ │ │ │ │ ├── andor │ │ │ │ │ │ ├── basename │ │ │ │ │ │ ├── call │ │ │ │ │ │ ├── dir │ │ │ │ │ │ ├── error │ │ │ │ │ │ ├── eval │ │ │ │ │ │ ├── filter-out │ │ │ │ │ │ ├── findstring │ │ │ │ │ │ ├── flavor │ │ │ │ │ │ ├── foreach │ │ │ │ │ │ ├── if │ │ │ │ │ │ ├── join │ │ │ │ │ │ ├── notdir │ │ │ │ │ │ ├── origin │ │ │ │ │ │ ├── realpath │ │ │ │ │ │ ├── shell │ │ │ │ │ │ ├── sort │ │ │ │ │ │ ├── strip │ │ │ │ │ │ ├── substitution │ │ │ │ │ │ ├── suffix │ │ │ │ │ │ ├── value │ │ │ │ │ │ ├── warning │ │ │ │ │ │ ├── wildcard │ │ │ │ │ │ └── word │ │ │ │ │ ├── misc/ │ │ │ │ │ │ ├── close_stdout │ │ │ │ │ │ ├── general1 │ │ │ │ │ │ ├── general2 │ │ │ │ │ │ ├── general3 │ │ │ │ │ │ └── general4 │ │ │ │ │ ├── options/ │ │ │ │ │ │ ├── dash-B │ │ │ │ │ │ ├── dash-C │ │ │ │ │ │ ├── dash-I │ │ │ │ │ │ ├── dash-W │ │ │ │ │ │ ├── dash-e │ │ │ │ │ │ ├── dash-f │ │ │ │ │ │ ├── dash-k │ │ │ │ │ │ ├── dash-l │ │ │ │ │ │ ├── dash-n │ │ │ │ │ │ ├── dash-q │ │ │ │ │ │ ├── dash-t │ │ │ │ │ │ ├── general │ │ │ │ │ │ ├── symlinks │ │ │ │ │ │ └── warn-undefined-variables │ │ │ │ │ ├── targets/ │ │ │ │ │ │ ├── DEFAULT │ │ │ │ │ │ ├── FORCE │ │ │ │ │ │ ├── INTERMEDIATE │ │ │ │ │ │ ├── PHONY │ │ │ │ │ │ ├── SECONDARY │ │ │ │ │ │ ├── SILENT │ │ │ │ │ │ └── clean │ │ │ │ │ ├── test_template │ │ │ │ │ └── variables/ │ │ │ │ │ ├── CURDIR │ │ │ │ │ ├── DEFAULT_GOAL │ │ │ │ │ ├── INCLUDE_DIRS │ │ │ │ │ ├── MAKE │ │ │ │ │ ├── MAKECMDGOALS │ │ │ │ │ ├── MAKEFILES │ │ │ │ │ ├── MAKELEVEL │ │ │ │ │ ├── MAKE_RESTARTS │ │ │ │ │ ├── MFILE_LIST │ │ │ │ │ ├── SHELL │ │ │ │ │ ├── automatic │ │ │ │ │ ├── flavors │ │ │ │ │ ├── negative │ │ │ │ │ └── special │ │ │ │ └── test_driver.pl │ │ │ ├── variable.c │ │ │ ├── variable.h │ │ │ ├── version.c │ │ │ ├── vmsdir.h │ │ │ ├── vmsfunctions.c │ │ │ ├── vmsify.c │ │ │ ├── vmsjobs.c │ │ │ ├── vpath.c │ │ │ └── w32/ │ │ │ ├── .deps/ │ │ │ │ ├── libw32_a-misc.Po │ │ │ │ ├── libw32_a-pathstuff.Po │ │ │ │ ├── libw32_a-sub_proc.Po │ │ │ │ └── libw32_a-w32err.Po │ │ │ ├── Makefile │ │ │ ├── Makefile.am │ │ │ ├── Makefile.in │ │ │ ├── compat/ │ │ │ │ └── dirent.c │ │ │ ├── include/ │ │ │ │ ├── dirent.h │ │ │ │ ├── pathstuff.h │ │ │ │ ├── sub_proc.h │ │ │ │ └── w32err.h │ │ │ ├── pathstuff.c │ │ │ └── subproc/ │ │ │ ├── NMakefile │ │ │ ├── build.bat │ │ │ ├── misc.c │ │ │ ├── proc.h │ │ │ ├── sub_proc.c │ │ │ └── w32err.c │ │ ├── nawk-20071023/ │ │ │ ├── FIXES │ │ │ ├── GNUmakefile │ │ │ ├── NOTICE │ │ │ ├── README │ │ │ ├── awk.h │ │ │ ├── awkgram.y │ │ │ ├── b.c │ │ │ ├── build-awk.sh │ │ │ ├── build.py │ │ │ ├── lex.c │ │ │ ├── lib.c │ │ │ ├── main.c │ │ │ ├── maketab.c │ │ │ ├── parse.c │ │ │ ├── proto.h │ │ │ ├── run.c │ │ │ └── tran.c │ │ ├── ndk-depends/ │ │ │ ├── GNUmakefile │ │ │ ├── NOTICE │ │ │ ├── build-ndk-depends.sh │ │ │ ├── build.py │ │ │ └── ndk-depends.cc │ │ ├── ndk-stack/ │ │ │ ├── GNUmakefile │ │ │ ├── NOTICE │ │ │ ├── binutils/ │ │ │ │ ├── COPYING3 │ │ │ │ └── addr2line.c │ │ │ ├── build-ndk-stack.sh │ │ │ ├── build.py │ │ │ ├── ndk-stack-parser.c │ │ │ ├── ndk-stack-parser.h │ │ │ ├── ndk-stack.c │ │ │ └── regex/ │ │ │ ├── cclass.h │ │ │ ├── cname.h │ │ │ ├── engine.c │ │ │ ├── regcomp.c │ │ │ ├── regerror.c │ │ │ ├── regex.h │ │ │ ├── regex2.h │ │ │ ├── regexec.c │ │ │ ├── regfree.c │ │ │ ├── targetver.h │ │ │ └── utils.h │ │ └── toolbox/ │ │ ├── NOTICE │ │ ├── build-toolbox.sh │ │ ├── build.py │ │ ├── cmp_win.c │ │ └── echo_win.c │ ├── objc/ │ │ ├── cocotron/ │ │ │ └── 0.1.0/ │ │ │ ├── .gitignore │ │ │ └── Android.mk │ │ ├── gnustep-libobjc2/ │ │ │ ├── .gitignore │ │ │ └── Android.mk │ │ └── none/ │ │ └── Android.mk │ ├── python/ │ │ ├── 2.7/ │ │ │ ├── .gitignore │ │ │ ├── Android.mk │ │ │ └── frozen/ │ │ │ ├── _ctypes/ │ │ │ │ └── Android.mk │ │ │ ├── _multiprocessing/ │ │ │ │ └── Android.mk │ │ │ ├── _socket/ │ │ │ │ └── Android.mk │ │ │ ├── _sqlite3/ │ │ │ │ └── Android.mk │ │ │ ├── _ssl/ │ │ │ │ └── Android.mk │ │ │ ├── pyexpat/ │ │ │ │ └── Android.mk │ │ │ ├── select/ │ │ │ │ └── Android.mk │ │ │ ├── stdlib/ │ │ │ │ └── Android.mk │ │ │ └── unicodedata/ │ │ │ └── Android.mk │ │ └── 3.5/ │ │ ├── .gitignore │ │ ├── Android.mk │ │ └── frozen/ │ │ ├── _ctypes/ │ │ │ └── Android.mk │ │ ├── _multiprocessing/ │ │ │ └── Android.mk │ │ ├── _socket/ │ │ │ └── Android.mk │ │ ├── _sqlite3/ │ │ │ └── Android.mk │ │ ├── _ssl/ │ │ │ └── Android.mk │ │ ├── pyexpat/ │ │ │ └── Android.mk │ │ ├── select/ │ │ │ └── Android.mk │ │ ├── stdlib/ │ │ │ └── Android.mk │ │ └── unicodedata/ │ │ └── Android.mk │ └── third_party/ │ └── googletest/ │ ├── Android.mk │ ├── README.NDK │ ├── googletest/ │ │ ├── CHANGES │ │ ├── LICENSE │ │ ├── README │ │ ├── include/ │ │ │ └── gtest/ │ │ │ ├── gtest-death-test.h │ │ │ ├── gtest-message.h │ │ │ ├── gtest-param-test.h │ │ │ ├── gtest-param-test.h.pump │ │ │ ├── gtest-printers.h │ │ │ ├── gtest-spi.h │ │ │ ├── gtest-test-part.h │ │ │ ├── gtest-typed-test.h │ │ │ ├── gtest.h │ │ │ ├── gtest_pred_impl.h │ │ │ ├── gtest_prod.h │ │ │ └── internal/ │ │ │ ├── gtest-death-test-internal.h │ │ │ ├── gtest-filepath.h │ │ │ ├── gtest-internal.h │ │ │ ├── gtest-linked_ptr.h │ │ │ ├── gtest-param-util-generated.h │ │ │ ├── gtest-param-util-generated.h.pump │ │ │ ├── gtest-param-util.h │ │ │ ├── gtest-port.h │ │ │ ├── gtest-string.h │ │ │ ├── gtest-tuple.h │ │ │ ├── gtest-tuple.h.pump │ │ │ ├── gtest-type-util.h │ │ │ └── gtest-type-util.h.pump │ │ ├── samples/ │ │ │ ├── prime_tables.h │ │ │ ├── sample1.cc │ │ │ ├── sample1.h │ │ │ ├── sample10_unittest.cc │ │ │ ├── sample1_unittest.cc │ │ │ ├── sample2.cc │ │ │ ├── sample2.h │ │ │ ├── sample2_unittest.cc │ │ │ ├── sample3-inl.h │ │ │ ├── sample3_unittest.cc │ │ │ ├── sample4.cc │ │ │ ├── sample4.h │ │ │ ├── sample4_unittest.cc │ │ │ ├── sample5_unittest.cc │ │ │ ├── sample6_unittest.cc │ │ │ ├── sample7_unittest.cc │ │ │ ├── sample8_unittest.cc │ │ │ └── sample9_unittest.cc │ │ ├── src/ │ │ │ ├── gtest-all.cc │ │ │ ├── gtest-death-test.cc │ │ │ ├── gtest-filepath.cc │ │ │ ├── gtest-internal-inl.h │ │ │ ├── gtest-port.cc │ │ │ ├── gtest-printers.cc │ │ │ ├── gtest-test-part.cc │ │ │ ├── gtest-typed-test.cc │ │ │ ├── gtest.cc │ │ │ └── gtest_main.cc │ │ └── test/ │ │ ├── gtest-death-test_ex_test.cc │ │ ├── gtest-death-test_test.cc │ │ ├── gtest-filepath_test.cc │ │ ├── gtest-linked_ptr_test.cc │ │ ├── gtest-listener_test.cc │ │ ├── gtest-message_test.cc │ │ ├── gtest-options_test.cc │ │ ├── gtest-param-test2_test.cc │ │ ├── gtest-param-test_test.cc │ │ ├── gtest-param-test_test.h │ │ ├── gtest-port_test.cc │ │ ├── gtest-printers_test.cc │ │ ├── gtest-test-part_test.cc │ │ ├── gtest-tuple_test.cc │ │ ├── gtest-typed-test2_test.cc │ │ ├── gtest-typed-test_test.cc │ │ ├── gtest-typed-test_test.h │ │ ├── gtest-unittest-api_test.cc │ │ ├── gtest_all_test.cc │ │ ├── gtest_break_on_failure_unittest.py │ │ ├── gtest_break_on_failure_unittest_.cc │ │ ├── gtest_catch_exceptions_test.py │ │ ├── gtest_catch_exceptions_test_.cc │ │ ├── gtest_color_test.py │ │ ├── gtest_color_test_.cc │ │ ├── gtest_env_var_test.py │ │ ├── gtest_env_var_test_.cc │ │ ├── gtest_environment_test.cc │ │ ├── gtest_filter_unittest.py │ │ ├── gtest_filter_unittest_.cc │ │ ├── gtest_help_test.py │ │ ├── gtest_help_test_.cc │ │ ├── gtest_list_tests_unittest.py │ │ ├── gtest_list_tests_unittest_.cc │ │ ├── gtest_main_unittest.cc │ │ ├── gtest_no_test_unittest.cc │ │ ├── gtest_output_test.py │ │ ├── gtest_output_test_.cc │ │ ├── gtest_output_test_golden_lin.txt │ │ ├── gtest_pred_impl_unittest.cc │ │ ├── gtest_prod_test.cc │ │ ├── gtest_repeat_test.cc │ │ ├── gtest_shuffle_test.py │ │ ├── gtest_shuffle_test_.cc │ │ ├── gtest_sole_header_test.cc │ │ ├── gtest_stress_test.cc │ │ ├── gtest_test_utils.py │ │ ├── gtest_throw_on_failure_ex_test.cc │ │ ├── gtest_throw_on_failure_test.py │ │ ├── gtest_throw_on_failure_test_.cc │ │ ├── gtest_uninitialized_test.py │ │ ├── gtest_uninitialized_test_.cc │ │ ├── gtest_unittest.cc │ │ ├── gtest_xml_outfile1_test_.cc │ │ ├── gtest_xml_outfile2_test_.cc │ │ ├── gtest_xml_outfiles_test.py │ │ ├── gtest_xml_output_unittest.py │ │ ├── gtest_xml_output_unittest_.cc │ │ ├── gtest_xml_test_utils.py │ │ ├── production.cc │ │ └── production.h │ └── patches.ndk/ │ ├── 0001-Allow-clone-usage-on-MIPS.patch │ ├── 0002-Work-around-broken-abort-on-Android-MIPS.patch │ └── 0003-Allow-clone-usage-on-X86.patch ├── tests/ │ ├── .gitignore │ ├── README │ ├── __init__.py │ ├── awk/ │ │ ├── extract-launchable/ │ │ │ ├── multiple-categories.in │ │ │ ├── multiple-categories.out │ │ │ ├── multiple-launchables.in │ │ │ ├── multiple-launchables.out │ │ │ ├── no-launchable.in │ │ │ ├── no-launchable.out │ │ │ ├── one-launchable.in │ │ │ └── one-launchable.out │ │ ├── extract-pid/ │ │ │ ├── test-1.in │ │ │ └── test-1.out │ │ ├── gen-cygwin-deps-converter/ │ │ │ ├── test-1.in │ │ │ ├── test-1.out │ │ │ ├── test-2.in │ │ │ └── test-2.out │ │ └── gen-windows-host-path/ │ │ ├── test-1.in │ │ └── test-1.out │ ├── build/ │ │ ├── .gitignore │ │ ├── absolute-src-file-paths/ │ │ │ ├── build.sh │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ └── Application.mk │ │ │ └── src/ │ │ │ ├── foo.c │ │ │ └── main.c │ │ ├── ansi/ │ │ │ ├── README │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ ├── test_ansi.c │ │ │ └── test_ansi.cpp │ │ ├── awk-trailing-r/ │ │ │ ├── AndroidManifest.xml │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── awk-trailing-r.c │ │ ├── b14811006-GOT_PREL-optimization/ │ │ │ ├── build.sh │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── SkAlphaMulQ.cc │ │ │ └── properties.json │ │ ├── b14825026-aarch64-FP_LO_REGS/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── idct_dequant_full_2x_neon.c │ │ │ └── test_config.py │ │ ├── b8247455-hidden-cxa/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ ├── idiv.cpp │ │ │ └── throw.cpp │ │ ├── b9193874-neon/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── b9193874-neon.c │ │ │ ├── properties.json │ │ │ └── test_config.py │ │ ├── build-assembly-file/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ ├── assembly-mips.S │ │ │ ├── assembly-x86.S │ │ │ ├── assembly1.s │ │ │ └── assembly2.S │ │ ├── build-mode/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── main.c │ │ ├── c++-stl-source-extensions/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ ├── main.C │ │ │ │ ├── main.CPP │ │ │ │ ├── main.c++ │ │ │ │ ├── main.cc │ │ │ │ ├── main.cp │ │ │ │ ├── main.cpp │ │ │ │ └── main.cxx │ │ │ └── test_config.py │ │ ├── check-armeabi-v7a-prebuilts/ │ │ │ ├── build.sh │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ └── Application.mk │ │ ├── clang-include-gnu-libc++/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── clang-include-gnu-libc++.cc │ │ ├── copysign/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── copysign.cpp │ │ │ └── test_config.py │ │ ├── cortex-a53-835769/ │ │ │ ├── build.sh │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ ├── cortex-a53-835769-1.c │ │ │ │ └── cortex-a53-835769-2.c │ │ │ └── test_config.py │ │ ├── cpp-extensions/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ ├── foo1.cc │ │ │ ├── foo2.cp │ │ │ ├── foo3.cxx │ │ │ ├── foo4.cpp │ │ │ ├── foo5.C │ │ │ ├── foo6.CPP │ │ │ └── main.c++ │ │ ├── crystax-check-BROKEN_BUILD/ │ │ │ └── build.sh │ │ ├── crystax-check-BROKEN_RUN/ │ │ │ └── build.sh │ │ ├── crystax-check-BUILD_SHOULD_FAIL/ │ │ │ └── build.sh │ │ ├── crystax-check-DISABLED/ │ │ │ └── build.sh │ │ ├── crystax-check-__gnu_linux__/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── main.c │ │ ├── crystax-check-host-python-ssl-modules/ │ │ │ └── build.sh │ │ ├── crystax-check-prebuilt-gdb/ │ │ │ └── build.sh │ │ ├── crystax-issue1044-clang-x86_64-crash/ │ │ │ ├── common.mk │ │ │ ├── host/ │ │ │ │ ├── .gitignore │ │ │ │ └── GNUmakefile │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── test.cpp │ │ │ └── properties.json │ │ ├── crystax-issue1170-alloca-redefined/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── main.c │ │ ├── crystax-issue1234-fd_set-should-be-exposed-implicitly-by-stdlib_h/ │ │ │ ├── common.mk │ │ │ ├── host/ │ │ │ │ ├── .gitignore │ │ │ │ └── GNUmakefile │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── test.c │ │ ├── crystax-issue1263-___atomic_add_fetch/ │ │ │ ├── common.mk │ │ │ ├── host/ │ │ │ │ ├── .gitignore │ │ │ │ └── GNUmakefile │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── test.cpp │ │ │ └── properties.json │ │ ├── crystax-issue1263-clang-64bit-atomics/ │ │ │ ├── common.mk │ │ │ ├── host/ │ │ │ │ ├── .gitignore │ │ │ │ └── GNUmakefile │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── test.cpp │ │ │ └── properties.json │ │ ├── crystax-issue1340-PTRDIFF_MAX-is-not-defined/ │ │ │ ├── common.mk │ │ │ ├── host/ │ │ │ │ ├── .gitignore │ │ │ │ └── GNUmakefile │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── main.cpp │ │ │ └── properties.json │ │ ├── crystax-issue1352-libobjc-soname/ │ │ │ └── build.sh │ │ ├── crystax-issue1363-do-not-know-how-to-soften-operand/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── test.cpp │ │ ├── crystax-issue1370-unknown-dwarf-version/ │ │ │ ├── build.sh │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ └── test.c │ │ ├── crystax-issue906-long-double/ │ │ │ ├── build.sh │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── test.cpp │ │ ├── crystax-issue922-struct_user-exposed-by-stdlib_h/ │ │ │ ├── build.sh │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── main.c │ │ ├── crystax-test-__GCC_HAVE_SYNC_COMPARE_AND_SWAP/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── main.c │ │ ├── crystax-test-boost-dependencies/ │ │ │ ├── build.sh │ │ │ └── jni/ │ │ │ └── test.cpp │ │ ├── crystax-test-c++-exceptions-and-rtti-enabled-by-default/ │ │ │ ├── build.sh │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ └── test.cpp │ │ ├── crystax-test-ext-hash/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── main.cpp │ │ ├── crystax-test-headers/ │ │ │ └── build.sh │ │ ├── crystax-test-libcrystax-linking/ │ │ │ └── build.sh │ │ ├── crystax-test-neon/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── main.cpp │ │ ├── crystax-test-patched-sysroot/ │ │ │ └── build.sh │ │ ├── crystax-test-posix-interfaces/ │ │ │ ├── bin/ │ │ │ │ ├── gen-aio │ │ │ │ ├── gen-all │ │ │ │ ├── gen-cpio │ │ │ │ ├── gen-errno │ │ │ │ ├── gen-fcntl │ │ │ │ ├── gen-fenv │ │ │ │ ├── gen-float │ │ │ │ ├── gen-fmtmsg │ │ │ │ ├── gen-fnmatch │ │ │ │ ├── gen-ftw │ │ │ │ ├── gen-glob │ │ │ │ ├── gen-inttypes │ │ │ │ ├── gen-iso646 │ │ │ │ ├── gen-langinfo │ │ │ │ ├── gen-limits │ │ │ │ ├── gen-locale │ │ │ │ ├── gen-math │ │ │ │ ├── gen-netdb │ │ │ │ ├── gen-netinet_in │ │ │ │ ├── gen-poll │ │ │ │ ├── gen-pthread │ │ │ │ ├── gen-regex │ │ │ │ ├── gen-sched │ │ │ │ ├── gen-signal │ │ │ │ ├── gen-spawn │ │ │ │ ├── gen-stdbool │ │ │ │ ├── gen-stdint │ │ │ │ ├── gen-stdio │ │ │ │ ├── gen-stdlib │ │ │ │ ├── gen-sys_ipc │ │ │ │ ├── gen-sys_mman │ │ │ │ ├── gen-sys_resource │ │ │ │ ├── gen-sys_sem │ │ │ │ ├── gen-sys_shm │ │ │ │ ├── gen-sys_socket │ │ │ │ ├── gen-sys_stat │ │ │ │ ├── gen-sys_statvfs │ │ │ │ ├── gen-sys_time │ │ │ │ ├── gen-sys_wait │ │ │ │ ├── gen-syslog │ │ │ │ ├── gen-tar │ │ │ │ ├── gen-termios │ │ │ │ ├── gen-tgmath │ │ │ │ ├── gen-time │ │ │ │ ├── gen-unistd │ │ │ │ ├── gen-wchar │ │ │ │ └── gen-wordexp │ │ │ ├── build.sh │ │ │ ├── common.mk │ │ │ ├── host/ │ │ │ │ ├── .gitignore │ │ │ │ └── GNUmakefile │ │ │ └── jni/ │ │ │ ├── .gitignore │ │ │ ├── Android.mk │ │ │ ├── aio.c │ │ │ ├── arpa_inet.c │ │ │ ├── checkm.c │ │ │ ├── complex.c │ │ │ ├── cpio.c │ │ │ ├── ctype.c │ │ │ ├── dirent.c │ │ │ ├── dlfcn.c │ │ │ ├── errno.c │ │ │ ├── fcntl.c │ │ │ ├── fenv.c │ │ │ ├── float.c │ │ │ ├── fmtmsg.c │ │ │ ├── fnmatch.c │ │ │ ├── ftw.c │ │ │ ├── glob.c │ │ │ ├── grp.c │ │ │ ├── helper.h │ │ │ ├── iconv.c │ │ │ ├── inttypes.c │ │ │ ├── iso646.c │ │ │ ├── langinfo.c │ │ │ ├── libgen.c │ │ │ ├── limits.c │ │ │ ├── locale.c │ │ │ ├── main.c │ │ │ ├── math.c │ │ │ ├── monetary.c │ │ │ ├── mqueue.c │ │ │ ├── ndbm.c │ │ │ ├── net_if.c │ │ │ ├── netdb.c │ │ │ ├── netinet_in.c │ │ │ ├── netinet_tcp.c │ │ │ ├── nl_types.c │ │ │ ├── poll.c │ │ │ ├── pthread.c │ │ │ ├── pwd.c │ │ │ ├── regex.c │ │ │ ├── sched.c │ │ │ ├── search.c │ │ │ ├── semaphore.c │ │ │ ├── setjmp.c │ │ │ ├── signal.c │ │ │ ├── spawn.c │ │ │ ├── stdarg.c │ │ │ ├── stdbool.c │ │ │ ├── stddef.c │ │ │ ├── stdint.c │ │ │ ├── stdio.c │ │ │ ├── stdlib.c │ │ │ ├── string.c │ │ │ ├── strings.c │ │ │ ├── sys_ipc.c │ │ │ ├── sys_mman.c │ │ │ ├── sys_msg.c │ │ │ ├── sys_resource.c │ │ │ ├── sys_select.c │ │ │ ├── sys_sem.c │ │ │ ├── sys_shm.c │ │ │ ├── sys_socket.c │ │ │ ├── sys_stat.c │ │ │ ├── sys_statvfs.c │ │ │ ├── sys_time.c │ │ │ ├── sys_times.c │ │ │ ├── sys_types.c │ │ │ ├── sys_uio.c │ │ │ ├── sys_un.c │ │ │ ├── sys_utsname.c │ │ │ ├── sys_wait.c │ │ │ ├── syslog.c │ │ │ ├── tar.c │ │ │ ├── termios.c │ │ │ ├── tgmath.c │ │ │ ├── time.c │ │ │ ├── unistd.c │ │ │ ├── utime.c │ │ │ ├── wchar.c │ │ │ ├── wctype.c │ │ │ ├── wordexp.c │ │ │ ├── xlocale.c │ │ │ └── xlocale2.c │ │ ├── crystax-test-prebuilt-macros/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── main.c │ │ ├── crystax-test-sync_file_range/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── main.c │ │ ├── deprecate-__set_errno/ │ │ │ └── build.sh │ │ ├── fenv/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ ├── test_fenv.c │ │ │ └── test_fenv.cpp │ │ ├── flto/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── flto.c │ │ │ ├── properties.json │ │ │ └── test_config.py │ │ ├── gnustl-force-all/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── forced_all.cpp │ │ ├── gnustl-force-exceptions/ │ │ │ └── build.sh │ │ ├── gnustl-force-none/ │ │ │ └── build.sh │ │ ├── gnustl-force-rtti/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── forced_rtti.cpp │ │ ├── import-install/ │ │ │ ├── README │ │ │ ├── build.sh │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── main.c │ │ │ ├── path1/ │ │ │ │ ├── Android.mk │ │ │ │ ├── path1.c │ │ │ │ └── path1.h │ │ │ └── path2/ │ │ │ ├── Android.mk │ │ │ ├── path2.c │ │ │ └── path2.h │ │ ├── import-static/ │ │ │ ├── README │ │ │ ├── bar/ │ │ │ │ ├── Android.mk │ │ │ │ ├── bar.c │ │ │ │ └── bar.h │ │ │ ├── build.sh │ │ │ ├── foo/ │ │ │ │ ├── Android.mk │ │ │ │ ├── foo.c │ │ │ │ └── foo.h │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ └── main.c │ │ ├── issue-gcc59052-partial-specialization-of-template/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── issue-gcc59052-partial-specialization-of-template.cc │ │ ├── issue17144-byteswap/ │ │ │ ├── build.sh │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── issue17144-byteswap.c │ │ │ └── test_config.py │ │ ├── issue20862-libpng-O0/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ ├── png.h │ │ │ ├── pngconf.h │ │ │ ├── pngdebug.h │ │ │ ├── pnginfo.h │ │ │ ├── pnglibconf.h │ │ │ ├── pngpriv.h │ │ │ ├── pngrtran.c │ │ │ └── pngstruct.h │ │ ├── issue21132-__ARM_ARCH__/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── issue21132-__ARM_ARCH__.c │ │ │ └── test_config.py │ │ ├── issue22336-ICE-emit-rtl/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── issue22336-ICE-emit-rtl.cpp │ │ │ └── test_config.py │ │ ├── issue22345-ICE-postreload/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── issue22345-ICE-postreload.cpp │ │ │ └── test_config.py │ │ ├── issue34613-neon/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── issue34613-neon.cpp │ │ │ └── test_config.py │ │ ├── issue36131-flto-c++11/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── issue36131-flto-c++11.cxx │ │ │ ├── properties.json │ │ │ └── test_config.py │ │ ├── issue38441-Elf32_auxv_t/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── issue38441-Elf32_auxv_t.c │ │ ├── issue39824-__BYTE_ORDER/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ ├── issue39824-_BYTE_ORDER.c │ │ │ └── issue39824-__BYTE_ORDER.c │ │ ├── issue39983-PAGE_SIZE/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── issue39983-PAGE_SIZE.c │ │ ├── issue40625-SL_IID_ANDROIDBUFFERQUEUESOURCE/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── issue40625-SL_IID_ANDROIDBUFFERQUEUESOURCE.c │ │ ├── issue41297-atomic-64bit/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── issue41297-atomic-64bit.c │ │ │ └── test_config.py │ │ ├── issue41387-uniform-initialized-rvalue/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── issue41387-uniform-initialized-rvalue.cpp │ │ ├── issue41770-_GLIBCXX_HAS_GTHREADS/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── issue41770-_GLIBCXX_HAS_GTHREADS.cpp │ │ │ └── test_config.py │ │ ├── issue42841-LOCAL_PATH/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── issue42841-LOCAL_PATH.c │ │ ├── issue53163-OpenSLES_AndroidConfiguration/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── issue53163-OpenSLES_AndroidConfiguration.c │ │ ├── issue53404-backward-compatibility/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── issue53404-backward-compatibility.cpp │ │ ├── issue53711-un_h/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── issue53711-un_h.c │ │ ├── issue54465-invalid-asm-operand-out-of-range/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── issue54465-invalid-asm-operand-out-of-range.cpp │ │ ├── issue54623-dcraw_common-x86-segfault/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── issue54623-dcraw_common-x86-segfault.cpp │ │ ├── issue56508-gcc4.7-ICE/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── extraMachine.c │ │ ├── issue58135-_C_LABEL_STRING/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── issue58135-_C_LABEL_STRING.cpp │ │ ├── issue64679-prctl/ │ │ │ ├── build.sh │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── issue64679-prctl.cc │ │ ├── issue65705-asm-pc/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── issue65705-asm-pc.c │ │ │ ├── properties.json │ │ │ └── test_config.py │ │ ├── issue66668-libc++-std-feof/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── issue66668-libc++-std-feof.cpp │ │ ├── issue79114-__builtin___stpncpy_chk/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── __builtin___stpncpy_chk.c │ │ ├── issue79115-confusing-ld.gold-warning/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── issue79115-confusing-ld.gold-warning.c │ │ ├── issue81440-non-ascii-comment/ │ │ │ ├── build.sh │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── issue81440-non-ascii-comment.cpp │ │ ├── lambda-defarg3/ │ │ │ ├── COPYING │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── lambda-defarg3.C │ │ │ └── test_config.py │ │ ├── merge-string-literals/ │ │ │ ├── build.sh │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ ├── merge-string-literals-1.c │ │ │ └── merge-string-literals-2.c │ │ ├── mips-fp4/ │ │ │ ├── build.sh │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ ├── mips-fp4-test1-2.c │ │ │ │ └── mips-fp4-test3-6.c │ │ │ ├── properties.json │ │ │ └── test_config.py │ │ ├── multi-abi/ │ │ │ ├── README │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── main.c │ │ ├── multi-module-path/ │ │ │ ├── build.sh │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ └── test.c │ │ │ ├── path1/ │ │ │ │ └── foo/ │ │ │ │ ├── Android.mk │ │ │ │ ├── foo.h │ │ │ │ └── libfoo.c │ │ │ └── path2/ │ │ │ └── bar/ │ │ │ ├── Android.mk │ │ │ ├── bar.h │ │ │ └── libbar.c │ │ ├── multiple-static-const/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ ├── foo.cpp │ │ │ ├── main.cpp │ │ │ └── main.h │ │ ├── ndk-build-unit-tests/ │ │ │ ├── build.sh │ │ │ └── jni/ │ │ │ └── Android.mk │ │ ├── ndk-out/ │ │ │ ├── build.sh │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ └── main.c │ │ ├── no-installable-modules/ │ │ │ ├── build.sh │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── foo.c │ │ ├── pch-cpp/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── foo.c │ │ │ ├── foo.cpp │ │ │ └── stdafx.h │ │ ├── pch-tags/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ ├── bar.cpp │ │ │ ├── foo.cpp │ │ │ └── stdafx.h │ │ ├── prebuilt-copy/ │ │ │ ├── README │ │ │ ├── build.sh │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── main.c │ │ │ └── prebuilts/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ ├── bar.c │ │ │ └── foo.c │ │ ├── project-properties/ │ │ │ ├── default.properties │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ └── Application.mk │ │ │ └── project.properties │ │ ├── pthread-rwlock-initializer/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── test_pthread_rwlock_initializer.c │ │ ├── short-commands/ │ │ │ └── build.sh │ │ ├── ssax-instructions/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── test.S │ │ │ └── test_config.py │ │ ├── standalone-toolchain/ │ │ │ ├── foo.cpp │ │ │ ├── properties.json │ │ │ ├── test.py │ │ │ └── test_config.py │ │ ├── stdint-c++/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ ├── gen-sources.sh │ │ │ ├── test_all_macros.cpp │ │ │ ├── test_c.c │ │ │ ├── test_constant_macros.cpp │ │ │ ├── test_limit_macros.cpp │ │ │ └── test_no_macros.cpp │ │ ├── system-cpp-headers/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── main.cpp │ │ ├── target-c-includes/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ ├── check.c │ │ │ └── include/ │ │ │ └── math.h │ │ ├── test-c-only-flags/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── test-c-only-flags.cpp │ │ ├── test-gnustl-chrono/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ ├── hanoi.c │ │ │ ├── hanoi.h │ │ │ └── main.cpp │ │ ├── test-inet-defs/ │ │ │ ├── README │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ ├── test-in.c │ │ │ └── test-in6.c │ │ ├── thin-archives/ │ │ │ ├── build.sh │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ ├── bar.c │ │ │ ├── foo.c │ │ │ └── main.c │ │ ├── topological-sort/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ ├── bar.c │ │ │ ├── bar.h │ │ │ ├── foo.c │ │ │ ├── foo.h │ │ │ ├── foo2.c │ │ │ └── main.c │ │ ├── ucontext/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── ucontext.c │ │ ├── warn-bad-modules/ │ │ │ ├── build.sh │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── foo.cpp │ │ ├── warn-no-ldflags-in-static-libraries/ │ │ │ ├── build.sh │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── foo.c │ │ ├── warn-no-ldlibs-in-static-libraries/ │ │ │ ├── build.sh │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── foo.c │ │ ├── warn-no-modules/ │ │ │ ├── build.sh │ │ │ └── jni/ │ │ │ └── Android.mk │ │ ├── warn-non-system-libs-in-linker-flags/ │ │ │ ├── build.sh │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── foo.c │ │ │ └── main.c │ │ └── warn-thin-archive-is-for-static-libraries/ │ │ ├── build.sh │ │ └── jni/ │ │ ├── Android.mk │ │ └── foo.c │ ├── device/ │ │ ├── asan-smoke/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── asan_oob_test.cc │ │ │ ├── properties.json │ │ │ └── test_config.py │ │ ├── b16355626-bad-atof-strtod/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── b16355626-bad-atof-strtod.cpp │ │ ├── b16355858/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ ├── sample.c │ │ │ └── sample_lib.c │ │ ├── b8708181-Vector4/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── Vector4.cpp │ │ │ └── test_config.py │ │ ├── bitfield/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ ├── func.c │ │ │ ├── header.h │ │ │ └── main.c │ │ ├── clone/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── clone.c │ │ ├── crystax-issue1003-pw_gecos/ │ │ │ ├── common.mk │ │ │ ├── host/ │ │ │ │ ├── .gitignore │ │ │ │ └── GNUmakefile │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── main.c │ │ ├── crystax-issue1046-dlopen-unknown-reloc-type-160/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ ├── main.c │ │ │ │ └── test.cpp │ │ │ └── properties.json │ │ ├── crystax-issue1163-dladdr/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ ├── foo.c │ │ │ ├── foo.h │ │ │ └── main.c │ │ ├── crystax-issue1188-wrong-static-library-link/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ ├── lib-shared.cpp │ │ │ ├── lib-shared.hpp │ │ │ ├── lib-static.cpp │ │ │ ├── lib-static.hpp │ │ │ └── test.cpp │ │ ├── crystax-issue1194-posix_memalign/ │ │ │ ├── common.mk │ │ │ ├── host/ │ │ │ │ ├── .gitignore │ │ │ │ └── GNUmakefile │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── main.c │ │ ├── crystax-issue1252-swab/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── main.c │ │ ├── crystax-issue1360-boost_locale_issetugid/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── issetugidtest.cpp │ │ ├── crystax-issue1369-lrintf/ │ │ │ ├── common.mk │ │ │ ├── host/ │ │ │ │ ├── .gitignore │ │ │ │ └── GNUmakefile │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── test.c │ │ ├── crystax-issue1398-esdb/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── test.cpp │ │ │ └── properties.json │ │ ├── crystax-issue1399-gmtime-return-NULL-tm_zone/ │ │ │ ├── common.mk │ │ │ ├── host/ │ │ │ │ ├── .gitignore │ │ │ │ └── GNUmakefile │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── main.c │ │ ├── crystax-issue1436-gethostname/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── main.c │ │ ├── crystax-issue350-copy-with-zone/ │ │ │ ├── common.mk │ │ │ ├── host/ │ │ │ │ ├── .gitignore │ │ │ │ └── GNUmakefile │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── main.m │ │ │ └── properties.json │ │ ├── crystax-issue355-clock_nanosleep/ │ │ │ ├── common.mk │ │ │ ├── host/ │ │ │ │ ├── .gitignore │ │ │ │ └── GNUmakefile │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── main.c │ │ │ └── properties.json │ │ ├── crystax-issue57-std_atomic/ │ │ │ ├── common.mk │ │ │ ├── host/ │ │ │ │ ├── .gitignore │ │ │ │ └── GNUmakefile │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── test.cpp │ │ ├── crystax-issue876-swapNN/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ ├── assert.h │ │ │ ├── function.c │ │ │ ├── macro.c │ │ │ └── main.c │ │ ├── crystax-issue912-__tls_get_addr/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ ├── test.c │ │ │ │ └── tga.c │ │ │ └── properties.json │ │ ├── crystax-issue995-objective-c-literals/ │ │ │ ├── common.mk │ │ │ ├── host/ │ │ │ │ ├── .gitignore │ │ │ │ └── GNUmakefile │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── test.m │ │ │ └── properties.json │ │ ├── crystax-test-alignof/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── test.cpp │ │ ├── crystax-test-big-switch/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── gen │ │ ├── crystax-test-bionic/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ └── Application.mk │ │ │ └── properties.json │ │ ├── crystax-test-boost-serialization/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ ├── gps.cpp │ │ │ ├── gps.hpp │ │ │ └── test.cpp │ │ ├── crystax-test-c++11/ │ │ │ ├── .syntastic/ │ │ │ │ └── cxx │ │ │ ├── common.mk │ │ │ ├── host/ │ │ │ │ ├── .gitignore │ │ │ │ └── GNUmakefile │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ ├── common.h │ │ │ ├── main.cpp │ │ │ ├── test-chrono-duration.cpp │ │ │ ├── test-language.cpp │ │ │ ├── test-stol.cpp │ │ │ ├── test-thread.cpp │ │ │ ├── test-to-string.cpp │ │ │ └── test-to-wstring.cpp │ │ ├── crystax-test-c99-complex/ │ │ │ ├── common.mk │ │ │ ├── host/ │ │ │ │ ├── .gitignore │ │ │ │ └── GNUmakefile │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── main.c │ │ │ └── properties.json │ │ ├── crystax-test-c99-stdlib/ │ │ │ ├── common.mk │ │ │ ├── host/ │ │ │ │ ├── .gitignore │ │ │ │ └── GNUmakefile │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── main.c │ │ ├── crystax-test-cmake/ │ │ │ ├── CMakeLists.txt │ │ │ └── test.c │ │ ├── crystax-test-dynamic_cast/ │ │ │ ├── common.mk │ │ │ ├── host/ │ │ │ │ ├── .gitignore │ │ │ │ └── GNUmakefile │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── main.cpp │ │ ├── crystax-test-executables/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── main.c │ │ ├── crystax-test-fcntl/ │ │ │ ├── common.mk │ │ │ ├── host/ │ │ │ │ ├── .gitignore │ │ │ │ └── GNUmakefile │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── fcntl.c │ │ ├── crystax-test-float-abi/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── test-float.c │ │ ├── crystax-test-getauxval/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── test.c │ │ ├── crystax-test-iostream/ │ │ │ ├── common.mk │ │ │ ├── host/ │ │ │ │ ├── .gitignore │ │ │ │ └── GNUmakefile │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── main.cpp │ │ ├── crystax-test-libcrystax/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ ├── absolutize.cpp │ │ │ ├── basename.cpp │ │ │ ├── common.h │ │ │ ├── dirname.cpp │ │ │ ├── is_absolute.cpp │ │ │ ├── is_normalized.cpp │ │ │ ├── is_subpath.cpp │ │ │ ├── list.cpp │ │ │ ├── main.cpp │ │ │ ├── normalize.cpp │ │ │ ├── open-self.cpp │ │ │ ├── path.cpp │ │ │ └── relpath.cpp │ │ ├── crystax-test-libjpeg/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── test.c │ │ ├── crystax-test-libjpeg-turbo/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── test.c │ │ ├── crystax-test-libkqueue/ │ │ │ ├── config.h │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ └── Application.mk │ │ ├── crystax-test-libpng/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── test.c │ │ ├── crystax-test-locales/ │ │ │ ├── common.mk │ │ │ ├── host/ │ │ │ │ ├── .gitignore │ │ │ │ ├── GNUmakefile │ │ │ │ └── test.mk │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ ├── test-setlocale.c │ │ │ ├── test-strfmon.c │ │ │ └── test-strftime.c │ │ ├── crystax-test-msun/ │ │ │ ├── common.mk │ │ │ ├── host/ │ │ │ │ ├── .gitignore │ │ │ │ ├── GNUmakefile │ │ │ │ └── test.mk │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ ├── test-cexp.c │ │ │ ├── test-conj.c │ │ │ ├── test-csqrt.c │ │ │ ├── test-ctrig.c │ │ │ ├── test-exponential.c │ │ │ ├── test-fenv.c │ │ │ ├── test-fma.c │ │ │ ├── test-fmaxmin.c │ │ │ ├── test-ilogb.c │ │ │ ├── test-invctrig.c │ │ │ ├── test-invtrig.c │ │ │ ├── test-logarithm.c │ │ │ ├── test-lrint.c │ │ │ ├── test-lround.c │ │ │ ├── test-nan.c │ │ │ ├── test-nearbyint.c │ │ │ ├── test-next.c │ │ │ ├── test-rem.c │ │ │ ├── test-trig.c │ │ │ └── test-utils.h │ │ ├── crystax-test-objc-blocks/ │ │ │ ├── common.mk │ │ │ ├── host/ │ │ │ │ ├── .gitignore │ │ │ │ └── GNUmakefile │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── test.m │ │ │ └── properties.json │ │ ├── crystax-test-objc-cocotron/ │ │ │ ├── common.mk │ │ │ ├── host/ │ │ │ │ ├── .gitignore │ │ │ │ ├── GNUmakefile │ │ │ │ └── test.mk │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ ├── test-assert.m │ │ │ │ ├── test-base.m │ │ │ │ ├── test-exception.m │ │ │ │ ├── test-nslog.m │ │ │ │ └── test-string.m │ │ │ └── properties.json │ │ ├── crystax-test-objc-runtime/ │ │ │ ├── common.mk │ │ │ ├── host/ │ │ │ │ ├── .gitignore │ │ │ │ └── GNUmakefile │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ ├── objc.m │ │ │ │ ├── objcxx.mm │ │ │ │ └── test.c │ │ │ └── properties.json │ │ ├── crystax-test-openpts/ │ │ │ ├── common.mk │ │ │ ├── host/ │ │ │ │ ├── .gitignore │ │ │ │ ├── GNUmakefile │ │ │ │ └── test.mk │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ └── Application.mk │ │ │ └── properties.json │ │ ├── crystax-test-pthread_workqueue/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ └── Application.mk │ │ │ └── properties.json │ │ ├── crystax-test-rand_r/ │ │ │ ├── common.mk │ │ │ ├── host/ │ │ │ │ ├── .gitignore │ │ │ │ └── GNUmakefile │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── main.c │ │ ├── crystax-test-regex/ │ │ │ ├── common.mk │ │ │ ├── host/ │ │ │ │ ├── .gitignore │ │ │ │ └── GNUmakefile │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── main.cpp │ │ ├── crystax-test-setjmp/ │ │ │ ├── common.mk │ │ │ ├── host/ │ │ │ │ ├── .gitignore │ │ │ │ └── GNUmakefile │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── main.c │ │ ├── crystax-test-sincos/ │ │ │ ├── common.mk │ │ │ ├── host/ │ │ │ │ ├── .gitignore │ │ │ │ └── GNUmakefile │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ ├── test-sincos-c.c │ │ │ ├── test-sincos-cpp.cpp │ │ │ └── test-sincos-main.c │ │ ├── crystax-test-sqlite3/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── test.c │ │ ├── crystax-test-std-atomic-crashes/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── main.cc │ │ │ └── properties.json │ │ ├── crystax-test-stdatomic.h/ │ │ │ ├── common.mk │ │ │ ├── host/ │ │ │ │ ├── .gitignore │ │ │ │ └── GNUmakefile │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── main.c │ │ ├── crystax-test-stdio/ │ │ │ ├── common.mk │ │ │ ├── host/ │ │ │ │ ├── .gitignore │ │ │ │ ├── GNUmakefile │ │ │ │ └── test.mk │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ ├── test-fmemopen.c │ │ │ ├── test-fopen.c │ │ │ ├── test-getdelim.c │ │ │ ├── test-getline.c │ │ │ ├── test-open_memstream.c │ │ │ ├── test-open_wmemstream.c │ │ │ ├── test-popen.c │ │ │ ├── test-print-positional.c │ │ │ ├── test-printbasic.c │ │ │ ├── test-printf-data.inc │ │ │ ├── test-printf.c │ │ │ ├── test-printfloat.c │ │ │ └── test-scanfloat.c │ │ ├── crystax-test-stream-float-output/ │ │ │ ├── common.mk │ │ │ ├── host/ │ │ │ │ ├── .gitignore │ │ │ │ └── GNUmakefile │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── test-stream-float-output.cpp │ │ ├── crystax-test-strtod/ │ │ │ ├── common.mk │ │ │ ├── host/ │ │ │ │ ├── .gitignore │ │ │ │ └── GNUmakefile │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── main.c │ │ ├── crystax-test-wchar/ │ │ │ ├── common.mk │ │ │ ├── host/ │ │ │ │ ├── .gitignore │ │ │ │ ├── GNUmakefile │ │ │ │ └── test.mk │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ ├── test-btowc.c │ │ │ ├── test-iswctype.c │ │ │ ├── test-mblen.c │ │ │ ├── test-mbrlen.c │ │ │ ├── test-mbrtowc.c │ │ │ ├── test-mbsnrtowcs.c │ │ │ ├── test-mbsrtowcs.c │ │ │ ├── test-mbstowcs.c │ │ │ ├── test-mbtowc.c │ │ │ ├── test-ms-wprintf.c │ │ │ ├── test-towctrans.c │ │ │ ├── test-wcrtomb.c │ │ │ ├── test-wcscasecmp.c │ │ │ ├── test-wcslen-cpp.cpp │ │ │ ├── test-wcslen.c │ │ │ ├── test-wcsnlen.c │ │ │ ├── test-wcsnrtombs.c │ │ │ ├── test-wcsrtombs.c │ │ │ ├── test-wcstombs.c │ │ │ ├── test-wctomb.c │ │ │ ├── test-wprintf.c │ │ │ ├── test-wscanf.c │ │ │ ├── test-wstring.cpp │ │ │ └── wprintf.inc │ │ ├── crystax-test-wchar-minmax/ │ │ │ ├── common.mk │ │ │ ├── host/ │ │ │ │ ├── .gitignore │ │ │ │ └── GNUmakefile │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── main.c │ │ ├── emm/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── emm.c │ │ │ └── test_config.py │ │ ├── exceptions-crash/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ ├── foo.cpp │ │ │ └── main.cpp │ │ ├── fenv/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── test_fenv.c │ │ │ └── test_config.py │ │ ├── gnustl-shared-1/ │ │ │ ├── README │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ ├── foo.cpp │ │ │ └── main.cpp │ │ ├── issue19851-sigsetjmp/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── issue19851-sigsetjmp.c │ │ │ └── test_config.py │ │ ├── issue20176-__gnu_Unwind_Find_exidx/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── issue20176-__gnu_Unwind_Find_exidx.cpp │ │ │ └── test_config.py │ │ ├── issue22165-typeinfo/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ ├── main.cpp │ │ │ ├── myexception.h │ │ │ ├── throwable.cpp │ │ │ └── throwable.h │ │ ├── issue28598-linker-global-ref/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ ├── liba.cpp │ │ │ ├── liba.h │ │ │ └── main.cpp │ │ ├── issue35933-lambda/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── issue35933-lambda.cpp │ │ ├── issue39680-chrono-resolution/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── issue39680-chrono-resolution.cpp │ │ ├── issue42891-boost-1_52/ │ │ │ ├── COPYING │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ ├── boost/ │ │ │ │ │ └── boost/ │ │ │ │ │ ├── algorithm/ │ │ │ │ │ │ └── string/ │ │ │ │ │ │ ├── compare.hpp │ │ │ │ │ │ ├── concept.hpp │ │ │ │ │ │ ├── config.hpp │ │ │ │ │ │ ├── constants.hpp │ │ │ │ │ │ ├── detail/ │ │ │ │ │ │ │ ├── find_format.hpp │ │ │ │ │ │ │ ├── find_format_all.hpp │ │ │ │ │ │ │ ├── find_format_store.hpp │ │ │ │ │ │ │ ├── finder.hpp │ │ │ │ │ │ │ ├── formatter.hpp │ │ │ │ │ │ │ ├── replace_storage.hpp │ │ │ │ │ │ │ ├── sequence.hpp │ │ │ │ │ │ │ └── util.hpp │ │ │ │ │ │ ├── find_format.hpp │ │ │ │ │ │ ├── finder.hpp │ │ │ │ │ │ ├── formatter.hpp │ │ │ │ │ │ ├── replace.hpp │ │ │ │ │ │ ├── sequence_traits.hpp │ │ │ │ │ │ └── yes_no_type.hpp │ │ │ │ │ ├── aligned_storage.hpp │ │ │ │ │ ├── array.hpp │ │ │ │ │ ├── assert.hpp │ │ │ │ │ ├── bind/ │ │ │ │ │ │ ├── arg.hpp │ │ │ │ │ │ ├── bind.hpp │ │ │ │ │ │ ├── bind_cc.hpp │ │ │ │ │ │ ├── bind_mf2_cc.hpp │ │ │ │ │ │ ├── bind_mf_cc.hpp │ │ │ │ │ │ ├── bind_template.hpp │ │ │ │ │ │ ├── mem_fn.hpp │ │ │ │ │ │ ├── mem_fn_cc.hpp │ │ │ │ │ │ ├── mem_fn_template.hpp │ │ │ │ │ │ ├── placeholders.hpp │ │ │ │ │ │ └── storage.hpp │ │ │ │ │ ├── bind.hpp │ │ │ │ │ ├── call_traits.hpp │ │ │ │ │ ├── checked_delete.hpp │ │ │ │ │ ├── concept/ │ │ │ │ │ │ ├── assert.hpp │ │ │ │ │ │ ├── detail/ │ │ │ │ │ │ │ ├── backward_compatibility.hpp │ │ │ │ │ │ │ ├── concept_def.hpp │ │ │ │ │ │ │ ├── concept_undef.hpp │ │ │ │ │ │ │ ├── general.hpp │ │ │ │ │ │ │ └── has_constraints.hpp │ │ │ │ │ │ └── usage.hpp │ │ │ │ │ ├── concept_check.hpp │ │ │ │ │ ├── config/ │ │ │ │ │ │ ├── compiler/ │ │ │ │ │ │ │ ├── clang.hpp │ │ │ │ │ │ │ └── gcc.hpp │ │ │ │ │ │ ├── no_tr1/ │ │ │ │ │ │ │ ├── cmath.hpp │ │ │ │ │ │ │ ├── complex.hpp │ │ │ │ │ │ │ ├── memory.hpp │ │ │ │ │ │ │ └── utility.hpp │ │ │ │ │ │ ├── platform/ │ │ │ │ │ │ │ └── linux.hpp │ │ │ │ │ │ ├── posix_features.hpp │ │ │ │ │ │ ├── select_compiler_config.hpp │ │ │ │ │ │ ├── select_platform_config.hpp │ │ │ │ │ │ ├── select_stdlib_config.hpp │ │ │ │ │ │ ├── stdlib/ │ │ │ │ │ │ │ └── libstdcpp3.hpp │ │ │ │ │ │ ├── suffix.hpp │ │ │ │ │ │ └── user.hpp │ │ │ │ │ ├── config.hpp │ │ │ │ │ ├── container/ │ │ │ │ │ │ └── container_fwd.hpp │ │ │ │ │ ├── cstdint.hpp │ │ │ │ │ ├── cstdlib.hpp │ │ │ │ │ ├── current_function.hpp │ │ │ │ │ ├── detail/ │ │ │ │ │ │ ├── binary_search.hpp │ │ │ │ │ │ ├── call_traits.hpp │ │ │ │ │ │ ├── endian.hpp │ │ │ │ │ │ ├── fenv.hpp │ │ │ │ │ │ ├── indirect_traits.hpp │ │ │ │ │ │ ├── iterator.hpp │ │ │ │ │ │ ├── lcast_precision.hpp │ │ │ │ │ │ ├── reference_content.hpp │ │ │ │ │ │ ├── sp_typeinfo.hpp │ │ │ │ │ │ └── workaround.hpp │ │ │ │ │ ├── exception/ │ │ │ │ │ │ ├── current_exception_cast.hpp │ │ │ │ │ │ ├── detail/ │ │ │ │ │ │ │ ├── attribute_noreturn.hpp │ │ │ │ │ │ │ ├── error_info_impl.hpp │ │ │ │ │ │ │ └── type_info.hpp │ │ │ │ │ │ ├── exception.hpp │ │ │ │ │ │ └── get_error_info.hpp │ │ │ │ │ ├── functional/ │ │ │ │ │ │ ├── hash/ │ │ │ │ │ │ │ └── hash_fwd.hpp │ │ │ │ │ │ └── hash_fwd.hpp │ │ │ │ │ ├── get_pointer.hpp │ │ │ │ │ ├── integer_traits.hpp │ │ │ │ │ ├── io/ │ │ │ │ │ │ └── ios_state.hpp │ │ │ │ │ ├── io_fwd.hpp │ │ │ │ │ ├── is_placeholder.hpp │ │ │ │ │ ├── iterator/ │ │ │ │ │ │ ├── detail/ │ │ │ │ │ │ │ ├── config_def.hpp │ │ │ │ │ │ │ ├── config_undef.hpp │ │ │ │ │ │ │ ├── enable_if.hpp │ │ │ │ │ │ │ └── facade_iterator_category.hpp │ │ │ │ │ │ ├── interoperable.hpp │ │ │ │ │ │ ├── iterator_adaptor.hpp │ │ │ │ │ │ ├── iterator_categories.hpp │ │ │ │ │ │ ├── iterator_concepts.hpp │ │ │ │ │ │ ├── iterator_facade.hpp │ │ │ │ │ │ ├── iterator_traits.hpp │ │ │ │ │ │ └── reverse_iterator.hpp │ │ │ │ │ ├── iterator.hpp │ │ │ │ │ ├── lexical_cast.hpp │ │ │ │ │ ├── limits.hpp │ │ │ │ │ ├── math/ │ │ │ │ │ │ ├── policies/ │ │ │ │ │ │ │ └── policy.hpp │ │ │ │ │ │ ├── special_functions/ │ │ │ │ │ │ │ ├── detail/ │ │ │ │ │ │ │ │ ├── fp_traits.hpp │ │ │ │ │ │ │ │ └── round_fwd.hpp │ │ │ │ │ │ │ ├── fpclassify.hpp │ │ │ │ │ │ │ ├── math_fwd.hpp │ │ │ │ │ │ │ └── sign.hpp │ │ │ │ │ │ └── tools/ │ │ │ │ │ │ ├── config.hpp │ │ │ │ │ │ ├── promotion.hpp │ │ │ │ │ │ ├── real_cast.hpp │ │ │ │ │ │ └── user.hpp │ │ │ │ │ ├── mem_fn.hpp │ │ │ │ │ ├── memory_order.hpp │ │ │ │ │ ├── mpl/ │ │ │ │ │ │ ├── O1_size.hpp │ │ │ │ │ │ ├── O1_size_fwd.hpp │ │ │ │ │ │ ├── advance.hpp │ │ │ │ │ │ ├── advance_fwd.hpp │ │ │ │ │ │ ├── always.hpp │ │ │ │ │ │ ├── and.hpp │ │ │ │ │ │ ├── apply.hpp │ │ │ │ │ │ ├── apply_fwd.hpp │ │ │ │ │ │ ├── apply_wrap.hpp │ │ │ │ │ │ ├── arg.hpp │ │ │ │ │ │ ├── arg_fwd.hpp │ │ │ │ │ │ ├── assert.hpp │ │ │ │ │ │ ├── at.hpp │ │ │ │ │ │ ├── at_fwd.hpp │ │ │ │ │ │ ├── aux_/ │ │ │ │ │ │ │ ├── O1_size_impl.hpp │ │ │ │ │ │ │ ├── adl_barrier.hpp │ │ │ │ │ │ │ ├── advance_backward.hpp │ │ │ │ │ │ │ ├── advance_forward.hpp │ │ │ │ │ │ │ ├── arg_typedef.hpp │ │ │ │ │ │ │ ├── arithmetic_op.hpp │ │ │ │ │ │ │ ├── arity.hpp │ │ │ │ │ │ │ ├── arity_spec.hpp │ │ │ │ │ │ │ ├── at_impl.hpp │ │ │ │ │ │ │ ├── begin_end_impl.hpp │ │ │ │ │ │ │ ├── clear_impl.hpp │ │ │ │ │ │ │ ├── common_name_wknd.hpp │ │ │ │ │ │ │ ├── comparison_op.hpp │ │ │ │ │ │ │ ├── config/ │ │ │ │ │ │ │ │ ├── adl.hpp │ │ │ │ │ │ │ │ ├── arrays.hpp │ │ │ │ │ │ │ │ ├── bcc.hpp │ │ │ │ │ │ │ │ ├── bind.hpp │ │ │ │ │ │ │ │ ├── compiler.hpp │ │ │ │ │ │ │ │ ├── ctps.hpp │ │ │ │ │ │ │ │ ├── dtp.hpp │ │ │ │ │ │ │ │ ├── eti.hpp │ │ │ │ │ │ │ │ ├── forwarding.hpp │ │ │ │ │ │ │ │ ├── gcc.hpp │ │ │ │ │ │ │ │ ├── has_apply.hpp │ │ │ │ │ │ │ │ ├── has_xxx.hpp │ │ │ │ │ │ │ │ ├── integral.hpp │ │ │ │ │ │ │ │ ├── intel.hpp │ │ │ │ │ │ │ │ ├── lambda.hpp │ │ │ │ │ │ │ │ ├── msvc.hpp │ │ │ │ │ │ │ │ ├── msvc_typename.hpp │ │ │ │ │ │ │ │ ├── nttp.hpp │ │ │ │ │ │ │ │ ├── overload_resolution.hpp │ │ │ │ │ │ │ │ ├── pp_counter.hpp │ │ │ │ │ │ │ │ ├── preprocessor.hpp │ │ │ │ │ │ │ │ ├── static_constant.hpp │ │ │ │ │ │ │ │ ├── ttp.hpp │ │ │ │ │ │ │ │ ├── typeof.hpp │ │ │ │ │ │ │ │ ├── use_preprocessed.hpp │ │ │ │ │ │ │ │ └── workaround.hpp │ │ │ │ │ │ │ ├── contains_impl.hpp │ │ │ │ │ │ │ ├── find_if_pred.hpp │ │ │ │ │ │ │ ├── fold_impl.hpp │ │ │ │ │ │ │ ├── full_lambda.hpp │ │ │ │ │ │ │ ├── has_apply.hpp │ │ │ │ │ │ │ ├── has_begin.hpp │ │ │ │ │ │ │ ├── has_size.hpp │ │ │ │ │ │ │ ├── has_tag.hpp │ │ │ │ │ │ │ ├── has_type.hpp │ │ │ │ │ │ │ ├── include_preprocessed.hpp │ │ │ │ │ │ │ ├── inserter_algorithm.hpp │ │ │ │ │ │ │ ├── integral_wrapper.hpp │ │ │ │ │ │ │ ├── is_msvc_eti_arg.hpp │ │ │ │ │ │ │ ├── iter_apply.hpp │ │ │ │ │ │ │ ├── iter_fold_if_impl.hpp │ │ │ │ │ │ │ ├── iter_fold_impl.hpp │ │ │ │ │ │ │ ├── lambda_arity_param.hpp │ │ │ │ │ │ │ ├── lambda_spec.hpp │ │ │ │ │ │ │ ├── lambda_support.hpp │ │ │ │ │ │ │ ├── largest_int.hpp │ │ │ │ │ │ │ ├── msvc_eti_base.hpp │ │ │ │ │ │ │ ├── msvc_never_true.hpp │ │ │ │ │ │ │ ├── msvc_type.hpp │ │ │ │ │ │ │ ├── na.hpp │ │ │ │ │ │ │ ├── na_assert.hpp │ │ │ │ │ │ │ ├── na_fwd.hpp │ │ │ │ │ │ │ ├── na_spec.hpp │ │ │ │ │ │ │ ├── nested_type_wknd.hpp │ │ │ │ │ │ │ ├── nttp_decl.hpp │ │ │ │ │ │ │ ├── numeric_cast_utils.hpp │ │ │ │ │ │ │ ├── numeric_op.hpp │ │ │ │ │ │ │ ├── preprocessed/ │ │ │ │ │ │ │ │ └── gcc/ │ │ │ │ │ │ │ │ ├── advance_backward.hpp │ │ │ │ │ │ │ │ ├── advance_forward.hpp │ │ │ │ │ │ │ │ ├── and.hpp │ │ │ │ │ │ │ │ ├── apply.hpp │ │ │ │ │ │ │ │ ├── apply_fwd.hpp │ │ │ │ │ │ │ │ ├── apply_wrap.hpp │ │ │ │ │ │ │ │ ├── arg.hpp │ │ │ │ │ │ │ │ ├── bind.hpp │ │ │ │ │ │ │ │ ├── bind_fwd.hpp │ │ │ │ │ │ │ │ ├── equal_to.hpp │ │ │ │ │ │ │ │ ├── fold_impl.hpp │ │ │ │ │ │ │ │ ├── full_lambda.hpp │ │ │ │ │ │ │ │ ├── greater.hpp │ │ │ │ │ │ │ │ ├── greater_equal.hpp │ │ │ │ │ │ │ │ ├── iter_fold_if_impl.hpp │ │ │ │ │ │ │ │ ├── iter_fold_impl.hpp │ │ │ │ │ │ │ │ ├── less.hpp │ │ │ │ │ │ │ │ ├── less_equal.hpp │ │ │ │ │ │ │ │ ├── list.hpp │ │ │ │ │ │ │ │ ├── minus.hpp │ │ │ │ │ │ │ │ ├── not_equal_to.hpp │ │ │ │ │ │ │ │ ├── or.hpp │ │ │ │ │ │ │ │ ├── placeholders.hpp │ │ │ │ │ │ │ │ ├── plus.hpp │ │ │ │ │ │ │ │ ├── quote.hpp │ │ │ │ │ │ │ │ ├── reverse_fold_impl.hpp │ │ │ │ │ │ │ │ ├── template_arity.hpp │ │ │ │ │ │ │ │ ├── times.hpp │ │ │ │ │ │ │ │ └── vector.hpp │ │ │ │ │ │ │ ├── preprocessor/ │ │ │ │ │ │ │ │ ├── def_params_tail.hpp │ │ │ │ │ │ │ │ ├── default_params.hpp │ │ │ │ │ │ │ │ ├── enum.hpp │ │ │ │ │ │ │ │ └── params.hpp │ │ │ │ │ │ │ ├── push_back_impl.hpp │ │ │ │ │ │ │ ├── push_front_impl.hpp │ │ │ │ │ │ │ ├── reverse_fold_impl.hpp │ │ │ │ │ │ │ ├── size_impl.hpp │ │ │ │ │ │ │ ├── static_cast.hpp │ │ │ │ │ │ │ ├── template_arity.hpp │ │ │ │ │ │ │ ├── template_arity_fwd.hpp │ │ │ │ │ │ │ ├── traits_lambda_spec.hpp │ │ │ │ │ │ │ ├── type_wrapper.hpp │ │ │ │ │ │ │ ├── unwrap.hpp │ │ │ │ │ │ │ ├── value_wknd.hpp │ │ │ │ │ │ │ └── yes_no.hpp │ │ │ │ │ │ ├── back_fwd.hpp │ │ │ │ │ │ ├── back_inserter.hpp │ │ │ │ │ │ ├── begin_end.hpp │ │ │ │ │ │ ├── begin_end_fwd.hpp │ │ │ │ │ │ ├── bind.hpp │ │ │ │ │ │ ├── bind_fwd.hpp │ │ │ │ │ │ ├── bool.hpp │ │ │ │ │ │ ├── bool_fwd.hpp │ │ │ │ │ │ ├── clear.hpp │ │ │ │ │ │ ├── clear_fwd.hpp │ │ │ │ │ │ ├── comparison.hpp │ │ │ │ │ │ ├── contains.hpp │ │ │ │ │ │ ├── contains_fwd.hpp │ │ │ │ │ │ ├── deref.hpp │ │ │ │ │ │ ├── distance.hpp │ │ │ │ │ │ ├── distance_fwd.hpp │ │ │ │ │ │ ├── empty_fwd.hpp │ │ │ │ │ │ ├── equal_to.hpp │ │ │ │ │ │ ├── eval_if.hpp │ │ │ │ │ │ ├── find.hpp │ │ │ │ │ │ ├── find_if.hpp │ │ │ │ │ │ ├── fold.hpp │ │ │ │ │ │ ├── for_each.hpp │ │ │ │ │ │ ├── front_fwd.hpp │ │ │ │ │ │ ├── front_inserter.hpp │ │ │ │ │ │ ├── greater.hpp │ │ │ │ │ │ ├── greater_equal.hpp │ │ │ │ │ │ ├── has_xxx.hpp │ │ │ │ │ │ ├── identity.hpp │ │ │ │ │ │ ├── if.hpp │ │ │ │ │ │ ├── inserter.hpp │ │ │ │ │ │ ├── int.hpp │ │ │ │ │ │ ├── int_fwd.hpp │ │ │ │ │ │ ├── integral_c.hpp │ │ │ │ │ │ ├── integral_c_fwd.hpp │ │ │ │ │ │ ├── integral_c_tag.hpp │ │ │ │ │ │ ├── is_sequence.hpp │ │ │ │ │ │ ├── iter_fold.hpp │ │ │ │ │ │ ├── iter_fold_if.hpp │ │ │ │ │ │ ├── iterator_range.hpp │ │ │ │ │ │ ├── iterator_tags.hpp │ │ │ │ │ │ ├── lambda.hpp │ │ │ │ │ │ ├── lambda_fwd.hpp │ │ │ │ │ │ ├── less.hpp │ │ │ │ │ │ ├── less_equal.hpp │ │ │ │ │ │ ├── limits/ │ │ │ │ │ │ │ ├── arity.hpp │ │ │ │ │ │ │ ├── list.hpp │ │ │ │ │ │ │ └── vector.hpp │ │ │ │ │ │ ├── list/ │ │ │ │ │ │ │ ├── aux_/ │ │ │ │ │ │ │ │ ├── O1_size.hpp │ │ │ │ │ │ │ │ ├── begin_end.hpp │ │ │ │ │ │ │ │ ├── clear.hpp │ │ │ │ │ │ │ │ ├── empty.hpp │ │ │ │ │ │ │ │ ├── front.hpp │ │ │ │ │ │ │ │ ├── include_preprocessed.hpp │ │ │ │ │ │ │ │ ├── item.hpp │ │ │ │ │ │ │ │ ├── iterator.hpp │ │ │ │ │ │ │ │ ├── pop_front.hpp │ │ │ │ │ │ │ │ ├── preprocessed/ │ │ │ │ │ │ │ │ │ └── plain/ │ │ │ │ │ │ │ │ │ ├── list10.hpp │ │ │ │ │ │ │ │ │ └── list20.hpp │ │ │ │ │ │ │ │ ├── push_back.hpp │ │ │ │ │ │ │ │ ├── push_front.hpp │ │ │ │ │ │ │ │ ├── size.hpp │ │ │ │ │ │ │ │ └── tag.hpp │ │ │ │ │ │ │ ├── list0.hpp │ │ │ │ │ │ │ ├── list10.hpp │ │ │ │ │ │ │ └── list20.hpp │ │ │ │ │ │ ├── list.hpp │ │ │ │ │ │ ├── logical.hpp │ │ │ │ │ │ ├── long.hpp │ │ │ │ │ │ ├── long_fwd.hpp │ │ │ │ │ │ ├── minus.hpp │ │ │ │ │ │ ├── multiplies.hpp │ │ │ │ │ │ ├── negate.hpp │ │ │ │ │ │ ├── next.hpp │ │ │ │ │ │ ├── next_prior.hpp │ │ │ │ │ │ ├── not.hpp │ │ │ │ │ │ ├── not_equal_to.hpp │ │ │ │ │ │ ├── numeric_cast.hpp │ │ │ │ │ │ ├── or.hpp │ │ │ │ │ │ ├── pair.hpp │ │ │ │ │ │ ├── placeholders.hpp │ │ │ │ │ │ ├── plus.hpp │ │ │ │ │ │ ├── pop_back_fwd.hpp │ │ │ │ │ │ ├── pop_front_fwd.hpp │ │ │ │ │ │ ├── prior.hpp │ │ │ │ │ │ ├── protect.hpp │ │ │ │ │ │ ├── push_back.hpp │ │ │ │ │ │ ├── push_back_fwd.hpp │ │ │ │ │ │ ├── push_front.hpp │ │ │ │ │ │ ├── push_front_fwd.hpp │ │ │ │ │ │ ├── quote.hpp │ │ │ │ │ │ ├── remove_if.hpp │ │ │ │ │ │ ├── reverse_fold.hpp │ │ │ │ │ │ ├── same_as.hpp │ │ │ │ │ │ ├── sequence_tag.hpp │ │ │ │ │ │ ├── sequence_tag_fwd.hpp │ │ │ │ │ │ ├── size.hpp │ │ │ │ │ │ ├── size_fwd.hpp │ │ │ │ │ │ ├── size_t.hpp │ │ │ │ │ │ ├── size_t_fwd.hpp │ │ │ │ │ │ ├── tag.hpp │ │ │ │ │ │ ├── times.hpp │ │ │ │ │ │ ├── vector/ │ │ │ │ │ │ │ ├── aux_/ │ │ │ │ │ │ │ │ ├── O1_size.hpp │ │ │ │ │ │ │ │ ├── at.hpp │ │ │ │ │ │ │ │ ├── back.hpp │ │ │ │ │ │ │ │ ├── begin_end.hpp │ │ │ │ │ │ │ │ ├── clear.hpp │ │ │ │ │ │ │ │ ├── empty.hpp │ │ │ │ │ │ │ │ ├── front.hpp │ │ │ │ │ │ │ │ ├── include_preprocessed.hpp │ │ │ │ │ │ │ │ ├── item.hpp │ │ │ │ │ │ │ │ ├── iterator.hpp │ │ │ │ │ │ │ │ ├── pop_back.hpp │ │ │ │ │ │ │ │ ├── pop_front.hpp │ │ │ │ │ │ │ │ ├── preprocessed/ │ │ │ │ │ │ │ │ │ └── typeof_based/ │ │ │ │ │ │ │ │ │ ├── vector10.hpp │ │ │ │ │ │ │ │ │ └── vector20.hpp │ │ │ │ │ │ │ │ ├── push_back.hpp │ │ │ │ │ │ │ │ ├── push_front.hpp │ │ │ │ │ │ │ │ ├── size.hpp │ │ │ │ │ │ │ │ ├── tag.hpp │ │ │ │ │ │ │ │ └── vector0.hpp │ │ │ │ │ │ │ ├── vector0.hpp │ │ │ │ │ │ │ ├── vector10.hpp │ │ │ │ │ │ │ └── vector20.hpp │ │ │ │ │ │ ├── vector.hpp │ │ │ │ │ │ ├── void.hpp │ │ │ │ │ │ └── void_fwd.hpp │ │ │ │ │ ├── next_prior.hpp │ │ │ │ │ ├── noncopyable.hpp │ │ │ │ │ ├── none.hpp │ │ │ │ │ ├── none_t.hpp │ │ │ │ │ ├── numeric/ │ │ │ │ │ │ └── conversion/ │ │ │ │ │ │ ├── bounds.hpp │ │ │ │ │ │ ├── cast.hpp │ │ │ │ │ │ ├── conversion_traits.hpp │ │ │ │ │ │ ├── converter.hpp │ │ │ │ │ │ ├── converter_policies.hpp │ │ │ │ │ │ ├── detail/ │ │ │ │ │ │ │ ├── bounds.hpp │ │ │ │ │ │ │ ├── conversion_traits.hpp │ │ │ │ │ │ │ ├── converter.hpp │ │ │ │ │ │ │ ├── int_float_mixture.hpp │ │ │ │ │ │ │ ├── is_subranged.hpp │ │ │ │ │ │ │ ├── meta.hpp │ │ │ │ │ │ │ ├── numeric_cast_traits.hpp │ │ │ │ │ │ │ ├── preprocessed/ │ │ │ │ │ │ │ │ ├── numeric_cast_traits_common.hpp │ │ │ │ │ │ │ │ └── numeric_cast_traits_long_long.hpp │ │ │ │ │ │ │ ├── sign_mixture.hpp │ │ │ │ │ │ │ └── udt_builtin_mixture.hpp │ │ │ │ │ │ ├── int_float_mixture_enum.hpp │ │ │ │ │ │ ├── numeric_cast_traits.hpp │ │ │ │ │ │ ├── sign_mixture_enum.hpp │ │ │ │ │ │ └── udt_builtin_mixture_enum.hpp │ │ │ │ │ ├── optional/ │ │ │ │ │ │ ├── optional.hpp │ │ │ │ │ │ └── optional_fwd.hpp │ │ │ │ │ ├── optional.hpp │ │ │ │ │ ├── preprocessor/ │ │ │ │ │ │ ├── arithmetic/ │ │ │ │ │ │ │ ├── add.hpp │ │ │ │ │ │ │ ├── dec.hpp │ │ │ │ │ │ │ ├── detail/ │ │ │ │ │ │ │ │ └── div_base.hpp │ │ │ │ │ │ │ ├── inc.hpp │ │ │ │ │ │ │ ├── mod.hpp │ │ │ │ │ │ │ └── sub.hpp │ │ │ │ │ │ ├── array/ │ │ │ │ │ │ │ ├── data.hpp │ │ │ │ │ │ │ ├── elem.hpp │ │ │ │ │ │ │ └── size.hpp │ │ │ │ │ │ ├── cat.hpp │ │ │ │ │ │ ├── comma_if.hpp │ │ │ │ │ │ ├── comparison/ │ │ │ │ │ │ │ └── less_equal.hpp │ │ │ │ │ │ ├── config/ │ │ │ │ │ │ │ └── config.hpp │ │ │ │ │ │ ├── control/ │ │ │ │ │ │ │ ├── deduce_d.hpp │ │ │ │ │ │ │ ├── detail/ │ │ │ │ │ │ │ │ └── while.hpp │ │ │ │ │ │ │ ├── expr_iif.hpp │ │ │ │ │ │ │ ├── if.hpp │ │ │ │ │ │ │ ├── iif.hpp │ │ │ │ │ │ │ └── while.hpp │ │ │ │ │ │ ├── debug/ │ │ │ │ │ │ │ └── error.hpp │ │ │ │ │ │ ├── detail/ │ │ │ │ │ │ │ ├── auto_rec.hpp │ │ │ │ │ │ │ ├── check.hpp │ │ │ │ │ │ │ └── is_binary.hpp │ │ │ │ │ │ ├── empty.hpp │ │ │ │ │ │ ├── facilities/ │ │ │ │ │ │ │ ├── empty.hpp │ │ │ │ │ │ │ ├── identity.hpp │ │ │ │ │ │ │ └── overload.hpp │ │ │ │ │ │ ├── identity.hpp │ │ │ │ │ │ ├── inc.hpp │ │ │ │ │ │ ├── iteration/ │ │ │ │ │ │ │ ├── detail/ │ │ │ │ │ │ │ │ ├── bounds/ │ │ │ │ │ │ │ │ │ ├── lower1.hpp │ │ │ │ │ │ │ │ │ └── upper1.hpp │ │ │ │ │ │ │ │ └── iter/ │ │ │ │ │ │ │ │ └── forward1.hpp │ │ │ │ │ │ │ └── iterate.hpp │ │ │ │ │ │ ├── list/ │ │ │ │ │ │ │ ├── adt.hpp │ │ │ │ │ │ │ ├── append.hpp │ │ │ │ │ │ │ ├── detail/ │ │ │ │ │ │ │ │ ├── fold_left.hpp │ │ │ │ │ │ │ │ └── fold_right.hpp │ │ │ │ │ │ │ ├── fold_left.hpp │ │ │ │ │ │ │ ├── fold_right.hpp │ │ │ │ │ │ │ ├── for_each_i.hpp │ │ │ │ │ │ │ ├── reverse.hpp │ │ │ │ │ │ │ └── transform.hpp │ │ │ │ │ │ ├── logical/ │ │ │ │ │ │ │ ├── and.hpp │ │ │ │ │ │ │ ├── bitand.hpp │ │ │ │ │ │ │ ├── bool.hpp │ │ │ │ │ │ │ ├── compl.hpp │ │ │ │ │ │ │ └── not.hpp │ │ │ │ │ │ ├── punctuation/ │ │ │ │ │ │ │ ├── comma.hpp │ │ │ │ │ │ │ ├── comma_if.hpp │ │ │ │ │ │ │ └── paren.hpp │ │ │ │ │ │ ├── repeat.hpp │ │ │ │ │ │ ├── repetition/ │ │ │ │ │ │ │ ├── detail/ │ │ │ │ │ │ │ │ └── for.hpp │ │ │ │ │ │ │ ├── enum.hpp │ │ │ │ │ │ │ ├── enum_binary_params.hpp │ │ │ │ │ │ │ ├── enum_params.hpp │ │ │ │ │ │ │ ├── enum_trailing_params.hpp │ │ │ │ │ │ │ ├── for.hpp │ │ │ │ │ │ │ ├── repeat.hpp │ │ │ │ │ │ │ └── repeat_from_to.hpp │ │ │ │ │ │ ├── seq/ │ │ │ │ │ │ │ ├── cat.hpp │ │ │ │ │ │ │ ├── elem.hpp │ │ │ │ │ │ │ ├── enum.hpp │ │ │ │ │ │ │ ├── fold_left.hpp │ │ │ │ │ │ │ ├── for_each.hpp │ │ │ │ │ │ │ ├── for_each_i.hpp │ │ │ │ │ │ │ ├── seq.hpp │ │ │ │ │ │ │ ├── size.hpp │ │ │ │ │ │ │ └── transform.hpp │ │ │ │ │ │ ├── slot/ │ │ │ │ │ │ │ ├── detail/ │ │ │ │ │ │ │ │ ├── def.hpp │ │ │ │ │ │ │ │ └── shared.hpp │ │ │ │ │ │ │ └── slot.hpp │ │ │ │ │ │ ├── stringize.hpp │ │ │ │ │ │ ├── tuple/ │ │ │ │ │ │ │ ├── eat.hpp │ │ │ │ │ │ │ ├── elem.hpp │ │ │ │ │ │ │ ├── rem.hpp │ │ │ │ │ │ │ └── to_list.hpp │ │ │ │ │ │ └── variadic/ │ │ │ │ │ │ ├── elem.hpp │ │ │ │ │ │ └── size.hpp │ │ │ │ │ ├── progress.hpp │ │ │ │ │ ├── range/ │ │ │ │ │ │ ├── algorithm/ │ │ │ │ │ │ │ └── equal.hpp │ │ │ │ │ │ ├── as_literal.hpp │ │ │ │ │ │ ├── begin.hpp │ │ │ │ │ │ ├── concepts.hpp │ │ │ │ │ │ ├── config.hpp │ │ │ │ │ │ ├── const_iterator.hpp │ │ │ │ │ │ ├── detail/ │ │ │ │ │ │ │ ├── common.hpp │ │ │ │ │ │ │ ├── extract_optional_type.hpp │ │ │ │ │ │ │ ├── implementation_help.hpp │ │ │ │ │ │ │ ├── misc_concept.hpp │ │ │ │ │ │ │ ├── safe_bool.hpp │ │ │ │ │ │ │ ├── sfinae.hpp │ │ │ │ │ │ │ └── str_types.hpp │ │ │ │ │ │ ├── difference_type.hpp │ │ │ │ │ │ ├── distance.hpp │ │ │ │ │ │ ├── empty.hpp │ │ │ │ │ │ ├── end.hpp │ │ │ │ │ │ ├── functions.hpp │ │ │ │ │ │ ├── iterator.hpp │ │ │ │ │ │ ├── iterator_range.hpp │ │ │ │ │ │ ├── iterator_range_core.hpp │ │ │ │ │ │ ├── iterator_range_io.hpp │ │ │ │ │ │ ├── mutable_iterator.hpp │ │ │ │ │ │ ├── rbegin.hpp │ │ │ │ │ │ ├── rend.hpp │ │ │ │ │ │ ├── reverse_iterator.hpp │ │ │ │ │ │ ├── size.hpp │ │ │ │ │ │ ├── size_type.hpp │ │ │ │ │ │ └── value_type.hpp │ │ │ │ │ ├── ref.hpp │ │ │ │ │ ├── scoped_array.hpp │ │ │ │ │ ├── scoped_ptr.hpp │ │ │ │ │ ├── shared_array.hpp │ │ │ │ │ ├── shared_ptr.hpp │ │ │ │ │ ├── smart_ptr/ │ │ │ │ │ │ ├── bad_weak_ptr.hpp │ │ │ │ │ │ ├── detail/ │ │ │ │ │ │ │ ├── operator_bool.hpp │ │ │ │ │ │ │ ├── shared_count.hpp │ │ │ │ │ │ │ ├── sp_convertible.hpp │ │ │ │ │ │ │ ├── sp_counted_base.hpp │ │ │ │ │ │ │ ├── sp_counted_base_gcc_mips.hpp │ │ │ │ │ │ │ ├── sp_counted_base_gcc_x86.hpp │ │ │ │ │ │ │ ├── sp_counted_base_spin.hpp │ │ │ │ │ │ │ ├── sp_counted_impl.hpp │ │ │ │ │ │ │ ├── sp_has_sync.hpp │ │ │ │ │ │ │ ├── spinlock.hpp │ │ │ │ │ │ │ ├── spinlock_pool.hpp │ │ │ │ │ │ │ ├── spinlock_pt.hpp │ │ │ │ │ │ │ ├── spinlock_sync.hpp │ │ │ │ │ │ │ └── yield_k.hpp │ │ │ │ │ │ ├── scoped_array.hpp │ │ │ │ │ │ ├── scoped_ptr.hpp │ │ │ │ │ │ ├── shared_array.hpp │ │ │ │ │ │ └── shared_ptr.hpp │ │ │ │ │ ├── static_assert.hpp │ │ │ │ │ ├── swap.hpp │ │ │ │ │ ├── test/ │ │ │ │ │ │ ├── debug.hpp │ │ │ │ │ │ ├── debug_config.hpp │ │ │ │ │ │ ├── detail/ │ │ │ │ │ │ │ ├── config.hpp │ │ │ │ │ │ │ ├── enable_warnings.hpp │ │ │ │ │ │ │ ├── fwd_decl.hpp │ │ │ │ │ │ │ ├── global_typedef.hpp │ │ │ │ │ │ │ ├── log_level.hpp │ │ │ │ │ │ │ ├── suppress_warnings.hpp │ │ │ │ │ │ │ ├── unit_test_parameters.hpp │ │ │ │ │ │ │ └── workaround.hpp │ │ │ │ │ │ ├── execution_monitor.hpp │ │ │ │ │ │ ├── floating_point_comparison.hpp │ │ │ │ │ │ ├── framework.hpp │ │ │ │ │ │ ├── impl/ │ │ │ │ │ │ │ ├── compiler_log_formatter.ipp │ │ │ │ │ │ │ ├── debug.ipp │ │ │ │ │ │ │ ├── exception_safety.ipp │ │ │ │ │ │ │ ├── execution_monitor.ipp │ │ │ │ │ │ │ ├── framework.ipp │ │ │ │ │ │ │ ├── interaction_based.ipp │ │ │ │ │ │ │ ├── logged_expectations.ipp │ │ │ │ │ │ │ ├── plain_report_formatter.ipp │ │ │ │ │ │ │ ├── progress_monitor.ipp │ │ │ │ │ │ │ ├── results_collector.ipp │ │ │ │ │ │ │ ├── results_reporter.ipp │ │ │ │ │ │ │ ├── test_tools.ipp │ │ │ │ │ │ │ ├── unit_test_log.ipp │ │ │ │ │ │ │ ├── unit_test_main.ipp │ │ │ │ │ │ │ ├── unit_test_monitor.ipp │ │ │ │ │ │ │ ├── unit_test_parameters.ipp │ │ │ │ │ │ │ ├── unit_test_suite.ipp │ │ │ │ │ │ │ ├── xml_log_formatter.ipp │ │ │ │ │ │ │ └── xml_report_formatter.ipp │ │ │ │ │ │ ├── included/ │ │ │ │ │ │ │ └── unit_test.hpp │ │ │ │ │ │ ├── interaction_based.hpp │ │ │ │ │ │ ├── mock_object.hpp │ │ │ │ │ │ ├── output/ │ │ │ │ │ │ │ ├── compiler_log_formatter.hpp │ │ │ │ │ │ │ ├── plain_report_formatter.hpp │ │ │ │ │ │ │ ├── xml_log_formatter.hpp │ │ │ │ │ │ │ └── xml_report_formatter.hpp │ │ │ │ │ │ ├── output_test_stream.hpp │ │ │ │ │ │ ├── predicate_result.hpp │ │ │ │ │ │ ├── progress_monitor.hpp │ │ │ │ │ │ ├── results_collector.hpp │ │ │ │ │ │ ├── results_reporter.hpp │ │ │ │ │ │ ├── test_observer.hpp │ │ │ │ │ │ ├── test_tools.hpp │ │ │ │ │ │ ├── unit_test.hpp │ │ │ │ │ │ ├── unit_test_log.hpp │ │ │ │ │ │ ├── unit_test_log_formatter.hpp │ │ │ │ │ │ ├── unit_test_monitor.hpp │ │ │ │ │ │ ├── unit_test_suite.hpp │ │ │ │ │ │ ├── unit_test_suite_impl.hpp │ │ │ │ │ │ └── utils/ │ │ │ │ │ │ ├── algorithm.hpp │ │ │ │ │ │ ├── assign_op.hpp │ │ │ │ │ │ ├── basic_cstring/ │ │ │ │ │ │ │ ├── basic_cstring.hpp │ │ │ │ │ │ │ ├── basic_cstring_fwd.hpp │ │ │ │ │ │ │ ├── bcs_char_traits.hpp │ │ │ │ │ │ │ ├── compare.hpp │ │ │ │ │ │ │ └── io.hpp │ │ │ │ │ │ ├── callback.hpp │ │ │ │ │ │ ├── class_properties.hpp │ │ │ │ │ │ ├── custom_manip.hpp │ │ │ │ │ │ ├── fixed_mapping.hpp │ │ │ │ │ │ ├── foreach.hpp │ │ │ │ │ │ ├── iterator/ │ │ │ │ │ │ │ ├── input_iterator_facade.hpp │ │ │ │ │ │ │ └── token_iterator.hpp │ │ │ │ │ │ ├── lazy_ostream.hpp │ │ │ │ │ │ ├── named_params.hpp │ │ │ │ │ │ ├── rtti.hpp │ │ │ │ │ │ ├── runtime/ │ │ │ │ │ │ │ ├── argument.hpp │ │ │ │ │ │ │ ├── cla/ │ │ │ │ │ │ │ │ ├── argument_factory.hpp │ │ │ │ │ │ │ │ ├── argv_traverser.hpp │ │ │ │ │ │ │ │ ├── argv_traverser.ipp │ │ │ │ │ │ │ │ ├── basic_parameter.hpp │ │ │ │ │ │ │ │ ├── char_parameter.hpp │ │ │ │ │ │ │ │ ├── char_parameter.ipp │ │ │ │ │ │ │ │ ├── detail/ │ │ │ │ │ │ │ │ │ └── argument_value_usage.hpp │ │ │ │ │ │ │ │ ├── dual_name_parameter.hpp │ │ │ │ │ │ │ │ ├── dual_name_parameter.ipp │ │ │ │ │ │ │ │ ├── fwd.hpp │ │ │ │ │ │ │ │ ├── id_policy.hpp │ │ │ │ │ │ │ │ ├── id_policy.ipp │ │ │ │ │ │ │ │ ├── iface/ │ │ │ │ │ │ │ │ │ ├── argument_factory.hpp │ │ │ │ │ │ │ │ │ └── id_policy.hpp │ │ │ │ │ │ │ │ ├── modifier.hpp │ │ │ │ │ │ │ │ ├── named_parameter.hpp │ │ │ │ │ │ │ │ ├── named_parameter.ipp │ │ │ │ │ │ │ │ ├── parameter.hpp │ │ │ │ │ │ │ │ ├── parser.hpp │ │ │ │ │ │ │ │ ├── parser.ipp │ │ │ │ │ │ │ │ ├── typed_parameter.hpp │ │ │ │ │ │ │ │ ├── validation.hpp │ │ │ │ │ │ │ │ ├── validation.ipp │ │ │ │ │ │ │ │ ├── value_generator.hpp │ │ │ │ │ │ │ │ └── value_handler.hpp │ │ │ │ │ │ │ ├── config.hpp │ │ │ │ │ │ │ ├── env/ │ │ │ │ │ │ │ │ ├── environment.hpp │ │ │ │ │ │ │ │ ├── environment.ipp │ │ │ │ │ │ │ │ ├── fwd.hpp │ │ │ │ │ │ │ │ ├── modifier.hpp │ │ │ │ │ │ │ │ └── variable.hpp │ │ │ │ │ │ │ ├── fwd.hpp │ │ │ │ │ │ │ ├── interpret_argument_value.hpp │ │ │ │ │ │ │ ├── parameter.hpp │ │ │ │ │ │ │ ├── trace.hpp │ │ │ │ │ │ │ └── validation.hpp │ │ │ │ │ │ ├── trivial_singleton.hpp │ │ │ │ │ │ ├── wrap_stringstream.hpp │ │ │ │ │ │ └── xml_printer.hpp │ │ │ │ │ ├── throw_exception.hpp │ │ │ │ │ ├── timer.hpp │ │ │ │ │ ├── type.hpp │ │ │ │ │ ├── type_traits/ │ │ │ │ │ │ ├── add_const.hpp │ │ │ │ │ │ ├── add_cv.hpp │ │ │ │ │ │ ├── add_pointer.hpp │ │ │ │ │ │ ├── add_reference.hpp │ │ │ │ │ │ ├── add_rvalue_reference.hpp │ │ │ │ │ │ ├── add_volatile.hpp │ │ │ │ │ │ ├── alignment_of.hpp │ │ │ │ │ │ ├── broken_compiler_spec.hpp │ │ │ │ │ │ ├── config.hpp │ │ │ │ │ │ ├── conversion_traits.hpp │ │ │ │ │ │ ├── cv_traits.hpp │ │ │ │ │ │ ├── detail/ │ │ │ │ │ │ │ ├── bool_trait_def.hpp │ │ │ │ │ │ │ ├── bool_trait_undef.hpp │ │ │ │ │ │ │ ├── cv_traits_impl.hpp │ │ │ │ │ │ │ ├── false_result.hpp │ │ │ │ │ │ │ ├── ice_and.hpp │ │ │ │ │ │ │ ├── ice_eq.hpp │ │ │ │ │ │ │ ├── ice_not.hpp │ │ │ │ │ │ │ ├── ice_or.hpp │ │ │ │ │ │ │ ├── is_function_ptr_helper.hpp │ │ │ │ │ │ │ ├── is_mem_fun_pointer_impl.hpp │ │ │ │ │ │ │ ├── size_t_trait_def.hpp │ │ │ │ │ │ │ ├── size_t_trait_undef.hpp │ │ │ │ │ │ │ ├── template_arity_spec.hpp │ │ │ │ │ │ │ ├── type_trait_def.hpp │ │ │ │ │ │ │ ├── type_trait_undef.hpp │ │ │ │ │ │ │ └── yes_no_type.hpp │ │ │ │ │ │ ├── function_traits.hpp │ │ │ │ │ │ ├── has_nothrow_constructor.hpp │ │ │ │ │ │ ├── has_nothrow_copy.hpp │ │ │ │ │ │ ├── has_trivial_constructor.hpp │ │ │ │ │ │ ├── has_trivial_copy.hpp │ │ │ │ │ │ ├── ice.hpp │ │ │ │ │ │ ├── integral_constant.hpp │ │ │ │ │ │ ├── intrinsics.hpp │ │ │ │ │ │ ├── is_abstract.hpp │ │ │ │ │ │ ├── is_arithmetic.hpp │ │ │ │ │ │ ├── is_array.hpp │ │ │ │ │ │ ├── is_class.hpp │ │ │ │ │ │ ├── is_const.hpp │ │ │ │ │ │ ├── is_convertible.hpp │ │ │ │ │ │ ├── is_enum.hpp │ │ │ │ │ │ ├── is_float.hpp │ │ │ │ │ │ ├── is_floating_point.hpp │ │ │ │ │ │ ├── is_function.hpp │ │ │ │ │ │ ├── is_integral.hpp │ │ │ │ │ │ ├── is_lvalue_reference.hpp │ │ │ │ │ │ ├── is_member_function_pointer.hpp │ │ │ │ │ │ ├── is_member_pointer.hpp │ │ │ │ │ │ ├── is_pod.hpp │ │ │ │ │ │ ├── is_pointer.hpp │ │ │ │ │ │ ├── is_reference.hpp │ │ │ │ │ │ ├── is_rvalue_reference.hpp │ │ │ │ │ │ ├── is_same.hpp │ │ │ │ │ │ ├── is_scalar.hpp │ │ │ │ │ │ ├── is_signed.hpp │ │ │ │ │ │ ├── is_unsigned.hpp │ │ │ │ │ │ ├── is_void.hpp │ │ │ │ │ │ ├── is_volatile.hpp │ │ │ │ │ │ ├── make_unsigned.hpp │ │ │ │ │ │ ├── remove_const.hpp │ │ │ │ │ │ ├── remove_cv.hpp │ │ │ │ │ │ ├── remove_pointer.hpp │ │ │ │ │ │ ├── remove_reference.hpp │ │ │ │ │ │ ├── remove_volatile.hpp │ │ │ │ │ │ └── type_with_alignment.hpp │ │ │ │ │ ├── units/ │ │ │ │ │ │ └── detail/ │ │ │ │ │ │ └── utility.hpp │ │ │ │ │ ├── utility/ │ │ │ │ │ │ ├── addressof.hpp │ │ │ │ │ │ ├── base_from_member.hpp │ │ │ │ │ │ ├── binary.hpp │ │ │ │ │ │ ├── compare_pointees.hpp │ │ │ │ │ │ ├── detail/ │ │ │ │ │ │ │ ├── in_place_factory_prefix.hpp │ │ │ │ │ │ │ └── in_place_factory_suffix.hpp │ │ │ │ │ │ ├── enable_if.hpp │ │ │ │ │ │ ├── identity_type.hpp │ │ │ │ │ │ ├── in_place_factory.hpp │ │ │ │ │ │ ├── swap.hpp │ │ │ │ │ │ └── value_init.hpp │ │ │ │ │ ├── utility.hpp │ │ │ │ │ ├── version.hpp │ │ │ │ │ └── visit_each.hpp │ │ │ │ └── main.cpp │ │ │ └── test_config.py │ │ ├── issue46718-iostream-crash-gnustl/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── issue46718-iostream-crash.cpp │ │ ├── issue61659-neon-assignment/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── issue61659-neon-assignment.c │ │ │ └── test_config.py │ │ ├── issue62910-gcc4.8.2-libstdc++-nth-element-segfault/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── issue62910-gcc4.8.2-libstdc++-nth-element-segfault.cpp │ │ ├── libcxx-relocs/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ ├── bar.cpp │ │ │ │ └── foo.cpp │ │ │ └── properties.json │ │ ├── libcxx-unwind/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── foo.cpp │ │ │ └── test_config.py │ │ ├── math/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ ├── math.c │ │ │ │ └── math.cpp │ │ │ └── test_config.py │ │ ├── multi-static-instances/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── main.cpp │ │ ├── stat/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── stat.c │ │ ├── static-executable/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── main.cxx │ │ │ └── test_config.py │ │ ├── test-basic-exceptions/ │ │ │ ├── README │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── test_basic_exceptions.cpp │ │ ├── test-basic-rtti/ │ │ │ ├── README │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── test_basic_rtti.cpp │ │ ├── test-compiler-bug-1/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── main.c │ │ ├── test-cpufeatures/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ ├── test_android_setCpuArm_1.c │ │ │ ├── test_android_setCpu_1.c │ │ │ ├── test_android_setCpu_2.c │ │ │ ├── test_arm_idiv.c │ │ │ └── test_cpufeatures.c │ │ ├── test-cxx-init-array/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ ├── global_ctor.cpp │ │ │ ├── global_ctor.h │ │ │ └── test.cpp │ │ ├── test-gnustl-1/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── hello.cpp │ │ ├── test-gnustl-2/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── hello.cpp │ │ ├── test-gnustl-copy_vector_into_a_set/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── copy_vector_into_a_set.cpp │ │ ├── test-gnustl-full/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ └── Application.mk │ │ │ ├── properties.json │ │ │ ├── test_config.py │ │ │ └── unit/ │ │ │ ├── _template.cpp │ │ │ ├── accum_test.cpp │ │ │ ├── adj_test.cpp │ │ │ ├── advance_test.cpp │ │ │ ├── alg_test.cpp │ │ │ ├── algorithm_header_test.cpp │ │ │ ├── allocator_test.cpp │ │ │ ├── assert_header_test.c │ │ │ ├── bcompos_test.cpp │ │ │ ├── bind_test.cpp │ │ │ ├── binsert_test.cpp │ │ │ ├── bitset_header_test.cpp │ │ │ ├── bitset_test.cpp │ │ │ ├── bnegate_test.cpp │ │ │ ├── boost_check.cpp │ │ │ ├── bound_test.cpp │ │ │ ├── bsearch_test.cpp │ │ │ ├── bvector_test.cpp │ │ │ ├── c_limits_header_test.c │ │ │ ├── c_locale_header_test.c │ │ │ ├── cassert_header_test.cpp │ │ │ ├── cctype_header_test.cpp │ │ │ ├── cerrno_header_test.cpp │ │ │ ├── cfloat_header_test.cpp │ │ │ ├── ciso646_header_test.cpp │ │ │ ├── climits_header_test.cpp │ │ │ ├── clocale_header_test.cpp │ │ │ ├── cmath_header_test.cpp │ │ │ ├── cmath_test.cpp │ │ │ ├── codecvt_test.cpp │ │ │ ├── collate_facets_test.cpp │ │ │ ├── complete_digits.h │ │ │ ├── complex_header_test.cpp │ │ │ ├── config_test.cpp │ │ │ ├── copy_test.cpp │ │ │ ├── count_test.cpp │ │ │ ├── cppunit/ │ │ │ │ ├── cppunit_mini.h │ │ │ │ ├── cppunit_proxy.h │ │ │ │ ├── cppunit_timer.h │ │ │ │ ├── file_reporter.h │ │ │ │ └── test_main.cpp │ │ │ ├── csetjmp_header_test.cpp │ │ │ ├── csignal_header_test.cpp │ │ │ ├── cstdarg_header_test.cpp │ │ │ ├── cstddef_header_test.cpp │ │ │ ├── cstdio_header_test.cpp │ │ │ ├── cstdlib_header_test.cpp │ │ │ ├── cstring_header_test.cpp │ │ │ ├── cstring_test.cpp │ │ │ ├── ctime_header_test.cpp │ │ │ ├── ctype_facets_test.cpp │ │ │ ├── ctype_header_test.c │ │ │ ├── cwchar_header_test.cpp │ │ │ ├── cwctype_header_test.cpp │ │ │ ├── deque_header_test.cpp │ │ │ ├── deque_test.cpp │ │ │ ├── divides_test.cpp │ │ │ ├── epilog_test.cpp │ │ │ ├── equal_test.cpp │ │ │ ├── errno_header_test.c │ │ │ ├── exception_header_test.cpp │ │ │ ├── exception_test.cpp │ │ │ ├── fadapter.h │ │ │ ├── fib.h │ │ │ ├── fill_test.cpp │ │ │ ├── find_test.cpp │ │ │ ├── finsert_test.cpp │ │ │ ├── float_header_test.c │ │ │ ├── foreach_test.cpp │ │ │ ├── fstream_header_test.cpp │ │ │ ├── fstream_test.cpp │ │ │ ├── full_streambuf.h │ │ │ ├── func_test.cpp │ │ │ ├── functional_header_test.cpp │ │ │ ├── generator_test.cpp │ │ │ ├── greater_test.cpp │ │ │ ├── hash_test.cpp │ │ │ ├── heap_test.cpp │ │ │ ├── includes_test.cpp │ │ │ ├── innerprod_test.cpp │ │ │ ├── inplace_test.cpp │ │ │ ├── insert_test.cpp │ │ │ ├── ioiter_test.cpp │ │ │ ├── iomanip_header_test.cpp │ │ │ ├── ios_header_test.cpp │ │ │ ├── iosfwd_header_test.cpp │ │ │ ├── iostream_header_test.cpp │ │ │ ├── iostream_test.cpp │ │ │ ├── iota.h │ │ │ ├── iota_test.cpp │ │ │ ├── iso646_header_test.c │ │ │ ├── istmit_test.cpp │ │ │ ├── istream_header_test.cpp │ │ │ ├── iter_test.cpp │ │ │ ├── iterator_header_test.cpp │ │ │ ├── less_test.cpp │ │ │ ├── lexcmp_test.cpp │ │ │ ├── limits_header_test.cpp │ │ │ ├── limits_test.cpp │ │ │ ├── list_header_test.cpp │ │ │ ├── list_test.cpp │ │ │ ├── locale_header_test.cpp │ │ │ ├── locale_test.cpp │ │ │ ├── locale_test.h │ │ │ ├── logic_test.cpp │ │ │ ├── macro_checks.cpp │ │ │ ├── map_header_test.cpp │ │ │ ├── map_test.cpp │ │ │ ├── math_aux.h │ │ │ ├── math_header_test.c │ │ │ ├── max_test.cpp │ │ │ ├── memory_header_test.cpp │ │ │ ├── memory_test.cpp │ │ │ ├── merge_test.cpp │ │ │ ├── messages_facets_test.cpp │ │ │ ├── mfunptr_test.cpp │ │ │ ├── min_test.cpp │ │ │ ├── mismatch_test.cpp │ │ │ ├── modulus_test.cpp │ │ │ ├── money_facets_test.cpp │ │ │ ├── multiset_test.cpp │ │ │ ├── mvctor_declaration_test.cpp │ │ │ ├── mvctor_test.cpp │ │ │ ├── mvctor_test.h │ │ │ ├── mvctor_traits_test.cpp │ │ │ ├── neq_test.cpp │ │ │ ├── new_header_test.cpp │ │ │ ├── nthelm_test.cpp │ │ │ ├── num_facets_test.cpp │ │ │ ├── num_put_get_test.cpp │ │ │ ├── numeric_header_test.cpp │ │ │ ├── ostmit_test.cpp │ │ │ ├── ostream_header_test.cpp │ │ │ ├── pair_test.cpp │ │ │ ├── partial_test.cpp │ │ │ ├── partition_test.cpp │ │ │ ├── perm_test.cpp │ │ │ ├── plusminus_test.cpp │ │ │ ├── ptr2_test.cpp │ │ │ ├── ptrspec_test.cpp │ │ │ ├── queue_header_test.cpp │ │ │ ├── queue_test.cpp │ │ │ ├── rawriter_test.cpp │ │ │ ├── reference_wrapper_test.cpp │ │ │ ├── resolve_name.cpp │ │ │ ├── reviter_test.cpp │ │ │ ├── rm_cp_test.cpp │ │ │ ├── rndshf_test.cpp │ │ │ ├── rope_test.cpp │ │ │ ├── rotate_test.cpp │ │ │ ├── search_test.cpp │ │ │ ├── set_header_test.cpp │ │ │ ├── set_test.cpp │ │ │ ├── setdiff_test.cpp │ │ │ ├── setinter_test.cpp │ │ │ ├── setjmp_header_test.c │ │ │ ├── setjmp_header_test2.cpp │ │ │ ├── setunion_test.cpp │ │ │ ├── shared_ptr_test.cpp │ │ │ ├── signal_header_test.c │ │ │ ├── slist_test.cpp │ │ │ ├── sort_test.cpp │ │ │ ├── sstream_header_test.cpp │ │ │ ├── sstream_test.cpp │ │ │ ├── stack_allocator.h │ │ │ ├── stack_header_test.cpp │ │ │ ├── stack_test.cpp │ │ │ ├── stdarg_header_test.c │ │ │ ├── stddef_header_test.c │ │ │ ├── stdexcept_header_test.cpp │ │ │ ├── stdio_header_test.c │ │ │ ├── stdlib_header_test.c │ │ │ ├── stldbg_include.cpp │ │ │ ├── streambuf_header_test.cpp │ │ │ ├── string_header_test.c │ │ │ ├── string_header_test.cpp │ │ │ ├── string_test.cpp │ │ │ ├── strstream_buffer_read_test.cpp │ │ │ ├── strstream_header_test.cpp │ │ │ ├── strstream_test.cpp │ │ │ ├── swap_test.cpp │ │ │ ├── test_errno.cpp │ │ │ ├── time_facets_test.cpp │ │ │ ├── time_header_test.c │ │ │ ├── times_test.cpp │ │ │ ├── transform_test.cpp │ │ │ ├── type_traits_test.cpp │ │ │ ├── typeinfo_header_test.cpp │ │ │ ├── unary.h │ │ │ ├── unary_test.cpp │ │ │ ├── uninitialized_test.cpp │ │ │ ├── unique_test.cpp │ │ │ ├── unordered_test.cpp │ │ │ ├── utility_header_test.cpp │ │ │ ├── valarray_header_test.cpp │ │ │ ├── valarray_test.cpp │ │ │ ├── vector_header_test.cpp │ │ │ ├── vector_test.cpp │ │ │ ├── wchar_header_test.c │ │ │ └── wctype_header_test.c │ │ ├── test-gnustl_shared-exception/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ ├── test0_foo.cpp │ │ │ │ ├── test0_main.cpp │ │ │ │ ├── test1_foo.cpp │ │ │ │ ├── test1_main.cpp │ │ │ │ ├── test2_foo.cpp │ │ │ │ ├── test2_main.cpp │ │ │ │ ├── test3_bar.cpp │ │ │ │ ├── test3_foo.cpp │ │ │ │ ├── test3_main.cpp │ │ │ │ ├── test4_bar.cpp │ │ │ │ ├── test4_foo.cpp │ │ │ │ └── test4_main.cpp │ │ │ ├── properties.json │ │ │ └── test_config.py │ │ ├── test-gnustl_static-exception/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ ├── test0_foo.cpp │ │ │ ├── test0_main.cpp │ │ │ ├── test1_foo.cpp │ │ │ ├── test1_main.cpp │ │ │ ├── test2_foo.cpp │ │ │ ├── test2_main.cpp │ │ │ ├── test3_bar.cpp │ │ │ ├── test3_foo.cpp │ │ │ ├── test3_main.cpp │ │ │ ├── test4_bar.cpp │ │ │ ├── test4_foo.cpp │ │ │ └── test4_main.cpp │ │ ├── test-googletest-full/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ └── Application.mk │ │ │ └── properties.json │ │ ├── test-googletest-gnustl/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ └── Application.mk │ │ ├── test-libc++/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── test_1.cc │ │ │ └── test_config.py │ │ ├── test-libc++-shared/ │ │ │ └── jni/ │ │ │ ├── Android.mk │ │ │ ├── Application.mk │ │ │ └── test_1.cc │ │ ├── test-libc++-shared-full/ │ │ │ ├── DATA │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ └── Application.mk │ │ │ ├── properties.json │ │ │ └── test_config.py │ │ ├── test-libc++-static/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── test_1.cc │ │ │ └── test_config.py │ │ ├── test-libc++-static-full/ │ │ │ ├── DATA │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ └── Application.mk │ │ │ ├── properties.json │ │ │ └── test_config.py │ │ ├── test-openmp/ │ │ │ ├── common.mk │ │ │ ├── host/ │ │ │ │ ├── .gitignore │ │ │ │ ├── GNUmakefile │ │ │ │ └── test.mk │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ ├── fib.c │ │ │ │ ├── openmp.c │ │ │ │ └── openmp2.c │ │ │ ├── properties.json │ │ │ └── test_config.py │ │ ├── test-shaderc-gnustl/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── shaderc.cc │ │ │ ├── properties.json │ │ │ └── test_config.py │ │ ├── test-shaderc-libc++/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── shaderc.cc │ │ │ ├── properties.json │ │ │ └── test_config.py │ │ ├── test-vulkan/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── instance.cpp │ │ │ ├── properties.json │ │ │ └── test_config.py │ │ ├── test-wait/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── test_wait.c │ │ │ └── test_config.py │ │ ├── test-yasm/ │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ ├── print_hello.asm │ │ │ │ └── test-yasm.c │ │ │ └── test_config.py │ │ └── whole-static-libs/ │ │ └── jni/ │ │ ├── Android.mk │ │ ├── Application.mk │ │ ├── foo.c │ │ ├── foo2.c │ │ └── main.c │ ├── filters.py │ ├── lib/ │ │ ├── awk.rb │ │ ├── log.rb │ │ ├── mro.rb │ │ ├── project.rb │ │ ├── samples.rb │ │ ├── standalone.rb │ │ └── tests.rb │ ├── ndk.py │ ├── onhost-functions.mk │ ├── onhost.mk │ ├── prepare-buildbot-emulators.py │ ├── printers.py │ ├── run-all.py │ ├── run-boost-tests │ ├── run-ndk-tests │ ├── runners.py │ ├── standalone/ │ │ ├── basic-c-compile/ │ │ │ └── main.c │ │ ├── basic-cxx-compile/ │ │ │ └── main.cpp │ │ ├── basic-objc-compile/ │ │ │ └── main.m │ │ ├── basic-objcxx-compile/ │ │ │ └── main.mm │ │ ├── builtin-macros/ │ │ │ └── run.sh │ │ ├── init-fini-arrays/ │ │ │ ├── README │ │ │ ├── foo.cpp │ │ │ └── run.sh │ │ ├── libcrystax-c-linked/ │ │ │ └── main.c │ │ ├── libcrystax-cxx-linked/ │ │ │ └── main.cpp │ │ ├── run-all.sh │ │ ├── run-standalone-tests.rb │ │ └── run.sh │ ├── test_filters.py │ ├── tests.py │ ├── util.py │ └── validate.py └── tools/ ├── adbrunner └── deploy-posix-environment ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ *~ *.bak *.pyc *.swp .DS_Store .crew .tramp_history Thumbs.db local.properties build.xml platforms/ packages/ postpone/ sources/crystax/tests/ sources/crystax/vendor/ toolchains/ /ndk-stack* /ndk-depends* /host-tools/ prebuilt/android-arm/ prebuilt/android-arm64/ prebuilt/android-mips/ prebuilt/android-mips64/ prebuilt/android-x86/ prebuilt/android-x86_64/ prebuilt/linux-x86/ prebuilt/linux-x86_64/ prebuilt/darwin-x86/ prebuilt/darwin-x86_64/ prebuilt/windows/ prebuilt/windows-x86_64/ prebuilt/common/scan-build/ prebuilt/common/scan-view/ tests/abcc/prebuilts/ tests/device/crystax-test-big-switch/jni/main.c tests/device/crystax-test-big-switch/jni/switch.c ================================================ FILE: Android.mk ================================================ # Please try to keep this file empty by only including what is necessary to # build the Android platform. This is not the normal usage of the NDK. include ndk/sources/android/cpufeatures/Android.mk ================================================ FILE: BACKERS.md ================================================ # Bountysource Backers Thank you to everyone who backed our [Bountysource fundraiser](https://www.bountysource.com/teams/crystaxndk/fundraiser)! ### Your name in BACKERS.md. - pj - sword1024 ### Your name and URL in BACKERS.md. - 1bsyl (https://github.com/1bsyl) - Alex Besogonov (https://github.com/Cyberax) - Antony Polukhin (https://github.com/apolukhin) ### Anonymous Supporters There were also other people who didn't claim any level of reward but contributed to the fundraiser. Thank you all for the support! ================================================ FILE: CHANGELOG.md ================================================ Changelog ========= We've moved our bug tracker to GitHub: https://github.com/android-ndk/ndk/issues Clang ----- * **PSA: Everyone should be switching to Clang.** * Clang has been updated to 3.8svn (r243773, build 2481030). * Note that this is now a nearly pure upstream clang. * Also note that Clang packaged in the Windows 64 NDK is actually 32-bit. * Support for emulated TLS. * `__thread` is now supported by the compiler by emulating ELF TLS with pthread thread-specific data. * C++11 `thread_local` will work in some cases, but will not work for data with non-trivial destructors except when running on Marshmallow (android-23) or newer because those cases require support from libc. * Does not yet work with Aarch64 when TLS variables are accessed from a shared library. GCC --- * **GCC in the NDK is now deprecated.** * Time to start using Clang if you haven’t already. If you have problems with Clang, please file bugs! * The NDK will not be upgrading to 5.x, nor will we be accepting non-critical backports. * Maintenance for miscompiles and internal compiler errors in 4.9 will be handled on a case by case basis. * GCC 4.8 has been removed. All targets now use GCC 4.9. * Synchronized with `google/gcc-4_9` to r224707 (from r214835). NDK --- * The samples are no longer included in the NDK. They are instead available on [GitHub]. * The documentation is no longer included in the NDK. It is instead available on the [Android Developer website]. * Make ARM standalone toolchains default to arm7. * The old behavior can be restored by passing `-target armv5te-linux-androideabi`. * Use `-isystem` for platform includes. * Warnings caused by bionic will no longer break app builds. * Fixed segfault when throwing exceptions via gabi++ (see http://b.android.com/179410). * Change libc++’s inline namespace to `std::__ndk1` to prevent ODR issues with platform libc++. * Support for mips64r2 has been partially dropped. The rest will be dropped in the future. * All libc++ libraries are now built with libc++abi. * Bump default `APP_PLATFORM` to Gingerbread. * Expect support for Froyo and older to be dropped in a future release. * Updated gabi++ `_Unwind_Exception` struct for 64 bits. * cpufeatures: Detect SSE4.1 and SSE4.2 as well. * cpufeatures: Detect cpu features on x86\_64 as well. * Update libc++abi to upstream r231075. * Added native tracing API to android-23. * Added native multinetwork API to android-23. * `byteswap.h`, `endian.h`, `sys/procfs.h`, `sys/ucontext.h`, `sys/user.h`, and `uchar.h` have all been updated from ToT Bionic. * `sys/cdefs.h` has been synchronized across all API levels. * Support for `_WCHAR_IS_8BIT` has been removed. * Fixed `fegetenv` and `fesetenv` for arm * Fix end pointer size/alignment of `crtend_*` for mips64 and x86\_64 * Removed sed. * Removed mclinker. * Removed Perl. * Removed symbols which are not exported by the current platform libc/m/dl from all versions of NDK libc/m/dl * libc/m/dl provide versioned symbols starting with v21 * Added Vulkan headers and library to API level 24. Binutils -------- * Unified binutils source between Android and ChromiumOS. * For full details see https://android-review.googlesource.com/#/c/182865/. * Gold for aarch64 should now be much more reliable. Use `-fuse-ld=gold` at link time to use gold instead of bfd. The default will likely switch in the next release. * Good linking time improvement for huge binaries for Gold ARM backend (up to 50% linking time reduction for debuggable Chrome Browser). * New option: `--pic-veneer`. * The 32-bit Windows package no longer contains ld.gold. It is available in the 64-bit package. * Current gold no longer builds when targeting 32-bit Windows (causes internal compiler failures in mingw). GDB --- * gdb has been updated to version 7.10. * ndk-gdb has been removed in favor of ndk-gdb.py. * ndk-gdb.py has been significantly rewritten. * Performance should be somewhat better. * Error messages have been significantly improved. * Relative project paths should always work now. * Ctrl-C no longer kills the backgrounded gdbserver. * Improve Windows support. Yasm ---- * Yasm has been updated to version 1.3.0. Known Issues ------------ * This is not intended to be a comprehensive list of all outstanding bugs. * x86 ASAN does not currently work. See discussion on https://android-review.googlesource.com/#/c/186276/ * The combination of Clang, x86, `stlport_static`, and optimization levels higher than `-O0` causes test failures with `dynamic_cast`. See https://android-review.googlesource.com/#/c/185920 * Exception handling will often fail when using `c++_shared` on ARM32. The root cause is incompatibility between the LLVM unwinder used by libc++abi for ARM32 and libgcc. This is not a regression from r10e. [GitHub]: https://github.com/googlesamples/android-ndk [Android Developer website]: http://developer.android.com/ndk/index.html ================================================ FILE: CleanSpec.mk ================================================ # Copyright (C) 2007 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. # # If you don't need to do a full clean build but would like to touch # a file or delete some intermediate files, add a clean step to the end # of the list. These steps will only be run once, if they haven't been # run before. # # E.g.: # $(call add-clean-step, touch -c external/sqlite/sqlite3.h) # $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates) # # Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with # files that are missing or have been moved. # # Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory. # Use $(OUT_DIR) to refer to the "out" directory. # # If you need to re-do something that's already mentioned, just copy # the command and add it to the bottom of the list. E.g., if a change # that you made last week required touching a file and a change you # made today requires touching the same file, just copy the old # touch step and add it to the end of the list. # # ************************************************ # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST # ************************************************ # For example: #$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates) #$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates) #$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f) #$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*) # ************************************************ # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST # ************************************************ ================================================ FILE: OWNERS ================================================ danalbert enh jmgao # For questions rather than code review, send email to: # # android-ndk@google.com (Googlers only) # android-ndk@googlegroups.com (public) # # Ask on Stack Overflow: http://stackoverflow.com/questions/tagged/android-ndk. ================================================ FILE: README.md ================================================ Android Native Development Kit (NDK) ==================================== 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. Other Resources --------------- This doc gives a high level overview of the NDK's build, packaging, and test process. For other use cases, or more in depth documentation, refer to the following sources: * User documentation is available on the [Android Developer website]. * Adding a new NDK API or platform version? Check [Generating Sysroots]. * Working on Clang or GCC? See [Toolchains.md]. * Discussions related to the Android NDK happen on the [android-ndk Google Group]. * File bugs against the NDK at https://github.com/android-ndk/ndk/issues. [Android Developer website]: https://developer.android.com/ndk/index.html [android-ndk Google Group]: http://groups.google.com/group/android-ndk [Generating Sysroots]: docs/GeneratingSysroots.md [Toolchains.md]: docs/Toolchains.md Building 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. Components ---------- The NDK consists of three parts: host binaries, target prebuilts, and others (build system, docs, samples, tests). ### Host Binaries * `toolchains/` contains GCC and Clang 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_TAG` contains build dependencies and additional tools. * make, awk, python, yasm, and for Windows: cmp.exe and echo.exe * `ndk-depends`, `ndk-stack` and `ndk-gdb` can also be found here. ### Target Headers and Binaries * `platforms/android-$VERSION/arch-$ARCH_NAME/` contains headers and libraries for each API level. * The build system sets `--sysroot` to one of these directories based on user-specified `APP_ABI` and `APP_PLATFORM`. * `sources/cxx-stl/$STL` contains the headers and libraries for the various C++ STLs. * `prebuilt/android-$ARCH/gdbserver` contains gdbserver. ### Others * `build/` contains the ndk-build system and scripts to rebuild NDK. * `sources/android` and `sources/third_party` contain modules that can be used in apps (cpufeatures, native\_app\_glue, etc) via `$(call import-module, $MODULE)` * `tests/` Prerequisites ------------- * [AOSP NDK Repository](http://source.android.com/source/downloading.html) * Check out the branch `master-ndk` ```bash 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): * bison * flex * libtool * mingw-w64 * pbzip2 (optional, improves packaging times) * texinfo * python3 (used for Vulkan validation layer generation) * python-lxml (used for Vulkan validation layer generation) * Mac OS X also requires Xcode. Host/Target prebuilts --------------------- ### For Linux or Darwin: ```bash $ python checkbuild.py ``` ### For Windows, from Linux: ```bash $ python checkbuild.py --system windows # Or windows64. ``` `checkbuild.py` also accepts a variety of other options to speed up local builds, namely `--arch` and `--module`. Packaging --------- By default, `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. If you need to re-run just the packaging step without going through a build, packaging is handled by `build/tools/package.py`. Testing ------- Testing is discussed in [Testing.md](docs/Testing.md). ================================================ FILE: build/NOTICE ================================================ Copyright (C) 2016 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. ================================================ FILE: build/awk/check-awk.awk ================================================ # Copyright (C) 2010 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. # # This script is used to check that a given awk executable # implements the match() and substr() functions appropriately. # # These were introduced in nawk/gawk, but the original awk # does not have them. # BEGIN { RSTART=0 RLENGTH=0 s1="A real world example" if (! match(s1,"world")) { print "Fail match" } else if (RSTART != 8) { print "Fail RSTART ="RSTART } else if (RLENGTH != 5) { print "Fail RLENGTH ="RLENGTH } else { s2=substr(s1,RSTART,RLENGTH) if (s2 != "world") { print "Fail substr="s2 } else { print "Pass" } } } ================================================ FILE: build/awk/extract-debuggable.awk ================================================ # Copyright (C) 2010 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. # # A nawk/gawk script used to extract the debuggable flag from an # application's manifest (i.e. AndroidManifest.xml). Usage: # # awk -f AndroidManifest.xml # BEGIN { DEBUGGABLE = ""; while ( xml_event() ) { # simply extract the 'android:debuggable' attribute value from # the first element we find. if ( XML_TYPE == "BEGIN" && XML_TAG == "APPLICATION" && XML_RPATH == "APPLICATION/MANIFEST/" ) { DEBUGGABLE = XML_ATTR["android:debuggable"]; break; } } # ensure the value is either "true" or "false" if ( DEBUGGABLE != "true" ) DEBUGGABLE = "false"; print DEBUGGABLE; } # # the following is copied directly from xml.awk - see this file for # usage and implementation details. # function xml_event () { RS=">"; XML_TAG=XML_TYPE=""; split("", XML_ATTR); while ( 1 ) { if (_xml_closing) { # delayed direct tag closure XML_TAG = _xml_closing; XML_TYPE = "END"; _xml_closing = ""; _xml_exit(XML_TAG); return 1; } if (getline <= 0) return 0; # read new input line _xml_p = index($0, "<"); # get start marker if (_xml_p == 0) return 0; # end of file (or malformed input) $0 = substr($0, _xml_p) # remove anything before '<' # ignore CData / Comments / Processing instructions / Declarations if (_xml_in_section(" _xml_closing = XML_TAG; # record delayed tag closure. break } _xml_attrib = $0; sub(/=.*$/,"",_xml_attrib); # extract attribute name sub(/^[^=]*/,"",$0); # remove it from record _xml_attrib = tolower(_xml_attrib); if ( _xml_attrib !~ /^[a-z][-+_0-9a-z:]*$/ ) # validate it _xml_panic("Invalid attribute name: " _xml_attrib); if (substr($0,1,2) == "=\"") { # value is ="something" _xml_value = substr($0,3); sub(/".*$/,"",_xml_value); sub(/^="[^"]*"/,"",$0); } else if (substr($0,1,2) == "='") { # value is ='something' _xml_value = substr($0,3); sub(/'.*$/,"",_xml_value); sub(/^='[^']*'/,"",$0); } else { _xml_panic("Invalid attribute value syntax for " _xml_attrib ": " $0); } XML_ATTR[_xml_attrib] = _xml_value; # store attribute name/value sub(/^[ \t\r\n]*/,"",$0); # get rid of remaining leading spaces } return 1; # now return, XML_TYPE/TAG/ATTR/RPATH are set } } function _xml_panic (msg) { print msg > "/dev/stderr" exit(1) } function _xml_in_section (sec_begin, sec_end) { if (!match( $0, "^" sec_begin )) return 0; while (!match($0, sec_end "$")) { if (getline <= 0) _xml_panic("Unexpected EOF: " ERRNO); } return 1; } function _xml_enter (tag) { XML_RPATH = tag "/" XML_RPATH; } function _xml_exit (tag) { _xml_p = index(XML_RPATH, "/"); _xml_expected = substr(XML_RPATH, 1, _xml_p-1); if (_xml_expected != XML_TAG) _xml_panic("Unexpected close tag: " XML_TAG ", expecting " _xml_expected); XML_RPATH = substr(XML_RPATH, _xml_p+1); } ================================================ FILE: build/awk/extract-launchable.awk ================================================ # Copyright (C) 2010 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. # # A nawk/gawk script used to extract the list of launchable activities # from an application's manifest (i.e. AndroidManifest.xml). Usage: # # awk -f AndroidManifest.xml # # # Explanation: # # A given application can have several activities, and each activity # can have several intent filters. We want to only list, in the final # output, the activities which have a intent-filter that contains the # following elements: # # # # # To do this, we need hooks called when entering and exiting # and elements. # BEGIN { while ( xml_event() ) { # concat xml event type and tag for simpler comparisons event = XML_TYPE "-" XML_TAG; # When entering a new , extract its name and set # the 'launchable' flag to false. if ( event == "BEGIN-ACTIVITY" && XML_RPATH == "ACTIVITY/APPLICATION/MANIFEST/" ) { name = XML_ATTR["android:name"]; launchable = 0; } # When exiting an , check that it has a name and # is launchable. If so, print its name to the output else if ( event == "END-ACTIVITY" && XML_RPATH == "APPLICATION/MANIFEST/" ) { if ( name && launchable ) { # If the name doesn't contain any dot, we consider # that it is just missing the initial one. if (index(name, ".") == 0) { name = "." name } print name; } } # When entering an inside an , clear # the 'action' and 'category' variables. They are updated when # we enter the corresponding elements within the intent-filter. else if ( event == "BEGIN-INTENT-FILTER" && XML_RPATH == "INTENT-FILTER/ACTIVITY/APPLICATION/MANIFEST/" ) { action_main = 0; category_launcher = 0; } # When exiting an , set the 'launchable' flag to true # for the current activity if both 'action' and 'category' have the # correct name. else if ( event == "END-INTENT-FILTER" && XML_RPATH == "ACTIVITY/APPLICATION/MANIFEST/" ) { if ( category_launcher ) { launchable = 1; } } # When entering an element inside an , record # its name. else if ( event == "BEGIN-ACTION" && XML_RPATH == "ACTION/INTENT-FILTER/ACTIVITY/APPLICATION/MANIFEST/" ) { action_main = 0; if ( XML_ATTR["android:name"] == "android.intent.action.MAIN" ) { action_main = 1; } } # When entering a element inside an , record # its name. else if ( event == "BEGIN-CATEGORY" && XML_RPATH == "CATEGORY/INTENT-FILTER/ACTIVITY/APPLICATION/MANIFEST/" ) { if ( action_main && XML_ATTR["android:name"] == "android.intent.category.LAUNCHER" ) { category_launcher = 1; } } } } # # the following is copied directly from xml.awk - see this file for # usage and implementation details. # function xml_event () { RS=">"; XML_TAG=XML_TYPE=""; split("", XML_ATTR); while ( 1 ) { if (_xml_closing) { # delayed direct tag closure XML_TAG = _xml_closing; XML_TYPE = "END"; _xml_closing = ""; _xml_exit(XML_TAG); return 1; } if (getline <= 0) return 0; # read new input line _xml_p = index($0, "<"); # get start marker if (_xml_p == 0) return 0; # end of file (or malformed input) $0 = substr($0, _xml_p) # remove anything before '<' # ignore CData / Comments / Processing instructions / Declarations if (_xml_in_section(" _xml_closing = XML_TAG; # record delayed tag closure. break } _xml_attrib = $0; sub(/=.*$/,"",_xml_attrib); # extract attribute name sub(/^[^=]*/,"",$0); # remove it from record _xml_attrib = tolower(_xml_attrib); if ( _xml_attrib !~ /^[a-z][-+_0-9a-z:]*$/ ) # validate it _xml_panic("Invalid attribute name: " _xml_attrib); if (substr($0,1,2) == "=\"") { # value is ="something" _xml_value = substr($0,3); sub(/".*$/,"",_xml_value); sub(/^="[^"]*"/,"",$0); } else if (substr($0,1,2) == "='") { # value is ='something' _xml_value = substr($0,3); sub(/'.*$/,"",_xml_value); sub(/^='[^']*'/,"",$0); } else { _xml_panic("Invalid attribute value syntax for " _xml_attrib ": " $0); } XML_ATTR[_xml_attrib] = _xml_value; # store attribute name/value sub(/^[ \t\r\n]*/,"",$0); # get rid of remaining leading spaces } return 1; # now return, XML_TYPE/TAG/ATTR/RPATH are set } } function _xml_panic (msg) { print msg > "/dev/stderr" exit(1) } function _xml_in_section (sec_begin, sec_end) { if (!match( $0, "^" sec_begin )) return 0; while (!match($0, sec_end "$")) { if (getline <= 0) _xml_panic("Unexpected EOF: " ERRNO); } return 1; } function _xml_enter (tag) { XML_RPATH = tag "/" XML_RPATH; } function _xml_exit (tag) { _xml_p = index(XML_RPATH, "/"); _xml_expected = substr(XML_RPATH, 1, _xml_p-1); if (_xml_expected != XML_TAG) _xml_panic("Unexpected close tag: " XML_TAG ", expecting " _xml_expected); XML_RPATH = substr(XML_RPATH, _xml_p+1); } ================================================ FILE: build/awk/extract-minsdkversion.awk ================================================ # Copyright (C) 2010 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. # # A nawk/gawk script used to extract the value of min. SDK version from an # application's manifest (i.e. AndroidManifest.xml). Usage: # # awk -f AndroidManifest.xml # BEGIN { MIN_SDK_VERSION = ""; while ( xml_event() ) { # simply extract the 'android:minSdkVersion' attribute value from # the first element we find. if ( XML_TYPE == "BEGIN" && XML_TAG == "USES-SDK" && XML_RPATH == "USES-SDK/MANIFEST/" ) { MIN_SDK_VERSION = XML_ATTR["android:minsdkversion"]; break; } } print MIN_SDK_VERSION; } # # the following is copied directly from xml.awk - see this file for # usage and implementation details. # function xml_event () { RS=">"; XML_TAG=XML_TYPE=""; split("", XML_ATTR); while ( 1 ) { if (_xml_closing) { # delayed direct tag closure XML_TAG = _xml_closing; XML_TYPE = "END"; _xml_closing = ""; _xml_exit(XML_TAG); return 1; } if (getline <= 0) return 0; # read new input line _xml_p = index($0, "<"); # get start marker if (_xml_p == 0) return 0; # end of file (or malformed input) $0 = substr($0, _xml_p) # remove anything before '<' # ignore CData / Comments / Processing instructions / Declarations if (_xml_in_section(" _xml_closing = XML_TAG; # record delayed tag closure. break } _xml_attrib = $0; sub(/=.*$/,"",_xml_attrib); # extract attribute name sub(/^[^=]*/,"",$0); # remove it from record _xml_attrib = tolower(_xml_attrib); if ( _xml_attrib !~ /^[a-z][-+_0-9a-z:]*$/ ) # validate it _xml_panic("Invalid attribute name: " _xml_attrib); if (substr($0,1,2) == "=\"") { # value is ="something" _xml_value = substr($0,3); sub(/".*$/,"",_xml_value); sub(/^="[^"]*"/,"",$0); } else if (substr($0,1,2) == "='") { # value is ='something' _xml_value = substr($0,3); sub(/'.*$/,"",_xml_value); sub(/^='[^']*'/,"",$0); } else { _xml_panic("Invalid attribute value syntax for " _xml_attrib ": " $0); } XML_ATTR[_xml_attrib] = _xml_value; # store attribute name/value sub(/^[ \t\r\n]*/,"",$0); # get rid of remaining leading spaces } return 1; # now return, XML_TYPE/TAG/ATTR/RPATH are set } } function _xml_panic (msg) { print msg > "/dev/stderr" exit(1) } function _xml_in_section (sec_begin, sec_end) { if (!match( $0, "^" sec_begin )) return 0; while (!match($0, sec_end "$")) { if (getline <= 0) _xml_panic("Unexpected EOF: " ERRNO); } return 1; } function _xml_enter (tag) { XML_RPATH = tag "/" XML_RPATH; } function _xml_exit (tag) { _xml_p = index(XML_RPATH, "/"); _xml_expected = substr(XML_RPATH, 1, _xml_p-1); if (_xml_expected != XML_TAG) _xml_panic("Unexpected close tag: " XML_TAG ", expecting " _xml_expected); XML_RPATH = substr(XML_RPATH, _xml_p+1); } ================================================ FILE: build/awk/extract-package-name.awk ================================================ # Copyright (C) 2010 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. # # A nawk/gawk script used to extract the package name from an application's # manifest (i.e. AndroidManifest.xml). Usage is: # # awk -f AndroidManifest.xml # # The name itself is the value of the 'package' attribute in the # 'manifest' element. # BEGIN { PACKAGE=""; while (xml_event()) { # Simply extract the value of the 'name' attribute from # the top-level element. if ( XML_TYPE == "BEGIN" && XML_RPATH == "MANIFEST/" ) { PACKAGE = XML_ATTR["package"]; break; } } if (!PACKAGE) PACKAGE = ""; print PACKAGE; } # # the following is copied directly from xml.awk - see this file for # usage and implementation details. # function xml_event () { RS=">"; XML_TAG=XML_TYPE=""; split("", XML_ATTR); while ( 1 ) { if (_xml_closing) { # delayed direct tag closure XML_TAG = _xml_closing; XML_TYPE = "END"; _xml_closing = ""; _xml_exit(XML_TAG); return 1; } if (getline <= 0) return 0; # read new input line _xml_p = index($0, "<"); # get start marker if (_xml_p == 0) return 0; # end of file (or malformed input) $0 = substr($0, _xml_p) # remove anything before '<' # ignore CData / Comments / Processing instructions / Declarations if (_xml_in_section(" _xml_closing = XML_TAG; # record delayed tag closure. break } _xml_attrib = $0; sub(/=.*$/,"",_xml_attrib); # extract attribute name sub(/^[^=]*/,"",$0); # remove it from record _xml_attrib = tolower(_xml_attrib); if ( _xml_attrib !~ /^[a-z][-+_0-9a-z:]*$/ ) # validate it _xml_panic("Invalid attribute name: " _xml_attrib); if (substr($0,1,2) == "=\"") { # value is ="something" _xml_value = substr($0,3); sub(/".*$/,"",_xml_value); sub(/^="[^"]*"/,"",$0); } else if (substr($0,1,2) == "='") { # value is ='something' _xml_value = substr($0,3); sub(/'.*$/,"",_xml_value); sub(/^='[^']*'/,"",$0); } else { _xml_panic("Invalid attribute value syntax for " _xml_attrib ": " $0); } XML_ATTR[_xml_attrib] = _xml_value; # store attribute name/value sub(/^[ \t\r\n]*/,"",$0); # get rid of remaining leading spaces } return 1; # now return, XML_TYPE/TAG/ATTR/RPATH are set } } function _xml_panic (msg) { print msg > "/dev/stderr" exit(1) } function _xml_in_section (sec_begin, sec_end) { if (!match( $0, "^" sec_begin )) return 0; while (!match($0, sec_end "$")) { if (getline <= 0) _xml_panic("Unexpected EOF: " ERRNO); } return 1; } function _xml_enter (tag) { XML_RPATH = tag "/" XML_RPATH; } function _xml_exit (tag) { _xml_p = index(XML_RPATH, "/"); _xml_expected = substr(XML_RPATH, 1, _xml_p-1); if (_xml_expected != XML_TAG) _xml_panic("Unexpected close tag: " XML_TAG ", expecting " _xml_expected); XML_RPATH = substr(XML_RPATH, _xml_p+1); } ================================================ FILE: build/awk/extract-pid.awk ================================================ # Copyright (C) 2010 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. # # Extract the pid of a given package name. This assumes that the # input is the product of 'adb shell ps' with all \r\n line endings # converted to \n, and that the PACKAGE variable has been initialized # to the package's name. In other words, this should be used as: # # adb shell ps | awk -f -v PACKAGE= # # The printed value will be 0 if the package is not found. # BEGIN { FS=" " # A default package name, used _only_ for unit-testing # com.google.android.apps.maps is interesting because # in our unit test input files, 'ps' lists several sub-processes # that implement services (e.g. com.google.android.apps.maps:) # and we explicitely don't want to match them. # if (PACKAGE == "") { PACKAGE="com.google.android.apps.maps" } PID=0 # The default column where we expect the PID to appear, this # matches the default Android toolbox 'ps', but some devices seem # to have a different version installed (e.g. Busybox) that place # it somewhere else. We will probe the output to detect this, but # this is a good fallback value. PID_COLUMN=2 } { # First, remove any trailing \r from the input line. This is important # because the output of "adb shell " seems to use \r\n line ending. gsub("\r","",$NF) if (NR == 1) { # The first line of the 'ps' output should list the columns, so we're going # to parse it to try to update PID_COLUMN for (n = 1; n <= NF; n++) { if ($n == "PID") { PID_COLUMN=n; } } } else { # Not the first line, compare the package name, which shall always # be the last field. if ($NF == PACKAGE) { PID=$PID_COLUMN } } } END { print PID } ================================================ FILE: build/awk/extract-platform.awk ================================================ # Copyright (C) 2009 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. # # A nawk/gawk script used to extract the application's platform name from # its project.properties file. It is called from build/core/add-application.mk # # we look for a line that looks like one of: # target=android- # target=:: # # is a number, but can also be "Donut" for the first form, # as a special case. # BEGIN { android_regex="android-[0-9A-Za-z_-]+" vendor_regex=":[0-9]+\\s*$" API=unknown } /^target\s*=\s*.*/ { if (match($0,android_regex)) { API=substr($0,RSTART,RLENGTH) } else if (match($0,vendor_regex)) { API="android-" substr($0,RSTART+1,RLENGTH) } } END { printf("%s", API) } ================================================ FILE: build/awk/gen-cygwin-deps-converter.awk ================================================ # Copyright (C) 2011 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. # # This script is used to generate a shell script that will be # run by the NDK build system to process dependency files generated by # GCC on Windows, and convert them to a format that is suitable for # Cygwin's GNU Make. # # The main issue to solve here is that the dependency files generated # by GCC use native windows path names, as in: # # C:/Foo/foo.o: \ # C:/Foo/src/foo.h \ # C:/Foo/src/foo.c \ # D:/Bar/bar/bar.h # # And the file needs to be processed to convert each such path into # a Cygwin-specific one, as in: # # /cygdrive/c/Foo/foo.o: \ # /cygdrive/c/Foo/src/foo.h \ # /cygdrive/c/Foo/src/foo.c \ # /cygdrive/d/Bar/bar/bar.h # # Previously, this conversion was done with an awk script that assumed # that the cygwin drive prefix was always 'cygdrive'. This didn't work # well when this was not the case, or when using drive-less mounts # (e.g. when /home/mnt would map to //server/subdir) # # To solve the issue correctly, we need to parse the output of the # Cygwin mount table (i.e. the output of the 'mount' command), and # build a sed script that will properly replace host paths into the # corresponding cygwin equivalent. # # NOTE: The sed script will be run during command execution, not during the # parse phase. # # This awk script expects its input to be the output of the Cygwin "mount" command # as in: # # C:/cygwin/bin on /usr/bin type ntfs (binary,auto) # C:/cygwin/lib on /usr/lib type ntfs (binary,auto) # C:/cygwin on / type ntfs (binary,auto) # C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto) # D: on /cygdrive/d type udf (binary,posix=0,user,noumount,auto) # //server/subdir on /home/mnt.2$ type .... # # It first builds a sed script that convert all windows path in the # an input file into the cygwin equivalent. For example, this would look # like the following (but all on a single line): # # s!^//server/subdir!/home/mnt\.2\$!ig; # s! //server/subdir! /home/mnt\.2\$!ig; # s!^C:/cygwin/bin!/usr/bin!ig; # s! C:/cygwin/bin! /usr/bin!ig; # s!^C:/cygwin/lib!/usr/lib!ig; # s! C:/cygwin/lib! /usr/lib!ig; # s!^C:/cygwin/!/!ig; # s! C:/cygwin/! /!ig; # s!^C:!/cygdrive/c!ig; # s! C:! /cygdrive/c!ig; # s!^D:!/cygdrive/d!ig; # s! D:! /cygdrive/d!ig; # # Note that we properly escape regex meta characters like . or $ # to avoid confusing sed. Also deal with the cases where the path # is the first in the line, or prefixed with a space in the deps file. # # After this, the sed invokation is hard-coded into a generated shell # script that can be invoked directly at build time. # BEGIN { # setup our count count = 0 } $2 == "on" { # record a new (host-path,cygwin-path) pair count ++ # Convert backwards slashes into forward ones in the host path. # This is to support MSys' mount command, which outputs Windows-style # separators, unlike Cygwin's version of the same tool. gsub("\\\\","/",$1) host[count] = $1 cygwin[count] = $3 } END { # We have recorded all (host,cygwin) path pairs, # now try to sort them so that the ones with the longest host path # appear first for (ii = 2; ii <= count; ii++) { for (jj = ii-1; jj > 0; jj--) { if (length(host[jj]) > length(host[jj+1])) { break; } if (length(host[jj]) == length(host[jj+1]) && host[jj] > host[jj+1]) { break } tmp = cygwin[jj] cygwin[jj] = cygwin[jj+1] cygwin[jj+1] = tmp tmp = host[jj] host[jj] = host[jj+1] host[jj+1] = tmp } } # build/core/init.mk defines VERBOSE to 1 when it needs to dump the # list of substitutions in a human-friendly format, generally when # NDK_LOG is defined in the environment # # Otherwise, just generate the corresponding sed script # if (VERBOSE == 1) { for (nn = 1; nn <= count; nn++) { printf( "$(info %s => %s)", cygwin[nn], host[nn]); } } else { RESULT = "" for (nn = 1; nn <= count; nn++) { add_drive_rule(host[nn], cygwin[nn]) } # Note: the role of the generated shell script is to first check # that $1.org exists. If this is not the case, this simply # means that GCC didn't generate a depedency file (e.g. when # compiling an assembler file). # # If the file exists, it is processed with our sed script, # the output is written to $1, and we remove the original $1.org # print "#!/bin/sh" print "# AUTO-GENERATED FILE, DO NOT EDIT!" print "if [ -f $1.org ]; then" print " sed -e '" RESULT "' $1.org > $1 && rm -f $1.org" print "fi" } } # We need to quote some characters so that 'sed' doesn't # believe they are regex operators. For example, if a path # contains a dot (.), we need to escape it into "\." # function sed_quote_path (str) { # Windows path names cannot contain any of: <>:"|?* # see msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx # # Anything else is valid. The regex meta characters are: ^.[]$()|*+?{}\ # # This means we need to escape these when they appear in path names: ^.[]$()+{}\ # gsub("\\^","\\^",str) gsub("\\.","\\.",str) gsub("\\[","\\[",str) gsub("\\]","\\]",str) gsub("\\$","\\$",str) gsub("\\(","\\(",str) gsub("\\)","\\)",str) gsub("\\+","\\+",str) gsub("\\{","\\{",str) gsub("\\}","\\}",str) return str } function add_drive_rule (hostpath,cygpath) { hostpath = sed_quote_path(hostpath) cygpath = sed_quote_path(cygpath) # The root directory is a special case, because we need # to add a slash at the end of the corresponding host path # otherwise c:/cygwin/foo will be translated into //foo # instead of /foo. # if (cygpath == "/") { hostpath = hostpath "/" } # when the hostpath starts the line RESULT = RESULT "s!^" hostpath "!" cygpath "!ig;" # when the hostpath does not start the line (it will always be after a space) RESULT = RESULT "s! " hostpath "! " cygpath "!ig;" } ================================================ FILE: build/awk/gen-windows-host-path.awk ================================================ # Copyright (C) 2010 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. # # This script is used to generate a Makefile fragment that will be evaluated # at runtime by the NDK build system during its initialization pass. # # The purpose of this generated fragment is to define a function, named # 'cygwin-to-host-path' that will transform a Cygwin-specific path into the # corresponding Windows specific one, i.e. calling # # $(call cygwin-to-host-path,/cygdrive/c/Stuff/) --> c:/Stuff # # A naive implementation of this function would be the following: # # cygwin-to-host-path = $(shell cygpath -m $1) # # Unfortunately, calling 'cygpath -m' from GNU Make is horridly slow and people # have complained that this was adding several minutes to their builds, even in # the case where there is nothing to do. # # The script expects its input to be the output of the Cygwin "mount" command # as in: # # C:/cygwin/bin on /usr/bin type ntfs (binary,auto) # C:/cygwin/lib on /usr/lib type ntfs (binary,auto) # C:/cygwin on / type ntfs (binary,auto) # C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto) # D: on /cygdrive/d type udf (binary,posix=0,user,noumount,auto) # # The script's output will be passed to the GNU Make 'eval' function # and will look like: # # $(patsubst /%,C:/cygwin/, # $(patsubst /usr/bin/%,C:/cygwin/bin/, # $(patsubst /usr/lib/%,C:/cygwin/lib/, # $(patsubst /cygdrive/C/%,C:/, # $(patsubst /cygdrive/D/%,D:/, # $(patsubst /cygdrive/c/%,C:/, # $(patsubst /cygdrive/d/%,D:/,$1))))) # BEGIN { # setup our count count = 0 } $2 == "on" { # record a new (host-path,cygwin-path) pair count ++ host[count] = $1 cygwin[count] = $3 } END { # Drive letters are special cases because we must match both # the upper and lower case versions to the same drive, i.e. # if "mount" lists that /cygdrive/c maps to C:, we need to # map both /cygdrive/c and /cygdrive/C to C: in our final rules. # count1 = count for (nn = 1; nn <= count1; nn++) { if (!match(host[nn],"^[A-Za-z]:$")) { # not a driver letter mapping, skip this pair continue } letter = substr(host[nn],1,1) lo = tolower(letter) up = toupper(letter) # If the cygwin path ends in /, then substitute it with / # to create a new pair. if (match(cygwin[nn],"/"lo"$")) { count++ host[count] = host[nn] cygwin[count] = substr(cygwin[nn],1,length(cygwin[nn])-1) up continue } # If the cygwin path ends in /, then substitute it with / # to create a new pair. if (match(cygwin[nn],"/"up"$")) { count++ host[count] = host[nn] cygwin[count] = substr(cygwin[nn],1,length(cygwin[nn])-1) lo continue } } # We have recorded all (host,cygwin) path pairs, # now try to sort them so that the ones with the longest cygwin path # appear first for (ii = 2; ii <= count; ii++) { for (jj = ii-1; jj > 0; jj--) { if (length(cygwin[jj]) > length(cygwin[jj+1])) { break; } if (length(cygwin[jj]) == length(cygwin[jj+1]) && cygwin[jj] > cygwin[jj+1]) { break } tmp = cygwin[jj] cygwin[jj] = cygwin[jj+1] cygwin[jj+1] = tmp tmp = host[jj] host[jj] = host[jj+1] host[jj+1] = tmp } } # build/core/init.mk defines VERBOSE to 1 when it needs to dump the # list of substitutions in a human-friendly format, generally when # NDK_LOG is defined in the environment # # Otherwise, just generate the corresponding Make function definition # if (VERBOSE == 1) { for (nn = 1; nn <= count; nn++) { printf( "$(info %s => %s)", cygwin[nn], host[nn]); } } else { RESULT = "$1" for (nn = 1; nn <= count; nn++) { add_drive_rule(host[nn], cygwin[nn]) } print RESULT } } function add_drive_rule (hostpath,cygpath) { if (cygpath == "/") { # Special case for / RESULT = "$(patsubst /%," hostpath "/%,\n" RESULT ")" return } # default rule otherwise RESULT = "$(patsubst " cygpath "/%," hostpath "/%,\n" RESULT ")" } ================================================ FILE: build/awk/xml.awk ================================================ # Copyright (C) 2010 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. # # Tiny XML parser implementation in awk. # # This file is not meant to be used directly, instead copy the # functions it defines here into your own script then specialize # it appropriately. # # See further below for usage instructions and implementation details. # # ---------------------------- cut here --------------------------- function xml_event () { RS=">"; XML_TAG=XML_TYPE=""; split("", XML_ATTR); while ( 1 ) { if (_xml_closing) { # delayed direct tag closure XML_TAG = _xml_closing; XML_TYPE = "END"; _xml_closing = ""; _xml_exit(XML_TAG); return 1; } if (getline <= 0) return 0; # read new input line _xml_p = index($0, "<"); # get start marker if (_xml_p == 0) return 0; # end of file (or malformed input) $0 = substr($0, _xml_p) # remove anything before '<' # ignore CData / Comments / Processing instructions / Declarations if (_xml_in_section(" _xml_closing = XML_TAG; # record delayed tag closure. break } _xml_attrib = $0; sub(/=.*$/,"",_xml_attrib); # extract attribute name sub(/^[^=]*/,"",$0); # remove it from record _xml_attrib = tolower(_xml_attrib); if ( _xml_attrib !~ /^[a-z][-+_0-9a-z:]*$/ ) # validate it _xml_panic("Invalid attribute name: " _xml_attrib); if (substr($0,1,2) == "=\"") { # value is ="something" _xml_value = substr($0,3); sub(/".*$/,"",_xml_value); sub(/^="[^"]*"/,"",$0); } else if (substr($0,1,2) == "='") { # value is ='something' _xml_value = substr($0,3); sub(/'.*$/,"",_xml_value); sub(/^='[^']*'/,"",$0); } else { _xml_panic("Invalid attribute value syntax for " _xml_attrib ": " $0); } XML_ATTR[_xml_attrib] = _xml_value; # store attribute name/value sub(/^[ \t\r\n]*/,"",$0); # get rid of remaining leading spaces } return 1; # now return, XML_TYPE/TAG/ATTR/RPATH are set } } function _xml_panic (msg) { print msg > "/dev/stderr" exit(1) } function _xml_in_section (sec_begin, sec_end) { if (!match( $0, "^" sec_begin )) return 0; while (!match($0, sec_end "$")) { if (getline <= 0) _xml_panic("Unexpected EOF: " ERRNO); } return 1; } function _xml_enter (tag) { XML_RPATH = tag "/" XML_RPATH; } function _xml_exit (tag) { _xml_p = index(XML_RPATH, "/"); _xml_expected = substr(XML_RPATH, 1, _xml_p-1); if (_xml_expected != XML_TAG) _xml_panic("Unexpected close tag: " XML_TAG ", expecting " _xml_expected); XML_RPATH = substr(XML_RPATH, _xml_p+1); } # ---------------------------- cut here --------------------------- # USAGE: # # The functions provided here are used to extract the tags and attributes of a # given XML file. They do not support extraction of data, CDATA, comments, # processing instructions and declarations at all. # # You should use this from the BEGIN {} action of your awk script (it will # not work from an END {} action). # # Call xml_event() in a while loop. This functions returns 1 for each XML # 'event' encountered, or 0 when the end of input is reached. Note that in # case of malformed output, an error will be printed and the script will # force an exit(1) # # After each succesful xml_event() call, the following variables will be set: # # XML_TYPE: type of event: "BEGIN" -> mean an opening tag, "END" a # closing one. # # XML_TAG: name of the tag, always in UPPERCASE! # # XML_ATTR: a map of attributes for the type. Only set for "BEGIN" types. # all attribute names are in lowercase. # # beware: values are *not* unescaped ! # # XML_RPATH: the _reversed_ element path, using "/" as a separator. # if you are within the tag, then # it will be set to "APPLICATION/MANIFEST/" # (note the trailing slash). # # This is a simple example that dumps the output of the parsing. # BEGIN { while ( xml_event() ) { printf "XML_TYPE=%s XML_TAG=%s XML_RPATH=%s", XML_TYPE, XML_TAG, XML_RPATH; if (XML_TYPE == "BEGIN") { for (attr in XML_ATTR) { printf " %s='%s'", attr, XML_ATTR[attr]; } } printf "\n"; } } # IMPLEMENTATION DETAILS: # # 1. '>' as the record separator: # # RS is set to '>' to use this character as the record separator, instead of # the default '\n'. This means that something like the following: # # stuff # # will be translated into the following successive 'records': # # ' is never part of the records and thus will not be matched. # If the record does not contain a single '<', the input is either # malformed XML, or we reached the end of file with data after the last # '>'. # # Newlines in the original input are kept in the records as-is. # # 2. Getting rid of unwanted stuff: # # We don't need any of the data within elements, so we get rid of them by # simply ignoring anything before the '<' in the current record. This is # done with code like this: # # p = index($0, "<"); # get index of '<' # if (p == 0) -> return 0; # malformed input or end of file # $0 = substr($0, p+1); # remove anything before the '<' in record # # We also want to ignore certain sections like CDATA, comments, declarations, # etc.. These begin with a certain pattern and end with another one, e.g. # "" for comments. This is handled by the _xml_in_section() # function that accepts two patterns as input: # # sec_begin: is the pattern for the start of the record. # sec_end: is the pattern for the end of the record (minus trailing '>'). # # The function deals with the fact that these section can embed a valid '>' # and will then span multiple records, i.e. something like: # # # # will be decomposed into two records: # # " libB.a # | ^ # v | # libC.a ------ # # static_libs(main.exe) = libA.a libC.a libB.a # (i.e. libB.a must appear after all libraries that depend on it). # all_libs := $(call module-get-link-libs,$(LOCAL_MODULE)) shared_libs := $(call module-filter-shared-libraries,$(all_libs)) static_libs := $(call module-filter-static-libraries,$(all_libs)) whole_static_libs := $(call module-extract-whole-static-libs,$(LOCAL_MODULE),$(static_libs)) static_libs := $(filter-out $(whole_static_libs),$(static_libs)) $(call -ndk-mod-debug,module $(LOCAL_MODULE) [$(LOCAL_BUILT_MODULE)]) $(call -ndk-mod-debug,. all_libs='$(all_libs)') $(call -ndk-mod-debug,. shared_libs='$(shared_libs)') $(call -ndk-mod-debug,. static_libs='$(static_libs)') $(call -ndk-mod-debug,. whole_static_libs='$(whole_static_libs)') shared_libs := $(call map,module-get-built,$(shared_libs))\ $(TARGET_PREBUILT_SHARED_LIBRARIES) static_libs := $(call map,module-get-built,$(static_libs)) whole_static_libs := $(call map,module-get-built,$(whole_static_libs)) $(call -ndk-mod-debug,. built_shared_libs='$(shared_libs)') $(call -ndk-mod-debug,. built_static_libs='$(static_libs)') $(call -ndk-mod-debug,. built_whole_static_libs='$(whole_static_libs)') # The list of object/static/shared libraries passed to the linker when # building shared libraries and executables. order is important. # # Cannot use immediate evaluation because PRIVATE_LIBGCC may not be defined at this point. linker_objects_and_libraries = $(strip $(call TARGET-get-linker-objects-and-libraries,\ $(LOCAL_OBJECTS), \ $(static_libs), \ $(whole_static_libs), \ $(shared_libs))) ifeq ($(LOCAL_SHORT_COMMANDS),true) $(call ndk_log,Building ELF binary module '$(LOCAL_MODULE)' with linker list file) linker_options := $(linker_objects_and_libraries) linker_list_file := $(LOCAL_OBJS_DIR)/linker.list linker_objects_and_libraries := @$(call host-path,$(linker_list_file)) $(call generate-list-file,$(linker_options),$(linker_list_file)) $(LOCAL_BUILT_MODULE): $(linker_list_file) endif $(LOCAL_BUILT_MODULE): $(shared_libs) $(static_libs) $(whole_static_libs) $(LOCAL_BUILT_MODULE): PRIVATE_ABI := $(TARGET_ARCH_ABI) $(LOCAL_BUILT_MODULE): PRIVATE_LINKER_OBJECTS_AND_LIBRARIES := $(linker_objects_and_libraries) $(LOCAL_BUILT_MODULE): PRIVATE_STATIC_LIBRARIES := $(static_libs) $(LOCAL_BUILT_MODULE): PRIVATE_WHOLE_STATIC_LIBRARIES := $(whole_static_libs) $(LOCAL_BUILT_MODULE): PRIVATE_SHARED_LIBRARIES := $(shared_libs) endif # # If this is a shared library module # ifeq ($(call module-get-class,$(LOCAL_MODULE)),SHARED_LIBRARY) $(LOCAL_BUILT_MODULE): PRIVATE_BUILD_SHARED_LIB := $(cmd-build-shared-library) $(LOCAL_BUILT_MODULE): $(LOCAL_OBJECTS) $(call host-echo-build-step,$(PRIVATE_ABI),SharedLibrary) "$(PRIVATE_NAME)" $(hide) $(PRIVATE_BUILD_SHARED_LIB) ALL_SHARED_LIBRARIES += $(LOCAL_BUILT_MODULE) endif # # If this is an executable module # ifeq ($(call module-get-class,$(LOCAL_MODULE)),EXECUTABLE) $(LOCAL_BUILT_MODULE): PRIVATE_ABI := $(TARGET_ARCH_ABI) $(LOCAL_BUILT_MODULE): PRIVATE_BUILD_EXECUTABLE := $(cmd-build-executable) $(LOCAL_BUILT_MODULE): $(LOCAL_OBJECTS) $(call host-echo-build-step,$(PRIVATE_ABI),Executable) "$(PRIVATE_NAME)" $(hide) $(PRIVATE_BUILD_EXECUTABLE) ALL_EXECUTABLES += $(LOCAL_BUILT_MODULE) endif # # If this is a copyable prebuilt module # ifeq ($(call module-is-copyable,$(LOCAL_MODULE)),$(true)) $(LOCAL_BUILT_MODULE): $(LOCAL_OBJECTS) $(call host-echo-build-step,$(PRIVATE_ABI),Prebuilt) "$(PRIVATE_NAME) <= $(call pretty-dir,$(dir $<))" $(hide) $(call host-cp,$<,$@) endif # # If this is an installable module # ifeq ($(call module-is-installable,$(LOCAL_MODULE)),$(true)) $(LOCAL_INSTALLED): PRIVATE_ABI := $(TARGET_ARCH_ABI) $(LOCAL_INSTALLED): PRIVATE_NAME := $(notdir $(LOCAL_BUILT_MODULE)) $(LOCAL_INSTALLED): PRIVATE_SRC := $(LOCAL_BUILT_MODULE) $(LOCAL_INSTALLED): PRIVATE_DST_DIR := $(NDK_APP_DST_DIR) $(LOCAL_INSTALLED): PRIVATE_DST := $(LOCAL_INSTALLED) $(LOCAL_INSTALLED): PRIVATE_STRIP := $(TARGET_STRIP) $(LOCAL_INSTALLED): PRIVATE_STRIP_CMD := $(call cmd-strip, $(PRIVATE_DST)) $(LOCAL_INSTALLED): PRIVATE_OBJCOPY := $(TARGET_OBJCOPY) $(LOCAL_INSTALLED): PRIVATE_OBJCOPY_CMD := $(call cmd-add-gnu-debuglink, $(PRIVATE_DST), $(PRIVATE_SRC)) LIBCRYSTAX_INSTALLED := $(subst //,/,$(call parent-dir,$(LOCAL_INSTALLED))/libcrystax.so) $(LOCAL_INSTALLED): $(LOCAL_BUILT_MODULE) clean-installed-binaries $(if $(filter dynamic,$(libcrystax-link-type)),$(LIBCRYSTAX_INSTALLED)) $(call host-echo-build-step,$(PRIVATE_ABI),Install) "$(PRIVATE_NAME) => $(call pretty-dir,$(PRIVATE_DST))" $(hide) $(call host-install,$(PRIVATE_SRC),$(PRIVATE_DST)) $(hide) $(PRIVATE_STRIP_CMD) #$(hide) $(PRIVATE_OBJCOPY_CMD) $(call generate-file-dir,$(LOCAL_INSTALLED)) ifeq (,$(GLOBAL_LIBCRYSTAX_INSTALL_RULE_DEFINED.$(TARGET_ARCH_ABI))) $(LIBCRYSTAX_INSTALLED): PRIVATE_LIBCRYSTAX_ABI := $(TARGET_ARCH_ABI) $(LIBCRYSTAX_INSTALLED): $(LOCAL_BUILT_MODULE) clean-installed-binaries $(call host-echo-build-step,$(PRIVATE_LIBCRYSTAX_ABI),Install) "$(notdir $@) => $(call pretty-dir,$@)" $(hide) $(call host-install,$(call libcrystax-libpath,$(PRIVATE_LIBCRYSTAX_ABI))/libcrystax.so,$@) $(hide) $(call cmd-strip,$@) $(call generate-file-dir,$(LIBCRYSTAX_INSTALLED)) GLOBAL_LIBCRYSTAX_INSTALL_RULE_DEFINED.$(TARGET_ARCH_ABI) := true endif endif ================================================ FILE: build/core/build-executable.mk ================================================ # Copyright (C) 2009 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. # # this file is included from Android.mk files to build a target-specific # executable program # LOCAL_BUILD_SCRIPT := BUILD_EXECUTABLE LOCAL_MAKEFILE := $(local-makefile) $(call check-defined-LOCAL_MODULE,$(LOCAL_BUILD_SCRIPT)) $(call check-LOCAL_MODULE,$(LOCAL_MAKEFILE)) $(call check-LOCAL_MODULE_FILENAME) # we are building target objects my := TARGET_ $(call handle-module-filename,,) $(call handle-module-built) LOCAL_MODULE_CLASS := EXECUTABLE include $(BUILD_SYSTEM)/build-module.mk ================================================ FILE: build/core/build-local.mk ================================================ # Copyright (C) 2010 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. # # This file is designed to be called from the 'ndk-build' script # or similar wrapper tool. # # Detect the NDK installation path by processing this Makefile's location. # This assumes we are located under $NDK_ROOT/build/core/main.mk # # Don't output to stdout if we're being invoked to dump a variable DUMP_VAR := $(patsubst DUMP_%,%,$(filter DUMP_%,$(MAKECMDGOALS))) ifneq (,$(DUMP_VAR)) NDK_NO_INFO := 1 NDK_NO_WARNINGS := 1 endif NDK_ROOT := $(dir $(lastword $(MAKEFILE_LIST))) NDK_ROOT := $(subst \,/,$(NDK_ROOT)) NDK_ROOT := $(strip $(NDK_ROOT:%build/core/=%)) NDK_ROOT := $(NDK_ROOT:%/=%) ifeq ($(NDK_ROOT),) # for the case when we're invoked from the NDK install path NDK_ROOT := . endif ifeq ($(NDK_LOG),1) $(info Android NDK: NDK installation path auto-detected: '$(NDK_ROOT)') endif ifneq ($(words $(NDK_ROOT)),1) $(info Android NDK: Your NDK installation path contains spaces.) $(info Android NDK: Please re-install to a different location to fix the issue !) $(error Aborting.) endif include $(NDK_ROOT)/build/core/init.mk # ==================================================================== # # If NDK_PROJECT_PATH is not defined, find the application's project # path by looking at the manifest file in the current directory or # any of its parents. If none is found, try again with 'jni/Android.mk' # # Note that we first look at the current directory to avoid using # absolute NDK_PROJECT_PATH values. This reduces the length of all # source, object and binary paths that are passed to build commands. # # It turns out that some people use ndk-build to generate static # libraries without a full Android project tree. # # If NDK_PROJECT_PATH=null, ndk-build make no attempt to look for it, but does # need the following variables depending on NDK_PROJECT_PATH to be explicitly # specified (from the default, if any): # # NDK_OUT # NDK_LIBS_OUT # APP_BUILD_SCRIPT # NDK_DEBUG (optional, default to 0) # Other APP_* used to be in Application.mk # # This behavior may be useful in an integrated build system. # # ==================================================================== find-project-dir = $(strip $(call find-project-dir-inner,$(abspath $1),$2)) find-project-dir-inner = \ $(eval __found_project_path := )\ $(eval __find_project_path := $1)\ $(eval __find_project_file := $2)\ $(call find-project-dir-inner-2)\ $(__found_project_path) find-project-dir-inner-2 = \ $(call ndk_log,Looking for $(__find_project_file) in $(__find_project_path))\ $(eval __find_project_manifest := $(strip $(wildcard $(__find_project_path)/$(__find_project_file))))\ $(if $(__find_project_manifest),\ $(call ndk_log, Found it !)\ $(eval __found_project_path := $(__find_project_path))\ ,\ $(eval __find_project_parent := $(call parent-dir,$(__find_project_path)))\ $(if $(__find_project_parent),\ $(eval __find_project_path := $(__find_project_parent))\ $(call find-project-dir-inner-2)\ )\ ) NDK_PROJECT_PATH := $(strip $(NDK_PROJECT_PATH)) APP_PROJECT_PATH := $(strip $(APP_PROJECT_PATH)) ifneq (,$(APP_PROJECT_PATH)) ifeq (,$(NDK_PROJECT_PATH)) # If NDK_PROJECT_PATH isn't set and APP_PROJECT_PATH is present, use APP_PROJECT_PATH $(call ndk_log,Use APP_PROJECT_PATH for NDK_PROJECT_PATH: $(APP_PROJECT_PATH)) NDK_PROJECT_PATH := $(APP_PROJECT_PATH) else # If both NDK_PROJECT_PATH and APP_PROJECT_PATH are present, check consistency ifneq ($(NDK_PROJECT_PATH),$(APP_PROJECT_PATH)) $(call __ndk_info,WARNING: NDK_PROJECT_PATH and APP_PROJECT_PATH are both set but not equal literally) $(call __ndk_info, NDK_PROJECT_PATH = $(NDK_PROJECT_PATH)) $(call __ndk_info, APP_PROJECT_PATH = $(APP_PROJECT_PATH)) endif endif endif ifeq (null,$(NDK_PROJECT_PATH)) $(call ndk_log,Make no attempt to look for NDK_PROJECT_PATH.) else # To keep paths as short as possible during the build, we first look if the # current directory is the top of our project path. If this is the case, we # will define NDK_PROJECT_PATH to simply '.' # # Otherwise, we will use find-project-dir which will first get the absolute # path of the current directory the climb back the hierarchy until we find # something. The result will always be a much longer definition for # NDK_PROJECT_PATH # ifndef NDK_PROJECT_PATH ifneq (,$(strip $(wildcard AndroidManifest.xml))) NDK_PROJECT_PATH := . else ifneq (,$(strip $(wildcard jni/Android.mk))) NDK_PROJECT_PATH := . endif endif endif ifndef NDK_PROJECT_PATH NDK_PROJECT_PATH := $(call find-project-dir,.,jni/Android.mk) endif ifndef NDK_PROJECT_PATH NDK_PROJECT_PATH := $(call find-project-dir,.,AndroidManifest.xml) endif ifndef NDK_PROJECT_PATH $(call __ndk_info,Could not find application project directory !) $(call __ndk_info,Please define the NDK_PROJECT_PATH variable to point to it.) $(call __ndk_error,Aborting) endif # Check that there are no spaces in the project path, or bad things will happen ifneq ($(words $(NDK_PROJECT_PATH)),1) $(call __ndk_info,Your Android application project path contains spaces: '$(NDK_PROJECT_PATH)') $(call __ndk_info,The Android NDK build cannot work here. Please move your project to a different location.) $(call __ndk_error,Aborting.) endif $(call ndk_log,Found project path: $(NDK_PROJECT_PATH)) NDK_APPLICATION_MK := $(strip $(wildcard $(NDK_PROJECT_PATH)/jni/Application.mk)) endif # NDK_PROJECT_PATH == null ifndef NDK_APPLICATION_MK NDK_APPLICATION_MK := $(NDK_ROOT)/build/core/default-application.mk endif # Place all generated intermediate files here NDK_APP_OUT := $(strip $(NDK_OUT)) ifndef NDK_APP_OUT ifeq (null,$(NDK_PROJECT_PATH)) $(call __ndk_info,NDK_PROJECT_PATH==null. Please explicitly set NDK_OUT to directory for all generated intermediate files.) $(call __ndk_error,Aborting.) endif NDK_APP_OUT := $(NDK_PROJECT_PATH)/obj endif $(call ndk_log,Ouput path for intermediate files: $(NDK_APP_OUT)) # Place all generated library files here. This is rarely changed since aapt expects the default libs/ NDK_APP_LIBS_OUT := $(strip $(NDK_LIBS_OUT)) ifndef NDK_APP_LIBS_OUT ifeq (null,$(NDK_PROJECT_PATH)) $(call __ndk_info,NDK_PROJECT_PATH==null. Please explicitly set NDK_LIBS_OUT to directory for generated library files.) $(call __ndk_error,Aborting.) endif NDK_APP_LIBS_OUT := $(NDK_PROJECT_PATH)/libs endif $(call ndk_log,Ouput path for generated library files: $(NDK_APP_LIBS_OUT)) # Fake an application named 'local' _app := local _application_mk := $(NDK_APPLICATION_MK) NDK_APPS := $(_app) include $(BUILD_SYSTEM)/add-application.mk # For cygwin, put generated dependency conversion script here # Do not define this variable for other host platforms # ifeq ($(HOST_OS),cygwin) NDK_DEPENDENCIES_CONVERTER := $(NDK_APP_OUT)/convert-dependencies.sh endif # If a goal is DUMP_xxx then we dump a variable xxx instead # of building anything # MAKECMDGOALS := $(filter-out DUMP_$(DUMP_VAR),$(MAKECMDGOALS)) include $(BUILD_SYSTEM)/setup-imports.mk ifneq (,$(DUMP_VAR)) # We only support a single DUMP_XXX goal at a time for now. ifneq ($(words $(DUMP_VAR)),1) $(call __ndk_error,!!TOO-MANY-DUMP-VARIABLES!!) endif $(foreach _app,$(NDK_APPS),\ $(eval include $(BUILD_SYSTEM)/setup-app.mk)\ ) DUMP_$(DUMP_VAR): @echo $($(DUMP_VAR)) else # Build it include $(BUILD_SYSTEM)/build-all.mk endif ================================================ FILE: build/core/build-module.mk ================================================ # Copyright (C) 2010 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. # $(call check-defined-LOCAL_MODULE,$(LOCAL_BUILD_SCRIPT)) $(call check-LOCAL_MODULE,$(LOCAL_MAKEFILE)) # This file is used to record the LOCAL_XXX definitions of a given # module. It is included by BUILD_STATIC_LIBRARY, BUILD_SHARED_LIBRARY # and others. # LOCAL_MODULE_CLASS := $(strip $(LOCAL_MODULE_CLASS)) ifndef LOCAL_MODULE_CLASS $(call __ndk_info,$(LOCAL_MAKEFILE):$(LOCAL_MODULE): LOCAL_MODULE_CLASS definition is missing !) $(call __ndk_error,Aborting) endif $(if $(call module-class-check,$(LOCAL_MODULE_CLASS)),,\ $(call __ndk_info,$(LOCAL_MAKEFILE):$(LOCAL_MODULE): Unknown LOCAL_MODULE_CLASS value: $(LOCAL_MODULE_CLASS))\ $(call __ndk_error,Aborting)\ ) $(call module-add,$(LOCAL_MODULE)) ================================================ FILE: build/core/build-shared-library.mk ================================================ # Copyright (C) 2009 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. # # this file is included from Android.mk files to build a target-specific # shared library # LOCAL_BUILD_SCRIPT := BUILD_SHARED_LIBRARY LOCAL_MAKEFILE := $(local-makefile) $(call check-defined-LOCAL_MODULE,$(LOCAL_BUILD_SCRIPT)) $(call check-LOCAL_MODULE,$(LOCAL_MAKEFILE)) $(call check-LOCAL_MODULE_FILENAME) # we are building target objects my := TARGET_ $(call handle-module-filename,lib,$(TARGET_SONAME_EXTENSION)) $(call handle-module-built) LOCAL_MODULE_CLASS := SHARED_LIBRARY include $(BUILD_SYSTEM)/build-module.mk ================================================ FILE: build/core/build-static-library.mk ================================================ # Copyright (C) 2009 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. # # this file is included from Android.mk files to build a target-specific # static library # LOCAL_BUILD_SCRIPT := BUILD_STATIC_LIBRARY LOCAL_MAKEFILE := $(local-makefile) $(call check-defined-LOCAL_MODULE,$(LOCAL_BUILD_SCRIPT)) $(call check-LOCAL_MODULE,$(LOCAL_MAKEFILE)) # we are building target objects my := TARGET_ $(call handle-module-filename,lib,$(TARGET_LIB_EXTENSION)) $(call handle-module-built) LOCAL_MODULE_CLASS := STATIC_LIBRARY include $(BUILD_SYSTEM)/build-module.mk ================================================ FILE: build/core/check-cygwin-make.mk ================================================ # Copyright (C) 2010 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. # # Check that we have a Cygwin-compatible make. # # For some reason, a lot of application developers on Windows # have another GNU Make installed in their path, that fails # miserably with our build scripts. If we can detect this use # case, early, we will be able to dump a human-readable error # message with some help to fix the issue. # .PHONY: all all: # Get the cygwin-specific path to the make executable # (e.g. /cygdrive/c/cygwin/usr/bin/make), then strip the # .exe suffix, if any. # CYGWIN_MAKE := $(shell cygpath --unix --absolute $(firstword $(MAKE))) CYGWIN_MAKE := $(CYGWIN_MAKE:%.exe=%) # Now try to find it on the file system, a non-cygwin compatible # GNU Make, even if launched from a Cygwin shell, will not # SELF_MAKE := $(strip $(wildcard $(CYGWIN_MAKE).exe)) ifeq ($(SELF_MAKE),) $(error Android NDK: $(firstword $(MAKE)) is not cygwin-compatible) endif # that's all ================================================ FILE: build/core/clear-vars.mk ================================================ # Copyright (C) 2009 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. # # this file is included repeatedly from Android.mk files in order to clean # the module-specific variables from the environment, $(call clear-src-tags) # Note: As a special exception, we don't want to clear LOCAL_PATH $(call clear-vars, $(filter-out LOCAL_PATH,$(modules-LOCALS:%=LOCAL_%))) # strip LOCAL_PATH LOCAL_PATH := $(strip $(LOCAL_PATH)) ================================================ FILE: build/core/default-application.mk ================================================ # Copyright (C) 2010 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. # # This is the default Application.mk that is being used for applications # that don't provide $PROJECT_PATH/jni/Application.mk # APP_PROJECT_PATH := $(NDK_PROJECT_PATH) # We expect the build script to be located here ifndef APP_BUILD_SCRIPT ifeq (null,$(NDK_PROJECT_PATH)) $(call __ndk_info,NDK_PROJECT_PATH==null. Please explicitly set APP_BUILD_SCRIPT.) $(call __ndk_error,Aborting.) endif APP_BUILD_SCRIPT := $(APP_PROJECT_PATH)/jni/Android.mk endif ================================================ FILE: build/core/default-build-commands.mk ================================================ # The following definitions are the defaults used by all toolchains. # This is included in setup-toolchain.mk just before the inclusion # of the toolchain's specific setup.mk file which can then override # these definitions. # # These flags are used to ensure that a binary doesn't reference undefined # flags. TARGET_NO_UNDEFINED_LDFLAGS := -Wl,--no-undefined # Return the list of object, static libraries and shared libraries as they # must appear on the final static linker command (order is important). # # This can be over-ridden by a specific toolchain. Note that by default # we always put libgcc _after_ all static libraries and _before_ shared # libraries. This ensures that any libgcc function used by the final # executable will be copied into it. Otherwise, it could contain # symbol references to the same symbols as exported by shared libraries # and this causes binary compatibility problems when they come from # system libraries (e.g. libc.so and others). # # IMPORTANT: The result must use the host path convention. # # $1: object files # $2: static libraries # $3: whole static libraries # $4: shared libraries # TARGET-get-linker-objects-and-libraries = \ $(call host-path, $1) \ $(call link-whole-archives,$3) \ $(call host-path, $2) $(PRIVATE_LIBGCC) $(call host-path, $4) \ # These flags are used to enforce the NX (no execute) security feature in the # generated machine code. This adds a special section to the generated shared # libraries that instruct the Linux kernel to disable code execution from # the stack and the heap. TARGET_NO_EXECUTE_CFLAGS := -Wa,--noexecstack TARGET_NO_EXECUTE_LDFLAGS := -Wl,-z,noexecstack # These flags disable the above security feature TARGET_DISABLE_NO_EXECUTE_CFLAGS := -Wa,--execstack TARGET_DISABLE_NO_EXECUTE_LDFLAGS := -Wl,-z,execstack # These flags are used to mark certain regions of the resulting # executable or shared library as being read-only after the dynamic # linker has run. This makes GOT overwrite security attacks harder to # exploit. TARGET_RELRO_LDFLAGS := -Wl,-z,relro -Wl,-z,now # These flags disable the above security feature TARGET_DISABLE_RELRO_LDFLAGS := -Wl,-z,norelro -Wl,-z,lazy # This flag are used to provide compiler protection against format # string vulnerabilities. TARGET_FORMAT_STRING_CFLAGS := -Wformat -Werror=format-security # This flag disables the above security checks TARGET_DISABLE_FORMAT_STRING_CFLAGS := -Wno-error=format-security # NOTE: Ensure that TARGET_LIBGCC is placed after all private objects # and static libraries, but before any other library in the link # command line when generating shared libraries and executables. # # This ensures that all libgcc.a functions required by the target # will be included into it, instead of relying on what's available # on other libraries like libc.so, which may change between system # releases due to toolchain or library changes. # define cmd-build-shared-library $(PRIVATE_CXX) \ -Wl,-soname,$(notdir $(LOCAL_BUILT_MODULE)) \ -shared \ --sysroot=$(call host-path,$(PRIVATE_SYSROOT_LINK)) \ $(PRIVATE_LINKER_OBJECTS_AND_LIBRARIES) \ $(PRIVATE_LDFLAGS) \ $(PRIVATE_LDLIBS) \ -o $(call host-path,$(LOCAL_BUILT_MODULE)) endef # zuav: with /usr/lib mips64 fails to link when objs and libs are built with default options ifneq ($(filter mips64,$(TARGET_ARCH_ABI)),) USR_LIB_SUFFIX := /usr/lib64 else USR_LIB_SUFFIX := /usr/lib endif # The following -rpath-link= are needed for ld.bfd (default for MIPS) when # linking executables to supress warning about missing symbol from libraries not # directly needed. ld.gold (default for ARM and X86) doesn't emulate this buggy # behavior, and ignores -rpath-link completely. define cmd-build-executable $(PRIVATE_CXX) \ -Wl,--gc-sections \ -Wl,-z,nocopyreloc \ --sysroot=$(call host-path,$(PRIVATE_SYSROOT_LINK)) \ -Wl,-rpath-link=$(call host-path,$(PRIVATE_SYSROOT_LINK)$(USR_LIB_SUFFIX)) \ -Wl,-rpath-link=$(call host-path,$(TARGET_OUT)) \ $(PRIVATE_LINKER_OBJECTS_AND_LIBRARIES) \ $(PRIVATE_LDFLAGS) \ $(PRIVATE_LDLIBS) \ -o $(call host-path,$(LOCAL_BUILT_MODULE)) endef define cmd-build-static-library $(PRIVATE_AR) $(call host-path,$(LOCAL_BUILT_MODULE)) $(PRIVATE_AR_OBJECTS) endef # The strip command is only used for shared libraries and executables. # It is thus safe to use --strip-unneeded, which is only dangerous # when applied to static libraries or object files. cmd-strip = $(PRIVATE_STRIP) --strip-unneeded $(call host-path,$1) # The command objcopy --add-gnu-debuglink= will be needed for Valgrind cmd-add-gnu-debuglink = $(PRIVATE_OBJCOPY) --add-gnu-debuglink=$(strip $(call host-path,$2)) $(call host-path,$1) TARGET_LIBGCC = -lgcc TARGET_LDLIBS := -lc -lm # # IMPORTANT: The following definitions must use lazy assignment because # the value of TOOLCHAIN_PREFIX or TARGET_CFLAGS can be changed later by # the toolchain's setup.mk script. # ifneq ($(findstring ccc-analyzer,$(CC)),) TARGET_CC = $(CC) else TARGET_CC = $(TOOLCHAIN_PREFIX)gcc endif TARGET_CFLAGS = TARGET_CONLYFLAGS = ifneq ($(findstring c++-analyzer,$(CXX)),) TARGET_CXX = $(CXX) else TARGET_CXX = $(TOOLCHAIN_PREFIX)g++ endif TARGET_CXXFLAGS = $(TARGET_CFLAGS) -fno-exceptions -fno-rtti TARGET_RS_CC = $(RENDERSCRIPT_TOOLCHAIN_PREFIX)llvm-rs-cc TARGET_RS_BCC = $(RENDERSCRIPT_TOOLCHAIN_PREFIX)bcc_compat TARGET_RS_FLAGS = -Wall -Werror ifeq (,$(findstring 64,$(TARGET_ARCH_ABI))) TARGET_RS_FLAGS += -m32 else TARGET_RS_FLAGS += -m64 endif TARGET_ASM = $(HOST_PREBUILT)/yasm TARGET_ASMFLAGS = TARGET_LD = $(TOOLCHAIN_PREFIX)ld TARGET_LDFLAGS := # Use *-gcc-ar instead of *-ar for better LTO support, except for # gcc4.6 which doesn't have gcc-ar ifneq (clang,$(NDK_TOOLCHAIN_VERSION)) TARGET_AR = $(TOOLCHAIN_PREFIX)gcc-ar else TARGET_AR = $(TOOLCHAIN_PREFIX)ar endif TARGET_ARFLAGS := crsD TARGET_STRIP = $(TOOLCHAIN_PREFIX)strip TARGET_OBJCOPY = $(TOOLCHAIN_PREFIX)objcopy TARGET_OBJ_EXTENSION := .o TARGET_LIB_EXTENSION := .a TARGET_SONAME_EXTENSION := .so ================================================ FILE: build/core/defaults.mk ================================================ DEFAULT_CXX_STANDARD := gnu++11 DEFAULT_LIBSTDCXX := gnustl DEFAULT_LIBOBJC := cocotron ================================================ FILE: build/core/definitions-graph.mk ================================================ # Copyright (C) 2012 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. # # Definitions of various graph-related generic functions, used by # ndk-build internally. # # Coding style note: # # All internal variables in this file begin with '_ndk_mod_' # All internal functions in this file begin with '-ndk-mod-' # # Set this to true if you want to debug the functions here. _ndk_mod_debug := $(if $(NDK_DEBUG_MODULES),true) _ndk_topo_debug := $(if $(NDK_DEBUG_TOPO),true) # Use $(call -ndk-mod-debug,) to print a debug message only # if _ndk_mod_debug is set to 'true'. Useful for debugging the functions # available here. # ifeq (true,$(_ndk_mod_debug)) -ndk-mod-debug = $(info $1) else -ndk-mod-debug := $(empty) endif ifeq (true,$(_ndk_topo_debug)) -ndk-topo-debug = $(info $1) else -ndk-topo-debug = $(empty) endif ####################################################################### # Filter a list of module with a predicate function # $1: list of module names. # $2: predicate function, will be called with $(call $2,), if the # result is not empty, will be added to the result. # Out: subset of input list, where each item passes the predicate. ####################################################################### -ndk-mod-filter = $(strip \ $(foreach _ndk_mod_filter_n,$1,\ $(if $(call $2,$(_ndk_mod_filter_n)),$(_ndk_mod_filter_n))\ )) -test-ndk-mod-filter = \ $(eval -local-func = $$(call seq,foo,$$1))\ $(call test-expect,,$(call -ndk-mod-filter,,-local-func))\ $(call test-expect,foo,$(call -ndk-mod-filter,foo,-local-func))\ $(call test-expect,foo,$(call -ndk-mod-filter,foo bar,-local-func))\ $(call test-expect,foo foo,$(call -ndk-mod-filter,aaa foo bar foo,-local-func))\ $(eval -local-func = $$(call sne,foo,$$1))\ $(call test-expect,,$(call -ndk-mod-filter,,-local-func))\ $(call test-expect,,$(call -ndk-mod-filter,foo,-local-func))\ $(call test-expect,bar,$(call -ndk-mod-filter,foo bar,-local-func))\ $(call test-expect,aaa bar,$(call -ndk-mod-filter,aaa foo bar,-local-func)) ####################################################################### # Filter out a list of modules with a predicate function # $1: list of module names. # $2: predicate function, will be called with $(call $2,), if the # result is not empty, will be added to the result. # Out: subset of input list, where each item doesn't pass the predicate. ####################################################################### -ndk-mod-filter-out = $(strip \ $(foreach _ndk_mod_filter_n,$1,\ $(if $(call $2,$(_ndk_mod_filter_n)),,$(_ndk_mod_filter_n))\ )) -test-ndk-mod-filter-out = \ $(eval -local-func = $$(call seq,foo,$$1))\ $(call test-expect,,$(call -ndk-mod-filter-out,,-local-func))\ $(call test-expect,,$(call -ndk-mod-filter-out,foo,-local-func))\ $(call test-expect,bar,$(call -ndk-mod-filter-out,foo bar,-local-func))\ $(call test-expect,aaa bar,$(call -ndk-mod-filter-out,aaa foo bar foo,-local-func))\ $(eval -local-func = $$(call sne,foo,$$1))\ $(call test-expect,,$(call -ndk-mod-filter-out,,-local-func))\ $(call test-expect,foo,$(call -ndk-mod-filter-out,foo,-local-func))\ $(call test-expect,foo,$(call -ndk-mod-filter-out,foo bar,-local-func))\ $(call test-expect,foo foo,$(call -ndk-mod-filter-out,aaa foo bar foo,-local-func)) ####################################################################### # Find the first item in a list that checks a valid predicate. # $1: list of names. # $2: predicate function, will be called with $(call $2,), if the # result is not empty, will be added to the result. # Out: subset of input list. ####################################################################### -ndk-mod-find-first = $(firstword $(call -ndk-mod-filter,$1,$2)) -test-ndk-mod-find-first.empty = \ $(eval -local-pred = $$(call seq,foo,$$1))\ $(call test-expect,,$(call -ndk-mod-find-first,,-local-pred))\ $(call test-expect,,$(call -ndk-mod-find-first,bar,-local-pred)) -test-ndk-mod-find-first.simple = \ $(eval -local-pred = $$(call seq,foo,$$1))\ $(call test-expect,foo,$(call -ndk-mod-find-first,foo,-local-pred))\ $(call test-expect,foo,$(call -ndk-mod-find-first,aaa foo bar,-local-pred))\ $(call test-expect,foo,$(call -ndk-mod-find-first,aaa foo foo bar,-local-pred)) ######################################################################## # Many tree walking operations require setting a 'visited' flag on # specific graph nodes. The following helper functions help implement # this while hiding details to the callers. # # Technical note: # _ndk_mod_tree_visited. will be 'true' if the node was visited, # or empty otherwise. # # _ndk_mod_tree_visitors lists all visited nodes, used to clean all # _ndk_mod_tree_visited. variables in -ndk-mod-tree-setup-visit. # ####################################################################### # Call this before tree traversal. -ndk-mod-tree-setup-visit = \ $(foreach _ndk_mod_tree_visitor,$(_ndk_mod_tree_visitors),\ $(eval _ndk_mod_tree_visited.$$(_ndk_mod_tree_visitor) :=))\ $(eval _ndk_mod_tree_visitors :=) # Returns non-empty if a node was visited. -ndk-mod-tree-is-visited = \ $(_ndk_mod_tree_visited.$1) # Set the visited state of a node to 'true' -ndk-mod-tree-set-visited = \ $(eval _ndk_mod_tree_visited.$1 := true)\ $(eval _ndk_mod_tree_visitors += $1) ######################################################################## # Many graph walking operations require a work queue and computing # dependencies / children nodes. Here are a few helper functions that # can be used to make their code clearer. This uses a few global # variables that should be defined as follows during the operation: # # _ndk_mod_module current graph node name. # _ndk_mod_wq current node work queue. # _ndk_mod_list current result (list of nodes). # _ndk_mod_depends current graph node's children. # you must call -ndk-mod-get-depends to set this. # ####################################################################### # Pop first item from work-queue into _ndk_mod_module. -ndk-mod-pop-first = \ $(eval _ndk_mod_module := $$(call first,$$(_ndk_mod_wq)))\ $(eval _ndk_mod_wq := $$(call rest,$$(_ndk_mod_wq))) -test-ndk-mod-pop-first = \ $(eval _ndk_mod_wq := A B C)\ $(call -ndk-mod-pop-first)\ $(call test-expect,A,$(_ndk_mod_module))\ $(call test-expect,B C,$(_ndk_mod_wq))\ # Push list of items at the back of the work-queue. -ndk-mod-push-back = \ $(eval _ndk_mod_wq := $(strip $(_ndk_mod_wq) $1)) -test-ndk-mod-push-back = \ $(eval _ndk_mod_wq := A B C)\ $(call -ndk-mod-push-back, D E)\ $(call test-expect,A B C D E,$(_ndk_mod_wq)) # Set _ndk_mod_depends to the direct dependencies of _ndk_mod_module -ndk-mod-get-depends = \ $(eval _ndk_mod_depends := $$(call $$(_ndk_mod_deps_func),$$(_ndk_mod_module))) # Set _ndk_mod_depends to the direct dependencies of _ndk_mod_module that # are not already in _ndk_mod_list. -ndk-mod-get-new-depends = \ $(call -ndk-mod-get-depends)\ $(eval _ndk_mod_depends := $$(filter-out $$(_ndk_mod_list),$$(_ndk_mod_depends))) ########################################################################## # Compute the transitive closure # $1: list of modules. # $2: dependency function, $(call $2,) should return all the # module that depends on. # Out: transitive closure of all modules from those in $1. Always includes # the modules in $1. Order is random. # # Implementation note: # we use the -ndk-mod-tree-xxx functions to flag 'visited' nodes # in the graph. A node is visited once it has been put into the work # queue. For each item in the work queue, get the dependencies and # append all those that were not visited yet. ####################################################################### -ndk-mod-get-closure = $(strip \ $(eval _ndk_mod_wq :=)\ $(eval _ndk_mod_list :=)\ $(eval _ndk_mod_deps_func := $2)\ $(call -ndk-mod-tree-setup-visit)\ $(foreach _ndk_mod_module,$1,\ $(call -ndk-mod-closure-visit,$(_ndk_mod_module))\ )\ $(call -ndk-mod-closure-recursive)\ $(eval _ndk_mod_deps :=)\ $(_ndk_mod_list)\ ) # Used internally to visit a new node during -ndk-mod-get-closure. # This appends the node to the work queue, and set its 'visit' flag. -ndk-mod-closure-visit = \ $(call -ndk-mod-push-back,$1)\ $(call -ndk-mod-tree-set-visited,$1) -ndk-mod-closure-recursive = \ $(call -ndk-mod-pop-first)\ $(eval _ndk_mod_list += $$(_ndk_mod_module))\ $(call -ndk-mod-get-depends)\ $(foreach _ndk_mod_dep,$(_ndk_mod_depends),\ $(if $(call -ndk-mod-tree-is-visited,$(_ndk_mod_dep)),,\ $(call -ndk-mod-closure-visit,$(_ndk_mod_dep))\ )\ )\ $(if $(_ndk_mod_wq),$(call -ndk-mod-closure-recursive)) -test-ndk-mod-get-closure.empty = \ $(eval -local-deps = $$($$1_depends))\ $(call test-expect,,$(call -ndk-mod-get-closure,,-local-deps)) -test-ndk-mod-get-closure.single = \ $(eval -local-deps = $$($$1_depends))\ $(eval A_depends :=)\ $(call test-expect,A,$(call -ndk-mod-get-closure,A,-local-deps)) -test-ndk-mod-get-closure.double = \ $(eval -local-deps = $$($$1_depends))\ $(eval A_depends := B)\ $(eval B_depends :=)\ $(call test-expect,A B,$(call -ndk-mod-get-closure,A,-local-deps)) -test-ndk-mod-get-closure.circular-deps = \ $(eval -local-deps = $$($$1_depends))\ $(eval A_depends := B)\ $(eval B_depends := C)\ $(eval C_depends := A)\ $(call test-expect,A B C,$(call -ndk-mod-get-closure,A,-local-deps)) -test-ndk-mod-get-closure.ABCDE = \ $(eval -local-deps = $$($$1_depends))\ $(eval A_depends := B C)\ $(eval B_depends := D)\ $(eval C_depends := D E)\ $(eval D_depends :=)\ $(eval E_depends :=)\ $(call test-expect,A B C D E,$(call -ndk-mod-get-closure,A,-local-deps)) ######################################################################### # For topological sort, we need to count the number of incoming edges # in each graph node. The following helper functions implement this and # hide implementation details. # # Count the number of incoming edges for each node during topological # sort with a string of xxxxs. I.e.: # 0 edge -> '' # 1 edge -> 'x' # 2 edges -> 'xx' # 3 edges -> 'xxx' # etc. ######################################################################### # zero the incoming edge counter for module $1 -ndk-mod-topo-zero-incoming = \ $(eval _ndk_mod_topo_incoming.$1 :=) # increment the incoming edge counter for module $1 -ndk-mod-topo-increment-incoming = \ $(eval _ndk_mod_topo_incoming.$1 := $$(_ndk_mod_topo_incoming.$1)x) # decrement the incoming edge counter for module $1 -ndk-mod-topo-decrement-incoming = \ $(eval _ndk_mod_topo_incoming.$1 := $$(_ndk_mod_topo_incoming.$1:%x=%)) # return non-empty if the module $1's incoming edge counter is > 0 -ndk-mod-topo-has-incoming = $(_ndk_mod_topo_incoming.$1) # Find first node in a list that has zero incoming edges. # $1: list of nodes # Out: first node that has zero incoming edges, or empty. -ndk-mod-topo-find-first-zero-incoming = $(firstword $(call -ndk-mod-filter-out,$1,-ndk-mod-topo-has-incoming)) # Only use for debugging: -ndk-mod-topo-dump-count = \ $(foreach _ndk_mod_module,$1,\ $(info .. $(_ndk_mod_module) incoming='$(_ndk_mod_topo_incoming.$(_ndk_mod_module))')) ######################################################################### # Return the topologically ordered closure of all nodes from a top-level # one. This means that a node A, in the result, will always appear after # node B if A depends on B. Assumes that the graph is a DAG (if there are # circular dependencies, this property cannot be guaranteed, but at least # the function should not loop infinitely). # # $1: top-level node name. # $2: dependency function, i.e. $(call $2,) returns the children # nodes for . # Return: list of nodes, include $1, which will always be the first. ######################################################################### -ndk-mod-get-topo-list = $(strip \ $(eval _ndk_mod_top_module := $1)\ $(eval _ndk_mod_deps_func := $2)\ $(eval _ndk_mod_nodes := $(call -ndk-mod-get-closure,$1,$2))\ $(call -ndk-mod-topo-count,$(_ndk_mod_nodes))\ $(eval _ndk_mod_list :=)\ $(eval _ndk_mod_wq := $(call -ndk-mod-topo-find-first-zero-incoming,$(_ndk_mod_nodes)))\ $(call -ndk-mod-topo-sort)\ $(_ndk_mod_list) $(_ndk_mod_nodes)\ ) # Given a closure list of nodes, count their incoming edges. # $1: list of nodes, must be a graph closure. -ndk-mod-topo-count = \ $(foreach _ndk_mod_module,$1,\ $(call -ndk-mod-topo-zero-incoming,$(_ndk_mod_module)))\ $(foreach _ndk_mod_module,$1,\ $(call -ndk-mod-get-depends)\ $(foreach _ndk_mod_dep,$(_ndk_mod_depends),\ $(call -ndk-mod-topo-increment-incoming,$(_ndk_mod_dep))\ )\ ) -ndk-mod-topo-sort = \ $(call -ndk-topo-debug,-ndk-mod-topo-sort: wq='$(_ndk_mod_wq)' list='$(_ndk_mod_list)')\ $(call -ndk-mod-pop-first)\ $(if $(_ndk_mod_module),\ $(eval _ndk_mod_list += $(_ndk_mod_module))\ $(eval _ndk_mod_nodes := $(filter-out $(_ndk_mod_module),$(_ndk_mod_nodes)))\ $(call -ndk-mod-topo-decrement-incoming,$(_ndk_mod_module))\ $(call -ndk-mod-get-depends)\ $(call -ndk-topo-debug,-ndk-mod-topo-sort: deps='$(_ndk_mod_depends)')\ $(foreach _ndk_mod_dep,$(_ndk_mod_depends),\ $(call -ndk-mod-topo-decrement-incoming,$(_ndk_mod_dep))\ $(if $(call -ndk-mod-topo-has-incoming,$(_ndk_mod_dep)),,\ $(call -ndk-mod-push-back,$(_ndk_mod_dep))\ )\ )\ $(call -ndk-mod-topo-sort)\ ) -test-ndk-mod-get-topo-list.empty = \ $(eval -local-deps = $$($$1_depends))\ $(call test-expect,,$(call -ndk-mod-get-topo-list,,-local-deps)) -test-ndk-mod-get-topo-list.single = \ $(eval -local-deps = $$($$1_depends))\ $(eval A_depends :=)\ $(call test-expect,A,$(call -ndk-mod-get-topo-list,A,-local-deps)) -test-ndk-mod-get-topo-list.no-infinite-loop = \ $(eval -local-deps = $$($$1_depends))\ $(eval A_depends := B)\ $(eval B_depends := C)\ $(eval C_depends := A)\ $(call test-expect,A B C,$(call -ndk-mod-get-topo-list,A,-local-deps)) -test-ndk-mod-get-topo-list.ABC = \ $(eval -local-deps = $$($$1_depends))\ $(eval A_depends := B C)\ $(eval B_depends :=)\ $(eval C_depends := B)\ $(call test-expect,A C B,$(call -ndk-mod-get-topo-list,A,-local-deps)) -test-ndk-mod-get-topo-list.ABCD = \ $(eval -local-deps = $$($$1_depends))\ $(eval A_depends := B C)\ $(eval B_depends := D)\ $(eval C_depends := B)\ $(eval D_depends :=)\ $(call test-expect,A C B D,$(call -ndk-mod-get-topo-list,A,-local-deps)) -test-ndk-mod-get-topo-list.ABC.circular = \ $(eval -local-deps = $$($$1_depends))\ $(eval A_depends := B)\ $(eval B_depends := C)\ $(eval C_depends := B)\ $(call test-expect,A B C,$(call -ndk-mod-get-topo-list,A,-local-deps)) ######################################################################### # Return the topologically ordered closure of all dependencies from a # top-level node. # # $1: top-level node name. # $2: dependency function, i.e. $(call $2,) returns the children # nodes for . # Return: list of nodes, include $1, which will never be included. ######################################################################### -ndk-mod-get-topological-depends = $(call rest,$(call -ndk-mod-get-topo-list,$1,$2)) -test-ndk-mod-get-topological-depends.simple = \ $(eval -local-get-deps = $$($$1_depends))\ $(eval A_depends := B)\ $(eval B_depends :=)\ $(eval topo_deps := $$(call -ndk-mod-get-topological-depends,A,-local-get-deps))\ $(call test-expect,B,$(topo_deps),topo dependencies) -test-ndk-mod-get-topological-depends.ABC = \ $(eval -local-get-deps = $$($$1_depends))\ $(eval A_depends := B C)\ $(eval B_depends :=)\ $(eval C_depends := B)\ $(eval bfs_deps := $$(call -ndk-mod-get-bfs-depends,A,-local-get-deps))\ $(eval topo_deps := $$(call -ndk-mod-get-topological-depends,A,-local-get-deps))\ $(call test-expect,B C,$(bfs_deps),dfs dependencies)\ $(call test-expect,C B,$(topo_deps),topo dependencies) -test-ndk-mod-get-topological-depends.circular = \ $(eval -local-get-deps = $$($$1_depends))\ $(eval A_depends := B)\ $(eval B_depends := C)\ $(eval C_depends := B)\ $(eval bfs_deps := $$(call -ndk-mod-get-bfs-depends,A,-local-get-deps))\ $(eval topo_deps := $$(call -ndk-mod-get-topological-depends,A,-local-get-deps))\ $(call test-expect,B C,$(bfs_deps),dfs dependencies)\ $(call test-expect,B C,$(topo_deps),topo dependencies) ######################################################################### # Return breadth-first walk of a graph, starting from an arbitrary # node. # # This performs a breadth-first walk of the graph and will return a # list of nodes. Note that $1 will always be the first in the list. # # $1: root node name. # $2: dependency function, i.e. $(call $2,) returns the nodes # that depends on. # Result: list of dependent modules, $1 will be part of it. ######################################################################### -ndk-mod-get-bfs-list = $(strip \ $(eval _ndk_mod_wq := $(call strip-lib-prefix,$1)) \ $(eval _ndk_mod_deps_func := $2)\ $(eval _ndk_mod_list :=)\ $(call -ndk-mod-tree-setup-visit)\ $(call -ndk-mod-tree-set-visited,$(_ndk_mod_wq))\ $(call -ndk-mod-bfs-recursive) \ $(_ndk_mod_list)) # Recursive function used to perform a depth-first scan. # Must initialize _ndk_mod_list, _ndk_mod_field, _ndk_mod_wq # before calling this. -ndk-mod-bfs-recursive = \ $(call -ndk-mod-debug,-ndk-mod-bfs-recursive wq='$(_ndk_mod_wq)' list='$(_ndk_mod_list)' visited='$(_ndk_mod_tree_visitors)')\ $(call -ndk-mod-pop-first)\ $(eval _ndk_mod_list += $$(_ndk_mod_module))\ $(call -ndk-mod-get-depends)\ $(call -ndk-mod-debug,. node='$(_ndk_mod_module)' deps='$(_ndk_mod_depends)')\ $(foreach _ndk_mod_child,$(_ndk_mod_depends),\ $(if $(call -ndk-mod-tree-is-visited,$(_ndk_mod_child)),,\ $(call -ndk-mod-tree-set-visited,$(_ndk_mod_child))\ $(call -ndk-mod-push-back,$(_ndk_mod_child))\ )\ )\ $(if $(_ndk_mod_wq),$(call -ndk-mod-bfs-recursive)) -test-ndk-mod-get-bfs-list.empty = \ $(eval -local-deps = $$($$1_depends))\ $(call test-expect,,$(call -ndk-mod-get-bfs-list,,-local-deps)) -test-ndk-mod-get-bfs-list.A = \ $(eval -local-deps = $$($$1_depends))\ $(eval A_depends :=)\ $(call test-expect,A,$(call -ndk-mod-get-bfs-list,A,-local-deps)) -test-ndk-mod-get-bfs-list.ABCDEF = \ $(eval -local-deps = $$($$1_depends))\ $(eval A_depends := B C)\ $(eval B_depends := D E)\ $(eval C_depends := F E)\ $(eval D_depends :=)\ $(eval E_depends :=)\ $(eval F_depends :=)\ $(call test-expect,A B C D E F,$(call -ndk-mod-get-bfs-list,A,-local-deps)) ######################################################################### # Return breadth-first walk of a graph, starting from an arbitrary # node. # # This performs a breadth-first walk of the graph and will return a # list of nodes. Note that $1 will _not_ be part of the list. # # $1: root node name. # $2: dependency function, i.e. $(call $2,) returns the nodes # that depends on. # Result: list of dependent modules, $1 will not be part of it. ######################################################################### -ndk-mod-get-bfs-depends = $(call rest,$(call -ndk-mod-get-bfs-list,$1,$2)) -test-ndk-mod-get-bfs-depends.simple = \ $(eval -local-deps-func = $$($$1_depends))\ $(eval A_depends := B)\ $(eval B_depends :=)\ $(eval deps := $$(call -ndk-mod-get-bfs-depends,A,-local-deps-func))\ $(call test-expect,B,$(deps)) -test-ndk-mod-get-bfs-depends.ABC = \ $(eval -local-deps-func = $$($$1_depends))\ $(eval A_depends := B C)\ $(eval B_depends :=)\ $(eval C_depends := B)\ $(eval deps := $$(call -ndk-mod-get-bfs-depends,A,-local-deps-func))\ $(call test-expect,B C,$(deps))\ -test-ndk-mod-get-bfs-depends.ABCDE = \ $(eval -local-deps-func = $$($$1_depends))\ $(eval A_depends := B C)\ $(eval B_depends := D)\ $(eval C_depends := D E F)\ $(eval D_depends :=)\ $(eval E_depends :=)\ $(eval F_depends :=)\ $(eval deps := $$(call -ndk-mod-get-bfs-depends,A,-local-deps-func))\ $(call test-expect,B C D E F,$(deps))\ -test-ndk-mod-get-bfs-depends.loop = \ $(eval -local-deps-func = $$($$1_depends))\ $(eval A_depends := B)\ $(eval B_depends := A)\ $(eval deps := $$(call -ndk-mod-get-bfs-depends,A,-local-deps-func))\ $(call test-expect,B,$(deps)) ================================================ FILE: build/core/definitions-host.mk ================================================ # Copyright (C) 2009 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. # # These definitions contain a few host-specific functions. I.e. they are # typically used to generate shell commands during the build and their # implementation will depend on the value of the HOST_OS variable. # # ----------------------------------------------------------------------------- # Function : host-path # Arguments: 1: file path # Returns : file path, as understood by the host file system # Usage : $(call host-path,) # Rationale: This function is used to translate Cygwin paths into # Cygwin-specific ones. On other platforms, it will just # return its argument. # ----------------------------------------------------------------------------- ifeq ($(HOST_OS),cygwin) host-path = $(if $(strip $1),$(call cygwin-to-host-path,$1)) else host-path = $1 endif # ----------------------------------------------------------------------------- # Function : host-rm # Arguments: 1: list of files # Usage : $(call host-rm,) # Rationale: This function expands to the host-specific shell command used # to remove some files. # ----------------------------------------------------------------------------- ifeq ($(HOST_OS),windows) host-rm = \ $(eval __host_rm_files := $(foreach __host_rm_file,$1,$(subst /,\,$(wildcard $(__host_rm_file)))))\ $(if $(__host_rm_files),del /f/q $(__host_rm_files) >NUL 2>NUL) else host-rm = rm -f $1 endif # ----------------------------------------------------------------------------- # Function : host-rmdir # Arguments: 1: list of files or directories # Usage : $(call host-rm,) # Rationale: This function expands to the host-specific shell command used # to remove some files _and_ directories. # ----------------------------------------------------------------------------- ifeq ($(HOST_OS),windows) host-rmdir = \ $(eval __host_rmdir_files := $(foreach __host_rmdir_file,$1,$(subst /,\,$(wildcard $(__host_rmdir_file)))))\ $(if $(__host_rmdir_files),del /f/s/q $(__host_rmdir_files) >NUL 2>NUL) else host-rmdir = rm -rf $1 endif # ----------------------------------------------------------------------------- # Function : host-mkdir # Arguments: 1: directory path # Usage : $(call host-mkdir, # Rationale: This function expands to the host-specific shell command used # to create a path if it doesn't exist. # ----------------------------------------------------------------------------- ifeq ($(HOST_OS),windows) host-mkdir = md $(subst /,\,"$1") >NUL 2>NUL || rem else host-mkdir = mkdir -p $1 endif # ----------------------------------------------------------------------------- # Function : host-cp # Arguments: 1: source file # 2: target file # Usage : $(call host-cp,,) # Rationale: This function expands to the host-specific shell command used # to copy a single file # ----------------------------------------------------------------------------- ifeq ($(HOST_OS),windows) host-cp = copy /b/y $(subst /,\,"$1" "$2") > NUL else host-cp = cp -f $1 $2 endif # ----------------------------------------------------------------------------- # Function : host-mv # Arguments: 1: source file # 2: target file # Usage : $(call host-mv,,) # Rationale: This function expands to the host-specific shell command used # to move a single file # ----------------------------------------------------------------------------- ifeq ($(HOST_OS),windows) host-mv = move /y $(subst /,\,"$1" "$2") > NUL else host-mv = mv -f $1 $2 endif # ----------------------------------------------------------------------------- # Function : host-install # Arguments: 1: source file # 2: target file # Usage : $(call host-install,,) # Rationale: This function expands to the host-specific shell command used # to install a file or directory, while preserving its timestamps # (if possible). # ----------------------------------------------------------------------------- ifeq ($(HOST_OS),windows) host-install = copy /b/y $(subst /,\,"$1" "$2") > NUL else host-install = install -p $1 $2 endif # ----------------------------------------------------------------------------- # Function : host-echo-build-step # Arguments: 1: ABI # 2: Step description (e.g. 'Compile C++', or 'StaticLibrary') # Usage : ---->|$(call host-echo-build-step,Compile) ....other text... # Rationale: This function expands to the host-specific shell command used # to print the prefix of a given build step / command. # ----------------------------------------------------------------------------- host-echo-build-step = @ $(HOST_ECHO) [$1] $(call left-justify-quoted-15,$2): # ----------------------------------------------------------------------------- # Function : host-c-includes # Arguments: 1: list of file paths (e.g. "foo bar") # Returns : list of include compiler options (e.g. "-Ifoo -Ibar") # Usage : $(call host-c-includes,) # Rationale: This function is used to translate Cygwin paths into # Cygwin-specific ones. On other platforms, it will just # return its argument. # ----------------------------------------------------------------------------- ifeq ($(HOST_OS),cygwin) host-c-includes = $(patsubst %,-I%,$(call host-path,$1)) else host-c-includes = $(1:%=-I%) endif # ----------------------------------------------------------------------------- # Function : host-copy-if-differ # Arguments: 1: source file # 2: destination file # Usage : $(call host-copy-if-differ,,) # Rationale: This function copy source file to destination file if contents are # different. # ----------------------------------------------------------------------------- ifeq ($(HOST_OS),windows) host-copy-if-differ = $(HOST_CMP) -s $1 $2 > NUL || copy /b/y $(subst /,\,"$1" "$2") > NUL else host-copy-if-differ = $(HOST_CMP) -s $1 $2 > /dev/null 2>&1 || cp -f $1 $2 endif # ----------------------------------------------------------------------------- # Function : host-path-is-absolute # Arguments: 1: file path # Usage : $(call host-path-is-absolute,) # Rationale: This function returns a non-empty result if the input path is # absolute on the host filesystem. # ----------------------------------------------------------------------------- # On Windows, we need to take care drive prefix in file paths, e.g.: # /foo -> top-level 'foo' directory on current drive. # //bar/foo -> top-level 'foo' on network share 'bar' # c:/foo -> top-level 'foo' directory on C drive. # c:foo -> 'foo' subdirectory on C drive's current directory. # # Treat all of them as absolute. Filtering the first two cases is easy # by simply looking at the first character. The other ones are more # complicated and the simplest way is still to try all alphabet letters # directly. Anything else involves very complicated GNU Make parsing # voodoo. ndk-windows-drive-letters := a b c d e f g h i j k l m n o p q r s t u v w x y z \ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z ndk-windows-drive-patterns := $(foreach _drive,$(ndk-windows-drive-letters),$(_drive):%) windows-path-is-absolute = $(if $(filter /% $(ndk-windows-drive-patterns),$(subst \,/,$1)),true) ifeq ($(HOST_OS),windows) host-path-is-absolute = $(call windows-path-is-absolute,$1) else host-path-is-absolute = $(if $(filter /%,$1),true) endif -test-host-path-is-absolute.relative-paths = \ $(call test-expect,,$(call host-path-is-absolute,foo))\ $(call test-expect,,$(call host-path-is-absolute,foo/bar))\ $(call test-expect,,$(call host-path-is-absolute,.))\ $(call test-expect,,$(call host-path-is-absolute,..)) -test-host-path-is-absolute.absolute-paths = \ $(call test-expect,true,$(call host-path-is-absolute,/))\ $(call test-expect,true,$(call host-path-is-absolute,/foo))\ $(call test-expect,true,$(call host-path-is-absolute,/foo/bar))\ $(call test-expect,true,$(call host-path-is-absolute,//foo))\ $(call test-expect,true,$(call host-path-is-absolute,/.)) -test-host-path-is-asbolute.windows-relative-paths = \ $(call test-expect,$(call windows-path-is-absolute,foo))\ $(call test-expect,$(call windows-path-is-absolute,foo/bar))\ $(call test-expect,$(call windows-path-is-absolute,.))\ $(call test-expect,$(call windows-path-is-absolute,..)) -test-host-path-is-asbolute.windows-absolute-paths = \ $(call test-expect,true,$(call windows-path-is-absolute,c:/))\ $(call test-expect,true,$(call windows-path-is-absolute,x:))\ $(call test-expect,true,$(call windows-path-is-absolute,K:foo))\ $(call test-expect,true,$(call windows-path-is-absolute,C:\Foo\Bar))\ $(call test-expect,true,$(call windows-path-is-absolute,\Foo)) ================================================ FILE: build/core/definitions-tests.mk ================================================ # Copyright (C) 2012 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. # # Definitions for the Android NDK build system's internal unit tests. # # # A function which names begin with -test- (e.g. -test-foo) is assumed # to be an internal unit test. It will be run automatically by ndk-build # if NDK_UNIT_TESTS is defined in your environment. # # Each test should call one of the following functions that will # register a failure: # # $(call test-expect,,) # # This will check that is equal to . # If not, this will print an error message and increment the failure # counter. # # $(call test-assert,,) # # This is similar to test-expect, though it will abort the program # immediately after displaying an error message. # # Here's an example that checks that the 'filter' function works correctly: # # -test-filter = \ # $(call test-expect,foo,$(filter bar,foo bar)) # # -ndk-test-start = \ $(eval _test_name := $1)\ $(eval _test_list += $1)\ $(eval _test_failed :=)\ $(info [$1 RUN]) # End current unit test. # -ndk-test-end = \ $(if $(_test_failed),\ $(info [$(_test_name) FAIL])$(error Aborting)\ $(eval _test_failures += $$(_test_name))\ ,\ $(info [$(_test_name) OK])\ ) # Define NDK_UNIT_TESTS to 2 to dump each test-expect/assert check. # ifeq (2,$(NDK_UNIT_TESTS)) -ndk-test-log = $(info . $(_test_name): $1) else -ndk-test-log = $(empty) endif test-expect = \ $(call -ndk-test-log,expect '$2' == '$1')\ $(if $(call sne,$1,$2),\ $(info ERROR <$(_test_name)>:$3)\ $(info . expected value:'$1')\ $(info . actual value: '$2')\ $(eval _test_failed := true)\ ) test-assert = \ $(call -ndk-test-log,assert '$2' == '$1')\ $(if $(call sne,$1,$2),\ $(info ASSERT <$(_test_name)>:$3)\ $(info . expected value:'$1')\ $(info . actual value: '$2')\ $(eval _test_failed := true)\ $(error Aborting.)\ ) # Run all the tests, i.e. all functions that are defined with a -test- # prefix will be called now in succession. ndk-run-all-tests = \ $(info ================= STARTING NDK-BUILD UNIT TESTS =================)\ $(eval _test_list :=)\ $(eval _test_failures :=)\ $(foreach _test,$(filter -test-%,$(.VARIABLES)),\ $(call -ndk-test-start,$(_test))\ $(call $(_test))\ $(call -ndk-test-end)\ )\ $(eval _test_count := $$(words $$(_test_list)))\ $(eval _test_fail_count := $$(words $$(_test_failures)))\ $(if $(_test_failures),\ $(info @@@@@@@@@@@ FAILED $(_test_fail_count) of $(_test_count) NDK-BUILD UNIT TESTS @@@@@@@)\ $(foreach _test_name,$(_test_failures),\ $(info . $(_test_name)))\ ,\ $(info =================== PASSED $(_test_count) NDK-BUILD UNIT TESTS =================)\ ) ================================================ FILE: build/core/definitions-utils.mk ================================================ # Copyright (C) 2009 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. # # Common utility functions. # # NOTE: All the functions here should be purely functional, i.e. avoid # using global variables or depend on the file system / environment # variables. This makes testing easier. # ----------------------------------------------------------------------------- # Macro : empty # Returns : an empty macro # Usage : $(empty) # ----------------------------------------------------------------------------- empty := # ----------------------------------------------------------------------------- # Macro : space # Returns : a single space # Usage : $(space) # ----------------------------------------------------------------------------- space := $(empty) $(empty) space4 := $(space)$(space)$(space)$(space) # ----------------------------------------------------------------------------- # Macro : comma # Returns : a single comma # Usage : $(comma) # ----------------------------------------------------------------------------- comma := , # ----------------------------------------------------------------------------- # Macro : colon # Returns : a single colon # Usage : $(colon) # ----------------------------------------------------------------------------- colon := : # ----------------------------------------------------------------------------- # Function : remove-duplicates # Arguments: a list # Returns : the list with duplicate items removed, order is preserved. # Usage : $(call remove-duplicates, ) # Note : This is equivalent to the 'uniq' function provided by GMSL, # however this implementation is non-recursive and *much* # faster. It will also not explode the stack with a lot of # items like 'uniq' does. # ----------------------------------------------------------------------------- remove-duplicates = $(strip \ $(eval __uniq_ret :=) \ $(foreach __uniq_item,$1,\ $(if $(findstring $(__uniq_item),$(__uniq_ret)),,\ $(eval __uniq_ret += $(__uniq_item))\ )\ )\ $(__uniq_ret)) -test-remove-duplicates = \ $(call test-expect,,$(call remove-duplicates))\ $(call test-expect,foo bar,$(call remove-duplicates,foo bar))\ $(call test-expect,foo bar,$(call remove-duplicates,foo bar foo bar))\ $(call test-expect,foo bar,$(call remove-duplicates,foo foo bar bar bar)) # ----------------------------------------------------------------------------- # Function : clear-vars # Arguments: 1: list of variable names # 2: file where the variable should be defined # Returns : None # Usage : $(call clear-vars, VAR1 VAR2 VAR3...) # Rationale: Clears/undefines all variables in argument list # ----------------------------------------------------------------------------- clear-vars = $(foreach __varname,$1,$(eval $(__varname) := $(empty))) # ----------------------------------------------------------------------------- # Function : filter-by # Arguments: 1: list # 2: predicate function, will be called as $(call $2,) # and it this returns a non-empty value, then # will be appended to the result. # Returns : elements of $1 that satisfy the predicate function $2 # ----------------------------------------------------------------------------- filter-by = $(strip \ $(foreach __filter_by_n,$1,\ $(if $(call $2,$(__filter_by_n)),$(__filter_by_n)))) -test-filter-by = \ $(eval -local-func = $$(call seq,foo,$$1))\ $(call test-expect,,$(call filter-by,,-local-func))\ $(call test-expect,foo,$(call filter-by,foo,-local-func))\ $(call test-expect,foo,$(call filter-by,foo bar,-local-func))\ $(call test-expect,foo foo,$(call filter-by,aaa foo bar foo,-local-func))\ $(eval -local-func = $$(call sne,foo,$$1))\ $(call test-expect,,$(call filter-by,,-local-func))\ $(call test-expect,,$(call filter-by,foo,-local-func))\ $(call test-expect,bar,$(call filter-by,foo bar,-local-func))\ $(call test-expect,aaa bar,$(call filter-by,aaa foo bar,-local-func)) # ----------------------------------------------------------------------------- # Function : filter-out-by # Arguments: 1: list # 2: predicate function, will be called as $(call $2,) # and it this returns an empty value, then # will be appended to the result. # Returns : elements of $1 that do not satisfy the predicate function $2 # ----------------------------------------------------------------------------- filter-out-by = $(strip \ $(foreach __filter_out_by_n,$1,\ $(if $(call $2,$(__filter_out_by_n)),,$(__filter_out_by_n)))) -test-filter-out-by = \ $(eval -local-func = $$(call seq,foo,$$1))\ $(call test-expect,,$(call filter-out-by,,-local-func))\ $(call test-expect,,$(call filter-out-by,foo,-local-func))\ $(call test-expect,bar,$(call filter-out-by,foo bar,-local-func))\ $(call test-expect,aaa bar,$(call filter-out-by,aaa foo bar foo,-local-func))\ $(eval -local-func = $$(call sne,foo,$$1))\ $(call test-expect,,$(call filter-out-by,,-local-func))\ $(call test-expect,foo,$(call filter-out-by,foo,-local-func))\ $(call test-expect,foo,$(call filter-out-by,foo bar,-local-func))\ $(call test-expect,foo foo,$(call filter-out-by,aaa foo bar foo,-local-func)) # ----------------------------------------------------------------------------- # Function : find-first # Arguments: 1: list # 2: predicate function, will be called as $(call $2,). # Returns : the first item of $1 that satisfies the predicate. # ----------------------------------------------------------------------------- find-first = $(firstword $(call filter-by,$1,$2)) -test-find-first.empty = \ $(eval -local-pred = $$(call seq,foo,$$1))\ $(call test-expect,,$(call find-first,,-local-pred))\ $(call test-expect,,$(call find-first,bar,-local-pred)) -test-find-first.simple = \ $(eval -local-pred = $$(call seq,foo,$$1))\ $(call test-expect,foo,$(call find-first,foo,-local-pred))\ $(call test-expect,foo,$(call find-first,aaa foo bar,-local-pred))\ $(call test-expect,foo,$(call find-first,aaa foo foo bar,-local-pred)) # ----------------------------------------------------------------------------- # Function : parent-dir # Arguments: 1: path # Returns : Parent dir or path of $1, with final separator removed. # ----------------------------------------------------------------------------- ifeq ($(HOST_OS),windows) # On Windows, defining parent-dir is a bit more tricky because the # GNU Make $(dir ...) function doesn't return an empty string when it # reaches the top of the directory tree, and we want to enforce this to # avoid infinite loops. # # $(dir C:) -> C: (empty expected) # $(dir C:/) -> C:/ (empty expected) # $(dir C:\) -> C:\ (empty expected) # $(dir C:/foo) -> C:/ (correct) # $(dir C:\foo) -> C:\ (correct) # parent-dir = $(patsubst %/,%,$(strip \ $(eval __dir_node := $(patsubst %/,%,$(subst \,/,$1)))\ $(eval __dir_parent := $(dir $(__dir_node)))\ $(filter-out $1,$(__dir_parent))\ )) else parent-dir = $(patsubst %/,%,$(dir $(1:%/=%))) endif -test-parent-dir = \ $(call test-expect,,$(call parent-dir))\ $(call test-expect,.,$(call parent-dir,foo))\ $(call test-expect,foo,$(call parent-dir,foo/bar))\ $(call test-expect,foo,$(call parent-dir,foo/bar/)) # ----------------------------------------------------------------------------- # Strip any 'lib' prefix in front of a given string. # # Function : strip-lib-prefix # Arguments: 1: module name # Returns : module name, without any 'lib' prefix if any # Usage : $(call strip-lib-prefix,$(LOCAL_MODULE)) # ----------------------------------------------------------------------------- strip-lib-prefix = $(1:lib%=%) -test-strip-lib-prefix = \ $(call test-expect,,$(call strip-lib-prefix,))\ $(call test-expect,foo,$(call strip-lib-prefix,foo))\ $(call test-expect,foo,$(call strip-lib-prefix,libfoo))\ $(call test-expect,nolibfoo,$(call strip-lib-prefix,nolibfoo))\ $(call test-expect,foolib,$(call strip-lib-prefix,foolib))\ $(call test-expect,foo bar,$(call strip-lib-prefix,libfoo libbar)) # ----------------------------------------------------------------------------- # Left-justify input string with spaces to fill a width of 15. # Function: left-justify-quoted-15 # Arguments: 1: Input text # Returns: A quoted string that can be used in command scripts to print # the left-justified input with host-echo. # # Usage: ---->@$(call host-echo, $(call left-justify-quoted-15,$(_TEXT)): Do stuff) # Where ----> is a TAB character. # ----------------------------------------------------------------------------- left-justify-quoted-15 = $(call -left-justify,$1,xxxxxxxxxxxxxxx) -test-left-justify-quoted-15 = \ $(call test-expect," ",$(call left-justify-quoted-15,))\ $(call test-expect,"Foo Bar ",$(call left-justify-quoted-15,Foo Bar))\ $(call test-expect,"Very long string over 15 characters wide",$(strip \ $(call left-justify-quoted-15,Very long string over 15 characters wide))) # Used internally to compute a quoted left-justified text string. # $1: Input string. # $2: A series of contiguous x's, its length determines the full width to justify to. # Return: A quoted string with the input text left-justified appropriately. -left-justify = $(strip \ $(eval __lj_temp := $(subst $(space),x,$1))\ $(foreach __lj_a,$(__gmsl_characters),$(eval __lj_temp := $$(subst $$(__lj_a),x,$(__lj_temp))))\ $(eval __lj_margin := $$(call -justification-margin,$(__lj_temp),$2)))"$1$(subst x,$(space),$(__lj_margin))" -test-left-justify = \ $(call test-expect,"",$(call -left-justify,,))\ $(call test-expect,"foo",$(call -left-justify,foo,xxx))\ $(call test-expect,"foo ",$(call -left-justify,foo,xxxx))\ $(call test-expect,"foo ",$(call -left-justify,foo,xxxxxx))\ $(call test-expect,"foo ",$(call -left-justify,foo,xxxxxxxxxxxx))\ $(call test-expect,"very long string",$(call -left-justify,very long string,xxx))\ # Used internally to compute a justification margin. # Expects $1 to be defined to a string of consecutive x's (e.g. 'xxxx') # Expects $2 to be defined to a maximum string of x's (e.g. 'xxxxxxxxx') # Returns a string of x's such as $1 + $(result) is equal to $2 # If $1 is larger than $2, return empty string.. -justification-margin = $(strip \ $(if $2,\ $(if $1,\ $(call -justification-margin-inner,$1,$2),\ $2\ ),\ $1)) -justification-margin-inner = $(if $(findstring $2,$1),,x$(call -justification-margin-inner,x$1,$2)) -test-justification-margin = \ $(call test-expect,,$(call -justification-margin,,))\ $(call test-expect,,$(call -justification-margin,xxx,xxx))\ $(call test-expect,xxxxxx,$(call -justification-margin,,xxxxxx))\ $(call test-expect,xxxxx,$(call -justification-margin,x,xxxxxx))\ $(call test-expect,xxxx,$(call -justification-margin,xx,xxxxxx))\ $(call test-expect,xxx,$(call -justification-margin,xxx,xxxxxx))\ $(call test-expect,xx,$(call -justification-margin,xxxx,xxxxxx))\ $(call test-expect,x,$(call -justification-margin,xxxxx,xxxxxx))\ $(call test-expect,,$(call -justification-margin,xxxxxx,xxxxxx))\ $(call test-expect,,$(call -justification-margin,xxxxxxxxxxx,xxxxxx))\ ================================================ FILE: build/core/definitions.mk ================================================ # Copyright (C) 2009, 2014, 2015, 2016 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. # # Common definitions for the Android NDK build system # # We use the GNU Make Standard Library include $(NDK_ROOT)/build/gmsl/gmsl include $(BUILD_SYSTEM)/definitions-tests.mk include $(BUILD_SYSTEM)/definitions-utils.mk include $(BUILD_SYSTEM)/definitions-host.mk include $(BUILD_SYSTEM)/definitions-graph.mk define crystax-dir $(strip \ $(call assert-defined,NDK_ROOT)\ $(eval __crystax_dir := $(call host-path,$(NDK_ROOT)/sources/crystax))\ $(if $(strip $(wildcard $(__crystax_dir))),\ $(__crystax_dir),\ $(call __ndk_info,Could not find libcrystax directory: $(call pretty-dir,$(__crystax_dir)) (broken NDK?))\ $(call __ndk_error,Aborting)\ ) ) endef # ----------------------------------------------------------------------------- # Macro : this-makefile # Returns : the name of the current Makefile in the inclusion stack # Usage : $(this-makefile) # ----------------------------------------------------------------------------- this-makefile = $(lastword $(MAKEFILE_LIST)) # ----------------------------------------------------------------------------- # Macro : local-makefile # Returns : the name of the last parsed Android.mk file # Usage : $(local-makefile) # ----------------------------------------------------------------------------- local-makefile = $(lastword $(filter %Android.mk,$(MAKEFILE_LIST))) # ----------------------------------------------------------------------------- # Function : assert-defined # Arguments: 1: list of variable names # Returns : None # Usage : $(call assert-defined, VAR1 VAR2 VAR3...) # Rationale: Checks that all variables listed in $1 are defined, or abort the # build # ----------------------------------------------------------------------------- assert-defined = $(foreach __varname,$(strip $1),\ $(if $(strip $($(__varname))),,\ $(call __ndk_error, Assertion failure: $(__varname) is not defined)\ )\ ) # ----------------------------------------------------------------------------- # Function : check-required-vars # Arguments: 1: list of variable names # 2: file where the variable(s) should be defined # Returns : None # Usage : $(call check-required-vars, VAR1 VAR2 VAR3..., ) # Rationale: Checks that all required vars listed in $1 were defined by $2 # or abort the build with an error # ----------------------------------------------------------------------------- check-required-vars = $(foreach __varname,$1,\ $(if $(strip $($(__varname))),,\ $(call __ndk_info, Required variable $(__varname) is not defined by $2)\ $(call __ndk_error,Aborting)\ )\ ) # The list of default C++ extensions supported by GCC. default-c++-extensions := .cc .cp .cxx .cpp .CPP .c++ .C # The list of default RS extensions supported by llvm-rs-cc default-rs-extensions := .rs .fs # ----------------------------------------------------------------------------- # Function : generate-dir # Arguments: 1: directory path # Returns : Generate a rule, but not dependency, to create a directory with # host-mkdir. # Usage : $(call generate-dir,) # ----------------------------------------------------------------------------- define ev-generate-dir __ndk_dir := $1 ifeq (,$$(__ndk_dir_flag__$$(__ndk_dir))) # Note that the following doesn't work because path in windows may contain # ':' if ndk-build is called inside jni/ directory when path is expanded # to full-path, eg. C:/path/to/project/jni/ # # __ndk_dir_flag__$1 := true # __ndk_dir_flag__$$(__ndk_dir) := true $1: $$(hide) $$(call host-mkdir,$$@) endif endef generate-dir = $(eval $(call ev-generate-dir,$1)) # ----------------------------------------------------------------------------- # Function : generate-file-dir # Arguments: 1: file path # Returns : Generate a dependency and a rule to ensure that the parent # directory of the input file path will be created before it. # This is used to enforce a call to host-mkdir. # Usage : $(call generate-file-dir,) # Rationale: Many object files will be stored in the same output directory. # Introducing a dependency on the latter avoids calling mkdir -p # for every one of them. # # ----------------------------------------------------------------------------- define ev-generate-file-dir __ndk_file_dir := $(call parent-dir,$1) $$(call generate-dir,$$(__ndk_file_dir)) $1:| $$(__ndk_file_dir) endef generate-file-dir = $(eval $(call ev-generate-file-dir,$1)) # ----------------------------------------------------------------------------- # Function : generate-list-file # Arguments: 1: list of strings (possibly very long) # 2: file name # Returns : write the content of a possibly very long string list to a file. # this shall be used in commands and will work around limitations # of host command-line lengths. # Usage : $(call host-echo-to-file,,) # Rationale: When there is a very large number of objects and/or libraries at # link time, the size of the command becomes too large for the # host system's maximum. Various tools however support the # @ syntax, where is the path of a file # which content will be parsed as if they were options. # # This function is used to generate such a list file from a long # list of strings in input. # # ----------------------------------------------------------------------------- # Helper functions because the GNU Make $(word ...) function does # not accept a 0 index, so we need to bump any of these to 1 when # we find them. # index-is-zero = $(filter 0 00 000 0000 00000 000000 0000000,$1) bump-0-to-1 = $(if $(call index-is-zero,$1),1,$1) -test-bump-0-to-1 = \ $(call test-expect,$(call bump-0-to-1))\ $(call test-expect,1,$(call bump-0-to-1,0))\ $(call test-expect,1,$(call bump-0-to-1,1))\ $(call test-expect,2,$(call bump-0-to-1,2))\ $(call test-expect,1,$(call bump-0-to-1,00))\ $(call test-expect,1,$(call bump-0-to-1,000))\ $(call test-expect,1,$(call bump-0-to-1,0000))\ $(call test-expect,1,$(call bump-0-to-1,00000))\ $(call test-expect,1,$(call bump-0-to-1,000000))\ $(call test-expect,10,$(call bump-0-to-1,10))\ $(call test-expect,100,$(call bump-0-to-1,100)) # Same as $(wordlist ...) except the start index, if 0, is bumped to 1 index-word-list = $(wordlist $(call bump-0-to-1,$1),$2,$3) -test-index-word-list = \ $(call test-expect,,$(call index-word-list,1,1))\ $(call test-expect,a b,$(call index-word-list,0,2,a b c d))\ $(call test-expect,b c,$(call index-word-list,2,3,a b c d))\ # NOTE: With GNU Make $1 and $(1) are equivalent, which means # that $10 is equivalent to $(1)0, and *not* $(10). # Used to generate a slice of up to 10 items starting from index $1, # If $1 is 0, it will be bumped to 1 (and only 9 items will be printed) # $1: start (tenth) index. Can be 0 # $2: word list # define list-file-start-gen-10 $$(hide) $$(HOST_ECHO_N) "$(call index-word-list,$10,$19,$2) " >> $$@ endef # Used to generate a slice of always 10 items starting from index $1 # $1: start (tenth) index. CANNOT BE 0 # $2: word list define list-file-always-gen-10 $$(hide) $$(HOST_ECHO_N) "$(wordlist $10,$19,$2) " >> $$@ endef # Same as list-file-always-gen-10, except that the word list might be # empty at position $10 (i.e. $(1)0) define list-file-maybe-gen-10 ifneq ($(word $10,$2),) $$(hide) $$(HOST_ECHO_N) "$(wordlist $10,$19,$2) " >> $$@ endif endef define list-file-start-gen-100 $(call list-file-start-gen-10,$10,$2) $(call list-file-always-gen-10,$11,$2) $(call list-file-always-gen-10,$12,$2) $(call list-file-always-gen-10,$13,$2) $(call list-file-always-gen-10,$14,$2) $(call list-file-always-gen-10,$15,$2) $(call list-file-always-gen-10,$16,$2) $(call list-file-always-gen-10,$17,$2) $(call list-file-always-gen-10,$18,$2) $(call list-file-always-gen-10,$19,$2) endef define list-file-always-gen-100 $(call list-file-always-gen-10,$10,$2) $(call list-file-always-gen-10,$11,$2) $(call list-file-always-gen-10,$12,$2) $(call list-file-always-gen-10,$13,$2) $(call list-file-always-gen-10,$14,$2) $(call list-file-always-gen-10,$15,$2) $(call list-file-always-gen-10,$16,$2) $(call list-file-always-gen-10,$17,$2) $(call list-file-always-gen-10,$18,$2) $(call list-file-always-gen-10,$19,$2) endef define list-file-maybe-gen-100 ifneq ($(word $(call bump-0-to-1,$100),$2),) ifneq ($(word $199,$2),) $(call list-file-start-gen-10,$10,$2) $(call list-file-always-gen-10,$11,$2) $(call list-file-always-gen-10,$12,$2) $(call list-file-always-gen-10,$13,$2) $(call list-file-always-gen-10,$14,$2) $(call list-file-always-gen-10,$15,$2) $(call list-file-always-gen-10,$16,$2) $(call list-file-always-gen-10,$17,$2) $(call list-file-always-gen-10,$18,$2) $(call list-file-always-gen-10,$19,$2) else ifneq ($(word $150,$2),) $(call list-file-start-gen-10,$10,$2) $(call list-file-always-gen-10,$11,$2) $(call list-file-always-gen-10,$12,$2) $(call list-file-always-gen-10,$13,$2) $(call list-file-always-gen-10,$14,$2) $(call list-file-maybe-gen-10,$15,$2) $(call list-file-maybe-gen-10,$16,$2) $(call list-file-maybe-gen-10,$17,$2) $(call list-file-maybe-gen-10,$18,$2) $(call list-file-maybe-gen-10,$19,$2) else $(call list-file-start-gen-10,$10,$2) $(call list-file-maybe-gen-10,$11,$2) $(call list-file-maybe-gen-10,$12,$2) $(call list-file-maybe-gen-10,$13,$2) $(call list-file-maybe-gen-10,$14,$2) endif endif endif endef define list-file-maybe-gen-1000 ifneq ($(word $(call bump-0-to-1,$1000),$2),) ifneq ($(word $1999,$2),) $(call list-file-start-gen-100,$10,$2) $(call list-file-always-gen-100,$11,$2) $(call list-file-always-gen-100,$12,$2) $(call list-file-always-gen-100,$13,$2) $(call list-file-always-gen-100,$14,$2) $(call list-file-always-gen-100,$15,$2) $(call list-file-always-gen-100,$16,$2) $(call list-file-always-gen-100,$17,$2) $(call list-file-always-gen-100,$18,$2) $(call list-file-always-gen-100,$19,$2) else ifneq ($(word $1500,$2),) $(call list-file-start-gen-100,$10,$2) $(call list-file-always-gen-100,$11,$2) $(call list-file-always-gen-100,$12,$2) $(call list-file-always-gen-100,$13,$2) $(call list-file-always-gen-100,$14,$2) $(call list-file-maybe-gen-100,$15,$2) $(call list-file-maybe-gen-100,$16,$2) $(call list-file-maybe-gen-100,$17,$2) $(call list-file-maybe-gen-100,$18,$2) $(call list-file-maybe-gen-100,$19,$2) else $(call list-file-start-gen-100,$10,$2) $(call list-file-maybe-gen-100,$11,$2) $(call list-file-maybe-gen-100,$12,$2) $(call list-file-maybe-gen-100,$13,$2) $(call list-file-maybe-gen-100,$14,$2) endif endif endif endef define generate-list-file-ev __list_file := $2 .PHONY: $$(__list_file).tmp $$(call generate-file-dir,$$(__list_file).tmp) $$(__list_file).tmp: $$(hide) $$(HOST_ECHO_N) "" > $$@ $(call list-file-maybe-gen-1000,0,$1) $(call list-file-maybe-gen-1000,1,$1) $(call list-file-maybe-gen-1000,2,$1) $(call list-file-maybe-gen-1000,3,$1) $(call list-file-maybe-gen-1000,4,$1) $(call list-file-maybe-gen-1000,5,$1) $$(__list_file): $$(__list_file).tmp $$(hide) $$(call host-copy-if-differ,$$@.tmp,$$@) $$(hide) $$(call host-rm,$$@.tmp) endef generate-list-file = $(eval $(call generate-list-file-ev,$1,$2)) # ----------------------------------------------------------------------------- # Function : link-whole-archives # Arguments: 1: list of whole static libraries # Returns : linker flags to use the whole static libraries # Usage : $(call link-whole-archives,) # Rationale: This function is used to put the list of whole static libraries # inside a -Wl,--whole-archive ... -Wl,--no-whole-archive block. # If the list is empty, it returns an empty string. # This function also calls host-path to translate the library # paths. # ----------------------------------------------------------------------------- link-whole-archives = $(if $(strip $1),$(call link-whole-archive-flags,$1)) link-whole-archive-flags = -Wl,--whole-archive $(call host-path,$1) -Wl,--no-whole-archive -test-link-whole-archive = \ $(call test-expect,,$(call link-whole-archives))\ $(eval _start := -Wl,--whole-archive)\ $(eval _end := -Wl,--no-whole-archive)\ $(call test-expect,$(_start) foo $(_end),$(call link-whole-archives,foo))\ $(call test-expect,$(_start) foo bar $(_end),$(call link-whole-archives,foo bar)) # ============================================================================= # # Modules database # # The following declarations are used to manage the list of modules # defined in application's Android.mk files. # # Technical note: # We use __ndk_modules to hold the list of all modules corresponding # to a given application. # # For each module 'foo', __ndk_modules.foo. is used # to store module-specific information. # # type -> type of module (e.g. 'static', 'shared', ...) # depends -> list of other modules this module depends on # # Also, LOCAL_XXXX values defined for a module are recorded in XXXX, e.g.: # # PATH -> recorded LOCAL_PATH for the module # CFLAGS -> recorded LOCAL_CFLAGS for the module # ... # # Some of these are created by build scripts like BUILD_STATIC_LIBRARY: # # MAKEFILE -> The Android.mk where the module is defined. # LDFLAGS -> Final linker flags # OBJECTS -> List of module objects # BUILT_MODULE -> location of module built file (e.g. obj///libfoo.so) # # Note that some modules are never installed (e.g. static libraries). # # ============================================================================= # The list of LOCAL_XXXX variables that are recorded for each module definition # These are documented by docs/ANDROID-MK.TXT. Exception is LOCAL_MODULE # modules-LOCALS := \ MODULE \ MODULE_FILENAME \ PATH \ SRC_FILES \ CPP_EXTENSION \ OBJC_EXTENSION \ OBJCPP_EXTENSION \ C_INCLUDES \ CFLAGS \ OBJCFLAGS \ CONLYFLAGS \ CXXFLAGS \ CPPFLAGS \ ASMFLAGS \ STATIC_LIBRARIES \ WHOLE_STATIC_LIBRARIES \ SHARED_LIBRARIES \ LDLIBS \ ALLOW_UNDEFINED_SYMBOLS \ ARM_MODE \ ARM_NEON \ DISABLE_NO_EXECUTE \ DISABLE_RELRO \ DISABLE_FORMAT_STRING_CHECKS \ DISABLE_FATAL_LINKER_WARNINGS \ EXPORT_CFLAGS \ EXPORT_CONLYFLAGS \ EXPORT_CPPFLAGS \ EXPORT_ASMFLAGS \ EXPORT_LDFLAGS \ EXPORT_LDLIBS \ EXPORT_C_INCLUDES \ FILTER_ASM \ CPP_FEATURES \ SHORT_COMMANDS \ BUILT_MODULE_NOT_COPIED \ THIN_ARCHIVE \ PCH \ RENDERSCRIPT_INCLUDES \ RENDERSCRIPT_INCLUDES_OVERRIDE \ RENDERSCRIPT_FLAGS \ RENDERSCRIPT_TARGET_API # The following are generated by the build scripts themselves # LOCAL_MAKEFILE will contain the path to the Android.mk defining the module modules-LOCALS += MAKEFILE # LOCAL_LDFLAGS will contain the set of final linker flags for the module modules-LOCALS += LDFLAGS # LOCAL_OBJECTS will contain the list of object files generated from the # module's sources, if any. modules-LOCALS += OBJECTS # LOCAL_BUILT_MODULE will contain the location of the symbolic version of # the generated module (i.e. the one containing all symbols used during # native debugging). It is generally under $PROJECT/obj/local/ modules-LOCALS += BUILT_MODULE # LOCAL_OBJS_DIR will contain the location where the object files for # this module will be stored. Usually $PROJECT/obj/local//obj modules-LOCALS += OBJS_DIR # LOCAL_INSTALLED will contain the location of the installed version # of the module. Usually $PROJECT/libs// # where and depend on the module class. modules-LOCALS += INSTALLED # LOCAL_MODULE_CLASS will contain the type of the module # (e.g. STATIC_LIBRARY, SHARED_LIBRARY, etc...) modules-LOCALS += MODULE_CLASS # the list of managed fields per module modules-fields = depends \ $(modules-LOCALS) # ----------------------------------------------------------------------------- # Function : modules-clear # Arguments: None # Returns : None # Usage : $(call modules-clear) # Rationale: clears the list of defined modules known by the build system # ----------------------------------------------------------------------------- modules-clear = \ $(foreach __mod,$(__ndk_modules),\ $(foreach __field,$(modules-fields),\ $(eval __ndk_modules.$(__mod).$(__field) := $(empty))\ )\ )\ $(eval __ndk_modules := $(empty_set)) \ $(eval __ndk_top_modules := $(empty)) \ $(eval __ndk_import_list := $(empty)) \ $(eval __ndk_import_depth := $(empty)) # ----------------------------------------------------------------------------- # Function : modules-get-list # Arguments: None # Returns : The list of all recorded modules # Usage : $(call modules-get-list) # ----------------------------------------------------------------------------- modules-get-list = $(__ndk_modules) # ----------------------------------------------------------------------------- # Function : modules-get-top-list # Arguments: None # Returns : The list of all recorded non-imported modules # Usage : $(call modules-get-top-list) # ----------------------------------------------------------------------------- modules-get-top-list = $(__ndk_top_modules) # ----------------------------------------------------------------------------- # Function : module-add # Arguments: 1: module name # Returns : None # Usage : $(call module-add,) # Rationale: add a new module. If it is already defined, print an error message # and abort. This will record all LOCAL_XXX variables for the module. # ----------------------------------------------------------------------------- module-add = \ $(call assert-defined,LOCAL_MAKEFILE LOCAL_BUILT_MODULE LOCAL_OBJS_DIR LOCAL_MODULE_CLASS)\ $(if $(call set_is_member,$(__ndk_modules),$1),\ $(call __ndk_info,Trying to define local module '$1' in $(LOCAL_MAKEFILE).)\ $(call __ndk_info,But this module was already defined by $(__ndk_modules.$1.MAKEFILE).)\ $(call __ndk_error,Aborting.)\ )\ $(eval __ndk_modules := $(call set_insert,$(__ndk_modules),$1))\ $(if $(strip $(__ndk_import_depth)),,\ $(eval __ndk_top_modules := $(call set_insert,$(__ndk_top_modules),$1))\ )\ $(if $(call module-class-is-installable,$(LOCAL_MODULE_CLASS)),\ $(eval LOCAL_INSTALLED := $(NDK_APP_DST_DIR)/$(notdir $(LOCAL_BUILT_MODULE))),\ $(eval LOCAL_INSTALLED := $(LOCAL_BUILT_MODULE))\ )\ $(foreach __field,STATIC_LIBRARIES WHOLE_STATIC_LIBRARIES SHARED_LIBRARIES,\ $(eval LOCAL_$(__field) := $(call strip-lib-prefix,$(LOCAL_$(__field)))))\ $(foreach __local,$(modules-LOCALS),\ $(eval __ndk_modules.$1.$(__local) := $(LOCAL_$(__local)))\ )\ $(call module-handle-c++-features,$1) # Retrieve the class of module $1 module-get-class = $(__ndk_modules.$1.MODULE_CLASS) # Retrieve built location of module $1 module-get-built = $(__ndk_modules.$1.BUILT_MODULE) # Returns $(true) is module $1 is installable # An installable module is one that will be copied to $PROJECT/libs// # (e.g. shared libraries). # module-is-installable = $(call module-class-is-installable,$(call module-get-class,$1)) # Returns $(true) if module $1 is a copyable prebuilt # A copyable prebuilt module is one that will be copied to $NDK_OUT// # at build time. At the moment, this is only used for prebuilt shared # libraries, since it helps ndk-gdb. # module-is-copyable = $(call module-class-is-copyable,$(call module-get-class,$1)) # ----------------------------------------------------------------------------- # Function : module-get-export # Arguments: 1: module name # 2: export variable name without LOCAL_EXPORT_ prefix (e.g. 'CFLAGS') # Returns : Exported value # Usage : $(call module-get-export,,) # Rationale: Return the recorded value of LOCAL_EXPORT_$2, if any, for module $1 # ----------------------------------------------------------------------------- module-get-export = $(__ndk_modules.$1.EXPORT_$2) # ----------------------------------------------------------------------------- # Function : module-get-listed-export # Arguments: 1: list of module names # 2: export variable name without LOCAL_EXPORT_ prefix (e.g. 'CFLAGS') # Returns : Exported values # Usage : $(call module-get-listed-export,,) # Rationale: Return the recorded value of LOCAL_EXPORT_$2, if any, for modules # listed in $1. # ----------------------------------------------------------------------------- module-get-listed-export = $(strip \ $(foreach __listed_module,$1,\ $(call module-get-export,$(__listed_module),$2)\ )) # ----------------------------------------------------------------------------- # Function : modules-restore-locals # Arguments: 1: module name # Returns : None # Usage : $(call module-restore-locals,) # Rationale: Restore the recorded LOCAL_XXX definitions for a given module. # ----------------------------------------------------------------------------- module-restore-locals = \ $(foreach __local,$(modules-LOCALS),\ $(eval LOCAL_$(__local) := $(__ndk_modules.$1.$(__local)))\ ) # Dump all module information. Only use this for debugging modules-dump-database = \ $(info Modules [$(TARGET_ARCH_ABI)]: $(__ndk_modules)) \ $(foreach __mod,$(__ndk_modules),\ $(info $(space4)$(__mod):)\ $(foreach __field,$(modules-fields),\ $(eval __fieldval := $(strip $(__ndk_modules.$(__mod).$(__field))))\ $(if $(__fieldval),\ $(if $(filter 1,$(words $(__fieldval))),\ $(info $(space4)$(space4)$(__field): $(__fieldval)),\ $(info $(space4)$(space4)$(__field): )\ $(foreach __fielditem,$(__fieldval),\ $(info $(space4)$(space4)$(space4)$(__fielditem))\ )\ )\ )\ )\ )\ $(info Top modules: $(__ndk_top_modules))\ $(info --- end of modules list) # ----------------------------------------------------------------------------- # Function : module-add-static-depends # Arguments: 1: module name # 2: list/set of static library modules this module depends on. # Returns : None # Usage : $(call module-add-static-depends,,) # Rationale: Record that a module depends on a set of static libraries. # Use module-get-static-dependencies to retrieve final list. # ----------------------------------------------------------------------------- module-add-static-depends = \ $(call module-add-depends-any,$1,$2,depends) \ # ----------------------------------------------------------------------------- # Function : module-add-shared-depends # Arguments: 1: module name # 2: list/set of shared library modules this module depends on. # Returns : None # Usage : $(call module-add-shared-depends,,) # Rationale: Record that a module depends on a set of shared libraries. # Use modulge-get-shared-dependencies to retrieve final list. # ----------------------------------------------------------------------------- module-add-shared-depends = \ $(call module-add-depends-any,$1,$2,depends) \ # Used internally by module-add-static-depends and module-add-shared-depends # NOTE: this function must not modify the existing dependency order when new depends are added. # module-add-depends-any = \ $(eval __ndk_modules.$1.$3 += $(filter-out $(__ndk_modules.$1.$3),$2)) # ----------------------------------------------------------------------------- # Returns non-empty if a module is a static library # Arguments: 1: module name # Returns : non-empty iff the module is a static library. # Usage : $(if $(call module-is-static-library,),...) # ----------------------------------------------------------------------------- module-is-static-library = $(strip \ $(filter STATIC_LIBRARY PREBUILT_STATIC_LIBRARY,\ $(call module-get-class,$1))) # ----------------------------------------------------------------------------- # Returns non-empty if a module is a shared library # Arguments: 1: module name # Returns : non-empty iff the module is a shared library. # Usage : $(if $(call module-is-shared-library,),...) # ----------------------------------------------------------------------------- module-is-shared-library = $(strip \ $(filter SHARED_LIBRARY PREBUILT_SHARED_LIBRARY,\ $(call module-get-class,$1))) # ----------------------------------------------------------------------------- # Filter a list of module names to retain only the static libraries. # Arguments: 1: module name list # Returns : input list modules which are static libraries. # ----------------------------------------------------------------------------- module-filter-static-libraries = $(call filter-by,$1,module-is-static-library) # ----------------------------------------------------------------------------- # Filter a list of module names to retain only the shared libraries. # Arguments: 1: module name list # Returns : input list modules which are shared libraries. # ----------------------------------------------------------------------------- module-filter-shared-libraries = $(call filter-by,$1,module-is-shared-library) # ----------------------------------------------------------------------------- # Return the LOCAL_LDFLAGS for a given module. # Arguments: 1: module name # Returns : List of linker flags # ----------------------------------------------------------------------------- module-get-ldflags = $(__ndk_modules.$1.LDFLAGS) # ----------------------------------------------------------------------------- # Return the LOCAL_STATIC_LIBRARIES for a given module. # Arguments: 1: module name # Returns : List of static library modules. # ----------------------------------------------------------------------------- module-get-static-libs = $(__ndk_modules.$1.STATIC_LIBRARIES) # ----------------------------------------------------------------------------- # Return the LOCAL_WHOLE_STATIC_LIBRARIES for a given module. # Arguments: 1: module name # Returns : List of whole static library modules. # ----------------------------------------------------------------------------- module-get-whole-static-libs = $(__ndk_modules.$1.WHOLE_STATIC_LIBRARIES) # ----------------------------------------------------------------------------- # Return all static libraries for a given module. # Arguments: 1: module name # Returns : List of static library modules (whole or not). # ----------------------------------------------------------------------------- module-get-all-static-libs = $(strip \ $(__ndk_modules.$1.STATIC_LIBRARIES) \ $(__ndk_modules.$1.WHOLE_STATIC_LIBRARIES)) # ----------------------------------------------------------------------------- # Return the list of LOCAL_SHARED_LIBRARIES for a given module. # Arguments: 1: module name # Returns : List of shared library modules. # ----------------------------------------------------------------------------- module-get-shared-libs = $(__ndk_modules.$1.SHARED_LIBRARIES) # ----------------------------------------------------------------------------- # Return the list of all libraries a modules depends directly on. # This is the concatenation of its LOCAL_STATIC_LIBRARIES, # LOCAL_WHOLE_STATIC_LIBRARIES, and LOCAL_SHARED_LIBRARIES variables. # Arguments: 1: module name # Returns : List of library modules (static or shared). # ----------------------------------------------------------------------------- module-get-direct-libs = $(strip \ $(__ndk_modules.$1.STATIC_LIBRARIES) \ $(__ndk_modules.$1.WHOLE_STATIC_LIBRARIES) \ $(__ndk_modules.$1.SHARED_LIBRARIES)) # ----------------------------------------------------------------------------- # Computes the full closure of a module and its dependencies. Order is # defined by a breadth-first walk of the graph. # $1 will be the first item in the result. # # Arguments: 1: module name # Returns : List of all modules $1 depends on. # # Note: Do not use this to determine build dependencies. The returned list # is much too large for this. For example consider the following # dependency graph: # # main.exe -> libA.a -> libfoo.so -> libB.a # # This function will return all four modules in the result, while # at link time building main.exe only requires the first three. # # ----------------------------------------------------------------------------- module-get-all-dependencies = $(call -ndk-mod-get-closure,$1,module-get-depends) # ----------------------------------------------------------------------------- # Compute the list of all static and shared libraries required to link a # given module. # # Note that the result is topologically ordered, i.e. if library A depends # on library B, then A will always appear after B in the result. # # Arguments: 1: module name # Returns : List of all library $1 depends at link time. # # Note: This doesn't differentiate between regular and whole static # libraries. Use module-extract-whole-static-libs to filter the # result returned by this function. # ----------------------------------------------------------------------------- module-get-link-libs = $(strip \ $(eval _ndk_mod_link_module := $1) \ $(call -ndk-mod-get-topological-depends,$1,-ndk-mod-link-deps)) # Special dependency function used by module-get-link-libs. # The rules to follow are the following: # - if $1 is the link module, or if it is a static library, then all direct # dependencies. # - if $1 is a shared library, then only those direct dependencies which # are shared libraries too. # - otherwise, don't add build deps. -ndk-mod-link-deps = \ $(strip $(or \ $(if $(or $(call seq,$1,$(_ndk_mod_link_module)),$(call module-is-static-library,$1)),\ $(call module-get-direct-libs,$1)\ ),\ $(if $(call module-is-shared-library,$1),\ $(call module-get-shared-libs)\ )\ )) # ----------------------------------------------------------------------------- # This function is used to extract the list of static libraries that need # to be linked as whole, i.e. placed in a special section on the final # link command. # Arguments: $1: module name. # $2: list of all static link-time libraries (regular or whole). # Returns : list of static libraries from '$2' that need to be linked # as whole. # ----------------------------------------------------------------------------- module-extract-whole-static-libs = $(strip \ $(eval _ndk_mod_whole_all := $(call map,module-get-whole-static-libs,$1 $2))\ $(eval _ndk_mod_whole_result := $(filter $(_ndk_mod_whole_all),$2))\ $(_ndk_mod_whole_result)) # Used to recompute all dependencies once all module information has been recorded. # modules-compute-dependencies = \ $(foreach __module,$(__ndk_modules),\ $(call module-compute-depends,$(__module))\ ) module-compute-depends = \ $(call module-add-static-depends,$1,$(__ndk_modules.$1.STATIC_LIBRARIES))\ $(call module-add-static-depends,$1,$(__ndk_modules.$1.WHOLE_STATIC_LIBRARIES))\ $(call module-add-shared-depends,$1,$(__ndk_modules.$1.SHARED_LIBRARIES))\ module-get-installed = $(__ndk_modules.$1.INSTALLED) module-get-depends = $(__ndk_modules.$1.depends) # ----------------------------------------------------------------------------- # Function : modules-get-all-installable # Arguments: 1: list of module names # Returns : List of all the installable modules $1 depends on transitively. # Usage : $(call modules-all-get-installable,) # Rationale: This computes the closure of all installable module dependencies starting from $1 # ----------------------------------------------------------------------------- # For now, only the closure of LOCAL_SHARED_LIBRARIES is enough modules-get-all-installable = $(strip \ $(foreach __alldep,$(call module-get-all-dependencies,$1),\ $(if $(call module-is-installable,$(__alldep)),$(__alldep))\ )) # Return the Obj-C extension of a given module # $1: module name module-get-objc-extension = $(strip \ $(if $(__ndk_modules.$1.OBJC_EXTENSION),\ $(__ndk_modules.$1.OBJC_EXTENSION),\ .m\ )) # Return the Obj-C++ extension of a given module # $1: module name module-get-objc++-extension = $(strip \ $(if $(__ndk_modules.$1.OBJCPP_EXTENSION),\ $(__ndk_modules.$1.OBJCPP_EXTENSION),\ .mm\ )) # Return the C++ extension(s) of a given module # $1: module name module-get-c++-extensions = $(strip \ $(if $(__ndk_modules.$1.CPP_EXTENSION),\ $(__ndk_modules.$1.CPP_EXTENSION),\ $(default-c++-extensions)\ )) # Return the list of Obj-C sources of a given module # module-get-objc-sources = \ $(eval __files := $(__ndk_modules.$1.SRC_FILES:%.neon=%))\ $(eval __files := $(__files:%.arm=%))\ $(eval __files := $(or \ $(filter %$(call module-get-objc-extension,$1),$(__files)),\ $(filter %$(call module-get-objc++-extension),$(__files))))\ $(__files) # Return the list of Obj-C++ sources of a given module # module-get-objc++-sources = \ $(eval __files := $(__ndk_modules.$1.SRC_FILES:%.neon=%))\ $(eval __files := $(__files:%.arm=%))\ $(eval __files := \ $(filter %$(call module-get-objc++-extension),$(__files)))\ $(__files) # Return the list of C++ sources of a given module # module-get-c++-sources = \ $(eval __files := $(__ndk_modules.$1.SRC_FILES:%.neon=%)) \ $(eval __files := $(__files:%.arm=%)) \ $(eval __extensions := $(call module-get-c++-extensions,$1))\ $(filter $(foreach __extension,$(__extensions),%$(__extension)),$(__files)) # Returns true if a module has Obj-C sources # module-has-objc-sources = $(strip $(call module-get-objc-sources,$1)) # Returns true if a module has Obj-C++ sources # module-has-objc++-sources = $(strip $(call module-get-objc++-sources,$1)) # Returns true if a module has C++ sources # module-has-c++-sources = $(strip $(call module-get-c++-sources,$1)) # Add C++ dependencies to any module that has C++ sources. # $1: list of C++ runtime static libraries (if any) # $2: list of C++ runtime shared libraries (if any) # $3: list of C++ runtime ldlibs (if any) # modules-add-c++-dependencies = \ $(foreach __module,$(__ndk_modules),\ $(if $(or $(call module-has-c++-sources,$(__module)),$(call module-has-objc++-sources,$(__module))),\ $(call ndk_log,Module '$(__module)' has C++ sources)\ $(call module-add-deps,$(__module),$1,$2,$3)\ )\ ) # Return the compiler flags used to compile a C++ module # Order matters and should match the one used by the build command module-get-c++-flags = $(strip \ $(__ndk_modules.$1.CFLAGS) \ $(__ndk_modules.$1.CPPFLAGS) \ $(__ndk_modules.$1.CXXFLAGS)) # This function is used to remove certain flags from a module compiler flags # $1: Module name # $2: List of flags to remove # module-filter-out-compiler-flags = \ $(eval __ndk_modules.$1.CFLAGS := $(filter-out $2,$(__ndk_modules.$1.CFLAGS)))\ $(eval __ndk_modules.$1.CONLYFLAGS := $(filter-out $2,$(__ndk_modules.$1.CONLYFLAGS)))\ $(eval __ndk_modules.$1.CPPFLAGS := $(filter-out $2,$(__ndk_modules.$1.CPPFLAGS)))\ $(eval __ndk_modules.$1.CXXFLAGS := $(filter-out $2,$(__ndk_modules.$1.CXXFLAGS)))\ $(eval __ndk_modules.$1.ASMFLAGS := $(filter-out $2,$(__ndk_modules.$1.ASMFLAGS))) # Return true if a module's compiler flags enable rtti # We just look at -frtti and -fno-rtti on the command-line # and keep the last one of these flags. module-flags-have-rtti = $(strip \ $(filter -frtti,\ $(lastword $(filter -frtti -fno-rtti,$(call module-get-c++-flags,$1)))\ )\ ) # Same with C++ exception support (i.e. -fexceptions and -fno-exceptions) # module-flags-have-exceptions = $(strip \ $(filter -fexceptions,\ $(lastword $(filter -fexceptions -fno-execeptions,$(call module-get-c++-flags,$1)))\ )\ ) # Handle the definition of LOCAL_CPP_FEATURES, i.e.: # # - If it is defined, check that it only contains valid values # - If it is undefined, try to compute its value automatically by # looking at the C++ compiler flags used to build the module # # After this, we remove all features flags from the module's command-line # And add only the correct ones back in LOCAL_CPP_FLAGS # module-handle-c++-features = \ $(if $(strip $(__ndk_modules.$1.CPP_FEATURES)),\ $(eval __cxxbad := $(filter-out rtti exceptions,$(__ndk_modules.$1.CPP_FEATURES)))\ $(if $(__cxxbad),\ $(call __ndk_info,WARNING: Ignoring invalid values in LOCAL_CPP_FEATURES definition in $(__ndk_modules.$1.MAKEFILE): $(__cxxbad))\ $(eval __ndk_modules.$1.CPP_FEATURES := $(strip $(filter-out $(__cxxbad),$(__ndk_modules.$1.CPP_FEATURES))))\ )\ ,\ $(eval __ndk_modules.$1.CPP_FEATURES := $(strip \ $(if $(call module-flags-have-rtti,$1),rtti) \ $(if $(call module-flags-have-exceptions,$1),exceptions) \ )) \ )\ $(call module-filter-out-compiler-flags,$1,-frtti -fno-rtti -fexceptions -fno-exceptions)\ # Returns true if a module or its dependencies have specific C++ features # (i.e. RTTI or Exceptions) # # $1: module name # $2: list of features (e.g. 'rtti' or 'exceptions') # module-has-c++-features = $(strip \ $(eval __cxxdeps := $(call module-get-all-dependencies,$1))\ $(eval __cxxflags := $(foreach __cxxdep,$(__cxxdeps),$(__ndk_modules.$(__cxxdep).CPP_FEATURES)))\ $(if $(filter $2,$(__cxxflags)),true,)\ ) # Add standard dependencies to a given module # # $1: module name # $2: list of C++ runtime static libraries (if any) # $3: list of C++ runtime shared libraries (if any) # $4: list of C++ runtime ldlibs (if any) # module-add-deps = \ $(if $(call strip,$2),$(call ndk_log,Add dependency '$(call strip,$2)' to module '$1'))\ $(eval __ndk_modules.$1.STATIC_LIBRARIES += $(2))\ $(if $(call strip,$3),$(call ndk_log,Add dependency '$(call strip,$3)' to module '$1'))\ $(eval __ndk_modules.$1.SHARED_LIBRARIES += $(3))\ $(if $(call strip,$4),$(call ndk_log,Add dependency '$(call strip,$4)' to module '$1'))\ $(eval __ndk_modules.$1.LDLIBS += $(4)) # ============================================================================= # # Utility functions # # ============================================================================= # ----------------------------------------------------------------------------- # Function : pretty-dir # Arguments: 1: path # Returns : Remove NDK_PROJECT_PATH prefix from a given path. This can be # used to perform pretty-printing for logs. # ----------------------------------------------------------------------------- pretty-dir = $(patsubst $(NDK_ROOT)/%,/%,\ $(patsubst $(NDK_PROJECT_PATH)/%,%,$1)) # Note: NDK_PROJECT_PATH is typically defined after this test is run. -test-pretty-dir = \ $(eval NDK_PROJECT_PATH ?= .)\ $(call test-expect,foo,$(call pretty-dir,foo))\ $(call test-expect,foo,$(call pretty-dir,$(NDK_PROJECT_PATH)/foo))\ $(call test-expect,foo/bar,$(call pretty-dir,$(NDK_PROJECT_PATH)/foo/bar))\ $(call test-expect,/foo,$(call pretty-dir,$(NDK_ROOT)/foo))\ $(call test-expect,/foo/bar,$(call pretty-dir,$(NDK_ROOT)/foo/bar)) # ----------------------------------------------------------------------------- # Function : check-user-define # Arguments: 1: name of variable that must be defined by the user # 2: name of Makefile where the variable should be defined # 3: name/description of the Makefile where the check is done, which # must be included by $2 # Returns : None # ----------------------------------------------------------------------------- check-user-define = $(if $(strip $($1)),,\ $(call __ndk_error,Missing $1 before including $3 in $2)) # ----------------------------------------------------------------------------- # This is used to check that LOCAL_MODULE is properly defined by an Android.mk # file before including one of the $(BUILD_SHARED_LIBRARY), etc... files. # # Function : check-user-LOCAL_MODULE # Arguments: 1: name/description of the included build Makefile where the # check is done # Returns : None # Usage : $(call check-user-LOCAL_MODULE, BUILD_SHARED_LIBRARY) # ----------------------------------------------------------------------------- check-defined-LOCAL_MODULE = \ $(call check-user-define,LOCAL_MODULE,$(local-makefile),$(1)) \ $(if $(call seq,$(words $(LOCAL_MODULE)),1),,\ $(call __ndk_info,LOCAL_MODULE definition in $(local-makefile) must not contain space)\ $(call __ndk_error,Please correct error. Aborting)\ ) # ----------------------------------------------------------------------------- # This is used to check that LOCAL_MODULE_FILENAME, if defined, is correct. # # Function : check-user-LOCAL_MODULE_FILENAME # Returns : None # Usage : $(call check-user-LOCAL_MODULE_FILENAME) # ----------------------------------------------------------------------------- check-LOCAL_MODULE_FILENAME = \ $(if $(strip $(LOCAL_MODULE_FILENAME)),\ $(if $(call seq,$(words $(LOCAL_MODULE_FILENAME)),1),,\ $(call __ndk_info,$(LOCAL_MAKEFILE):$(LOCAL_MODULE): LOCAL_MODULE_FILENAME must not contain spaces)\ $(call __ndk_error,Plase correct error. Aborting)\ )\ $(if $(filter %$(TARGET_LIB_EXTENSION) %$(TARGET_SONAME_EXTENSION),$(LOCAL_MODULE_FILENAME)),\ $(call __ndk_info,$(LOCAL_MAKEFILE):$(LOCAL_MODULE): LOCAL_MODULE_FILENAME should not include file extensions)\ )\ ) # ----------------------------------------------------------------------------- # Function : handle-module-filename # Arguments : 1: default file prefix # 2: file suffix # Returns : None # Usage : $(call handle-module-filename,,) # Rationale : To be used to check and or set the module's filename through # the LOCAL_MODULE_FILENAME variable. # ----------------------------------------------------------------------------- handle-module-filename = $(eval $(call ev-handle-module-filename,$1,$2)) # # Check that LOCAL_MODULE_FILENAME is properly defined # - with one single item # - without a library file extension # - with no directory separators # define ev-check-module-filename ifneq (1,$$(words $$(LOCAL_MODULE_FILENAME))) $$(call __ndk_info,$$(LOCAL_MAKEFILE):$$(LOCAL_MODULE): LOCAL_MODULE_FILENAME must not contain any space) $$(call __ndk_error,Aborting) endif ifneq (,$$(filter %$$(TARGET_LIB_EXTENSION) %$$(TARGET_SONAME_EXTENSION),$$(LOCAL_MODULE_FILENAME))) $$(call __ndk_info,$$(LOCAL_MAKEFILE):$$(LOCAL_MODULE): LOCAL_MODULE_FILENAME must not contain a file extension) $$(call __ndk_error,Aborting) endif ifneq (1,$$(words $$(subst /, ,$$(LOCAL_MODULE_FILENAME)))) $$(call __ndk_info,$$(LOCAL_MAKEFILE):$$(LOCAL_MODULE): LOCAL_MODULE_FILENAME must not contain directory separators) $$(call __ndk_error,Aborting) endif endef # # Check the definition of LOCAL_MODULE_FILENAME. If none exists, # infer it from the LOCAL_MODULE name. # # $1: default file prefix # $2: default file suffix # define ev-handle-module-filename LOCAL_MODULE_FILENAME := $$(strip $$(LOCAL_MODULE_FILENAME)) ifndef LOCAL_MODULE_FILENAME LOCAL_MODULE_FILENAME := $1$$(LOCAL_MODULE) endif $$(eval $$(call ev-check-module-filename)) LOCAL_MODULE_FILENAME := $$(LOCAL_MODULE_FILENAME)$2 endef handle-prebuilt-module-filename = $(eval $(call ev-handle-prebuilt-module-filename,$1)) # # Check the definition of LOCAL_MODULE_FILENAME for a _prebuilt_ module. # If none exists, infer it from $(LOCAL_SRC_FILES) # # $1: default file suffix # define ev-handle-prebuilt-module-filename LOCAL_MODULE_FILENAME := $$(strip $$(LOCAL_MODULE_FILENAME)) ifndef LOCAL_MODULE_FILENAME LOCAL_MODULE_FILENAME := $$(notdir $(LOCAL_SRC_FILES)) LOCAL_MODULE_FILENAME := $$(LOCAL_MODULE_FILENAME:%$$(TARGET_LIB_EXTENSION)=%) LOCAL_MODULE_FILENAME := $$(LOCAL_MODULE_FILENAME:%$$(TARGET_SONAME_EXTENSION)=%) endif LOCAL_MODULE_FILENAME := $$(LOCAL_MODULE_FILENAME)$1 $$(eval $$(call ev-check-module-filename)) endef # ----------------------------------------------------------------------------- # Function : handle-module-built # Returns : None # Usage : $(call handle-module-built) # Rationale : To be used to automatically compute the location of the generated # binary file, and the directory where to place its object files. # ----------------------------------------------------------------------------- handle-module-built = \ $(eval LOCAL_BUILT_MODULE := $(TARGET_OUT)/$(LOCAL_MODULE_FILENAME))\ $(eval LOCAL_OBJS_DIR := $(TARGET_OBJS)/$(LOCAL_MODULE)) # ----------------------------------------------------------------------------- # Compute the real path of a prebuilt file. # # Function : local-prebuilt-path # Arguments: 1: prebuilt path (as listed in $(LOCAL_SRC_FILES)) # Returns : full path. If $1 begins with a /, the path is considered # absolute and returned as-is. Otherwise, $(LOCAL_PATH)/$1 is # returned instead. # Usage : $(call local-prebuilt-path,$(LOCAL_SRC_FILES)) # ----------------------------------------------------------------------------- local-prebuilt-path = $(call local-source-file-path,$1) # ----------------------------------------------------------------------------- # This is used to strip any lib prefix from LOCAL_MODULE, then check that # the corresponding module name is not already defined. # # Function : check-user-LOCAL_MODULE # Arguments: 1: path of Android.mk where this LOCAL_MODULE is defined # Returns : None # Usage : $(call check-LOCAL_MODULE,$(LOCAL_MAKEFILE)) # ----------------------------------------------------------------------------- check-LOCAL_MODULE = \ $(eval LOCAL_MODULE := $$(call strip-lib-prefix,$$(LOCAL_MODULE))) # ----------------------------------------------------------------------------- # Macro : my-dir # Returns : the directory of the current Makefile # Usage : $(my-dir) # ----------------------------------------------------------------------------- my-dir = $(call parent-dir,$(lastword $(MAKEFILE_LIST))) # ----------------------------------------------------------------------------- # Function : all-makefiles-under # Arguments: 1: directory path # Returns : a list of all makefiles immediately below some directory # Usage : $(call all-makefiles-under, ) # ----------------------------------------------------------------------------- all-makefiles-under = $(wildcard $1/*/Android.mk) # ----------------------------------------------------------------------------- # Macro : all-subdir-makefiles # Returns : list of all makefiles in subdirectories of the current Makefile's # location # Usage : $(all-subdir-makefiles) # ----------------------------------------------------------------------------- all-subdir-makefiles = $(call all-makefiles-under,$(call my-dir)) # ============================================================================= # # Source file tagging support. # # Each source file listed in LOCAL_SRC_FILES can have any number of # 'tags' associated to it. A tag name must not contain space, and its # usage can vary. # # For example, the 'debug' tag is used to sources that must be built # in debug mode, the 'arm' tag is used for sources that must be built # using the 32-bit instruction set on ARM platforms, and 'neon' is used # for sources that must be built with ARM Advanced SIMD (a.k.a. NEON) # support. # # More tags might be introduced in the future. # # LOCAL_SRC_TAGS contains the list of all tags used (initially empty) # LOCAL_SRC_FILES contains the list of all source files. # LOCAL_SRC_TAG. contains the set of source file names tagged # with # LOCAL_SRC_FILES_TAGS. contains the set of tags for a given # source file name # # Tags are processed by a toolchain-specific function (e.g. TARGET-compute-cflags) # which will call various functions to compute source-file specific settings. # These are currently stored as: # # LOCAL_SRC_FILES_TARGET_CFLAGS. contains the list of # target-specific C compiler flags used to compile a given # source file. This is set by the function TARGET-set-cflags # defined in the toolchain's setup.mk script. # # LOCAL_SRC_FILES_TEXT. contains the 'text' that will be # displayed along the label of the build output line. For example # 'thumb' or 'arm ' with ARM-based toolchains. # # ============================================================================= # ----------------------------------------------------------------------------- # Macro : escape-colon-in-path # Returns : replace colon in $1 with $(colon) # Usage : $(escape-colon-in-path,) # ----------------------------------------------------------------------------- escape-colon-in-path = $(subst $(colon),$$(colon),$1) # ----------------------------------------------------------------------------- # Macro : clear-all-src-tags # Returns : remove all source file tags and associated data. # Usage : $(clear-all-src-tags) # ----------------------------------------------------------------------------- clear-all-src-tags = \ $(foreach __tag,$(LOCAL_SRC_TAGS), \ $(eval LOCAL_SRC_TAG.$(__tag) := $(empty)) \ ) \ $(foreach __src,$(LOCAL_SRC_FILES), \ $(eval LOCAL_SRC_FILES_TAGS.$(call escape-colon-in-path,$(__src)) := $(empty)) \ $(eval LOCAL_SRC_FILES_TARGET_CFLAGS.$(call escape-colon-in-path,$(__src)) := $(empty)) \ $(eval LOCAL_SRC_FILES_TEXT.$(call escape-colon-in-path,$(__src)) := $(empty)) \ ) \ $(eval LOCAL_SRC_TAGS := $(empty_set)) # ----------------------------------------------------------------------------- # Macro : tag-src-files # Arguments: 1: list of source files to tag # 2: tag name (must not contain space) # Usage : $(call tag-src-files,,) # Rationale: Add a tag to a list of source files # ----------------------------------------------------------------------------- tag-src-files = \ $(eval LOCAL_SRC_TAGS := $(call set_insert,$2,$(LOCAL_SRC_TAGS))) \ $(eval LOCAL_SRC_TAG.$2 := $(call set_union,$1,$(LOCAL_SRC_TAG.$2))) \ $(foreach __src,$1, \ $(eval LOCAL_SRC_FILES_TAGS.$(call escape-colon-in-path,$(__src)) += $2) \ ) # ----------------------------------------------------------------------------- # Macro : get-src-files-with-tag # Arguments: 1: tag name # Usage : $(call get-src-files-with-tag,) # Return : The list of source file names that have been tagged with # ----------------------------------------------------------------------------- get-src-files-with-tag = $(LOCAL_SRC_TAG.$1) # ----------------------------------------------------------------------------- # Macro : get-src-files-without-tag # Arguments: 1: tag name # Usage : $(call get-src-files-without-tag,) # Return : The list of source file names that have NOT been tagged with # ----------------------------------------------------------------------------- get-src-files-without-tag = $(filter-out $(LOCAL_SRC_TAG.$1),$(LOCAL_SRC_FILES)) # ----------------------------------------------------------------------------- # Macro : set-src-files-target-cflags # Arguments: 1: list of source files # 2: list of compiler flags # Usage : $(call set-src-files-target-cflags,,) # Rationale: Set or replace the set of compiler flags that will be applied # when building a given set of source files. This function should # normally be called from the toolchain-specific function that # computes all compiler flags for all source files. # ----------------------------------------------------------------------------- set-src-files-target-cflags = \ $(foreach __src,$1,$(eval LOCAL_SRC_FILES_TARGET_CFLAGS.$(call escape-colon-in-path,$(__src)) := $2)) # ----------------------------------------------------------------------------- # Macro : add-src-files-target-cflags # Arguments: 1: list of source files # 2: list of compiler flags # Usage : $(call add-src-files-target-cflags,,) # Rationale: A variant of set-src-files-target-cflags that can be used # to append, instead of replace, compiler flags for specific # source files. # ----------------------------------------------------------------------------- add-src-files-target-cflags = \ $(foreach __src,$1,$(eval LOCAL_SRC_FILES_TARGET_CFLAGS.$(call escape-colon-in-path,$(__src)) += $2)) # ----------------------------------------------------------------------------- # Macro : get-src-file-target-cflags # Arguments: 1: single source file name # Usage : $(call get-src-file-target-cflags,) # Rationale: Return the set of target-specific compiler flags that must be # applied to a given source file. These must be set prior to this # call using set-src-files-target-cflags or add-src-files-target-cflags # ----------------------------------------------------------------------------- get-src-file-target-cflags = $(LOCAL_SRC_FILES_TARGET_CFLAGS.$1) # ----------------------------------------------------------------------------- # Macro : set-src-files-text # Arguments: 1: list of source files # 2: text # Usage : $(call set-src-files-text,,) # Rationale: Set or replace the 'text' associated to a set of source files. # The text is a very short string that complements the build # label. For example, it will be either 'thumb' or 'arm ' for # ARM-based toolchains. This function must be called by the # toolchain-specific functions that processes all source files. # ----------------------------------------------------------------------------- set-src-files-text = \ $(foreach __src,$1,$(eval LOCAL_SRC_FILES_TEXT.$(call escape-colon-in-path,$(__src)) := $2)) # ----------------------------------------------------------------------------- # Macro : get-src-file-text # Arguments: 1: single source file # Usage : $(call get-src-file-text,) # Rationale: Return the 'text' associated to a given source file when # set-src-files-text was called. # ----------------------------------------------------------------------------- get-src-file-text = $(LOCAL_SRC_FILES_TEXT.$1) # This should only be called for debugging the source files tagging system dump-src-file-tags = \ $(info LOCAL_SRC_TAGS := $(LOCAL_SRC_TAGS)) \ $(info LOCAL_SRC_FILES = $(LOCAL_SRC_FILES)) \ $(foreach __tag,$(LOCAL_SRC_TAGS),$(info LOCAL_SRC_TAG.$(__tag) = $(LOCAL_SRC_TAG.$(__tag)))) \ $(foreach __src,$(LOCAL_SRC_FILES),$(info LOCAL_SRC_FILES_TAGS.$(__src) = $(LOCAL_SRC_FILES_TAGS.$(__src)))) \ $(info WITH arm = $(call get-src-files-with-tag,arm)) \ $(info WITHOUT arm = $(call get-src-files-without-tag,arm)) \ $(foreach __src,$(LOCAL_SRC_FILES),$(info LOCAL_SRC_FILES_TARGET_CFLAGS.$(__src) = $(LOCAL_SRC_FILES_TARGET_CFLAGS.$(__src)))) \ $(foreach __src,$(LOCAL_SRC_FILES),$(info LOCAL_SRC_FILES_TEXT.$(__src) = $(LOCAL_SRC_FILES_TEXT.$(__src)))) \ # ============================================================================= # # Application.mk support # # ============================================================================= # the list of variables that *must* be defined in Application.mk files NDK_APP_VARS_REQUIRED := # the list of variables that *may* be defined in Application.mk files NDK_APP_VARS_OPTIONAL := APP_OPTIM APP_CPPFLAGS APP_CFLAGS APP_CONLYFLAGS APP_CXXFLAGS \ APP_LDFLAGS APP_PLATFORM APP_BUILD_SCRIPT APP_ABI APP_MODULES \ APP_PROJECT_PATH APP_STL APP_SHORT_COMMANDS \ APP_PIE APP_THIN_ARCHIVE \ APP_LIBCRYSTAX APP_OBJC APP_CXX_STANDARD # the list of all variables that may appear in an Application.mk file # or defined by the build scripts. NDK_APP_VARS := $(NDK_APP_VARS_REQUIRED) \ $(NDK_APP_VARS_OPTIONAL) \ APP_DEBUG \ APP_DEBUGGABLE \ APP_MANIFEST # ============================================================================= # # Android.mk support # # ============================================================================= # ============================================================================= # # Build commands support # # ============================================================================= get-object-name = $(strip \ $(subst ../,__/,\ $(subst :,_,\ $(eval __obj := $1)\ $(foreach __ext,.c .s .S .asm $(LOCAL_CPP_EXTENSION) $(LOCAL_RS_EXTENSION) $(LOCAL_OBJC_EXTENSION) $(LOCAL_OBJCPP_EXTENSION),\ $(eval __obj := $(__obj:%$(__ext)=%$(TARGET_OBJ_EXTENSION)))\ )\ $(__obj)\ ))) -test-get-object-name = \ $(eval TARGET_OBJ_EXTENSION=.o)\ $(eval LOCAL_CPP_EXTENSION ?= .cpp)\ $(eval LOCAL_OBJC_EXTENSION ?= .m)\ $(eval LOCAL_OBJCPP_EXTENSION ?= .mm)\ $(eval LOCAL_RS_EXTENSION ?= .rs)\ $(call test-expect,foo.o,$(call get-object-name,foo.c))\ $(call test-expect,bar.o,$(call get-object-name,bar.s))\ $(call test-expect,zoo.o,$(call get-object-name,zoo.S))\ $(call test-expect,tot.o,$(call get-object-name,tot.cpp))\ $(call test-expect,baz.o,$(call get-object-name,baz.m))\ $(call test-expect,moo.o,$(call get-object-name,moo.mm))\ $(call test-expect,RS.o,$(call get-object-name,RS.rs))\ $(call test-expect,goo.o,$(call get-object-name,goo.asm)) get-rs-scriptc-name = $(strip \ $(subst ../,__/,\ $(subst :,_,\ $(eval __obj := $1)\ $(foreach __ext,$(LOCAL_RS_EXTENSION),\ $(eval __obj := $(__obj:%$(__ext)=%.cpp))\ )\ $(dir $(__obj))ScriptC_$(notdir $(__obj))\ ))) get-rs-bc-name = $(strip \ $(subst ../,__/,\ $(subst :,_,\ $(eval __obj := $1)\ $(foreach __ext,$(LOCAL_RS_EXTENSION),\ $(eval __obj := $(__obj:%$(__ext)=%.bc))\ )\ $(__obj)\ ))) get-rs-so-name = $(strip \ $(subst ../,__/,\ $(subst :,_,\ $(eval __obj := $1)\ $(foreach __ext,$(LOCAL_RS_EXTENSION),\ $(eval __obj := $(__obj:%$(__ext)=%$(TARGET_SONAME_EXTENSION)))\ )\ $(notdir $(__obj))\ ))) # ----------------------------------------------------------------------------- # Macro : hide # Returns : nothing # Usage : $(hide) # Rationale: To be used as a prefix for Make build commands to hide them # by default during the build. To show them, set V=1 in your # environment or command-line. # # For example: # # foo.o: foo.c # -->|$(hide) # # Where '-->|' stands for a single tab character. # # ----------------------------------------------------------------------------- ifeq ($(V),1) hide = $(empty) else hide = @ endif # ----------------------------------------------------------------------------- # Function : local-source-file-path # Parameters: $1: source file (as listed in LOCAL_SRC_FILES) # Returns : full source file path of $1 # Usage : $(call local-source-file-path,$1) # Rationale : Used to compute the full path of a source listed in # LOCAL_SRC_FILES. If it is an absolute path, then this # returns the input, otherwise, prepends $(LOCAL_PATH)/ # to the result. # ----------------------------------------------------------------------------- local-source-file-path = $(if $(call host-path-is-absolute,$1),$1,$(LOCAL_PATH)/$1) # cmd-convert-deps # # On Cygwin, we need to convert the .d dependency file generated by # the gcc toolchain by transforming any Windows paths inside it into # Cygwin paths that GNU Make can understand (i.e. C:/Foo => /cygdrive/c/Foo) # # To do that, we will force the compiler to write the dependency file to # .d.org, which will will later convert through a clever sed script # that is auto-generated by our build system. # # The script is invoked with: # # $(NDK_DEPENDENCIES_CONVERTER) foo.d # # It will look if foo.d.org exists, and if so, process it # to generate foo.d, then remove the original foo.d.org. # # On other systems, we simply tell the compiler to write to the .d file directly. # # NOTE: In certain cases, no dependency file will be generated by the # compiler (e.g. when compiling an assembly file as foo.s) # # convert-deps is used to compute the name of the compiler-generated dependency file # cmd-convert-deps is a command used to convert it to a Cygwin-specific path # ifeq ($(HOST_OS),cygwin) convert-deps = $1.org cmd-convert-deps = && $(NDK_DEPENDENCIES_CONVERTER) $1 else convert-deps = $1 cmd-convert-deps = endif # Extract -IPATH/platforms/android-X/arch-Y/include from passed argument define extract-platforms-include $(strip $(foreach __opt,$(1),\ $(if \ $(and \ $(filter -I%,$(__opt)),\ $(findstring /platforms/,$(__opt)),\ $(findstring /android-,$(__opt)),\ $(findstring /arch-,$(__opt))\ ),\ $(__opt)\ )\ )) endef # Put platforms include option to the end of list, ensuring CrystaX include option going right before that # We use subst function here to workaround the fact that '-isystem /some/path' is 2 words while '-I/some/path' is one. define interpose-crystax-headers $(strip \ $(filter-out $(call extract-platforms-include,$(subst -isystem ,-I,$(1))),$(subst -isystem ,-I,$(1))) \ $(eval __libcrystax_incpath := $(crystax-dir)/include)\ $(if $(wildcard $(__libcrystax_incpath)),\ -I$(__libcrystax_incpath),\ $(call __ndk_info,Could not find libcrystax headers: $(call pretty-dir,$(__libcrystax_incpath)) (broken NDK?))\ $(call __ndk_error,Aborting)\ )\ $(subst -I,-isystem ,$(call extract-platforms-include,$(subst -isystem ,-I,$(1))))\ ) endef # This assumes that many variables have been pre-defined: # _SRC: source file # _OBJ: destination file # _CC: 'compiler' command # _FLAGS: 'compiler' flags # _TEXT: Display text (e.g. "Compile++ thumb", must be EXACTLY 15 chars long) # define ev-build-file $$(_OBJ): PRIVATE_ABI := $$(TARGET_ARCH_ABI) $$(_OBJ): PRIVATE_SRC := $$(_SRC) $$(_OBJ): PRIVATE_OBJ := $$(_OBJ) $$(_OBJ): PRIVATE_DEPS := $$(call host-path,$$(_OBJ).d) $$(_OBJ): PRIVATE_MODULE := $$(LOCAL_MODULE) $$(_OBJ): PRIVATE_TEXT := $$(_TEXT) $$(_OBJ): PRIVATE_CC := $$(_CC) $$(_OBJ): PRIVATE_CFLAGS := $$(call interpose-crystax-headers,$$(_FLAGS)) ifeq ($$(LOCAL_SHORT_COMMANDS),true) _OPTIONS_LISTFILE := $$(_OBJ).cflags $$(_OBJ): $$(call generate-list-file,$$(_FLAGS),$$(_OPTIONS_LISTFILE)) $$(_OBJ): PRIVATE_CFLAGS := @$$(call host-path,$$(_OPTIONS_LISTFILE)) $$(_OBJ): $$(_OPTIONS_LISTFILE) endif $$(call generate-file-dir,$$(_OBJ)) $$(_OBJ): $$(_SRC) $$(LOCAL_MAKEFILE) $$(NDK_APP_APPLICATION_MK) $$(NDK_DEPENDENCIES_CONVERTER) $(LOCAL_RS_OBJECTS) $$(call host-echo-build-step,$$(PRIVATE_ABI),$$(PRIVATE_TEXT)) "$$(PRIVATE_MODULE) <= $$(notdir $$(PRIVATE_SRC))" $$(hide) $$(PRIVATE_CC) -MMD -MP -MF $$(call convert-deps,$$(PRIVATE_DEPS)) $$(PRIVATE_CFLAGS) $$(call host-path,$$(PRIVATE_SRC)) -o $$(call host-path,$$(PRIVATE_OBJ)) \ $$(call cmd-convert-deps,$$(PRIVATE_DEPS)) endef # For renderscript: slightly different from the above ev-build-file # _RS_SRC: RS source file # _CPP_SRC: ScriptC_RS.cpp source file # _BC_SRC: Bitcode source file # _BC_SO: Bitcode SO name, no path # _OBJ: destination file # _RS_CC: 'compiler' command for _RS_SRC # _RS_BCC: 'compiler' command for _BC_SRC # _CXX: 'compiler' command for _CPP_SRC # _RS_FLAGS: 'compiler' flags for _RS_SRC # _CPP_FLAGS: 'compiler' flags for _CPP_SRC # _LD_FLAGS: 'compiler' flags for linking # _TEXT: Display text (e.g. "Compile RS") # _OUT: output dir # _COMPAT: 'true' if bcc_compat is required # define ev-build-rs-file $$(_OBJ): PRIVATE_ABI := $$(TARGET_ARCH_ABI) $$(_OBJ): PRIVATE_RS_SRC := $$(_RS_SRC) $$(_OBJ): PRIVATE_CPP_SRC := $$(_CPP_SRC) $$(_OBJ): PRIVATE_BC_SRC := $$(_BC_SRC) $$(_OBJ): PRIVATE_OBJ := $$(_OBJ) $$(_OBJ): PRIVATE_BC_OBJ := $$(_BC_SRC)$(TARGET_OBJ_EXTENSION) $$(_OBJ): PRIVATE_BC_SO := $$(_BC_SO) $$(_OBJ): PRIVATE_DEPS := $$(call host-path,$$(_OBJ).d) $$(_OBJ): PRIVATE_MODULE := $$(LOCAL_MODULE) $$(_OBJ): PRIVATE_TEXT := $$(_TEXT) $$(_OBJ): PRIVATE_RS_CC := $$(_RS_CC) $$(_OBJ): PRIVATE_RS_BCC := $$(_RS_BCC) $$(_OBJ): PRIVATE_CXX := $$(_CXX) $$(_OBJ): PRIVATE_RS_FLAGS := $$(_RS_FLAGS) $$(_OBJ): PRIVATE_CPPFLAGS := $$(_CPP_FLAGS) $$(_OBJ): PRIVATE_LDFLAGS := $$(_LD_FLAGS) $$(_OBJ): PRIVATE_OUT := $$(NDK_APP_DST_DIR) $$(_OBJ): PRIVATE_RS_TRIPLE := $$(RS_TRIPLE) $$(_OBJ): PRIVATE_COMPAT := $$(_COMPAT) ifeq ($$(LOCAL_SHORT_COMMANDS),true) _OPTIONS_LISTFILE := $$(_OBJ).cflags $$(_OBJ): $$(call generate-list-file,$$(_CPP_FLAGS),$$(_OPTIONS_LISTFILE)) $$(_OBJ): PRIVATE_CPPFLAGS := @$$(call host-path,$$(_OPTIONS_LISTFILE)) $$(_OBJ): $$(_OPTIONS_LISTFILE) endif # llvm-rc-cc.exe has problem accepting input *.rs with path. To workaround: # cd ($dir $(_SRC)) ; llvm-rs-cc $(notdir $(_SRC)) -o ...full-path... # ifeq ($$(_COMPAT),true) $$(_OBJ): $$(_RS_SRC) $$(LOCAL_MAKEFILE) $$(NDK_APP_APPLICATION_MK) $$(NDK_DEPENDENCIES_CONVERTER) $$(call host-echo-build-step,$$(PRIVATE_ABI),$$(PRIVATE_TEXT)) "$$(PRIVATE_MODULE) <= $$(notdir $$(PRIVATE_RS_SRC))" $$(hide) \ cd $$(call host-path,$$(dir $$(PRIVATE_RS_SRC))) && $$(PRIVATE_RS_CC) -o $$(call host-path,$$(abspath $$(dir $$(PRIVATE_OBJ))))/ -d $$(abspath $$(call host-path,$$(dir $$(PRIVATE_OBJ)))) -MD -reflect-c++ -target-api $(strip $(subst android-,,$(APP_PLATFORM))) $$(PRIVATE_RS_FLAGS) $$(notdir $$(PRIVATE_RS_SRC)) $$(hide) \ $$(PRIVATE_RS_BCC) -O3 -o $$(call host-path,$$(PRIVATE_BC_OBJ)) -fPIC -shared -rt-path $$(call host-path,$(SYSROOT_LINK)/usr/lib/rs/libclcore.bc) -mtriple $$(PRIVATE_RS_TRIPLE) $$(call host-path,$$(PRIVATE_BC_SRC)) && \ $$(PRIVATE_CXX) -shared -Wl,-soname,librs.$$(PRIVATE_BC_SO) -nostdlib $$(call host-path,$$(PRIVATE_BC_OBJ)) $$(call host-path,$(SYSROOT_LINK)/usr/lib/rs/libcompiler_rt.a) -o $$(call host-path,$$(PRIVATE_OUT)/librs.$$(PRIVATE_BC_SO)) -L $$(call host-path,$(SYSROOT_LINK)/usr/lib) -L $$(call host-path,$(SYSROOT_LINK)/usr/lib/rs) $$(PRIVATE_LDFLAGS) -lRSSupport -lm -lc && \ $$(PRIVATE_CXX) -MMD -MP -MF $$(call convert-deps,$$(PRIVATE_DEPS)) $$(PRIVATE_CPPFLAGS) $$(call host-path,$$(PRIVATE_CPP_SRC)) -o $$(call host-path,$$(PRIVATE_OBJ)) \ $$(call cmd-convert-deps,$$(PRIVATE_DEPS)) else $$(_OBJ): $$(_RS_SRC) $$(LOCAL_MAKEFILE) $$(NDK_APP_APPLICATION_MK) $$(NDK_DEPENDENCIES_CONVERTER) $$(call host-echo-build-step,$$(PRIVATE_ABI),$$(PRIVATE_TEXT)) "$$(PRIVATE_MODULE) <= $$(notdir $$(PRIVATE_RS_SRC))" $$(hide) \ cd $$(call host-path,$$(dir $$(PRIVATE_RS_SRC))) && $$(PRIVATE_RS_CC) -o $$(call host-path,$$(abspath $$(dir $$(PRIVATE_OBJ))))/ -d $$(abspath $$(call host-path,$$(dir $$(PRIVATE_OBJ)))) -MD -reflect-c++ -target-api $(strip $(subst android-,,$(APP_PLATFORM))) $$(PRIVATE_RS_FLAGS) $$(notdir $$(PRIVATE_RS_SRC)) $$(hide) \ $$(PRIVATE_CXX) -MMD -MP -MF $$(call convert-deps,$$(PRIVATE_DEPS)) $$(PRIVATE_CPPFLAGS) $$(call host-path,$$(PRIVATE_CPP_SRC)) -o $$(call host-path,$$(PRIVATE_OBJ)) \ $$(call cmd-convert-deps,$$(PRIVATE_DEPS)) endif endef # This assumes the same things than ev-build-file, but will handle # the definition of LOCAL_FILTER_ASM as well. define ev-build-source-file LOCAL_DEPENDENCY_DIRS += $$(dir $$(_OBJ)) ifndef LOCAL_FILTER_ASM # Trivial case: Directly generate an object file $$(eval $$(call ev-build-file)) else # This is where things get hairy, we first transform # the source into an assembler file, send it to the # filter, then generate a final object file from it. # # First, remember the original settings and compute # the location of our temporary files. # _ORG_SRC := $$(_SRC) _ORG_OBJ := $$(_OBJ) _ORG_FLAGS := $$(_FLAGS) _ORG_TEXT := $$(_TEXT) _OBJ_ASM_ORIGINAL := $$(patsubst %$$(TARGET_OBJ_EXTENSION),%.s,$$(_ORG_OBJ)) _OBJ_ASM_FILTERED := $$(patsubst %$$(TARGET_OBJ_EXTENSION),%.filtered.s,$$(_ORG_OBJ)) # If the source file is a plain assembler file, we're going to # use it directly in our filter. ifneq (,$$(filter %.s,$$(_SRC))) _OBJ_ASM_ORIGINAL := $$(_SRC) endif #$$(info SRC=$$(_SRC) OBJ=$$(_OBJ) OBJ_ORIGINAL=$$(_OBJ_ASM_ORIGINAL) OBJ_FILTERED=$$(_OBJ_ASM_FILTERED)) # We need to transform the source into an assembly file, instead of # an object. The proper way to do that depends on the file extension. # # For C and C++ source files, simply replace the -c by an -S in the # compilation command (this forces the compiler to generate an # assembly file). # # For assembler templates (which end in .S), replace the -c with -E # to send it to the preprocessor instead. # # Don't do anything for plain assembly files (which end in .s) # ifeq (,$$(filter %.s,$$(_SRC))) _OBJ := $$(_OBJ_ASM_ORIGINAL) ifneq (,$$(filter %.S,$$(_SRC))) _FLAGS := $$(patsubst -c,-E,$$(_ORG_FLAGS)) else _FLAGS := $$(patsubst -c,-S,$$(_ORG_FLAGS)) endif $$(eval $$(call ev-build-file)) endif # Next, process the assembly file with the filter $$(_OBJ_ASM_FILTERED): PRIVATE_ABI := $$(TARGET_ARCH_ABI) $$(_OBJ_ASM_FILTERED): PRIVATE_SRC := $$(_OBJ_ASM_ORIGINAL) $$(_OBJ_ASM_FILTERED): PRIVATE_DST := $$(_OBJ_ASM_FILTERED) $$(_OBJ_ASM_FILTERED): PRIVATE_FILTER := $$(LOCAL_FILTER_ASM) $$(_OBJ_ASM_FILTERED): PRIVATE_MODULE := $$(LOCAL_MODULE) $$(_OBJ_ASM_FILTERED): $$(_OBJ_ASM_ORIGINAL) $$(call host-echo-build-step,$$(PRIVATE_ABI),AsmFilter) "$$(PRIVATE_MODULE) <= $$(notdir $$(PRIVATE_SRC))" $$(hide) $$(PRIVATE_FILTER) $$(PRIVATE_SRC) $$(PRIVATE_DST) # Then, generate the final object, we need to keep assembler-specific # flags which look like -Wa,