Proper way to include STL in Android.mk in AOSP build system

778 views
Skip to first unread message

Michael Robbeloth

unread,
Jun 3, 2016, 11:27:18 AM6/3/16
to Android Building
Anyone,

I was wondering what is the proper way to include the STL in the Android.mk file when building under the AOSP build system and not in the NDK.  I know about libstlport in external, but it does not include all the classes needed in some cases (such as vector or chrono). Thanks.

Michael

Dan Willemsen

unread,
Jun 3, 2016, 12:44:16 PM6/3/16
to android-...@googlegroups.com
Which branch are you using? Newer branches (Marshmallow+) use LOCAL_CXX_STL to chose a STL for non-NDK modules (LOCAL_NDK_STL_VARIANT for NDK modules).

In Lollipop, you could include external/libcxx/libcxx.mk for libc++

- 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.
For more options, visit https://groups.google.com/d/optout.

Michael Robbeloth

unread,
Jun 3, 2016, 5:08:26 PM6/3/16
to Android Building
Dan,

Thank you for the suggestion. My company is using Jellybean 4.3 for one branch, but we''re working on moving to Lollipop 5.0. It looks like external.libcxx wasn't added until Lollipop. I doubt you can backport the project and just have it work. It's a shame really that there isn't an easy way to bring updates to the sdk and ndk that Google regularly issues for regular software development into older AOSP branches for use within the AOSP build system. It makes trying to get something to build under both Android Studio/Eclipse and AOSP quite tedious and compromising.

Michael
Reply all
Reply to author
Forward
0 new messages