Partial bp2build conversion of bootstratp_go_package
This module type does not implement android.Module, and therefore we cannot write a conventional bp2build converter for this module type. Instead this has been special-cased inside bp2build/build_conversion.go. Because of the above, we also do not have access to useful functions available in the ctx object of ConvertWithBp2build. This includes 1. Finding the package (directory) of a dep. This requires getting a handle of the underlying module from its name (string). To solve, we do a pre-visit to collect this information. This did not increase the wall time. On my machine, `m bp2build --skip-soong-tests` takes ~14s before and after this CL 2. Converting srcs to labels. This requires glob and package boundary resolution. This CL introduces a partial implementation for this function. (glob patterns are not used in go tools) For (1), I considered creating a `ModuleFromName` on `blueprint.Context` instead of a pre-run, but this increased the time to ~27s. Test: unit tests Test: TH Bug: 284483729 Change-Id: Ifeb029103d14947352556dba295591dd7038b090
Loading
Please register or sign in to comment