Handle arch/cpu variants in mixed builds

Test: mixed_libc.sh
Change-Id: Ib5084060199b8e1a5955bd51bc3fd793bb83a1eb
This commit is contained in:
Liz Kammer
2022-03-18 15:55:04 -04:00
parent b6a55c53e7
commit 0940b89937
4 changed files with 13 additions and 8 deletions

View File

@@ -119,12 +119,12 @@ func (fg *fileGroup) maybeGenerateBazelBuildActions(ctx ModuleContext) {
return
}
archVariant := ctx.Arch().ArchType
archVariant := ctx.Arch().String()
osVariant := ctx.Os()
if len(fg.Srcs()) == 1 && fg.Srcs()[0].Base() == fg.Name() {
// This will be a regular file target, not filegroup, in Bazel.
// See FilegroupBp2Build for more information.
archVariant = Common
archVariant = Common.String()
osVariant = CommonOS
}