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 b8f7fde4bdfba5a65ef5a88265fdb79403e8a699)
diff --git a/libc/Android.bp b/libc/Android.bp
index 1472bc9..cb04c6f 100644
--- a/libc/Android.bp
+++ b/libc/Android.bp
@@ -2176,6 +2176,63 @@
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",
diff --git a/libdl/Android.bp b/libdl/Android.bp
index 5b67e38..8c6b47e 100644
--- a/libdl/Android.bp
+++ b/libdl/Android.bp
@@ -124,3 +124,8 @@
symbol_file: "libdl.map.txt",
first_version: "9",
}
+
+llndk_library {
+ name: "libdl.llndk",
+ symbol_file: "libdl.map.txt",
+}
diff --git a/libm/Android.bp b/libm/Android.bp
index 7489bfe..24e641c 100644
--- a/libm/Android.bp
+++ b/libm/Android.bp
@@ -538,3 +538,8 @@
symbol_file: "libm.map.txt",
first_version: "9",
}
+
+llndk_library {
+ name: "libm.llndk",
+ symbol_file: "libm.map.txt",
+}