Allow using libandroid_headers_private on host builds
This is needed to create a host implementation of RenderThread.
Bug: 322360037
Test: build libandroid_runtime on host
Change-Id: I23f78155e0d2c511451e3e249537b83ca06f411a
diff --git a/Android.bp b/Android.bp
index 8c4dfbb..2520a71 100644
--- a/Android.bp
+++ b/Android.bp
@@ -105,7 +105,13 @@
cc_library_headers {
name: "libandroid_headers_private",
+ host_supported: true,
export_include_dirs: ["include/private"],
+ target: {
+ windows: {
+ enabled: true,
+ },
+ },
}
filegroup {
diff --git a/include/android/choreographer.h b/include/android/choreographer.h
index f999708..d4f30ef 100644
--- a/include/android/choreographer.h
+++ b/include/android/choreographer.h
@@ -48,9 +48,19 @@
#ifndef ANDROID_CHOREOGRAPHER_H
#define ANDROID_CHOREOGRAPHER_H
+#include <stddef.h>
#include <stdint.h>
#include <sys/cdefs.h>
+// This file may also be built on glibc or on Windows/MacOS libc's, so no-op
+// and deprecated definitions are provided.
+#if !defined(__INTRODUCED_IN)
+#define __INTRODUCED_IN(__api_level) /* nothing */
+#endif
+#if !defined(__DEPRECATED_IN)
+#define __DEPRECATED_IN(__api_level) __attribute__((__deprecated__))
+#endif
+
__BEGIN_DECLS
struct AChoreographer;