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

Commit ee804d45 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix up files to compile on Linux" am: 93577522 am: 532dcdaf

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1560696

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib44611644db0619a99508500d275315c307a5092
parents 0b4c5ca1 532dcdaf
Loading
Loading
Loading
Loading
+134 −7
Original line number Original line Diff line number Diff line
@@ -20,11 +20,17 @@
# you add a new build file, there must be some path of dependencies from this
# you add a new build file, there must be some path of dependencies from this
# file to your new one or GN won't know about it.
# file to your new one or GN won't know about it.


group("all") {
  deps = [
    ":bluetooth",
  ]
}

# This pulls in main/BUILD.gn and all of its dependencies.
# This pulls in main/BUILD.gn and all of its dependencies.
group("bluetooth") {
group("bluetooth") {
  deps = [
  deps = [
    "//main:bluetooth",
    "//bt/main:bluetooth",
    "//service:bluetoothtbd",
    "//bt/service:bluetoothtbd",
  ]
  ]
}
}


@@ -32,10 +38,131 @@ group("bluetooth_tests") {
  testonly = true
  testonly = true


  deps = [
  deps = [
    "//test/suite:net_test_bluetooth",
    "//bt/test/suite:net_test_bluetooth",
    "//btcore:net_test_btcore",
    "//bt/btcore:net_test_btcore",
    "//hci:net_test_hci",
    "//bt/hci:net_test_hci",
    "//osi:net_test_osi",
    "//bt/osi:net_test_osi",
    "//device:net_test_device",
    "//bt/device:net_test_device",
  ]
}

config("target_defaults") {
  include_dirs = [
    "//bt/linux_include",
    "//bt/types",
    "//bt/include",
  ]

  cflags = [
    "-DEXPORT_SYMBOL=__attribute__((visibility(\"default\")))",
    "-DFALLTHROUGH_INTENDED=[[clang::fallthrough]]",
    "-fPIC",
    "-Wno-non-c-typedef-for-linkage",
    "-Wno-unreachable-code-return",
    "-Wno-defaulted-function-deleted",
    "-Wno-gnu-variable-sized-type-not-at-end",
    "-Wno-format-nonliteral",
    "-Wno-inconsistent-missing-override",
    "-Wno-unreachable-code",
    "-Wno-range-loop-construct",
    "-Wno-reorder-init-list",
    "-Wno-unused-function",
    "-Wno-unused-result",
    "-Wno-unused-variable",
    "-Wno-unused-const-variable",
  ]

  cflags_cc = [
    "-std=c++17",
  ]

  defines = [
    "HAS_NO_BDROID_BUILDCFG",
    "OS_GENERIC",
  ]

  configs = [
    ":external_libchrome",
  ]
}

# Configurations to use as dependencies for GN build
config("external_gtest") {
  configs = [
    ":pkg_gtest",
    ":pkg_gmock",
  ]
  ]
}
}

config("external_gtest_main") {
  configs = [ ":pkg_gtest_main" ]
}

config("external_gmock_main") {
  configs = [ ":pkg_gmock_main" ]
}

config("external_libchrome") {
  configs = [ ":pkg_libchrome" ]
}

config("external_modp_b64") {
  configs = [ ":pkg_modp_b64" ]
}

config("external_tinyxml2") {
  configs = [ ":pkg_tinyxml2" ]
}

# Package configurations to extract dependencies from env
pkg_config("pkg_gtest") {
  pkg_deps = [ "gtest" ]
}

pkg_config("pkg_gtest_main") {
  pkg_deps = [ "gtest_main" ]
}

pkg_config("pkg_gmock") {
  pkg_deps = [ "gmock" ]
}

pkg_config("pkg_gmock_main") {
  pkg_deps = [ "gmock_main" ]
}

pkg_config("pkg_libchrome") {
  pkg_deps = [ "libchrome" ]
}

pkg_config("pkg_modp_b64") {
  pkg_deps = [ "libmodp_b64" ]
}

pkg_config("pkg_tinyxml2") {
  pkg_deps = [ "tinyxml2" ]
}

