From 3aa93292c9a73fccd011897c499f93ed7693d4b2 Mon Sep 17 00:00:00 2001 From: Tomasz Wasilczyk Date: Thu, 14 Nov 2024 11:32:53 -0800 Subject: [PATCH] Drop references to CAN HAL from libnetdevice and libnl++ Bug: 310710841 Test: m Change-Id: I362bb91860fa2e78168b4b27a1c9b36d1c23ba7e --- .../can/1.0/default/libnetdevice/Android.bp | 26 ++++++++++++++++--- automotive/can/1.0/default/libnl++/Android.bp | 11 +++++++- 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/automotive/can/1.0/default/libnetdevice/Android.bp b/automotive/can/1.0/default/libnetdevice/Android.bp index affbeee895..4131a658e4 100644 --- a/automotive/can/1.0/default/libnetdevice/Android.bp +++ b/automotive/can/1.0/default/libnetdevice/Android.bp @@ -23,11 +23,20 @@ package { default_applicable_licenses: ["hardware_interfaces_license"], } -cc_library_static { - name: "android.hardware.automotive.can@libnetdevice", - defaults: ["android.hardware.automotive.can@defaults"], +cc_defaults { + name: "libnetdevice-common", host_supported: true, vendor_available: true, + cflags: [ + "-Wall", + "-Wextra", + "-Werror", + "-DANDROID_BASE_UNIQUE_FD_DISABLE_IMPLICIT_CONVERSION", + ], + shared_libs: [ + "libbase", + "libutils", + ], srcs: [ "can.cpp", "common.cpp", @@ -41,3 +50,14 @@ cc_library_static { "libnl++", ], } + +// TODO: migrate to "libnetdevice" and remove +cc_library_static { + name: "android.hardware.automotive.can@libnetdevice", + defaults: ["libnetdevice-common"], +} + +cc_library_static { + name: "libnetdevice", + defaults: ["libnetdevice-common"], +} diff --git a/automotive/can/1.0/default/libnl++/Android.bp b/automotive/can/1.0/default/libnl++/Android.bp index 5e3168a837..ade4ae09ca 100644 --- a/automotive/can/1.0/default/libnl++/Android.bp +++ b/automotive/can/1.0/default/libnl++/Android.bp @@ -25,9 +25,18 @@ package { cc_library_static { name: "libnl++", - defaults: ["android.hardware.automotive.can@defaults"], host_supported: true, vendor_available: true, + cflags: [ + "-Wall", + "-Wextra", + "-Werror", + "-DANDROID_BASE_UNIQUE_FD_DISABLE_IMPLICIT_CONVERSION", + ], + shared_libs: [ + "libbase", + "libutils", + ], srcs: [ "protocols/common/Empty.cpp", "protocols/common/Error.cpp",