Page 1 of 1

How to compile C and CPP to elf by win32 clang?

Posted: Tue Apr 27, 2021 2:44 am
by SiliconOS
My new OS(Hyperon, based macOS and FreeBSD and myself codes). But I don't know how to generate elf file by win32 clang?(I don't like GPL)

Re: How to compile C and CPP to elf by win32 clang?

Posted: Tue Apr 27, 2021 3:25 am
by Korona
-target i686-elf

Re: How to compile C and CPP to elf by win32 clang?

Posted: Thu Apr 29, 2021 3:06 am
by SiliconOS
Korona wrote:-target i686-elf
Thanks, but I want to compile on windows.

Re: How to compile C and CPP to elf by win32 clang?

Posted: Thu Apr 29, 2021 3:10 am
by Korona
Clang does not care about your host OS, it is a cross compiler that can target any of its targets.

So that flag also works on Windows.