mold
mold copied to clipboard
Support Windows
We want to support the Windows target by mold 3.0.
Can't wait for this!
+1
Guys, stop spamming. All your useless comments are sent to all subscribed people. Just use reactions on the first message.
ok ,i'm sorry
In the case of the msys2/mingw environment currently there is this error:
In file included from filepath.cc:1:
mold.h:17:10: fatal error: sys/mman.h: No such file or directory
17 | #include <sys/mman.h>
Is it possible to help on this issue somehow? E.g. port to Cmake or other cross-platform build system, make some logic platform-independent etc.
I don't think there's anything to speed this thing up. I'm busy working on mold/macOS right now, so I don't think I can start working on mold/Windows now. If I can hire a full-time engineer or two to have them fix all known problems of mold/Unix and mold/macOS, I can start working on mold/Windows early on, but for doing that I would have to pay six figure salary for each engineer out of my pocket, so I don't think it's realistic.
Then, please sponsor with donations
Please initiate a sponsorship link
I believe having a feature roadmap for Windows support with a bulleted list of features could go a long way of attracting open source contributions, since a lot of people are excited about having a fast linker on Windows.
That means doing more PR reviews and issue maintenance for the author though, which could be cumbersome, and I don't want to push a way of work on someone. 🙂
I think a bulleted list of features or an issue tracker-based task management work after I set the foundation of mold/Windows. The core part has to be written by me (or by someone who is good at writing optimized programs and has extremely deep knowledge of the Windows linker) to achieve our performance goal. So what I can do right now is to try to finish up mold/macOS as quickly as possible so that I can start working on mold/Windows.
If the windows version of gold is implemented, can go/cgo achieve a link speed of %100++?
I don't want to speculate about speed because mold/Windows is vaporware at the moment. I'll create mold/Windows because I see some opportunity there, and I can only say that I'll do my best.
PE executables are used not only in Windows, but also in EFI (so many operating systems include UNIX-like can use it for boot loader), SanOS, BeOS R4 x86 and others.
Any news about this? Currently, that's the only mold I have on my windows;

I will update this issue when I have an update, so do not ping us.
Do we have any news about MOLD Coming to Windows?
I'll support it in the sold linker instead of the mold linker, so I'll close this bug.
https://github.com/bluewhalesystems/sold/issues/8
I'll support it in the sold linker instead of the mold linker, so I'll close this bug.
Too bad. PE linker would be useful for linking EFI executables. Some opensource OSes use PE as native executable format (SanOS for example). BeOS R3 used PE for x86 platform. PE format is not only MS Windows.
I usually don't jump into these, but these examples are bad, lld already links x86/x64 incredibly fast, I can't see any adantage to these small oses to use Mold.
For big applications I'm super happy if we see a faster linker than lld for the 100mb+ binaries and 500mb+ pdb's. Being paid software is not a problem if it comes with sources (and its own symbols, profiling your linker is necessary from time to time). Hope to see (m/s)old linking x64 soon.
Whether it's FOSS or not, someone has to cover the development cost. If users are not paying, it's on the developer. How much is that in this case? I would be able to earn hundreds of thousands or maybe more than a million USD in total if I'd work for a company instead of developing mold/Windows for free. In other words, it would cost me 6 to 7 figures in terms of opportunity cost. I'm happy to donate thousands of dollars a year to open source communities (which is what I'm currently doing through GitHub Sponsors), but this case is literally orders of magnitude larger than that.
I also want to point out that the situation that development tool developers cannot make big money by creating new better tools makes the industry stagnated. I disrupted it twice with lld and mold and showed that a 10x performance improvement is doable. Why can I build such better tools? It's not only because I'm good at writing high-performance programs, but it's mostly because no one else seriously considered to try to do that. There are many more areas we can make a significant improvement, but for example I can't hire engineers to let them work on it because I wouldn't be able to get a return from that investment. I believe the lack of economical incentive to create better tools is a serious problem here.
Being said that, I've already wrote lld for Windows (that's my first liner) while I was working for Google, and that's much faster than MSVC's linker. It's also cross-platform; you can build EFI executable with it. If you are not happy with sold, you can always use lld.
I'm with @rui314 , although as an individual developer I want to spend as less money as possible, but he is using his professional skill and personal time to create such creative and valuable product, this great effort is surely worthy to be paid. I don't think anyone has the right to make decisions for mold than rui himself.
@rui314 Are you able to work on sold in full time thanks to the society ?
Sorry, I don't get what you mean. What do you mean by society?
oops I'm sorry, I reword: because sold is commercial and as I saw, payable, can you work on sold (or mold) in full time?
I don't know, let's see how it works.
I'll lock the conversation as this issue is no longer relevant.