I tried bu clang seems to support only target on which it has been compiled.
If I use:
with clang -S -emit-llvm t.c -o t.ll
I've got following file for t.ll
; ModuleID = 't.c'
target datalayout
"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
Which, I think, defines datalayout for x86 64-bit target.
Now If I add -march=arm or -march=x86-32 I've got following error message
from clang:
error: unknown target CPU 'arm'
or
error: unknown target CPU 'x86-32'
Is there a way to build clang so that it support cross-compilation for
ARM/x86-32 ?
Best Regards
Seb
2011/10/27 Carl-Philip Hänsch <cphaensch at googlemail.com>
> You can compile an empty C source code with clang -S -emit-llvm and copy
> the data layout from there.
>
> 2011/10/27 Seb <babslachem at gmail.com>
>
>> Hi all,
>>
>> Can someone give me advice on what should be a good definition of
target
>> datalayout for an ARM cortex-A9 + neon target and x86 32-bit ?
>> Shall I use a different definition for a cortex-A9 without neon ?
>> Thanks for your advices
>> Best Regards
>> Seb
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20111028/96cd8166/attachment.html>