Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f23054f6 authored by Nicolas Geoffray's avatar Nicolas Geoffray
Browse files

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
parent 359d4f33
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -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