问题
I'm trying to install Rust debugging tools on my Windows machine. I know I have to find if I'm using the GNU or MSVC toolchain my Rust compiler is using, but I don't know how to find this information.
回答1:
The platform toolchain is known by the compiler. Use rustc --version --verbose
to see it:
PS C:\Users\IEUser> rustc --version --verbose
rustc 1.26.0 (a77568041 2018-05-07)
binary: rustc
commit-hash: a7756804103447ea4e68a71ccf071e7ad8f7a03e
commit-date: 2018-05-07
host: x86_64-pc-windows-msvc
release: 1.26.0
LLVM version: 6.0
From here, we can see that I have installed the MSVC flavor (host: x86_64-pc-windows-msvc
).
See also:
- What are the differences between the GNU and MSVC Rust toolchain?
回答2:
Use rustup show
to see your active toolchain which contains the name of the platform you're using. For example, on my Windows PC, I see this:
$ rustup show
Default host: x86_64-pc-windows-msvc
installed toolchains
--------------------
stable-x86_64-pc-windows-msvc (default)
nightly-x86_64-pc-windows-msvc
active toolchain
----------------
stable-x86_64-pc-windows-msvc (default)
rustc 1.26.1 (827013a31 2018-05-25)
Which says that my active toolchain is msvc
.
来源:https://stackoverflow.com/questions/50687861/how-do-i-tell-which-windows-toolchain-my-rust-compiler-is-using