Soong: Is it possible to read a conditional variable/feature flag defined in a device.mk file?

721 views
Skip to first unread message

Michael Lekman

unread,
Sep 14, 2017, 5:21:57 PM9/14/17
to Android Building
Hello,

Is it possible to access a feature flag set in a device setup mk file.


TARGET_USES_NANOHUB_SENSORHAL

Can we access it in a go file?
if ctx.AConfig().IsEnvTrue("TARGET_USES_NANOHUB_SENSORHAL") { cflags = append(cflags, "-DTARGET_USES_NANOHUB_SENSORHAL") }

I am trying to add a define and add a shared lib in my Android.bp file that are dependent on a conditional feature flag.

BR
/Michael


Colin Cross

unread,
Sep 14, 2017, 5:32:54 PM9/14/17
to android-...@googlegroups.com
It needs to be plumbed through to soong using build/make/core/soong_config.mk and build/soong/android/variable.go.

--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscribe@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-building+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages