Skip to content
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

[Windows] Enable building rustc with "pthreads" flavor of mingw. #40805

Merged
merged 5 commits into from
Apr 6, 2017

Conversation

vadimcn
Copy link
Contributor

@vadimcn vadimcn commented Mar 24, 2017

Tested on mingw-w64 packaged with msys2.

r? @alexcrichton

cc #40123

@alexcrichton
Copy link
Member

r+ from me!

Let's see if we can land #40524 though to rebase out the original commit (that PR has had some fixes/revisions as well)

@alexcrichton
Copy link
Member

er, land that first though*

@TimNN
Copy link
Contributor

TimNN commented Mar 27, 2017

I think the appveyor config still needs to be adjusted -- either to remove the custom mingw downloads or to replace the mingw downloads with the pthread versions (to make us independent from changes to the appveyor build environment).

@alexcrichton
Copy link
Member

Ideally I'd actually prefer if we didn't have to change the toolchain because that would signify a large breaking change that'd be much more difficult to deal with. I think @vadimcn said though that the dll/staticlib were present in both toolchains, they'd just be ignored on the win32 threading one I think.

@TimNN
Copy link
Contributor

TimNN commented Mar 27, 2017

Mh, wasn't the whole point of this that we could switch to the pthread toolchains, because they implement std::thread (which is currently needed for LLVM 4.0)?

@alexcrichton
Copy link
Member

Ah true yes, we'll want to switch compiling the compiler to the pthreads toolchain. I'd like to see if this lands alone though because we should continue to be able to work with a win32 toolchain. Maybe one day we can add a bot for that but in the meantime we just need to make sure there's a transition path for win32 toolchain users to the pthread toolchain.

At the very least we can land the pthread compiler change for rustc in the llvm 4.0 PR, but I'd also be fine with a separate pr (after this one) to do that change independently.

@bors
Copy link
Contributor

bors commented Mar 30, 2017

☔ The latest upstream changes (presumably #40524) made this pull request unmergeable. Please resolve the merge conflicts.

@vadimcn
Copy link
Contributor Author

vadimcn commented Mar 31, 2017

@bors r=alexcrichton

@bors
Copy link
Contributor

bors commented Mar 31, 2017

📌 Commit ad3f6e0 has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Mar 31, 2017

⌛ Testing commit ad3f6e0 with merge 273fcd1...

@bors
Copy link
Contributor

bors commented Mar 31, 2017

💔 Test failed - status-appveyor

@alexcrichton
Copy link
Member

alexcrichton commented Mar 31, 2017 via email

@bors
Copy link
Contributor

bors commented Apr 1, 2017

⌛ Testing commit ad3f6e0 with merge c374e2f...

@bors
Copy link
Contributor

bors commented Apr 1, 2017

💔 Test failed - status-travis

@alexcrichton
Copy link
Member

alexcrichton commented Apr 1, 2017 via email

@bors
Copy link
Contributor

bors commented Apr 1, 2017

⌛ Testing commit ad3f6e0 with merge a3d82bd...

@@ -259,4 +259,10 @@ fn main() {
println!("cargo:rustc-link-lib={}", stdcppname);
}
}

// LLVM requires symbols from this library, but apparently they're not printeds
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/printeds/printed/

@bors
Copy link
Contributor

bors commented Apr 1, 2017

💔 Test failed - status-travis

@alexcrichton
Copy link
Member

@bors: retry

@bors
Copy link
Contributor

bors commented Apr 2, 2017

⌛ Testing commit ad3f6e0 with merge 597944d...

@bors
Copy link
Contributor

bors commented Apr 2, 2017

💔 Test failed - status-travis

@vadimcn
Copy link
Contributor Author

vadimcn commented Apr 2, 2017

Another sccache failure?

@TimNN
Copy link
Contributor

TimNN commented Apr 2, 2017

Looks like it :(

ERROR:sccache::server: [Error(Msg("failed to spawn child"), State { next_error: Some(Error { repr: Os { code: 32, message: "Broken pipe" } }) })] 	lli.cpp.o
ERROR:sccache::server: [Error { repr: Os { code: 32, message: "Broken pipe" } }] 	lli.cpp.o

@vadimcn
Copy link
Contributor Author

vadimcn commented Apr 2, 2017

@bors: retry

@bors
Copy link
Contributor

bors commented Apr 2, 2017

⌛ Testing commit ad3f6e0 with merge cd6f950...

@bors
Copy link
Contributor

bors commented Apr 2, 2017

💔 Test failed - status-travis

@alexcrichton
Copy link
Member

alexcrichton commented Apr 3, 2017 via email

@bors
Copy link
Contributor

bors commented Apr 5, 2017

⌛ Testing commit ad3f6e0 with merge 49133bb...

@bors
Copy link
Contributor

bors commented Apr 5, 2017

💔 Test failed - status-appveyor

@TimNN
Copy link
Contributor

TimNN commented Apr 5, 2017

@bors
Copy link
Contributor

bors commented Apr 6, 2017

⌛ Testing commit ad3f6e0 with merge 1a9b382...

bors added a commit that referenced this pull request Apr 6, 2017
[Windows] Enable building rustc with "pthreads" flavor of mingw.

Tested on mingw-w64 packaged with msys2.

r? @alexcrichton

cc #40123
@bors
Copy link
Contributor

bors commented Apr 6, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 1a9b382 to master...

@bors bors merged commit ad3f6e0 into rust-lang:master Apr 6, 2017
@bors bors mentioned this pull request Apr 6, 2017
@TimNN TimNN mentioned this pull request Apr 8, 2017
5 tasks
@alexcrichton alexcrichton added the relnotes Marks issues that should be documented in the release notes of the next release. label May 5, 2017
@alexcrichton
Copy link
Member

This PR caused a few regression such as #41416 and #41607 so tagging relnotes at least. We haven't reverted yet and if we end up not doing so we'll want to mention this in compatibility nodes, namely:

  • Tweaking the link order of local static/dynamic libraries (respecting the order on given rather than having the compiler reorder)
  • Tweaking how MinGW is linked, so native code linked to dynamic libraries may require manually linking the gcc support library (for the native code itself)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relnotes Marks issues that should be documented in the release notes of the next release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants