【问题标题】:How do I tell which Windows toolchain my Rust compiler is using?如何判断我的 Rust 编译器正在使用哪个 Windows 工具链?
【发布时间】:2018-06-04 19:52:27
【问题描述】:

我正在尝试在我的 Windows 机器上安装 Rust 调试工具。我知道我必须找出我使用的是我的 Rust 编译器正在使用的 GNU 还是 MSVC 工具链,但我不知道如何找到这些信息。

【问题讨论】:

    标签: windows rust


    【解决方案1】:

    使用rustup show 查看包含您正在使用的平台名称的活动工具链。例如,在我的 Windows PC 上,我看到:

    $ 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)
    

    这说明我的活动工具链是msvc

    【讨论】:

      【解决方案2】:

      编译器知道平台工具链。使用rustc --version --verbose查看:

      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
      

      从这里,我们可以看到我已经安装了 MSVC 风格 (host: x86_64-pc-windows-msvc)。

      另见:

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2019-10-06
        • 1970-01-01
        • 1970-01-01
        • 2019-07-13
        • 2013-02-14
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多