[LLVMdev] How to use clang -intergrated-as to compile cross-(os/target) assembly file.
罗勇刚(Yonggang Luo)
luoyonggang at gmail.com
Tue Oct 22 22:42:48 PDT 2013
2013/10/23 Rafael Espíndola <rafael.espindola at gmail.com>
> > Sorry for the unclear statements, I didn't means the assembler to mangle
> > symbols declared in assembly source files, I means directly use assembly
> > directive to choice which symbol should be used. The compiler just need
> to
> > follow the directive.
> > For example, in assembly files, there is a directive
> > https://sourceware.org/binutils/docs-2.23.1/as/If.html#If
> > to act like C macro #ifdef #if, so i wanna to know how to use this
> directive
> > to detect if it's target to x86/win32. if that's true, then I can control
> > which code to be generate.
> >>
>
>
> I don't think there is anything in plain .s files. In .S files you can
> use any of the C predefined macros, in particular,
> __USER_LABEL_PREFIX__ might be what you want.
>
Thanks, Rafael, this is acceptable if GCC/binutils also support for this, I
want to keep compatible with GCC/binutils,
besides, is there any command option to force use C predefined macros?
because use .S is too tricky.
>
> Cheers,
> Rafael
>
--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131023/a0086236/attachment.html>
More information about the llvm-dev
mailing list