Android Support
I open this issue just to provide some information about android cross compile:
First thing is that, android-ndk do not have backtrace, hence, we need some workaround like chromium.
Second, there is a little difference of the malloc prototype:
SNMALLOC_EXPORT size_t SNMALLOC_NAME_MANGLE(malloc_usable_size)(const void* ptr)
{
return Alloc::alloc_size(const_cast<void*>(ptr));
}
With the above changes, I successfully cross compiled for android.
Android (5900059 based on r365631c) clang version 9.0.8 (https://android.googlesource.com/toolchain/llvm-project 207d7abc1a2abf3ef8d4301736d6a7ebc224a290) (based on LLVM 9.0.8svn)
Target: aarch64-unknown-linux-android29
Thread model: posix
InstalledDir: /opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin
It is extremely hard to find a test environment to check whether the allocator is really working, but if you want to have a try, the above workarounds can be useful.
I'm going to leave this issue open until we have CI support to test Android support.
Preliminary support provided by #171.
https://docs.microsoft.com/en-us/azure/devops/pipelines/ecosystems/android?view=azure-devops