Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android Support #163

Open
SchrodingerZhu opened this issue Apr 8, 2020 · 4 comments
Open

Android Support #163

SchrodingerZhu opened this issue Apr 8, 2020 · 4 comments

Comments

@SchrodingerZhu
Copy link
Collaborator

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.

@mjp41
Copy link
Member

mjp41 commented Apr 18, 2020

I'm going to leave this issue open until we have CI support to test Android support.

@mjp41
Copy link
Member

mjp41 commented Apr 18, 2020

Preliminary support provided by #171.

@SchrodingerZhu
Copy link
Collaborator Author

@mjp41
Copy link
Member

mjp41 commented Sep 25, 2024

Is there more we should do here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants