Fix duplicate install targets from sdk variants in --skip-make mode.

This can manifest as duplicate "dependency missing" rules in builds
where SOONG_ALLOW_MISSING_DEPENDENCIES, TARGET_BUILD_APPS and
--skip-make are used together.

Test: art/tools/build_linux_bionic.sh dalvikvm
  with "export TARGET_BUILD_APPS=com.android.art" after the lunch line
  in build_linux_bionic.sh.
Bug: 157549171
Change-Id: I0e8dec0020f194cd265c73a55153555a51f6a426
This commit is contained in:
Martin Stjernholm 2020-06-02 18:57:05 +01:00
parent c55b679e7b
commit 02229a2c6b
1 changed files with 1 additions and 0 deletions

View File

@ -43,6 +43,7 @@ func sdkMutator(ctx android.BottomUpMutatorContext) {
if ctx.Config().UnbundledBuild() {
modules[0].(*Module).Properties.HideFromMake = true
modules[0].(*Module).Properties.PreventInstall = true
} else {
modules[1].(*Module).Properties.SdkAndPlatformVariantVisibleToMake = true
modules[1].(*Module).Properties.PreventInstall = true