Android NDK compatibility patch for Debug+Asserts build

Jeffrey Brusseau bobajeff82 at gmail.com
Mon Sep 15 21:01:38 PDT 2014


Cool, I'll try that. I've so far only tested builds in the Android emulator
but I may beable to use a spare android arm device around here.to test
with. The native build I can do right away. I'll post back when I've done
the tests (may be awhile though).

On Sun, Sep 14, 2014 at 7:28 PM, Jonathan Roelofs <jonathan at codesourcery.com
> wrote:

>
>
> On 9/13/14 8:14 PM, Jeffrey Brusseau wrote:
>
>> Ok, here's my new patch for making LLVM/Clang build using the NDK
>> toolchain.
>> This time my configuration looked like:
>> ../llvm/configure --host=arm-linux-androideabi --build=i686-pc-linux-gnu
>> --prefix=/home/bobajeff/android-ext
>>
>> The configure script didn't seem to detect that I was cross-compiling
>> unless I
>> used the host and build flags. It didn't seem like the prefix flag would
>> make it
>> pick up the NDK compiler either.
>>
> '--prefix' only tells configure where you'd like `make install` to copy
> the build products to. Yes, '--build', '--target', and '--host' are the
> correct way to specify that you're cross compiling.
>
>>
>> Anyway I ran:
>> make ENABLE_OPTIMIZED=1
>>
>> Everything built fine.
>>
>> Then I ran:
>> make ENABLE_OPTIMIZED=1 check-all
>>
>> I got "Could not find llvm-config in
>> /home/bobajeff/Downloads/LLVM4Android/build/Release+Asserts/bin"
>> I looked and it's in there. I think it just tried to run it but because
>> it's a
>> Arm binary and my system is x86 it couldn't.
>>
> I'd only expect `make check-all` to work on 'host' because it has to run
> things like llc, clang, and FileCheck which are build to run on '--host'.
>
> In your case, it probably makes sense to keep two builds of the tree
> around: one for the cross build, and another where build and host are both
> i686-pc-linux-gnu.  Then you can write patches for the cross build case,
> test them on your device, and then apply the patches to the other tree,
> build that, and test there to make sure you haven't broken any of the tests
> for other platforms.
>
>
> Cheers,
>
> Jon
>
>
>> What do you think?
>>
>>
>>
> --
> Jon Roelofs
> jonathan at codesourcery.com
> CodeSourcery / Mentor Embedded
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140915/601d08af/attachment.html>


More information about the llvm-commits mailing list