Commit graph

18 commits

Author SHA1 Message Date
Colin Cross
6a4d3ba138 Fix location of host tools
Host tools are in out/host/linux-x86/bin now instead of
out/soong/host/linux-x86/bin.

Bug: 204136549
Test: forrest
Change-Id: I293accdde5ee4d1d21a471e12ba66e169f9410fc
2021-11-05 14:10:01 -07:00
Brian Egizi
2aded7dd55 Fix unbound variable in kzip script
Change-Id: Id7f81677389cb853da064a43f1d5d54b2271f0c0
2021-05-21 00:51:44 +00:00
Brian Egizi
4aa056eb9e Update kzip script to support superproject revision environment variable
This changes the superproject sha variable to use the
SUPERPROJECT_REVISION as the default value if no explicit sha is
defined. Only sets up the new default if the revision value matches a
sha.

This change is required since the builder provides a revision for the
superproject that is either pinned to a sha or a branch name. If it is
pinned to a sha, we want to use this as the fallback source for
SUPERPROJECT_SHA

Bug: b/149248752
Change-Id: I59569b0e4d2f360243f0adc5b2587130956b6b99
2021-05-20 19:36:13 +00:00
Brian Egizi
29161df446 Prepare kzip script to support superproject sha as an environment variable
Bug: b/149248752
Change-Id: I17a640c66c8f4a37cc0c55b2d0a23d438c032974
2021-05-05 23:04:36 +00:00
Sasha Smundak
7049266392 Workaround for b/182183061: generate corpus-specific rule file
Bug: 182183061
Test: run build_kzip.bash, verify Go compilation units have corpus set
Change-Id: I26e034eb9bbb8fbb3902404ce72f7e223b9a5972
2021-03-08 16:29:31 -08:00
Sasha Smundak
b0addafd93 Limit the number of the Java source files in a single compilation unit
KYTHE_JAVA_SOURCE_BATCH_SIZE environment variable controls this setting.
The limit is 1000 if this variable is not set.

Fixes: 179932118
Test: run prebuilts/build-tools/build-prebuilts.sh, use it to build kzips, check
Change-Id: I9ad57dfd1d2c2dce5cff755b1bd61cf933420bd3
2021-02-16 15:14:52 -08:00
Sasha Smundak
b8f46cd2d6 In kzip files, compilation unit paths should be relative to top.
Fixes inter-module cross references.

Bug: 137798757
Test: build kzips, verify paths
Change-Id: I5cf64972ae61b869c96aafea5de0a48303d9af83
2020-02-25 11:22:17 -08:00
Sasha Smundak
f77ee745d3 Export KYTHE_KZIP_ENCODING.
Bug: 146224091
Test: manual
Change-Id: I998a51565419b86a9f183c0f3228ce09d7b035c0
2020-01-22 14:41:01 -08:00
Sasha Smundak
facb360e49 Build kzip for Go files in build/blueprint directory.
Bug: 137798757
Test: manual
Change-Id: If953425c80c60a64ebd6d50dddbac858ef091275
2020-01-16 11:02:17 -08:00
Sasha Smundak
6c2d4f91f8 Save compilation units in protobuf format.
Bug: 146224091
Test: manual
Change-Id: I7a856bab13f54c78efa0061421c3fcb9341bc6e7
2020-01-15 12:40:03 -08:00
Sasha Smundak
17c42bd105 Use absolute path for output.
Test: manual
Bug: 137798757
Change-Id: If2e9c31e1ff523914f5f2cecf8975e1da91c03a7
2020-01-02 11:20:40 -08:00
Sasha Smundak
ca54088aa8 Run extractor for Go files in build/soong directory
Bug: 137798757
Test: run 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 $OUT_DIR/soong/golang.kzip ./...
Change-Id: Ib1edde4bf36e6b0683f49da0986f243690c81d6b
2019-12-23 11:34:15 -08:00
Sasha Smundak
651436460a Pass filename mappings to C++ and Java extractors.
Android builds by default put artifacts into out/ subdirectory of
the source tree, causing the extractor to record their names as
relative. The indexer considers such files as sources, which is wrong.
Fortunately, the extractor can be fed a set of filename rewriting
rules (see build/tools/vnames.json).
Also, undo previous unsuccessful attempt use to absolute path for the
output directory to distinguish between source code and artifacts.

Bug: 141385476
Test: run the build, inspect compilation units of the kzip file
Change-Id: I89ec3aed8fd14f43ea6e0b226d54f643346f6125
2019-09-27 10:28:11 -07:00
Sasha Smundak
114d966c27 Name the resulting file $BUILD_NUMBER.kzip, drop revision.txt
Bug: 137977523
Test: manual
Change-Id: Ifb02f033baaf6ee1668ccaa56b59edd05dce078a
2019-09-26 14:54:19 -07:00
Sasha Smundak
a1e178f39d Build output directory should be an absolute path.
Bug: 141385476
Test: manual
Change-Id: I969c761571dca6949204a8aa87a0b52ba98761c2
2019-09-24 12:07:52 -07:00
Sasha Smundak
69ee7b0967 Generate revision.txt file containing unique ID.
Bug: 137977523
Test: manual
Change-Id: Ib1fbf6a4305bd843ace203e3f62a511fbdb168a1
2019-09-24 10:28:36 -07:00
Sasha Smundak
b13f9c520c Handle the case when OUT_DIR is not set.
Bug: 137977523
Test: manual
Change-Id: I6a4bcc5099223f28bce72bf10004c01327598fc7
2019-08-15 11:13:01 -07:00
Sasha Smundak
cb86c3c532 The script to generate input for the cross-referencing pipeline.
Bug: 137977523
Test: manual
Change-Id: I80faee8db12f0d8e85a09aa9d96fbfc04af19bf8
2019-08-13 14:45:52 -07:00