Add LLNDK stub libraries for the VNDK

The stub libraries are the same as the (equivalent version) NDK, but
they also contain symbols tagged with 'vndk'. Except there are none of
those in Bionic currently.

For headers, the LLNDK/VNDK isn't using a sysroot like the NDK. Nor is
it hardcoding an explicit source path list like the platform. Instead it
runs the bionic/libc/include directory through versioner like the NDK,
then exports those generated headers and the kernel headers from the
stub library like any other exported header. Except it uses -isystem
instead of -I due to export_headers_as_system.

Test: aosp_arm; m -j
Test: Enable BOARD_VNDK_VERSION on aosp_arm; m -j
Test: Inspect out/soong/build.ninja before/after (w/o vndk)
Change-Id: Ief58a73907a83053b408b1d4b62999cba470d61c
(cherry picked from commit b8f7fde4bd)
This commit is contained in:
Dan Willemsen 2017-03-20 14:07:47 -07:00 committed by Steven Moreland
parent fd5260e3a7
commit b93d3c26f7
3 changed files with 67 additions and 0 deletions

View file

@ -2176,6 +2176,63 @@ ndk_library {
first_version: "9",
}
llndk_library {
name: "libc.llndk",
symbol_file: "libc.map.txt",
export_headers_as_system: true,
export_preprocessed_headers: ["include"],
arch: {
arm: {
export_include_dirs: [
"arch-arm/include",
"kernel/uapi",
"kernel/uapi/asm-arm",
"kernel/android/uapi",
],
},
arm64: {
export_include_dirs: [
"arch-arm64/include",
"kernel/uapi",
"kernel/uapi/asm-arm64",
"kernel/android/uapi",
],
},
mips: {
export_include_dirs: [
"arch-mips/include",
"kernel/uapi",
"kernel/uapi/asm-mips",
"kernel/android/uapi",
],
},
mips64: {
export_include_dirs: [
"arch-mips64/include",
"kernel/uapi",
"kernel/uapi/asm-mips",
"kernel/android/uapi",
],
},
x86: {
export_include_dirs: [
"arch-x86/include",
"kernel/uapi",
"kernel/uapi/asm-x86",
"kernel/android/uapi",
],
},
x86_64: {
export_include_dirs: [
"arch-x86_64/include",
"kernel/uapi",
"kernel/uapi/asm-x86",
"kernel/android/uapi",
],
},
},
}
ndk_library {
name: "libstdc++.ndk",
symbol_file: "libstdc++.map.txt",

View file

@ -124,3 +124,8 @@ ndk_library {
symbol_file: "libdl.map.txt",
first_version: "9",
}
llndk_library {
name: "libdl.llndk",
symbol_file: "libdl.map.txt",
}

View file

@ -538,3 +538,8 @@ ndk_library {
symbol_file: "libm.map.txt",
first_version: "9",
}
llndk_library {
name: "libm.llndk",
symbol_file: "libm.map.txt",
}