Merge "Fix the lib directory being used for fetching libraries." am: d118b1c2b7 am: bb038e28f9 am: e233f13870 am: a27f44ef84 am: 2ec9673711

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1382656

Change-Id: Ib6f054f18972130bf4e9da401816e89e1e7a3cd6
This commit is contained in:
Nicolas Geoffray 2020-08-03 09:55:08 +00:00 committed by Automerger Merge Worker
commit 504357370b
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