Skip to content

rustbuild: Restore Config.libdir_relative - #48362

Merged
bors merged 2 commits into
rust-lang:masterfrom
cuviper:libdir_relative
Feb 25, 2018
Merged

rustbuild: Restore Config.libdir_relative#48362
bors merged 2 commits into
rust-lang:masterfrom
cuviper:libdir_relative

Conversation

@cuviper

Copy link
Copy Markdown
Member

This re-introduces a Config.libdir_relative field, now derived from
libdir and made relative to prefix if necessary.

This fixes a regression from #46592 when --libdir is given an absolute
path. Builder::sysroot_libdir should always use a relative path so
its callers don't clobber system locations, and librustc also asserts
that CFG_LIBDIR_RELATIVE is really relative.

This re-introduces a `Config.libdir_relative` field, now derived from
`libdir` and made relative to `prefix` if necessary.
This fixes a regression from rust-lang#46592 when `--libdir` is given an absolute
path. `Builder::sysroot_libdir` should always use a relative path so
its callers don't clobber system locations, and `librustc` also asserts
that `CFG_LIBDIR_RELATIVE` is really relative.
@rust-highfive

Copy link
Copy Markdown
Contributor

r? @alexcrichton

(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 Feb 19, 2018
@Mark-Simulacrum

Copy link
Copy Markdown
Member

Hm, so I think this is fine in general, but could we make libdir_relative a method on Config instead? It shouldn't really matter performance wise and it makes things easier from a maintenance viewpoint since there's no need to confirm it's kept up-to-date and think about it...

@cuviper

Copy link
Copy Markdown
MemberAuthor

OK, it's now a method.

Can we also nominate this for beta?

@Mark-SimulacrumMark-Simulacrum added beta-nominated Nominated for backporting to the compiler in the beta channel. beta-accepted Accepted for backporting to the compiler in the beta channel. labels Feb 20, 2018
@Mark-Simulacrum

Copy link
Copy Markdown
Member

@bors r+

I've accepted for beta backport.

@bors

bors commented Feb 20, 2018

Copy link
Copy Markdown
Collaborator

📌 Commit 8174c0d has been approved by Mark-Simulacrum

@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 Feb 20, 2018
@cuviper

Copy link
Copy Markdown
MemberAuthor

Thanks!

@kennytmkennytm mentioned this pull request Feb 25, 2018
kennytm added a commit to kennytm/rust that referenced this pull request Feb 25, 2018
…ulacrum
rustbuild: Restore Config.libdir_relative
This re-introduces a `Config.libdir_relative` field, now derived from
`libdir` and made relative to `prefix` if necessary.
This fixes a regression from rust-lang#46592 when `--libdir` is given an absolute
path. `Builder::sysroot_libdir` should always use a relative path so
its callers don't clobber system locations, and `librustc` also asserts
that `CFG_LIBDIR_RELATIVE` is really relative.
bors added a commit that referenced this pull request Feb 25, 2018
@bors
bors merged commit 8174c0d into rust-lang:masterFeb 25, 2018
@kennytmkennytm removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Mar 7, 2018
bors added a commit that referenced this pull request Mar 9, 2018
bors added a commit that referenced this pull request Mar 9, 2018
@cuviper
cuviper deleted the libdir_relative branch April 17, 2018 18:42
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beta-acceptedAccepted for backporting to the compiler in the beta channel.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.

6 participants

@cuviper@rust-highfive@Mark-Simulacrum@bors@alexcrichton@kennytm