From 379ed1ef62d4c3c340e7c92db6f995e014fa308b Mon Sep 17 00:00:00 2001 From: Tom Cherry Date: Thu, 17 Sep 2020 09:36:25 -0700 Subject: [PATCH] Explicitly add the include path for android_filesystem_config.h android_filesystem_config.h is found since system/core/include is on the include path for all projects and contains a symlink to the real android_filesystem_config.h. This is fragile and the below bug seeks to remove this symlink and have users correctly depend on libcutils_headers. In bionic, libcutils_headers header library cannot be used due to cyclic dependencies, so it gets the actual include path instead, which is less bad than depending on the build system injecting the for all modules. Bug: 165825252 Test: build Change-Id: Id43bdea9553b1174ceb3efc2a3ed505888619c62 --- libc/Android.bp | 2 ++ tests/Android.bp | 1 + 2 files changed, 3 insertions(+) diff --git a/libc/Android.bp b/libc/Android.bp index 49b75c103..a761e3bb5 100644 --- a/libc/Android.bp +++ b/libc/Android.bp @@ -62,6 +62,8 @@ cc_defaults { cppflags: [], include_dirs: [ "bionic/libc/async_safe/include", + // For android_filesystem_config.h. + "system/core/libcutils/include", ], header_libs: [ diff --git a/tests/Android.bp b/tests/Android.bp index 586ef344e..8760256d9 100644 --- a/tests/Android.bp +++ b/tests/Android.bp @@ -44,6 +44,7 @@ cc_defaults { // For glibc. "-D__STDC_LIMIT_MACROS", ], + header_libs: ["libcutils_headers"], // Ensure that the tests exercise shadow call stack support and // the hint space PAC/BTI instructions. arch: {