[cfe-dev] Can clang generate COFF files on Linux host?

Jacob Carlborg via cfe-dev cfe-dev at lists.llvm.org
Fri Dec 25 05:16:03 PST 2020


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



More information about the cfe-dev mailing list