1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
/* What the Android toolchain is asked to prove.
*
* Nothing ships this: it is the smallest object that can only compile if the
* driver really is the NDK's, really is pointed at bionic, and really is
* building for the device rather than for the host that invoked it. A desktop
* clang answers every one of these the other way, and __ANDROID_API__ comes
* from the --target= suffix, so a missing API level fails here too. */
#include <android/api-level.h>
#include <jni.h>
#if !defined(__ANDROID__)
#error "not an Android target"
#endif
#if !defined(__aarch64__)
#error "not an arm64 target"
#endif
#if __ANDROID_API__ < 28
#error "API level below frq's min_sdk_version"
#endif
/* jni.h is a platform header, so reaching it proves the sysroot is the NDK's
* and not whatever the host has under /usr/include. */
jint jolt_android_abi_ok(void) {
return __ANDROID_API__;
}
|