android_kernel_oneplus_sm8250/Android.bp
Justin DeMartino cc39738286 Example kernel headers header_lib package
This change is foundational for converting many modules that depend on kernel
headers built via the platform build system.

Bug: 143567008
Change-Id: I998890ed427104ed835000e421756981e0f24ab5
[rishabhb@codeaurora.org: add logic to iterate over mandatory headers
 and only generate these headers if not already present in
 usr/include/asm.]
Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org>
2020-01-18 11:53:58 -08:00

46 lines
1.2 KiB
Plaintext

cc_binary_host {
name: "unifdef",
srcs: ["scripts/unifdef.c"],
sanitize: {
never: true,
},
}
genrule {
name: "gen-headers_install.sh",
srcs: ["scripts/headers_install.sh"],
tools: ["unifdef"],
out: ["headers_install.sh"],
cmd: "sed 's+scripts/unifdef+$(location unifdef)+g' $(in) > $(out)",
}
cc_prebuilt_binary {
name: "headers_install.sh",
device_supported: false,
host_supported: true,
srcs: [":gen-headers_install.sh"],
}
// Use the following for verbose output from kernel_headers.py.
// kernel_headers_verbose = "--verbose "
// Use the following for minimal output from kernel_headers.py.
kernel_headers_verbose = ""
build = ["gen_headers_arm.bp", "gen_headers_arm64.bp"]
cc_library_headers {
name: "qti_kernel_headers",
arch: {
arm: {
generated_headers: ["qti_generate_kernel_headers_arm"],
export_generated_headers: ["qti_generate_kernel_headers_arm"],
},
arm64: {
generated_headers: ["qti_generate_kernel_headers_arm64"],
export_generated_headers: ["qti_generate_kernel_headers_arm64"],
},
},
vendor: true,
recovery_available: true,
}