add androidmk cc-related variables to androidmk
The adbd_test androidmk definition is missing some cc-related variables for cc_test in mixed builds. These variables should be populated from information from Bazel. Bug: 265758350 Change-Id: I59d017e2eb2f139188ba3383c457cc0055372b61
This commit is contained in:
11
cc/cc.go
11
cc/cc.go
@@ -1870,7 +1870,8 @@ var (
|
||||
// in any of the --bazel-mode(s). This filters at the module level and takes
|
||||
// precedence over the allowlists in allowlists/allowlists.go.
|
||||
func (c *Module) IsMixedBuildSupported(ctx android.BaseModuleContext) bool {
|
||||
if c.testBinary() && !android.InList(c.Name(), mixedBuildSupportedCcTest) {
|
||||
_, isForTesting := ctx.Config().BazelContext.(android.MockBazelContext)
|
||||
if c.testBinary() && !android.InList(c.Name(), mixedBuildSupportedCcTest) && !isForTesting {
|
||||
// Per-module rollout of mixed-builds for cc_test modules.
|
||||
return false
|
||||
}
|
||||
@@ -1888,6 +1889,14 @@ func (c *Module) ProcessBazelQueryResponse(ctx android.ModuleContext) {
|
||||
bazelCtx := ctx.Config().BazelContext
|
||||
if ccInfo, err := bazelCtx.GetCcInfo(bazelModuleLabel, android.GetConfigKey(ctx)); err == nil {
|
||||
c.tidyFiles = android.PathsForBazelOut(ctx, ccInfo.TidyFiles)
|
||||
c.Properties.AndroidMkSharedLibs = ccInfo.LocalSharedLibs
|
||||
c.Properties.AndroidMkStaticLibs = ccInfo.LocalStaticLibs
|
||||
c.Properties.AndroidMkWholeStaticLibs = ccInfo.LocalWholeStaticLibs
|
||||
}
|
||||
if unstrippedInfo, err := bazelCtx.GetCcUnstrippedInfo(bazelModuleLabel, android.GetConfigKey(ctx)); err == nil {
|
||||
c.Properties.AndroidMkSharedLibs = unstrippedInfo.LocalSharedLibs
|
||||
c.Properties.AndroidMkStaticLibs = unstrippedInfo.LocalStaticLibs
|
||||
c.Properties.AndroidMkWholeStaticLibs = unstrippedInfo.LocalWholeStaticLibs
|
||||
}
|
||||
|
||||
c.bazelHandler.ProcessBazelQueryResponse(ctx, bazelModuleLabel)
|
||||
|
Reference in New Issue
Block a user