cc_binary module name and binary name

136 views
Skip to first unread message

Abhayadev S

unread,
Oct 4, 2021, 3:14:20 PM10/4/21
to Android Building
Hi,

usually the name of the installed binary will be same as the module "name" but can we have 2 cc_binary modules defined to install a binary of same name but on a conditional PRODUCT_PACKAGES definition?

like a/Android.bp will define cc_binary with name : mymodule and it shall install myBin
and b/Android.bp will define cc_binary with name mymodule2 and it shall install myBin
and this will be controlled by a conditional PRODUCT_PACKAGES definition
PRODUCT_PACKAGES += mymodule  OR PRODUCT_PACKAGES += mymodule2

this is the install a binary (with same name) from 2 partners but based on a build condition/rule.

regards,
abhay



Dan Willemsen

unread,
Oct 4, 2021, 6:35:18 PM10/4/21
to android-...@googlegroups.com
No, that's not possible, as the installation system still sets up the install rules for every module, so that the user can request a module to be installed even if it isn't in PRODUCT_PACKAGES.

Either have them named differently on the device, or use soong namespaces and the same module name(myBin) so that only one will ever be exported to Make at a time, that can be chosen through PRODUCT_SOONG_NAMESPACES (PRODUCT_PACKAGES would just have myBin in either case).

- Dan

--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com
To unsubscribe from this group, send email to
android-buildi...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

---
You received this message because you are subscribed to the Google Groups "Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-buildi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/697400b2-6362-430e-99f2-9e5bce018996n%40googlegroups.com.

Abhayadev S

unread,
Oct 8, 2021, 5:37:55 PM10/8/21
to Android Building
Thanks Dan, appreciate the support.
I will explore the namespace options...
Reply all
Reply to author
Forward
0 new messages