Set <partition>_available only if it is for device

it is meaningful only if it is installed in the device

Bug: 277909042
Test: cargo2android.py with/without device, and then check
product/vendor_available

Change-Id: I9ca7328ac953849db224949089412e181b659945
This commit is contained in:
Jeongik Cha
2023-09-27 02:28:55 +09:00
parent 4b76dd3526
commit a18bd3c1ca

View File

@@ -744,6 +744,8 @@ class Crate(object):
self.write(' "libcompiler_builtins.rust_sysroot",')
self.write(' "libcore.rust_sysroot",')
self.write(' ],')
if self.device_supported:
# These configurations are meaningful only if it is for device.
if self.runner.variant_args.native_bridge_supported:
self.write(' native_bridge_supported: true,')
if self.runner.variant_args.product_available: