Can clang generate COFF files on Linux host?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Can clang generate COFF files on Linux host?

shirley breuer via cfe-dev
Hi!

There was a technical issue in mail web client, let's try again.

Just now I wrote a linker for KolibriOS. It's based on lld-link so it only
works with COFF inputs. But my development environment is Linux. Is
there any
way to ask clang to generate COFF objects?

Or, maybe, it may be compiled with some cmake flags to make it generate
COFFs
instead of ELFs?

Currently I have to use MinGW to test the linker, but I gonna port
clang, not
MinGW, so it's better if clang could generate COFFs. Or I have to implement
both ELF and COFF objects handling in the linker.

Thanks,
Magomed

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Can clang generate COFF files on Linux host?

shirley breuer via cfe-dev
On 2020-12-20 15:09, Magomed Kostoev via cfe-dev wrote:
> Hi!
>
> There was a technical issue in mail web client, let's try again.
>
> Just now I wrote a linker for KolibriOS. It's based on lld-link so it only
> works with COFF inputs.

The regular LLD can handle ELF input and link ELF binaries.

> But my development environment is Linux. Is  there any
> way to ask clang to generate COFF objects?

Use the `-target` flag. Something like `-target x86_64-windows`.

--
/Jacob Carlborg

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev