[cfe-dev] clang dependence on gcc for assembler even with -filetype=obj

Bigcheese bigcheesegs at gmail.com
Thu Jun 10 12:25:06 PDT 2010


On Wed, Jun 9, 2010 at 12:20 PM, Aaron Gray <aaronngray.lists at gmail.com> wrote:
> Hi,
> I just compiled llvm+clang with MSVC++ and tried using the -filetype=obj but
> clang seems to be dependent on GCC.
> Aaron

Use the integrated assembler with this patch:
http://old.nabble.com/Re:-Win32-COFF-Support-p28702793.html

On Thu, Jun 10, 2010 at 1:39 PM, Daniel Dunbar <daniel.dunbar at gmail.com> wrote:
> Just the Win32 host info would be a good start.
> There should be no need for a Win32Clang or Win32GCC classes. On Win32 we
> want to just get to the point where the integrated assembler works.
>  - Daniel

The Generic_GCC HostInfo  works with -integrated-as with the COFF
patch for MC over on the llvmdev ML. No changes to clang are needed. I
have the beginnings of a WindowsClang HostInfo that  defaults to
-integrated-as (no need to pass the arg) and uses MSVC link.exe for
linking. This allows "echo int main(){printf("Hello World!");} | clang
-x c -o hello.exe - && hello.exe" to work (and output what one would
expect).

It's not quite ready for review yet, mainly because I'm not sure
exactly how it all should be organized. Right now I just copy what's
done on darwin/linux as best I can.

- Michael Spencer




More information about the cfe-dev mailing list