def x : JoinedOrSeparate<["-"], "x">, Flags<[DriverOption,CC1Option]>,
HelpText<"Treat subsequent input files as having type <language>">,
MetaVarName<"<language>">;
Is there a list for this.
I want to compile a gas style x86 assembly file to COFF object file by
the driver clang, how to do that.
to be exact, I want to do this but failed:
H:\CI\bld\compilers\musl\src\math\x86_64>clang sqrt.s /Xassembler -filetype=obj
-triple i686-pc-win32
clang.exe: error: unknown argument: '-filetype=obj'
clang.exe: error: unknown argument: '-triple'
clang.exe: error: no such file or directory: '/Xassembler'
clang.exe: error: no such file or directory: 'i686-pc-win32'
Does something like this work:
clang -c sqrt.s
Clang should detect the file type based on the extension and assemble it.
- Hans
H:\CI\bld\compilers\musl\src\math\i386>clang -v
clang version 3.4 (trunk)
Target: i686-pc-win32
Thread model: posix
H:\CI\bld\compilers\musl\src\math\i386>clang -c sqrt.s
sqrt.s:2:7: error: expected absolute expression
.type sqrt,@function
^
H:\CI\bld\compilers\musl\src\math\i386>type sqrt.s
.global sqrt
.type sqrt,@function
sqrt: fldl 4(%esp)
fsqrt
fstsw %ax
sub $12,%esp
fld %st(0)
fstpt (%esp)
mov (%esp),%ecx
and $0x7ff,%ecx
cmp $0x400,%ecx
jnz 1f
and $0x200,%eax
sub $0x100,%eax
sub %eax,(%esp)
fstp %st(0)
fldt (%esp)
1: add $12,%esp
fstpl 4(%esp)
fldl 4(%esp)
ret
H:\CI\bld\compilers\musl\src\math\i386>