ANDROID: kleaf: //common:all_headers should use linux_includes.

A new attribute, linux_includes, is added to ddk_headers to
denote that certain include directories should be added
to LINUXINCLUDE, not ccflags-y.

Change includes to linux_includes for the allowlist of
ddk_headers targets in //common. These are already
added to LINUXINCLUDE in common/Makefile, but we should
make them explicit in BUILD files too so the ordering can
be listed clearly in BUILD files.

Test: build cuttlefish with DDK
Bug: 257342715
Bug: 254735056
Change-Id: I97678264b37036cb5ab86973428e4e0d7f5b645d
Signed-off-by: Yifan Hong <elsk@google.com>
(cherry picked from commit 943d5a70d5)
This commit is contained in:
Yifan Hong
2022-11-03 16:12:31 -07:00
parent 4d71819ac4
commit a4c2687cd9

View File

@@ -286,7 +286,8 @@ ddk_headers(
],
# The list of include directories where source files can #include headers
# from. In other words, these are the `-I` option to the C compiler.
includes = [
# These are prepended to LINUXINCLUDE.
linux_includes = [
"arch/arm64/include",
"arch/arm64/include/uapi",
"include",
@@ -303,7 +304,8 @@ ddk_headers(
],
# The list of include directories where source files can #include headers
# from. In other words, these are the `-I` option to the C compiler.
includes = [
# These are prepended to LINUXINCLUDE.
linux_includes = [
"arch/x86/include",
"arch/x86/include/uapi",
"include",
@@ -352,6 +354,7 @@ ddk_headers(
],
# The list of include directories where source files can #include headers
# from. In other words, these are the `-I` option to the C compiler.
# Unsafe include directories are appended to ccflags-y.
includes = [],
visibility = ["//visibility:private"],
)