MinGW: Enable C++ threads with mcfgthreads#73195
Merged
Ericson2314 merged 11 commits intoNixOS:masterfrom Nov 12, 2019
Merged
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.
10 tasks
4 tasks
Contributor
|
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. |
Mic92
reviewed
Nov 12, 2019
|
|
||
| stdenv.mkDerivation { | ||
| pname = "mcfgthreads"; | ||
| version = "git"; |
Member
There was a problem hiding this comment.
We usually use date of commit here instead of git.
Member
Author
Contributor
|
@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? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
threadsCrossattribute 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
sandboxinnix.confon non-NixOS linux)nix-shell -p nix-review --run "nix-review wip"./result/bin/)nix path-info -Sbefore and after)Notify maintainers
cc @angerman @volth