diff options
author | 2024-02-13 20:34:58 +0000 | |
---|---|---|
committer | 2024-02-16 17:01:42 +0000 | |
commit | 3614f1842f1f1fb165fd9239e8a62ccc90e454f0 (patch) | |
tree | 55289fa02fe165b0d5564528056e9e5f16389e6c | |
parent | 74962b789d6f89e3280d92cc0c50d90b9b3c7222 (diff) |
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
-rw-r--r-- | Android.bp | 6 | ||||
-rw-r--r-- | include/android/choreographer.h | 10 |
2 files changed, 16 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp index 8c4dfbbea4..2520a71968 100644 --- a/Android.bp +++ b/Android.bp @@ -105,7 +105,13 @@ aidl_library { 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 f999708f04..d4f30efe3a 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; |