-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
MinGW: Enable C++ threads with mcfgthreads #73195
Conversation
It is needed for the `-municode` flag, supposedly.
Also deduplicate more of the GCC derivations.
95e70af
to
ab2de9b
Compare
Currently this is set up to be mcfgthreads, but it could be something else instead.
Seems to build just fine without it, maybe it was just using C++ threads which mcfgthread provides?
ab2de9b
to
89ec69e
Compare
Working around broken build for now.
I think those deps could be made to build, but I didn't want to get bogged down investigating further. "Use flags" are always a good thing, so this is fine for now.
This is pretty neat as it will likely allow to build
I'm not sure what implications this might or might not incur wrt to building and distributing binaries for windows. |
|
||
stdenv.mkDerivation { | ||
pname = "mcfgthreads"; | ||
version = "git"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We usually use date of commit here instead of git
.
@Ericson2314 I'm running into lots of issues with this. I'm appreciative of this, however
Is there a global switch to turn this off? |
Motivation for this change
This uses https://github.com/lhmouse/mcfgthread to get C++ threads with mingw without the slow POSIX threads emulation. The bootstrapping infrastructure is set up so this is factored through
threadsCross
attribute which could be parameterized to support both gthreads (GCC's threading interface) implementations. In any case, the threading library is built withgccCrossStageStatic
+libcCross
/lldClangNoCXX
, which works.I declare this worth merging because I cross compiled Nix with it!
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @angerman @volth