diff options
author | 2020-01-14 17:01:03 -0800 | |
---|---|---|
committer | 2020-01-16 11:02:17 -0800 | |
commit | facb360e49b05cc244d6ef6bb8261f32f769dfe3 (patch) | |
tree | f2200044d5fb372236bb5d0c195ce00964d5f4c7 /build_kzip.bash | |
parent | 1be2d48005d45e4061d21dec17a4e6714a600232 (diff) |
Build kzip for Go files in build/blueprint directory.
Bug: 137798757
Test: manual
Change-Id: If953425c80c60a64ebd6d50dddbac858ef091275
Diffstat (limited to 'build_kzip.bash')
-rwxr-xr-x | build_kzip.bash | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/build_kzip.bash b/build_kzip.bash index 89cd067ba..329825a03 100755 --- a/build_kzip.bash +++ b/build_kzip.bash @@ -22,13 +22,14 @@ declare -r out="${OUT_DIR:-out}" build/soong/soong_ui.bash --build-mode --all-modules --dir=$PWD -k merge_zips xref_cxx xref_java #Build extraction file for Go files in build/soong directory. declare -r abspath_out=$(realpath "${out}") -(cd build/soong; - ../../prebuilts/build-tools/linux-x86/bin/go_extractor \ - --goroot="${PWD}/../../prebuilts/go/linux-x86" \ - --rules=vnames.go.json \ - --canonicalize_package_corpus \ - --output "${abspath_out}/soong/all.go.kzip" \ - ./... ) +declare -r go_extractor=$(realpath prebuilts/build-tools/linux-x86/bin/go_extractor) +declare -r go_root=$(realpath prebuilts/go/linux-x86) +for dir in blueprint soong; do + (cd "build/$dir"; + "$go_extractor" --goroot="$go_root" --rules=vnames.go.json --canonicalize_package_corpus \ + --output "${abspath_out}/soong/build_${dir}.go.kzip" ./... + ) +done declare -r kzip_count=$(find "$out" -name '*.kzip' | wc -l) (($kzip_count>100000)) || { printf "Too few kzip files were generated: %d\n" $kzip_count; exit 1; } |