Riduidel
Riduidel

Reputation: 22308

How do I tell which Windows toolchain my Rust compiler is using?

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.

Upvotes: 4

Views: 4550

Answers (2)

Wesley Wiser
Wesley Wiser

Reputation: 9871

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.

Upvotes: 5

Shepmaster
Shepmaster

Reputation: 432059

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:

Upvotes: 2

Related Questions