Revert "Revert "Run the versioner as part of the build.""

This reverts commit 69c7562f59.

Test: make checkbuild
Change-Id: Ie443029398c01b45e0a0317a8074808b064f35d4
This commit is contained in:
Dan Albert 2017-03-22 15:28:05 -07:00
parent 840ae69408
commit 22805ea9b8
35 changed files with 21 additions and 90 deletions

View file

@ -1,3 +1,2 @@
[Hook Scripts]
versioner = tools/versioner/preupload.sh
notice = tools/update_notice.sh

View file

@ -2036,15 +2036,12 @@ cc_object {
defaults: ["crt_defaults"],
}
// 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"],
// }
preprocessed_ndk_headers {
name: "common_libc",
from: "include",
to: "",
license: "NOTICE",
}
ndk_headers {
name: "libc_uapi",

View file

@ -0,0 +1 @@
../../arch-arm/include/

View file

@ -0,0 +1 @@
../../kernel/uapi/asm-arm

View file

@ -0,0 +1 @@
../../arch-arm64/include/

View file

@ -0,0 +1 @@
../../kernel/uapi/asm-arm64

View file

@ -0,0 +1 @@
../../../../external/clang/lib/Headers/

View file

@ -0,0 +1 @@
../../kernel/android/uapi/

View file

@ -0,0 +1 @@
../../kernel/uapi/

View file

@ -0,0 +1 @@
../../arch-mips/include/

View file

@ -0,0 +1 @@
../../kernel/uapi/asm-mips

View file

@ -0,0 +1 @@
../../arch-mips64/include/

View file

@ -0,0 +1 @@
../../kernel/uapi/asm-mips

View file

@ -0,0 +1 @@
../../arch-x86/include/

View file

@ -0,0 +1 @@
../../kernel/uapi/asm-x86/

View file

@ -0,0 +1 @@
../../arch-x86_64/include/

View file

@ -0,0 +1 @@
../../kernel/uapi/asm-x86/

View file

@ -1,53 +0,0 @@
#!/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."

View file

@ -1 +0,0 @@
../../../../libc/arch-arm/include

View file

@ -1 +0,0 @@
../../../../libc/kernel/uapi/asm-arm

View file

@ -1 +0,0 @@
../../../../libc/arch-arm64/include

View file

@ -1 +0,0 @@
../../../../libc/kernel/uapi/asm-arm64

View file

@ -1 +0,0 @@
../../../../../external/clang/lib/Headers

View file

@ -1 +0,0 @@
../../../../libc/kernel/android/uapi

View file

@ -1 +0,0 @@
../../../../libc/kernel/uapi

View file

@ -1 +0,0 @@
../../../../libc/arch-mips/include

View file

@ -1 +0,0 @@
../../../../libc/kernel/uapi/asm-mips

View file

@ -1 +0,0 @@
../../../../libc/arch-mips64/include

View file

@ -1 +0,0 @@
../../../../libc/kernel/uapi/asm-mips

View file

@ -1 +0,0 @@
../../../../libc/arch-x86/include

View file

@ -1 +0,0 @@
../../../../libc/kernel/uapi/asm-x86

View file

@ -1 +0,0 @@
../../../../libc/arch-x86_64/include

View file

@ -1 +0,0 @@
../../../../libc/kernel/uapi/asm-x86

View file

@ -1,9 +0,0 @@
#!/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 $?

View file

@ -41,9 +41,6 @@ cc_binary_host {
"-fno-rtti",
],
},
darwin: {
enabled: false,
},
windows: {
enabled: false,
},