OSDN Git Service

Make vulkan build with the VNDK.
authorSteven Moreland <smoreland@google.com>
Mon, 17 Jul 2017 18:49:21 +0000 (11:49 -0700)
committerSteven Moreland <smoreland@google.com>
Mon, 17 Jul 2017 18:49:40 +0000 (11:49 -0700)
When the vndk is enabled (BOARD_VNDK_VERSION=current),
vendor libraries must only link against vendor variants
in the build system. This also means that they receive
restricted sets of headers and that automatic global
headers are restricted.

Test: build vulkan with BOARD_VNDK_VERSION=current
Bug: 37342627
Change-Id: I9690635e4654e053cf35a3941aff14f4f7b46491

vulkan/Android.bp
vulkan/nulldrv/null_driver.cpp

index 91c270e..26d3c6a 100644 (file)
@@ -25,8 +25,16 @@ ndk_headers {
 
 cc_library_headers {
     name: "vulkan_headers",
-    export_include_dirs: ["include"],
     vendor_available: true,
+    header_libs: [
+        "libcutils_headers",
+        "libhardware_headers",
+    ],
+    export_header_lib_headers: [
+        "libcutils_headers",
+        "libhardware_headers",
+    ],
+    export_include_dirs: ["include"],
 }
 
 subdirs = [
index 6714779..a3da651 100644 (file)
 #include <inttypes.h>
 #include <stdlib.h>
 #include <string.h>
+#include <unistd.h>
 
 #include <algorithm>
 #include <array>
 
 #include <log/log.h>
-#include <utils/Errors.h>
 
 #include "null_driver_gen.h"