# Uncomment if building nonstandard codecs
# config("external_aac") {
#   configs = [ ":pkg_aac" ]
# }
#
# pkg_config("pkg_aac") {
#   pkg_deps = [ "fdk-aac" ]
# }
#
# config("external_libldac") {
#   configs = [
#     ":pkg_libldacBT_enc",
#     ":pkg_libldacBT_abr",
#   ]
# }
#
# pkg_config("pkg_libldacBT_enc") {
#   pkg_deps = [ "ldacBT-enc", ]
# }
#
# pkg_config("pkg_libldacBT_abr") {
#   pkg_deps = [ "ldacBT-abr", ]
# }
+36 −29
Original line number Original line Diff line number Diff line
@@ -92,28 +92,32 @@ static_library("bta") {
    "hd",
    "hd",
    "include",
    "include",
    "sys",
    "sys",
    "//",
    "//bt/",
    "//linux_include",
    "//bt/linux_include",
    "//bta",
    "//bt/bta",
    "//internal_include",
    "//bt/internal_include",
    "//btcore/include",
    "//bt/btcore/include",
    "//hci/include",
    "//bt/hci/include",
    "//internal_include",
    "//bt/internal_include",
    "//stack/include",
    "//bt/stack/include",
    "//stack/btm",
    "//bt/stack/btm",
    "//udrv/include",
    "//bt/udrv/include",
    "//utils/include",
    "//bt/utils/include",
    "//vnd/include",
    "//bt/vnd/include",
    "//btif/include",
    "//bt/btif/include",
    "//btif/avrcp",
    "//bt/btif/avrcp",
    "//include/hardware/avrcp",
    "//bt/include/hardware/avrcp",
    "//profile/avrcp",
    "//bt/profile/avrcp",
    "//packet/avrcp",
    "//bt/packet/avrcp",
    "//packet/base",
    "//bt/packet/base",
  ]

  configs += [
    "//bt:target_defaults"
  ]
  ]


  deps = [
  deps = [
    "//third_party/libchrome:base"
    "//bt/gd/rust/shim:init_flags_bridge_header",
  ]
  ]
}
}


@@ -128,18 +132,21 @@ executable("net_test_bta") {


  include_dirs = [
  include_dirs = [
    "include",
    "include",
    "//",
    "//bt/",
    "//bta",
    "//bt/bta",
    "//btcore/include",
    "//bt/btcore/include",
    "//hci/include",
    "//bt/hci/include",
    "//internal_include",
    "//bt/internal_include",
    "//stack/btm",
    "//bt/stack/btm",
  ]
  ]


  deps = [
  deps = [
    "//bta",
    "//bt/bta",
    "//types",
    "//bt/types",
    "//third_party/googletest:gmock_main",
  ]
    "//third_party/libchrome:base",

  configs += [
    "//bt:external_gmock_main",
    "//bt:target_defaults",
  ]
  ]
}
}
+16 −9
Original line number Original line Diff line number Diff line
@@ -25,11 +25,15 @@ static_library("btcore") {


  include_dirs = [
  include_dirs = [
    "include",
    "include",
    "//",
    "//bt",
  ]

  configs += [
    "//bt:target_defaults",
  ]
  ]


  deps = [
  deps = [
    "//third_party/libchrome:base",
    "//bt/gd/rust/shim:init_flags_bridge_header",
  ]
  ]
}
}


