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

Document the use of toolchain link #954

Closed
jonhoo opened this issue Feb 13, 2017 · 8 comments
Closed

Document the use of toolchain link #954

jonhoo opened this issue Feb 13, 2017 · 8 comments

Comments

@jonhoo
Copy link
Contributor

jonhoo commented Feb 13, 2017

The current output of toolchain --help mentions that "rustup can also install toolchains from [..] local builds", but then does not go into further detail. toolchain link is the command meant for that purpose, but its --help output is, well, unhelpful:

$ rustup toolchain link --help
rustup-toolchain-link
Create a custom toolchain by symlinking to a directory

USAGE:
    rustup toolchain link <toolchain> <path>

FLAGS:
    -h, --help    Prints help information

ARGS:
    <toolchain>
    <path>

In particular, it should at the very least be noted that path should be /path/to/rust/build/$triple/stage1, and link should be pointed to from toolchain --help. It'd also be useful to mention that only a rustc build is required, not a full cargo build.

@brson
Copy link
Contributor

brson commented Mar 16, 2017

Thank you for the bug report @jonhoo !

typesanitizer pushed a commit to typesanitizer/rustup.rs that referenced this issue Mar 29, 2017
…ng#954.

* Also renamed TOOLCHAIN_INSTALL_HELP -> INSTALL_HELP for consistency.
@typesanitizer
Copy link

PR submitted here: #1017

@durka
Copy link
Contributor

durka commented Apr 1, 2017

Would be great to also add some error checking, so if you try to rustup toolchain link stage1/bin or stage1/bin/rustc instead of totally mysterious "infinite recursion detected" later.

@typesanitizer
Copy link

typesanitizer commented Apr 1, 2017

  1. @durka, what are all the things that need to be checked before linking? In my build, I have a lot of .so files inside stage1/lib and .rlib and .so files in stage1/lib/x86_64-unknown-linux-gnu/lib.
  2. I'm not sure which function should handle the error checking though: toolchain_link calls install_from_dir which calls install which calls run which basically calls utils::symlink_dir. Which function's responsibility would it be to handle this error? I suppose we could do it in toolchain_link itself by just calling rustup_utils::utils::assert_is_file for $path/bin/rustc.

@durka
Copy link
Contributor

durka commented Apr 1, 2017 via email

typesanitizer pushed a commit to typesanitizer/rustup.rs that referenced this issue Apr 3, 2017
bors added a commit that referenced this issue May 9, 2017
Added help for `rustup toolchain link` as documented in issue #954.

* Also renamed TOOLCHAIN_INSTALL_HELP -> INSTALL_HELP for consistency.
@brson
Copy link
Contributor

brson commented May 11, 2017

Looks like the original issue is fixed. Thanks @theindigamer. Do we need to open another issue for the followups mentioned here cc @durka @theindigamer ?

@typesanitizer
Copy link

@brson the merged PR included error checking for directories as suggested by @durka . Is there anything else that requires a follow up?

@brson
Copy link
Contributor

brson commented May 12, 2017

Nope! Thanks @theindigamer.

@brson brson closed this as completed May 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants