8fe14e6a49
This amends Idad7ef138cdbcbd209d390bf6c10ca8365d4619f. With the change, when there is a member that returns IsHostOsDependent() == true, the sdk having the member and the member itself are disable for host and only the os that the member supports is explicitly enabled. However, that change will cause a problem when we add the support for the linux_bionic_arm64 target. The target is not enabled when building sdk snapshots. The only linux_bionic target that is enabled is 'linux_bionic_x86_64'. However, since the granularity is os which is linux_bionic, the snapshot is generated as follows. cc_prebuilt_binary { target: { host: { enabled: false, }, linux_bionic: { enabled: true, }, linux_bionic_x86_64: { srcs: ["x86_64/bin/..."], }, // no srcs for linux_bionic_arm64 }, } Above is a problem for linux_bionic_arm64 target because the target is enabled (via linux_bionic.enabled: true), but srcs is not provided. To fix the problem, the enabling of a target is done in a target (os_arch) granularity, rather than os granularity. For example, above now becomes ... cc_prebuilt_binary { target: { host: { enabled: false, }, linux_bionic_x86_64: { enabled: true, srcs: ["x86_64/bin/..."], }, }, } Only the targets that the snapshot actually can provide srcs are enabled and the rest of the host targets are disabled. Bug: 159685774 Test: m nothing Test: build/soong/scripts/build-aml-prebuilts.sh runtime-module-host-exports Change-Id: Ibca48c40f6dc4628b5f4bfa4ceb68ebe0973cc81 |
||
---|---|---|
.. | ||
Android.bp | ||
bp.go | ||
bp_test.go | ||
cc_sdk_test.go | ||
exports.go | ||
exports_test.go | ||
java_sdk_test.go | ||
sdk.go | ||
sdk_test.go | ||
testing.go | ||
update.go |