Skip to content

Search codegen backends based on target libdir instead of sysroot - #57101

Merged
bors merged 1 commit into
rust-lang:masterfrom
o01eg:fix-57014
Jan 5, 2019
Merged

Search codegen backends based on target libdir instead of sysroot#57101
bors merged 1 commit into
rust-lang:masterfrom
o01eg:fix-57014

Conversation

@o01eg

Copy link
Copy Markdown
Contributor

Fixes#57014

Fixes cases with custom libdir when it consists of two or more parts.

Fixes cases with custom libdir when it consists of two or more parts.
@rust-highfive

Copy link
Copy Markdown
Contributor

r? @davidtwco

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 24, 2018
@davidtwco

Copy link
Copy Markdown
Member

r? @alexcrichton

@alexcrichton

Copy link
Copy Markdown
Member

@bors: r+

@bors

bors commented Jan 2, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit 4e7d53d has been approved by alexcrichton

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 2, 2019
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request Jan 3, 2019
Search codegen backends based on target libdir instead of sysroot
Fixesrust-lang#57014
Fixes cases with custom libdir when it consists of two or more parts.
@bors

bors commented Jan 5, 2019

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 4e7d53d with merge 6861426...

bors added a commit that referenced this pull request Jan 5, 2019
Search codegen backends based on target libdir instead of sysroot
Fixes#57014
Fixes cases with custom libdir when it consists of two or more parts.
@bors

bors commented Jan 5, 2019

Copy link
Copy Markdown
Collaborator

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

@bors
bors merged commit 4e7d53d into rust-lang:masterJan 5, 2019
@rust-highfive

Copy link
Copy Markdown
Contributor

📣 Toolstate changed by #57101!

Tested on commit 6861426.
Direct link to PR: #57101

💔 miri on windows: test-pass → test-fail (cc @oli-obk@RalfJung@eddyb, @rust-lang/infra).

rust-highfive added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request Jan 5, 2019
Tested on commit rust-lang/rust@6861426.
Direct link to PR: <rust-lang/rust#57101>
💔 miri on windows: test-pass → test-fail (cc @oli-obk@RalfJung@eddyb, @rust-lang/infra).
@RalfJung

Copy link
Copy Markdown
Member

Uh... any idea why this would affect Miri only on Windows, and what we could do about that?

The error is

error: failed to find a `codegen-backends` folder in the libdir candidates:
* C:\projects\rust\build\x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib
* \\?\C:\projects\rust\build\x86_64-pc-windows-msvc\stage2\bin
* \\?\C:\projects\rust\build\x86_64-pc-windows-msvc\stage2\bin\rustlib\x86_64-pc-windows-msvc\lib

@o01eg

o01eg commented Jan 5, 2019

Copy link
Copy Markdown
ContributorAuthor

It's strange. What is correct place of codegen library?

@RalfJung

Copy link
Copy Markdown
Member

I have no idea, I hoped you'd tell me.^^

@o01eg

o01eg commented Jan 5, 2019

Copy link
Copy Markdown
ContributorAuthor

I suppose it could be broken because windows places dynamic libraries in the "bin" folder.

@o01eg

o01eg commented Jan 5, 2019

Copy link
Copy Markdown
ContributorAuthor

I'm afraid other tools will fail as well but they were already broken.

@mati865

mati865 commented Jan 5, 2019

Copy link
Copy Markdown
Member

Unfortunately it broke all the tools for MSVC target: #57303

I suppose it could be broken because windows places dynamic libraries in the "bin" folder.

That's correct, for both Windows target bin must be in PATH.

@o01eg

o01eg commented Jan 6, 2019

Copy link
Copy Markdown
ContributorAuthor

How are executable binaries and codegen and rustc_driver libraries placed on windows? It looks like it requires other way to calculate target libdir and codegen folder.

@matthiaskrgr

matthiaskrgr commented Jan 6, 2019

Copy link
Copy Markdown
Member

I'm afraid other tools will fail as well but they were already broken.

They would have been fixed by #57303 but the pr broke them in a way I cannot fix as I don't have windows.

Could you please provide a fix for this?

@mati865

Copy link
Copy Markdown
Member

Generally the only difference in files placement between UNIX and Windows (MinGW at least) should be runtime lib placement. On UNIX they are inside /usr/lib and on Windows they are usually located alongside executables because they have to be in PATH.

Here is the tree of MinGW toolchain installed with rustup: tree.txt

@o01eg

o01eg commented Jan 6, 2019

Copy link
Copy Markdown
ContributorAuthor

I could try to fix it after tomorrow. I think it better to revert PR now and then I try to fix it.
But it better to make a test to prevent this breakage.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 7, 2019
This reverts commit 6861426, reversing
changes made to cae623c.
Should fix tools on windows.
Reopens rust-lang#57014
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

@o01eg@rust-highfive@davidtwco@alexcrichton@bors@RalfJung@mati865@matthiaskrgr