-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Too slow link in MinGW-w64 #1205
Comments
Hi, I have a similar problem. I am using Catch under CLion. Example
Build finished in 2m 32s 812ms (!!!)
Build finished in 2m 4s 211ms (!!!)
Most of the time is spent on linking. Configuration
|
We have had some issue with link times before, but that was caused by LTO builds. For non-lto builds, there is not much we can do except concluding that MinGW link times are awful. |
OK. Thanks a lot. |
mingw-w64 in version 7.2 and 7.3 LTO is completely broken. Also, the link times are horrible without LTO, to the point of it not being usable. I have to wait 4 minutes for it to link, compared to under MSVC++ the same projects links in less than 20 seconds. |
The only reasonable for me to use mingw and catch2 is to create a shared library and compile the whole subtree from here https://github.com/catchorg/Catch2/tree/master/include (not a single header file because it's awfully slow). Tests compile and run within milisecond |
Any resolution on this issue? |
Not that I am aware of. Hopefully soon, as we're about to move back to Visual Studio. |
I have same problem on MSYS2. |
@nano-bot Hi, How to compile catch2 shared library? |
@nano-bot How'd you go about compiling your shared library? On a side-note, can we push that shared library to |
I am a random guy who was searching for a solution to improve the horrible link time in Mingw. I successfully improve it vastly by using the lld linker |
where to set
? |
@Adriankhl where do you set the |
@ellipticaldoor It is a compiler flag for |
Description
I'm suffer from too slow link in MinGW-w64 environment.
Steps to reproduce
I used very simple main.cpp:
And, here's the result:
Well, it takes about 8 seconds to compile the file here, which is totally acceptable considering big header file.
The problem is that it takes another approximately 9 seconds again to create executable with already compiled object file.
As you can see, the link time is even longer than compile time.
This is very annoying because I have to wait 9 seconds at least whenever building executable even though the object file is not changed.
In fact, my actual test project requires me to wait about 1 minute to be linked.
How can I improve link performance, here?
Any suggestion would be nice.
Thank you.
Extra information
The text was updated successfully, but these errors were encountered: