OSDN Git Service

Add LLNDK stub libraries for the VNDK
authorDan Willemsen <dwillemsen@google.com>
Mon, 20 Mar 2017 21:07:47 +0000 (14:07 -0700)
committerDan Willemsen <dwillemsen@google.com>
Wed, 5 Apr 2017 22:42:08 +0000 (22:42 +0000)
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

libc/Android.bp
libdl/Android.bp
libm/Android.bp

index 8c6f596..72699f5 100644 (file)
@@ -2182,6 +2182,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",
index 5b67e38..8c6b47e 100644 (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",
+}
index 7489bfe..24e641c 100644 (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",
+}