Fix the lib directory being used for fetching libraries.

On 64bit archs, it needs to be lib64.

Test: scripts/build-mainline-modules.sh
Bug: 142935992
Change-Id: I049cfc39704c34c32f79edc7cc49d5f7f29f0ac2
This commit is contained in:
Nicolas Geoffray 2020-07-31 15:36:39 +01:00
parent 359d4f3374
commit f23054f668
1 changed files with 9 additions and 1 deletions

View File

@ -51,6 +51,13 @@ echo_and_run() {
"$@"
}
lib_dir() {
case $1 in
(aosp_arm|aosp_x86) echo "lib";;
(aosp_arm64|aosp_x86_64) echo "lib64";;
esac
}
OUT_DIR=$(source build/envsetup.sh > /dev/null; TARGET_PRODUCT= get_build_var OUT_DIR)
DIST_DIR=$(source build/envsetup.sh > /dev/null; TARGET_PRODUCT= get_build_var DIST_DIR)
@ -68,7 +75,8 @@ for product in "${PRODUCTS[@]}"; do
echo_and_run cp ${PWD}/${PRODUCT_OUT}/system/apex/${module}.apex ${DIST_DIR}/${TARGET_ARCH}/
done
for library in "${PLATFORM_LIBRARIES[@]}"; do
echo_and_run cp ${PWD}/${PRODUCT_OUT}/system/lib/${library}.so ${DIST_DIR}/${TARGET_ARCH}/
libdir=$(lib_dir $product)
echo_and_run cp ${PWD}/${PRODUCT_OUT}/system/${libdir}/${library}.so ${DIST_DIR}/${TARGET_ARCH}/
done
done