Prepare for moving Vulkan headers
In preparation for importing Vulkan headers from
external/vulkan-headers, this reorganizes the Vulkan Soong modules a
bit:
* Separate the Vulkan API headers from the Vulkan HAL headers. The
former will move, the latter won't. Also, many things need the
API headers but very few should use the HAL headers. These probably
should have always been separate modules, but now they have to be.
* Add a llndk_headers module separate from the llndk_library module, so
the header module can be in external/vulkan-headers but the library
module can stay in frameworks/native.
* Merge "vulkan_headers_ndk" into "vulkan_headers". A single module can
serve both unbundled and platform clients, these never needed to be
duplicated.
Bug: 129696724
Test: make checkbuild
Change-Id: I955c880298843db4a2f4c08d93f7c8edbb205ef8
Merged-In: I955c880298843db4a2f4c08d93f7c8edbb205ef8
diff --git a/vulkan/Android.bp b/vulkan/Android.bp
index b15bed9..ad4e300 100644
--- a/vulkan/Android.bp
+++ b/vulkan/Android.bp
@@ -12,8 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+// This module defines which headers are included in the NDK sysroot during
+// the NDK build process.
ndk_headers {
- name: "libvulkan_headers",
+ name: "ndk_vulkan_headers",
from: "include",
to: "",
srcs: [
@@ -25,8 +27,28 @@
license: "include/vulkan/NOTICE",
}
+// This module makes Vulkan headers available to other modules without
+// having to link against libvulkan.so, e.g. for the Vulkan loader and
+// drivers, or things that dlopen libvulkan.so. It's available to system
+// modules, as part of the VNDK, and to unbundled modules.
cc_library_headers {
name: "vulkan_headers",
+ export_include_dirs: ["include"],
+ vendor_available: true,
+ sdk_version: "24",
+}
+
+// This module makes Vulkan headers available to vendor code that is
+// restricted to LLNDK dependencies.
+llndk_headers {
+ name: "vulkan_headers_llndk",
+ export_include_dirs: ["include"],
+}
+
+// This module makes the Vulkan libhardware HAL headers available, for
+// the loader and for HAL/driver implementations.
+cc_library_headers {
+ name: "hwvulkan_headers",
vendor_available: true,
header_libs: [
"libcutils_headers",
@@ -39,18 +61,6 @@
export_include_dirs: ["include"],
}
-cc_library_headers {
- name: "vulkan_headers_ndk",
- export_include_dirs: ["include"],
- sdk_version: "24",
-}
-
-llndk_library {
- name: "libvulkan",
- symbol_file: "libvulkan/libvulkan.map.txt",
- export_include_dirs: ["include"],
-}
-
subdirs = [
"nulldrv",
"libvulkan",