1*61046927SAndroid Build Coastguard Worker#!/bin/bash 2*61046927SAndroid Build Coastguard Worker 3*61046927SAndroid Build Coastguard Workerset -e 4*61046927SAndroid Build Coastguard Worker 5*61046927SAndroid Build Coastguard Workerif [ ! -f meson_options.txt ]; then 6*61046927SAndroid Build Coastguard Worker echo "Run this script from the repo root" 7*61046927SAndroid Build Coastguard Worker exit 1 8*61046927SAndroid Build Coastguard Workerfi 9*61046927SAndroid Build Coastguard Worker 10*61046927SAndroid Build Coastguard WorkerBIN_DIR=$(dirname "$0") 11*61046927SAndroid Build Coastguard WorkerROOT_DIR=$BIN_DIR/../../.. 12*61046927SAndroid Build Coastguard Worker 13*61046927SAndroid Build Coastguard WorkerPYTHON_BUILD=generate_android_build.py 14*61046927SAndroid Build Coastguard Worker 15*61046927SAndroid Build Coastguard WorkerREGEN=0 16*61046927SAndroid Build Coastguard Workerif [ "$1" == "-regen" ]; then 17*61046927SAndroid Build Coastguard Worker REGEN=1 18*61046927SAndroid Build Coastguard Workerfi 19*61046927SAndroid Build Coastguard Workerif [ ! -f $PYTHON_BUILD ]; then 20*61046927SAndroid Build Coastguard Worker REGEN=1 21*61046927SAndroid Build Coastguard Workerfi 22*61046927SAndroid Build Coastguard Worker 23*61046927SAndroid Build Coastguard Workerif [ "$REGEN" == "1" ]; then 24*61046927SAndroid Build Coastguard Worker time python3 $BIN_DIR/generate_python_build.py 25*61046927SAndroid Build Coastguard Workerelse 26*61046927SAndroid Build Coastguard Worker echo "Python build found; use -regen to regenerate it" 27*61046927SAndroid Build Coastguard Workerfi 28*61046927SAndroid Build Coastguard Worker 29*61046927SAndroid Build Coastguard Worker# Always generate Android.bp because it's fast 30*61046927SAndroid Build Coastguard WorkerPYTHONPATH=$BIN_DIR python3 generate_android_build.py --config=meson_to_hermetic/aosp.toml 31*61046927SAndroid Build Coastguard Worker 32*61046927SAndroid Build Coastguard Workersource $ROOT_DIR/build/envsetup.sh 33*61046927SAndroid Build Coastguard Workerlunch aosp_trout_arm64-trunk_staging-userdebug 34*61046927SAndroid Build Coastguard Worker 35*61046927SAndroid Build Coastguard Workerm vulkan_freedreno 36