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

Commit 35430799 authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by Andre Eisenbach
Browse files

Get rid of dependency on core from linux build (1/2)

When building bluetooth stack for linux, don't include dependencies from
core.

Test: build with ninja and mma
Change-Id: I02aeb178327c9f6c0414cc37624aecc58fb0876e
parent 8d6d9cec
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -79,7 +79,6 @@ Fluoride currently has dependency on some internal Android projects, which also

```sh
cd ~/fluoride
git clone https://android.googlesource.com/platform/system/core
git clone https://android.googlesource.com/platform/hardware/libhardware
```

@@ -100,7 +99,6 @@ This will prompt you to fill the contents of your "out/Default/args.gn" file. Ma
# See "gn args <out_dir> --list" for available build arguments.

libhw_include_path = "/home/job/fluoride/libhardware/include"
core_include_path = "/home/job/fluoride/core/include"
```

Then generate your build files by calling
+5 −4
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@
declare_args() {
  # Include path for hardware/bluetooth.h
  libhw_include_path = ""
  core_include_path = ""
}

config("default_include_dirs") {
@@ -25,11 +24,8 @@ config("default_include_dirs") {
  # been removed.
  assert(libhw_include_path != "",
         "libhardware_include_path build argument wasn't provided.")
  assert(core_include_path != "",
         "core_include_path build argument wasn't provided.")
  include_dirs = [
    libhw_include_path,
    core_include_path,
  ]
}

@@ -66,6 +62,11 @@ config("linux") {
    "EXPORT_SYMBOL=__attribute__((visibility(\"default\")))",
    "KERNEL_MISSING_CLOCK_BOOTTIME_ALARM=TRUE",

    # This is a macro to that can be used by android hardware/libhardware
    # to not include dependencies on core project. This is a temporary
    # workaround until we get rid of dependency on hardware.
    "_HW_DONT_INCLUDE_CORE_=1",

    # This is a macro to that can be used by source code to detect if the
    # current build is done by GN or via Android.mk. This is a temporary
    # workaround until we can remove all Android-specific dependencies.
+5 −0
Original line number Diff line number Diff line
@@ -36,8 +36,13 @@
#include <sys/resource.h>
#include <unistd.h>

#ifdef OS_GENERIC
#define ANDROID_PRIORITY_AUDIO -16
#define ANDROID_PRIORITY_URGENT_AUDIO -19
#else
#include <utils/ThreadDefs.h>
#include <cutils/sched_policy.h>
#endif

#include "bt_types.h"
#include "btcore/include/module.h"