Open ZizhanChen opened 4 years ago
hi! I got the same error. yes, we can add this flag to BoardConfig.mk, but it is not a clean solution since Google encourages the use of Android.bp files instead of Makefiles. Thant's what the soong suggested the use of these modules (cc_prebuilt_binary / cc_prebuilt_library_shared). in my case, solved this problem by creating Android.bp file in the repo where I put my prebuilt libraries, then I added them as product packages in the product mk file. this is an example :
Android.bp : cc_prebuilt_library { name: "product_package_name_in_MK_file", relative_install_path: "sub_lib/sub_sub_lib", stem: "output_file_name", // .so will be added automatically to out file name. compile_multilib: "both", multilib: { lib32: { srcs: ["path for src 32bit lib"], }, lib64: { srcs: ["path for src 64bit lib"], }, }, strip: { none:true, }, allow_undefined_symbols: true, check_elf_files: false, vendor: true, enabled: true, }
product_mk file :
... PRODUCT_PACKAGES += product_package_name_in_MK_file ...
The error: