Android NDK compatibility patch for Debug+Asserts build

Jonathan Roelofs jonathan at codesourcery.com
Thu Sep 11 09:22:00 PDT 2014


Imagine for a moment using clang on android to cross compile to another target 
where, say, fstat64 was supported: that would no longer work with this patch. 
Did you run `make check-all` after building with your patch? This looks to me 
like it breaks a lot of other targets, and doesn't actually help you "build 
clang/llvm on android"....

What build errors were you running into that led you to write this patch?

On 9/11/14 9:24 AM, Jeffrey Brusseau wrote:
> This is my first patch. I don't expect it's the best way to do things but this
> is at least a start. If you have any suggestions on how to improve it I'm open
> to being ridiculed in all manner of ways.
>
> This patch is to add support for compiling LLVM/Clang for use on Android using
> the NDK toolchain (GCC-4.8). For the most part I compiled this using the default
> configuration:
>
>     ../llvm/configure --enable-targets=host --host=arm-linux-androideabi
It's okay to leave off the '--enable-targets=host', and in fact when you run 
`make check-all` it will get you better test coverage if you do.  I think --host 
should also be autodetected, so you can leave that off too.
>     --prefix=/home/bobajeff/android-ext
>
> So I wound up compiling the Debug+Asserts build. I will test compiling Release
> (optimized) build if that's requested. I've had experience building a optimized
> build before using Mozilla's Fastcomp fork but that needed a different set of
> patches.
Should be as easy as `make ENABLE_OPTIMIZED=1`, and it's definitely a good thing 
to check along with `make ENABLE_OPTIMIZED=1 check-all` (which runs the 
Release+Asserts tests).


Cheers,

Jon
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>

-- 
Jon Roelofs
jonathan at codesourcery.com
CodeSourcery / Mentor Embedded



More information about the llvm-commits mailing list