I want to conditional compile one Android.bp module conditionally! if
vendorA, use vendora.bp to compile, if vendorB, then use vendorb.bp to
compile!
Say I:
----1. define a marco in BoardConfig.mk:
TARGET_PLATFORM_VENDOR := vendorA or vendorB etc.
----2. Then I change variable.go:
type variableProperties struct {
...
Platform_vendor struct {
Cflags []string
}
...
type productVariables struct {
Platform_vendor *string `json:",omitempty"`
----3. And I change soong_config.mk:
$(call add_json_str, Platform_vendor,
$(TARGET_PLATFORM_VENDOR))
----4. Change Android.bp (I guess):
cc_defaults {
name: "my-defaults",
defaults: [
],
product_variables: {
platform_vendor: {
vendora: {
include vendorA.bp
cflags: ["-DPLATFORM_SAMSUNG"],
},
vendorb: {
include vendorB.bp
cflags: ["-DPLATFORM_QCOM"],
}
}
}
}
I just write fake code here to include vendor.bp here! How can I write
correct Android.bp to make it work?
--
--
You received this message because you are subscribed to the "Android Building"
mailing list.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/d/optout.