diff --git a/vndk/tools/header-checker/Documentation/Development.md b/vndk/tools/header-checker/Documentation/Development.md new file mode 100644 index 000000000..128584ef3 --- /dev/null +++ b/vndk/tools/header-checker/Documentation/Development.md @@ -0,0 +1,39 @@ +# Development + +## Checkout source tree + +To checkout the source tree, run the following commands: + + $ mkdir aosp-clang-tools + + $ cd aosp-clang-tools + + $ repo init \ + -u persistent-https://android.googlesource.com/platform/manifest \ + -b clang-tools + + $ repo sync + + +## Build instructions + +To build `header-abi-dumper`, `header-abi-linker` and `header-abi-diff`: + + $ OUT_DIR=out \ + development/vndk/tools/header-checker/android/build-prebuilts.sh + + +## Alternative build instructions + +If you have a full AOSP master branch source tree, you may build the tools +with: + + $ source build/envsetup.sh + + $ lunch aosp_arm64-userdebug + + $ cd development/vndk/tools/header-checker + + $ source android/envsetup.sh + + $ mm diff --git a/vndk/tools/header-checker/android/build-prebuilts.sh b/vndk/tools/header-checker/android/build-prebuilts.sh index 299ce905d..7131c0e6b 100755 --- a/vndk/tools/header-checker/android/build-prebuilts.sh +++ b/vndk/tools/header-checker/android/build-prebuilts.sh @@ -14,12 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -export LLVM_BUILD_HOST_TOOLS=true -export LLVM_PREBUILTS_VERSION=clang-r365631 -export LLVM_RELEASE_VERSION=9.0.6 - -# FIXME: Workaround to build bionic versioner in the aosp/clang-tools branch. -export FORCE_BUILD_LLVM_COMPONENTS=true +source "$(dirname "$0")/envsetup.sh" if [ -z "${OUT_DIR}" ]; then echo "error: Must set OUT_DIR" diff --git a/vndk/tools/header-checker/android/envsetup.sh b/vndk/tools/header-checker/android/envsetup.sh new file mode 100644 index 000000000..3a6c6bac9 --- /dev/null +++ b/vndk/tools/header-checker/android/envsetup.sh @@ -0,0 +1,19 @@ +#!/bin/bash -ex + +# Copyright 2019 Google Inc. All rights reserved. +# +# 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. + +export LLVM_BUILD_HOST_TOOLS=true +export LLVM_PREBUILTS_VERSION=clang-r365631 +export LLVM_RELEASE_VERSION=9.0.6