-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Add support for --bindir and remember the relative locations of bindir and libdir vs prefix (ie: sysroot) #19065
Conversation
Without this make fails due to not finding a way to create the bindir target.
If the expected rustc snapshot is not where we expect it to be, complain and fail at that point rather than creating a empty rustc file and continuing until we try to run it.
Without this, if we we're using a non-standard host libdir, the target bindir would not exist (and rustc would fail to write to the non-existent directory).
…an calculate it properly
0285e9e
to
370101c
Compare
Updated to fix some issues I ran into while testing with: |
This PR seems closely related to #16552, just something to keep in mind. |
@@ -340,6 +340,7 @@ need_cmd date | |||
need_cmd tr | |||
need_cmd sed | |||
need_cmd file | |||
need_cmd realpath |
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.
Both my linux machine and my OSX machine don't have this command, so it may not be common enough to require. There are some snippets in #16552 which may be useful, however.
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.
Ok, I'll look into alternatives to calculate the relative paths.
Thanks for the pointer, I'll keep an eye on #16552 |
Closing due to inactivity, but feel free to reopen with a rebase! |
Potential downsides:
realpath
, which I'm not sure everyone has, to determine relative directories. It's possible we could substitute something else if this matters.Upsides:
--libdir
now avoids breaking things at runtime if it isn't in one of the expected locations