Don't use ctx.directlyInAnyApex for bootstrap libraries
The check for directlyInAnyApex is redundant for bootstrap libraries,
they are already explicitly enumerated in InstallToBootstrap, and
they are all directly in an apex. Replace the check with
!ctx.isSdkVariant(), since ctx.directlyInAnyApex() was returning
false for the sdk variants.
Bug: 372543712
Test: no change to build.ninja
Test: all Soong tests pass
Change-Id: I00f63757bc93e50affcc54577393e34a5625154e
diff --git a/cc/binary.go b/cc/binary.go
index 2ac9a45..4b77bea 100644
--- a/cc/binary.go
+++ b/cc/binary.go
@@ -505,7 +505,7 @@
// The original path becomes a symlink to the corresponding file in the
// runtime APEX.
translatedArch := ctx.Target().NativeBridge == android.NativeBridgeEnabled
- if InstallToBootstrap(ctx.baseModuleName(), ctx.Config()) && !ctx.Host() && ctx.directlyInAnyApex() &&
+ if InstallToBootstrap(ctx.baseModuleName(), ctx.Config()) && !ctx.Host() && !ctx.isSdkVariant() &&
!translatedArch && ctx.apexVariationName() == "" && !ctx.inRamdisk() && !ctx.inRecovery() &&
!ctx.inVendorRamdisk() {