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

Commit f08d6079 authored by Jakub Pawlowski's avatar Jakub Pawlowski
Browse files

Build only for current architecture by default

From now on, libbluetooth.so, and all unit tests will be compiled for
the current device platform only.

libbluetooth-types is an exception from rule, as some vendor libraries
are still compiled for 32bit.

Bug: 68028239
Test: compile and run Bluetooth
Change-Id: I51bb4da2a9e1e4e9a03c43f2825bd1dbd4a5ca58
parent 821b9cb6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ fluoride_defaults {
fluoride_defaults {
    name: "fluoride_defaults",
    defaults: ["fluoride_types_defaults"],
    compile_multilib: "first",
    header_libs: ["libbluetooth_headers"],
    static_libs: [
        "libbluetooth-types",
+8 −1
Original line number Diff line number Diff line
@@ -102,11 +102,18 @@ if [ -n "${device}" ]; then
  adb+=( "-s" "${device}" )
fi

source ${ANDROID_BUILD_TOP}/build/envsetup.sh
target_arch=$(gettargetarch)

failed_tests=()
for spec in "${tests[@]}"
do
  name="${spec%%.*}"
  if [[ $target_arch == *"64"* ]]; then
    binary="/data/nativetest64/${name}/${name}"
  else
    binary="/data/nativetest/${name}/${name}"
  fi

  push_command=( "${adb[@]}" push {"${ANDROID_PRODUCT_OUT}",}"${binary}" )
  test_command=( "${adb[@]}" shell "${binary}" )
+1 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@ cc_library {
    name: "libbluetooth-types",
    vendor_available: true,
    defaults: ["fluoride_types_defaults"],
    compile_multilib: "both",
    cflags: [
        /* we export all classes, so change default visibility, instead of having EXPORT_SYMBOL on each class*/
        "-fvisibility=default",