Merge changes from topic 'no-bionic-prebuilts'

* changes:
  Build the versioner even on unbundled branches.
  Revert "Revert "Run the versioner as part of the build.""
This commit is contained in:
Treehugger Robot 2017-03-29 17:59:25 +00:00 committed by Gerrit Code Review
commit aa0b5054c5
35 changed files with 21 additions and 97 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,18 +41,8 @@ cc_binary_host {
"-fno-rtti",
],
},
darwin: {
enabled: false,
},
windows: {
enabled: false,
},
},
product_variables: {
unbundled_build: {
// Only do this when Clang is available.
enabled: false,
},
},
}