header-checker: Extract build variables into envsetup.sh
This commit extracts LLVM build variables from `build-prebuilts.sh` to
`android/envsetup.sh` so that header-checker developers can load these
variables with:
source android/envsetup.sh
This commit also removes stale `FORCE_BUILD_LLVM_COMPONENTS`.
Test: source android/envsetup.sh; mm; header-abi-dumper --help
Change-Id: Iba5577ba27f8e73d2601d71f538efdb388c4a208
This commit is contained in:
39
vndk/tools/header-checker/Documentation/Development.md
Normal file
39
vndk/tools/header-checker/Documentation/Development.md
Normal file
@@ -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
|
||||
@@ -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"
|
||||
|
||||
19
vndk/tools/header-checker/android/envsetup.sh
Normal file
19
vndk/tools/header-checker/android/envsetup.sh
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user