Skip to content

Commit

Permalink
docs: rust: add a note about rustup override set
Browse files Browse the repository at this point in the history
This is just FWIW, but O= changes the working directory before the
build starts.

If you do 'rustup override set' in the source tree and O= points a
directory outside, the version override is not effective.

For example,

  $ rustup override set $(scripts/min-tool-version.sh rustc)
  $ make LLVM=1 O=../build-dir

RUSTUP_TOOLCHAIN works irrespective of the working directory. Anyway,
people will eventually find a way they like.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
  • Loading branch information
masahir0y committed Sep 29, 2022
1 parent 1cb292c commit f2238e7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Documentation/rust/quick-start.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ and run::

rustup override set $(scripts/min-tool-version.sh rustc)

Please note the ``O=`` option changes the working directory before the build
starts. If you use a separate output directory, you need to run
``rustup override set`` so that it covers the output directory.

Otherwise, fetch a standalone installer or install ``rustup`` from:

https://www.rust-lang.org
Expand Down

0 comments on commit f2238e7

Please sign in to comment.