From 53b174e771fd1b0f736a6e5e3febb972fa03dd40 Mon Sep 17 00:00:00 2001
From: Jakub Pawlowski <jpawlowski@google.com>
Date: Thu, 19 Oct 2017 19:51:57 -0700
Subject: [PATCH] Linux: bluetooth.default.so -> libbluetooth.so

Also rename the build goal for both the library.

Bug: 67853426
Test: run Bluetooth
Change-Id: Ic5bd27f10ade0b068057049dd98c09e082cafee1
---
 BUILD.gn                   |  2 +-
 system/main/BUILD.gn       | 11 +++++++++--
 system/stack/BUILD.gn      |  2 +-
 system/test/suite/BUILD.gn |  2 +-
 4 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/BUILD.gn b/BUILD.gn
index 618de1c3224..e471a747b4a 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -23,7 +23,7 @@
 # This pulls in main/BUILD.gn and all of its dependencies.
 group("bluetooth") {
   deps = [
-    "//main:bluetooth.default",
+    "//main:bluetooth",
     "//service:bluetoothtbd",
   ]
 }
diff --git a/system/main/BUILD.gn b/system/main/BUILD.gn
index a81b666f3bd..ff5c8e41795 100644
--- a/system/main/BUILD.gn
+++ b/system/main/BUILD.gn
@@ -14,8 +14,13 @@
 #  limitations under the License.
 #
 
-shared_library("bluetooth.default") {
-  output_prefix_override=true
+config("libbluetooth_config") {
+  include_dirs = [
+    "../include",
+  ]
+}
+
+shared_library("bluetooth") {
 
   # HAL layer
   sources = [
@@ -32,6 +37,8 @@ shared_library("bluetooth.default") {
     "stack_config.cc",
   ]
 
+  public_configs = [ ":libbluetooth_config" ]
+
   include_dirs = [
     "//",
     "//bta/include",
diff --git a/system/stack/BUILD.gn b/system/stack/BUILD.gn
index 61a0cee15b2..8bb4a277b51 100644
--- a/system/stack/BUILD.gn
+++ b/system/stack/BUILD.gn
@@ -226,7 +226,7 @@ executable("stack_unittests") {
     "//embdrv/sbc",
     "//hci",
     "//types",
-    "//main:bluetooth.default",
+    "//main:bluetooth",
     "//third_party/googletest:gmock_main",
     "//third_party/libchrome:base",
   ]
diff --git a/system/test/suite/BUILD.gn b/system/test/suite/BUILD.gn
index d48100023e4..8d34c8c6864 100644
--- a/system/test/suite/BUILD.gn
+++ b/system/test/suite/BUILD.gn
@@ -28,7 +28,7 @@ executable("net_test_bluetooth") {
 
   deps = [
     "//btcore",
-    "//main:bluetooth.default",
+    "//main:bluetooth",
     "//service:service",
     "//service:service_unittests",
     "//types:types_unittests",
-- 
GitLab