@@ -38,20 +42,23 @@ executable("net_test_btcore") {
  sources = [
  sources = [
    "test/device_class_test.cc",
    "test/device_class_test.cc",
    "test/property_test.cc",
    "test/property_test.cc",
    "//osi/test/AllocationTestHarness.cc",
    "//bt/osi/test/AllocationTestHarness.cc",
  ]
  ]


  include_dirs = [
  include_dirs = [
    "include",
    "include",
    "//",
    "//bt",
  ]
  ]


  deps = [
  deps = [
    "//btcore",
    "//bt/btcore",
    "//osi",
    "//bt/osi",
    "//types",
    "//bt/types",
    "//third_party/googletest:gtest_main",
  ]
    "//third_party/libchrome:base",

  configs += [
    "//bt:external_gtest_main",
    "//bt:target_defaults",
  ]
  ]


  libs = [
  libs = [
+34 −28
Original line number Original line Diff line number Diff line
@@ -16,13 +16,13 @@


static_library("btif") {
static_library("btif") {
  sources = [
  sources = [
    "//audio_a2dp_hw/src/audio_a2dp_hw_utils.cc",
    "//bt/audio_a2dp_hw/src/audio_a2dp_hw_utils.cc",
    "//audio_hearing_aid_hw/src/audio_hearing_aid_hw_utils.cc",
    "//bt/audio_hearing_aid_hw/src/audio_hearing_aid_hw_utils.cc",
    "src/btif_a2dp.cc",
    "src/btif_a2dp.cc",
    "src/btif_a2dp_audio_interface_linux.cc",
    "src/btif_a2dp_audio_interface_linux.cc",
    "src/btif_a2dp_control.cc",
    "src/btif_a2dp_control.cc",
    "src/btif_a2dp_sink.cc",
    "src/btif_a2dp_sink.cc",
    "src/btif_a2dp_source.cc",
    # "src/btif_a2dp_source.cc",
    "src/btif_av.cc",
    "src/btif_av.cc",
    "avrcp/avrcp_service.cc",
    "avrcp/avrcp_service.cc",


@@ -31,7 +31,7 @@ static_library("btif") {
    "src/btif_avrcp_audio_track_linux.cc",
    "src/btif_avrcp_audio_track_linux.cc",
    "src/btif_ble_advertiser.cc",
    "src/btif_ble_advertiser.cc",
    "src/btif_ble_scanner.cc",
    "src/btif_ble_scanner.cc",
    "src/btif_config.cc",
    # "src/btif_config.cc",
    "src/btif_config_transcode.cc",
    "src/btif_config_transcode.cc",
    "src/btif_core.cc",
    "src/btif_core.cc",
    "src/btif_debug.cc",
    "src/btif_debug.cc",
@@ -77,32 +77,38 @@ static_library("btif") {


  include_dirs = [
  include_dirs = [
    "include",
    "include",
    "//",
    "//bt/",
    "//linux_include",
    "//bt/bta/dm",
    "//audio_a2dp_hw/include",
    "//bt/linux_include",
    "//audio_hearing_aid_hw/include",
    "//bt/audio_a2dp_hw/include",
    "//bta/include",
    "//bt/audio_hearing_aid_hw/include",
    "//bta/sys",
    "//bt/bta/include",
    "//btcore/include",
    "//bt/bta/sys",
    "//device/include",
    "//bt/btcore/include",
    "//embdrv/sbc/encoder/include",
    "//bt/device/include",
    "//embdrv/sbc/decoder/include",
    "//bt/embdrv/sbc/encoder/include",
    "//hci/include",
    "//bt/embdrv/sbc/decoder/include",
    "//stack/a2dp",
    "//bt/hci/include",
    "//stack/btm",
    "//bt/stack/a2dp",
    "//stack/l2cap",
    "//bt/stack/btm",
    "//stack/include",
    "//bt/stack/l2cap",
    "//third_party/tinyxml2",
    "//bt/stack/include",
    "//internal_include",
    "//bt/internal_include",
    "//udrv/include",
    "//bt/udrv/include",
    "//utils/include",
    "//bt/utils/include",
    "//vnd/include",
    "//bt/vnd/include",
    "//profile/avrcp",
    "//bt/profile/avrcp",
  ]
  ]


  deps = [
  deps = [
    "//common",
    "//bt/common",
    "//third_party/libchrome:base",
    "//bt/gd/rust/shim:init_flags_bridge_header",
    "//profile/avrcp:profile_avrcp"
    "//bt/profile/avrcp:profile_avrcp",
    "//bt/third_party/proto_logging/stats:libbt-platform-protos",
  ]

  configs += [
    "//bt:target_defaults",
    "//bt:external_tinyxml2",
  ]
  ]
}
}
+1 −0
Original line number Original line Diff line number Diff line
@@ -18,6 +18,7 @@


#include <map>
#include <map>
#include <memory>
#include <memory>
#include <mutex>


#include "hardware/avrcp/avrcp.h"
#include "hardware/avrcp/avrcp.h"
#include "osi/include/properties.h"
#include "osi/include/properties.h"
Loading