diff --git a/PREUPLOAD.cfg b/PREUPLOAD.cfg index 125b469f4..7b533a472 100644 --- a/PREUPLOAD.cfg +++ b/PREUPLOAD.cfg @@ -1,3 +1,2 @@ [Hook Scripts] -versioner = tools/versioner/preupload.sh notice = tools/update_notice.sh diff --git a/libc/Android.bp b/libc/Android.bp index 5d0e8c7e9..9bba77698 100644 --- a/libc/Android.bp +++ b/libc/Android.bp @@ -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", diff --git a/libc/versioner-dependencies/arm/arch-arm b/libc/versioner-dependencies/arm/arch-arm new file mode 120000 index 000000000..cc94225a7 --- /dev/null +++ b/libc/versioner-dependencies/arm/arch-arm @@ -0,0 +1 @@ +../../arch-arm/include/ \ No newline at end of file diff --git a/libc/versioner-dependencies/arm/kernel_uapi_asm-arm b/libc/versioner-dependencies/arm/kernel_uapi_asm-arm new file mode 120000 index 000000000..3c7584dec --- /dev/null +++ b/libc/versioner-dependencies/arm/kernel_uapi_asm-arm @@ -0,0 +1 @@ +../../kernel/uapi/asm-arm \ No newline at end of file diff --git a/libc/versioner-dependencies/arm64/arch-arm64 b/libc/versioner-dependencies/arm64/arch-arm64 new file mode 120000 index 000000000..2d9128afd --- /dev/null +++ b/libc/versioner-dependencies/arm64/arch-arm64 @@ -0,0 +1 @@ +../../arch-arm64/include/ \ No newline at end of file diff --git a/libc/versioner-dependencies/arm64/kernel_uapi_asm-arm64 b/libc/versioner-dependencies/arm64/kernel_uapi_asm-arm64 new file mode 120000 index 000000000..7ee6fd21f --- /dev/null +++ b/libc/versioner-dependencies/arm64/kernel_uapi_asm-arm64 @@ -0,0 +1 @@ +../../kernel/uapi/asm-arm64 \ No newline at end of file diff --git a/libc/versioner-dependencies/common/clang-builtins b/libc/versioner-dependencies/common/clang-builtins new file mode 120000 index 000000000..7bd481c94 --- /dev/null +++ b/libc/versioner-dependencies/common/clang-builtins @@ -0,0 +1 @@ +../../../../external/clang/lib/Headers/ \ No newline at end of file diff --git a/libc/versioner-dependencies/common/kernel_android_uapi b/libc/versioner-dependencies/common/kernel_android_uapi new file mode 120000 index 000000000..fd7831572 --- /dev/null +++ b/libc/versioner-dependencies/common/kernel_android_uapi @@ -0,0 +1 @@ +../../kernel/android/uapi/ \ No newline at end of file diff --git a/libc/versioner-dependencies/common/kernel_uapi b/libc/versioner-dependencies/common/kernel_uapi new file mode 120000 index 000000000..d5cb8eec1 --- /dev/null +++ b/libc/versioner-dependencies/common/kernel_uapi @@ -0,0 +1 @@ +../../kernel/uapi/ \ No newline at end of file diff --git a/libc/versioner-dependencies/mips/arch-mips b/libc/versioner-dependencies/mips/arch-mips new file mode 120000 index 000000000..56ed02144 --- /dev/null +++ b/libc/versioner-dependencies/mips/arch-mips @@ -0,0 +1 @@ +../../arch-mips/include/ \ No newline at end of file diff --git a/libc/versioner-dependencies/mips/kernel_uapi_asm-mips b/libc/versioner-dependencies/mips/kernel_uapi_asm-mips new file mode 120000 index 000000000..94bb3db75 --- /dev/null +++ b/libc/versioner-dependencies/mips/kernel_uapi_asm-mips @@ -0,0 +1 @@ +../../kernel/uapi/asm-mips \ No newline at end of file diff --git a/libc/versioner-dependencies/mips64/arch-mips64 b/libc/versioner-dependencies/mips64/arch-mips64 new file mode 120000 index 000000000..4893b5748 --- /dev/null +++ b/libc/versioner-dependencies/mips64/arch-mips64 @@ -0,0 +1 @@ +../../arch-mips64/include/ \ No newline at end of file diff --git a/libc/versioner-dependencies/mips64/kernel_uapi_asm-mips b/libc/versioner-dependencies/mips64/kernel_uapi_asm-mips new file mode 120000 index 000000000..94bb3db75 --- /dev/null +++ b/libc/versioner-dependencies/mips64/kernel_uapi_asm-mips @@ -0,0 +1 @@ +../../kernel/uapi/asm-mips \ No newline at end of file diff --git a/libc/versioner-dependencies/x86/arch-x86 b/libc/versioner-dependencies/x86/arch-x86 new file mode 120000 index 000000000..64263842a --- /dev/null +++ b/libc/versioner-dependencies/x86/arch-x86 @@ -0,0 +1 @@ +../../arch-x86/include/ \ No newline at end of file diff --git a/libc/versioner-dependencies/x86/kernel_uapi_asm-x86 b/libc/versioner-dependencies/x86/kernel_uapi_asm-x86 new file mode 120000 index 000000000..1b7a73dda --- /dev/null +++ b/libc/versioner-dependencies/x86/kernel_uapi_asm-x86 @@ -0,0 +1 @@ +../../kernel/uapi/asm-x86/ \ No newline at end of file diff --git a/libc/versioner-dependencies/x86_64/arch-x86_64 b/libc/versioner-dependencies/x86_64/arch-x86_64 new file mode 120000 index 000000000..684d74eba --- /dev/null +++ b/libc/versioner-dependencies/x86_64/arch-x86_64 @@ -0,0 +1 @@ +../../arch-x86_64/include/ \ No newline at end of file diff --git a/libc/versioner-dependencies/x86_64/kernel_uapi_asm-x86 b/libc/versioner-dependencies/x86_64/kernel_uapi_asm-x86 new file mode 120000 index 000000000..1b7a73dda --- /dev/null +++ b/libc/versioner-dependencies/x86_64/kernel_uapi_asm-x86 @@ -0,0 +1 @@ +../../kernel/uapi/asm-x86/ \ No newline at end of file diff --git a/tools/update_headers.sh b/tools/update_headers.sh deleted file mode 100755 index 0095d5065..000000000 --- a/tools/update_headers.sh +++ /dev/null @@ -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." diff --git a/tools/versioner/dependencies/arm/arch-arm b/tools/versioner/dependencies/arm/arch-arm deleted file mode 120000 index ed69f41b1..000000000 --- a/tools/versioner/dependencies/arm/arch-arm +++ /dev/null @@ -1 +0,0 @@ -../../../../libc/arch-arm/include \ No newline at end of file diff --git a/tools/versioner/dependencies/arm/kernel_uapi_asm-arm b/tools/versioner/dependencies/arm/kernel_uapi_asm-arm deleted file mode 120000 index fabed85af..000000000 --- a/tools/versioner/dependencies/arm/kernel_uapi_asm-arm +++ /dev/null @@ -1 +0,0 @@ -../../../../libc/kernel/uapi/asm-arm \ No newline at end of file diff --git a/tools/versioner/dependencies/arm64/arch-arm64 b/tools/versioner/dependencies/arm64/arch-arm64 deleted file mode 120000 index 21a21d4a0..000000000 --- a/tools/versioner/dependencies/arm64/arch-arm64 +++ /dev/null @@ -1 +0,0 @@ -../../../../libc/arch-arm64/include \ No newline at end of file diff --git a/tools/versioner/dependencies/arm64/kernel_uapi_asm-arm64 b/tools/versioner/dependencies/arm64/kernel_uapi_asm-arm64 deleted file mode 120000 index 16e74a3e5..000000000 --- a/tools/versioner/dependencies/arm64/kernel_uapi_asm-arm64 +++ /dev/null @@ -1 +0,0 @@ -../../../../libc/kernel/uapi/asm-arm64 \ No newline at end of file diff --git a/tools/versioner/dependencies/common/clang-builtins b/tools/versioner/dependencies/common/clang-builtins deleted file mode 120000 index fc27e65b2..000000000 --- a/tools/versioner/dependencies/common/clang-builtins +++ /dev/null @@ -1 +0,0 @@ -../../../../../external/clang/lib/Headers \ No newline at end of file diff --git a/tools/versioner/dependencies/common/kernel_android_uapi b/tools/versioner/dependencies/common/kernel_android_uapi deleted file mode 120000 index bcf6daa69..000000000 --- a/tools/versioner/dependencies/common/kernel_android_uapi +++ /dev/null @@ -1 +0,0 @@ -../../../../libc/kernel/android/uapi \ No newline at end of file diff --git a/tools/versioner/dependencies/common/kernel_uapi b/tools/versioner/dependencies/common/kernel_uapi deleted file mode 120000 index 2a915efb9..000000000 --- a/tools/versioner/dependencies/common/kernel_uapi +++ /dev/null @@ -1 +0,0 @@ -../../../../libc/kernel/uapi \ No newline at end of file diff --git a/tools/versioner/dependencies/mips/arch-mips b/tools/versioner/dependencies/mips/arch-mips deleted file mode 120000 index 7f2f10410..000000000 --- a/tools/versioner/dependencies/mips/arch-mips +++ /dev/null @@ -1 +0,0 @@ -../../../../libc/arch-mips/include \ No newline at end of file diff --git a/tools/versioner/dependencies/mips/kernel_uapi_asm-mips b/tools/versioner/dependencies/mips/kernel_uapi_asm-mips deleted file mode 120000 index dcd1955af..000000000 --- a/tools/versioner/dependencies/mips/kernel_uapi_asm-mips +++ /dev/null @@ -1 +0,0 @@ -../../../../libc/kernel/uapi/asm-mips \ No newline at end of file diff --git a/tools/versioner/dependencies/mips64/arch-mips64 b/tools/versioner/dependencies/mips64/arch-mips64 deleted file mode 120000 index 48cea7234..000000000 --- a/tools/versioner/dependencies/mips64/arch-mips64 +++ /dev/null @@ -1 +0,0 @@ -../../../../libc/arch-mips64/include \ No newline at end of file diff --git a/tools/versioner/dependencies/mips64/kernel_uapi_asm-mips b/tools/versioner/dependencies/mips64/kernel_uapi_asm-mips deleted file mode 120000 index dcd1955af..000000000 --- a/tools/versioner/dependencies/mips64/kernel_uapi_asm-mips +++ /dev/null @@ -1 +0,0 @@ -../../../../libc/kernel/uapi/asm-mips \ No newline at end of file diff --git a/tools/versioner/dependencies/x86/arch-x86 b/tools/versioner/dependencies/x86/arch-x86 deleted file mode 120000 index d0f016a09..000000000 --- a/tools/versioner/dependencies/x86/arch-x86 +++ /dev/null @@ -1 +0,0 @@ -../../../../libc/arch-x86/include \ No newline at end of file diff --git a/tools/versioner/dependencies/x86/kernel_uapi_asm-x86 b/tools/versioner/dependencies/x86/kernel_uapi_asm-x86 deleted file mode 120000 index 0efae62b7..000000000 --- a/tools/versioner/dependencies/x86/kernel_uapi_asm-x86 +++ /dev/null @@ -1 +0,0 @@ -../../../../libc/kernel/uapi/asm-x86 \ No newline at end of file diff --git a/tools/versioner/dependencies/x86_64/arch-x86_64 b/tools/versioner/dependencies/x86_64/arch-x86_64 deleted file mode 120000 index deb647d21..000000000 --- a/tools/versioner/dependencies/x86_64/arch-x86_64 +++ /dev/null @@ -1 +0,0 @@ -../../../../libc/arch-x86_64/include \ No newline at end of file diff --git a/tools/versioner/dependencies/x86_64/kernel_uapi_asm-x86 b/tools/versioner/dependencies/x86_64/kernel_uapi_asm-x86 deleted file mode 120000 index 0efae62b7..000000000 --- a/tools/versioner/dependencies/x86_64/kernel_uapi_asm-x86 +++ /dev/null @@ -1 +0,0 @@ -../../../../libc/kernel/uapi/asm-x86 \ No newline at end of file diff --git a/tools/versioner/preupload.sh b/tools/versioner/preupload.sh deleted file mode 100755 index 45d6cca46..000000000 --- a/tools/versioner/preupload.sh +++ /dev/null @@ -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 $? diff --git a/tools/versioner/src/Android.bp b/tools/versioner/src/Android.bp index d1362d094..c5afa56d0 100644 --- a/tools/versioner/src/Android.bp +++ b/tools/versioner/src/Android.bp @@ -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, - }, - }, }