[LLVMdev] How to use clang -intergrated-as to compile cross-(os/target) assembly file.
Rafael EspĂndola
rafael.espindola at gmail.com
Tue Oct 22 20:12:21 PDT 2013
> 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.
Cheers,
Rafael
More information about the llvm-dev
mailing list