prebuilt shared library using Android.bp

3,287 views
Skip to first unread message

dhinesh kumar

unread,
Dec 13, 2018, 3:03:17 PM12/13/18
to android-...@googlegroups.com
Hi,

I am new to Android.bp
I have a requirement where I need to use prebuilt shared library for both  arm and arm64 architectures.
How to add conditional sources picking in Android.bp based on the arch type building.

Sample:

cc_prebuilt_library_shared {
    name: "libmymodule",
    owner: "mycomp",

    srcs: ["obj/libmymodule.so"],
    compile_multilib: "both",
    vendor_available: true,

    header_libs: ["libmymodule_headers"],
    export_header_lib_headers: ["libmymodule_headers"],
}

--
Yours,
Dhineshkumar C

Wesolowski, Krzysztof

unread,
Dec 14, 2018, 2:45:10 PM12/14/18
to android-...@googlegroups.com

Sth like that?

cc_prebuilt_library_shared {
    name: "<name>",
    vendor: true,
    compile_multilib: "both",
    multilib: {
      lib32: {
         srcs: ["lib/name.so"],
      },
      lib64: {
         srcs: ["lib64/name.so"],
      },
    },
    export_include_dirs: ["include"],
}


BR, K.



From: android-...@googlegroups.com <android-...@googlegroups.com> on behalf of dhinesh kumar <dhinesh...@gmail.com>
Sent: Thursday, December 13, 2018 8:09:11 PM
To: android-...@googlegroups.com
Subject: [android-building] prebuilt shared library using Android.bp
 
--
--
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.

Anil kumar

unread,
May 27, 2020, 12:29:45 PM5/27/20
to Android Building
I want to include multiple shared and static libraries built by 3rd party in my Native Application. Can anyone help me? I am using Android.bp file as shown below, but it is not working.

cc_prebuilt_library_static {
        name: "boost-prebuilt",
        target: {
            android_arm: {
                srcs: ["include/boost/lib/libboost_chrono-clang-mt-1_63.a",
                "include/boost/lib/libboost_date_time-clang-mt-1_63.a",
                "include/boost/lib/libboost_filesystem-clang-mt-1_63.a",
                "include/boost/lib/libboost_program_options-clang-mt-1_63.a",
                "include/boost/lib/libboost_regex-clang-mt-1_63.a",
                "include/boost/lib/libboost_serialization-clang-mt-1_63.a",
                "include/boost/lib/libboost_system-clang-mt-1_63.a",
                "include/boost/lib/libboost_thread-clang-mt-1_63.a",
                "include/boost/lib/libboost_timer-clang-mt-1_63.a",
                "include/boost/lib/libboost_wserialization-clang-mt-1_63.a"
                ],
            },
            android_arm64: {
                srcs: ["include/boost/lib64/libboost_chrono-clang-mt-1_63.a",
                "include/boost/lib64/libboost_date_time-clang-mt-1_63.a",
                "include/boost/lib64/libboost_filesystem-clang-mt-1_63.a",
                "include/boost/lib64/libboost_program_options-clang-mt-1_63.a",
                "include/boost/lib64/libboost_regex-clang-mt-1_63.a",
                "include/boost/lib64/libboost_serialization-clang-mt-1_63.a",
                "include/boost/lib64/libboost_system-clang-mt-1_63.a",
                "include/boost/lib64/libboost_thread-clang-mt-1_63.a",
                "include/boost/lib64/libboost_timer-clang-mt-1_63.a",
                "include/boost/lib64/libboost_wserialization-clang-mt-1_63.a"
                ],
            },
        },
        strip: {
            none:true,
        },

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-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages