How Can I Add Eng Build Only CFLAGS

61 views
Skip to first unread message

yestin

unread,
Jan 5, 2018, 10:18:23 PM1/5/18
to Android Building
Hi,

With the new Soong build system, how can I add eng build only CFLAGS? Something equivalent to the following ...

ifneq (,$(filter eng,$(TARGET_BUILD_VARIANT)))
LOCAL_CFLAGS += -DALLOW_SKIP_SECURE_CHECK=1
endif

Thanks,
Yestin

Wesolowski, Krzysztof

unread,
Jan 6, 2018, 8:06:24 PM1/6/18
to Android Building

cc_binary {
 ... // normal stuff    
  product_variables: {

        debuggable: {
            cppflags: ["-DUSERDEBUG_OR_ENG"],
        },

        eng: {
            cppflags: ["-DENG"],
        },

   },
}


BR, Krzysztof



From: android-...@googlegroups.com <android-...@googlegroups.com> on behalf of yestin <suny...@gmail.com>
Sent: Saturday, January 6, 2018 1:14:08 AM
To: Android Building
Subject: [android-building] How Can I Add Eng Build Only CFLAGS
 
--
--
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.
For more options, visit https://groups.google.com/d/optout.

yestin

unread,
Jan 6, 2018, 8:06:24 PM1/6/18
to Android Building
OK, I figured it out.

    product_variables: {
        eng: {
            cflags: [
                "-DALLOW_SKIP_SECURE_CHECK=1",
            ],
        },
    },

Thanks,
Yesitn
Reply all
Reply to author
Forward
0 new messages