diff options
author | 2021-02-16 16:57:06 +0000 | |
---|---|---|
committer | 2021-02-16 17:38:08 +0000 | |
commit | 2c36f240828eaad1904d231b8809e212aecd6708 (patch) | |
tree | f61e95c8dd1d2ffe5a2cbb51c44775d4af5c96c7 /java/hiddenapi_singleton.go | |
parent | 82b3fcf12334a9d3bc257eecc948cc6fbc6ac473 (diff) |
Sort hiddenapi monolithic files by signature
Adds a new --key_field option to merge_csv.py which specifies the name
of the field that should be used to sort the input. If specified it
causes that field to be the first in each row and performs the merge
operation of a merge sort on the input files. That assumes that each
input file is already sorted into the same order.
Modifies the rules that use merge_csv.py to pass in:
--key_field signature
to sort the rows by signature.
Bug: 180387396
Test: Verified that hiddenapi files (both aggregated ones and for the
individual modules) are not affected by this change other than
changing the order.
Change-Id: Idcd5f0fea373b520b604889e1c280f21ed495660
Diffstat (limited to 'java/hiddenapi_singleton.go')
-rw-r--r-- | java/hiddenapi_singleton.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/java/hiddenapi_singleton.go b/java/hiddenapi_singleton.go index 25d39f346..82e8b3f75 100644 --- a/java/hiddenapi_singleton.go +++ b/java/hiddenapi_singleton.go @@ -424,6 +424,7 @@ func metadataRule(ctx android.SingletonContext) android.Path { rule.Command(). BuiltTool("merge_csv"). + Flag("--key_field signature"). FlagWithOutput("--output=", outputPath). Inputs(metadataCSV) @@ -535,6 +536,7 @@ func (h *hiddenAPIIndexSingleton) GenerateBuildActions(ctx android.SingletonCont rule := android.NewRuleBuilder(pctx, ctx) rule.Command(). BuiltTool("merge_csv"). + Flag("--key_field signature"). FlagWithArg("--header=", "signature,file,startline,startcol,endline,endcol,properties"). FlagWithOutput("--output=", hiddenAPISingletonPaths(ctx).index). Inputs(indexes) |