[Lldb-commits] [PATCH] D27305: Replace __ANDROID_NDK__ with simply ANDROID

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Dec 1 10:17:22 PST 2016


labath planned changes to this revision.
labath added a comment.

Thanks for the suggestion. I'll try using `__ANDROID__` instead.



================
Comment at: cmake/platforms/Android.cmake:36
 # flags and definitions
 remove_definitions( -DANDROID -D__ANDROID__ )
+add_definitions( -DANDROID -DLLDB_DISABLE_LIBEDIT )
----------------
danalbert wrote:
> You're removing it a line before just to add it back?
> 
> `__ANDROID__` is probably the one you want. That one is defined by Clang (and GCC if that matters) for any Android target, so no need to worry about dealing with it in cmake (or any other build system).
> 
> This isn't a concern right now, but if LLDB ever needed to become part of the Android platform build, `ANDROID` doesn't actually mean `ANDROID`; it gets set for host modules too :(
I have no idea who wrote this file, but a bit messy, and that's why I am trying to get rid of it. :)

I didn't know about the `__ANDROID__` thing. I'll try using that instead (and yes, I'd still like this to compile with gcc -- that's what we are using currently, although we may switch once this is sorted out).


https://reviews.llvm.org/D27305





More information about the lldb-commits mailing list