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

Add support for --bindir and remember the relative locations of bindir and libdir vs prefix (ie: sysroot) #19065

Closed
wants to merge 9 commits into from

Conversation

codyps
Copy link
Contributor

@codyps codyps commented Nov 18, 2014

Potential downsides:

  • right now adds a build dependency on 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
  • config diff between windows and everyone else is now confined to the configure script.

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).
@codyps
Copy link
Contributor Author

codyps commented Nov 19, 2014

Updated to fix some issues I ran into while testing with:
../configure --prefix=$HOME/rust-foo --libdir=$HOME/rust-foo/not-lib/not-lib-2/real-lib --bindir=$HOME/rust-foo/not-bin/real-bin

@alexcrichton
Copy link
Member

This PR seems closely related to #16552, just something to keep in mind.

@alexcrichton alexcrichton self-assigned this Nov 20, 2014
@@ -340,6 +340,7 @@ need_cmd date
need_cmd tr
need_cmd sed
need_cmd file
need_cmd realpath
Copy link
Member

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.

Copy link
Contributor Author

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.

@codyps
Copy link
Contributor Author

codyps commented Nov 20, 2014

Thanks for the pointer, I'll keep an eye on #16552

@alexcrichton
Copy link
Member

Closing due to inactivity, but feel free to reopen with a rebase!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants