[Hook Scripts]
+versioner = tools/versioner/preupload.sh
notice = tools/update_notice.sh
defaults: ["crt_defaults"],
}
-preprocessed_ndk_headers {
- name: "common_libc",
- from: "include",
- to: "",
- license: "NOTICE",
-}
+// The following module lives in prebuilts/ndk because we need to preprocess the
+// headers to include ifdef guards for __ANDROID_API__. Update with
+// bionic/tools/update_headers.sh.
+// ndk_headers {
+// name: "common_libc",
+// from: "include",
+// to: "",
+// srcs: ["include/**/*.h"],
+// }
ndk_headers {
name: "libc_uapi",
+++ /dev/null
-../../arch-arm/include/
\ No newline at end of file
+++ /dev/null
-../../kernel/uapi/asm-arm
\ No newline at end of file
+++ /dev/null
-../../arch-arm64/include/
\ No newline at end of file
+++ /dev/null
-../../kernel/uapi/asm-arm64
\ No newline at end of file
+++ /dev/null
-../../../../external/clang/lib/Headers/
\ No newline at end of file
+++ /dev/null
-../../kernel/android/uapi/
\ No newline at end of file
+++ /dev/null
-../../kernel/uapi/
\ No newline at end of file
+++ /dev/null
-../../arch-mips/include/
\ No newline at end of file
+++ /dev/null
-../../kernel/uapi/asm-mips
\ No newline at end of file
+++ /dev/null
-../../arch-mips64/include/
\ No newline at end of file
+++ /dev/null
-../../kernel/uapi/asm-mips
\ No newline at end of file
+++ /dev/null
-../../arch-x86/include/
\ No newline at end of file
+++ /dev/null
-../../kernel/uapi/asm-x86/
\ No newline at end of file
+++ /dev/null
-../../arch-x86_64/include/
\ No newline at end of file
+++ /dev/null
-../../kernel/uapi/asm-x86/
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+cd $DIR
+
+which versioner >/dev/null 2>&1
+if [ $? -ne 0 ]; then
+ >&2 echo "versioner not in path; run mma in $DIR/versioner"
+ exit 1
+fi
+
+VERSION=$(git rev-parse --short HEAD)
+git diff-index --quiet HEAD
+DIRTY=$?
+git branch -r --contains HEAD | grep -q aosp/master
+SUBMITTED=$?
+
+if [ $DIRTY -ne 0 ]; then
+ >&2 echo "Warning: bionic has uncommitted changes"
+ VERSION="${VERSION}-dirty"
+elif [ $SUBMITTED -ne 0 ]; then
+ >&2 echo "Warning: current HEAD does not exist in aosp/master"
+ VERSION="${VERSION}-unsubmitted"
+fi
+
+PREBUILTS_DIR=$ANDROID_BUILD_TOP/prebuilts/ndk
+BRANCH_NAME=$(git -C $PREBUILTS_DIR symbolic-ref --short -q HEAD)
+if [ $? -ne 0 ]; then
+ BRANCH_NAME=update-bionic-headers-$VERSION
+ echo "prebuilts/ndk has detached head; creating branch $BRANCH_NAME"
+ repo start $BRANCH_NAME $PREBUILTS_DIR
+else
+ echo "prebuilts/ndk already on branch $BRANCH_NAME"
+fi
+
+HEADERS_INSTALL=$PREBUILTS_DIR/headers
+if [ -d "$HEADERS_INSTALL" ]; then
+ git -C $PREBUILTS_DIR rm -r --ignore-unmatch $HEADERS_INSTALL
+ if [ -d $HEADERS_INSTALL ]; then
+ rm -r $HEADERS_INSTALL
+ fi
+fi
+
+versioner -p versioner/platforms versioner/current versioner/dependencies \
+ -o $HEADERS_INSTALL
+if [ $? -ne 0 ]; then
+ >&2 echo "Header preprocessing failed"
+ exit 1
+fi
+
+cp ../libc/NOTICE $PREBUILTS_DIR
+
+git -C $PREBUILTS_DIR add $HEADERS_INSTALL $PREBUILTS_DIR/NOTICE
+git -C $PREBUILTS_DIR commit -m "Update bionic headers to $VERSION."
--- /dev/null
+../../../../libc/arch-arm/include
\ No newline at end of file
--- /dev/null
+../../../../libc/kernel/uapi/asm-arm
\ No newline at end of file
--- /dev/null
+../../../../libc/arch-arm64/include
\ No newline at end of file
--- /dev/null
+../../../../libc/kernel/uapi/asm-arm64
\ No newline at end of file
--- /dev/null
+../../../../../external/clang/lib/Headers
\ No newline at end of file
--- /dev/null
+../../../../libc/kernel/android/uapi
\ No newline at end of file
--- /dev/null
+../../../../libc/kernel/uapi
\ No newline at end of file
--- /dev/null
+../../../../libc/arch-mips/include
\ No newline at end of file
--- /dev/null
+../../../../libc/kernel/uapi/asm-mips
\ No newline at end of file
--- /dev/null
+../../../../libc/arch-mips64/include
\ No newline at end of file
--- /dev/null
+../../../../libc/kernel/uapi/asm-mips
\ No newline at end of file
--- /dev/null
+../../../../libc/arch-x86/include
\ No newline at end of file
--- /dev/null
+../../../../libc/kernel/uapi/asm-x86
\ No newline at end of file
--- /dev/null
+../../../../libc/arch-x86_64/include
\ No newline at end of file
--- /dev/null
+../../../../libc/kernel/uapi/asm-x86
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+
+if ! which versioner > /dev/null; then
+ echo "versioner not found (lunch and mma in bionic)"
+ exit 1
+fi
+
+versioner -r arm -r arm64
+exit $?
"-fno-rtti",
],
},
+ darwin: {
+ enabled: false,
+ },
windows: {
enabled: false,
},