[LLVMdev] Android build patch
Alp Toker
alp at nuanti.com
Tue Nov 5 00:05:29 PST 2013
On 05/11/2013 07:57, James Lyon wrote:
> I suppose I was just doing the "smallest" thing. Disabling the hack
> entirely also allows it to build and is probably the correct thing to
> do. I'm not that knowledgeable about glibc vs. Bionic differences so
> the thing to do would be to test whether those functions work without
> the "hack" on Android. Unfortunately at the moment I can't get my
> Android JIT test program to actually run; it crashes somewhere in LLVM
> without any useful output (the debugger also crashes), so that one's
> going to take some time to figure out.
Good luck with that. I can't help there (there are probably others on
the list who could/should!) but I am interested in cleaning up
defined(__linux__).
The defined(__linux__) checks in LLVM aren't very consistent. Some check
for __GNU__, others for __ANDROID__ and it's known to break non-standard
libc.
So if anyone's building against ulibc, dietlibc, musl etc. and
interested in helping out with these, give me a shout.
Regards,
Alp.
>
> On 05/11/13 07:33, Alp Toker wrote:
>> The CMake changes look fine to me, landed in r194051!
>>
>> As for the JITMemoryManager.cpp changes, not so sure. Did you try
>> disabling the 'hack' described below instead of patching it?
>>
>>
>> |
>> ||//===----------------------------------------------------------------------===//||
>> ||// Function stubs that are invoked instead of certain library calls||
>> ||//||
>> ||// Force the following functions to be linked in to anything that
>> uses the||
>> ||// JIT. This is a hack designed to work around the all-too-clever
>> Glibc||
>> ||// strategy of making these functions work differently when inlined
>> vs. when||
>> ||// not inlined, and hiding their real definitions in a separate
>> archive file||
>> ||// that the dynamic linker can't see. For more info, search for||
>> ||// 'libc_nonshared.a' on Google, or read http://llvm.org/PR274.||
>> ||#if defined(__linux__)|
>>
>> ^ ie try making this defined(__linux__) && !defined(__BIONIC__)
>>
>> Alp.
>>
>>
>> On 31/10/2013 00:08, James Lyon wrote:
>>> I've been trying to get LLVM JIT compilation working on Android for
>>> the last few days. The patch I needed to get it to build is attached
>>> (nothing major - CMake configuration header typo and avoiding open64
>>> which is missing on Android).
>>>
>>> Sadly even though it builds I can't get generated code to work - it
>>> appears at the moment that the generated code doesn't have execute
>>> permissions set for some reason (this is 3.3, not svn).
>>>
>>> James
>>>
>>>
>>> _______________________________________________
>>> LLVM Developers mailing list
>>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>
>> --
>> http://www.nuanti.com
>> the browser experts
>
--
http://www.nuanti.com
the browser experts
More information about the llvm-dev
mailing list