Skip to content

GNU toolchain on Windows can't build compiler plugins since nightly 2017-12-15. #47029

Closed
@Rantanen

Description

PS C:\Dev\Projects\rust-plugin-test\src> rustup run nightly-2017-12-15-gnu rustc --version
rustc 1.24.0-nightly (0077d128d 2017-12-14)

lib.rs

#![feature(rustc_private)]
extern crate rustc_plugin;

Building the above file as a dylib (or alternatively using cargo and plugin = true) fails:

PS C:\Dev\Projects\rust-plugin-test\src> rustup run nightly-2017-12-15-gnu rustc lib.rs --crat
e-type dylib
error: linking with `gcc` failed: exit code: 1
  |
  = note: "gcc" "-Wl,--enable-long-section-names" "-fno-use-linker-plugin" ... // continues...
  = note: ld: cannot find -ldbghelp

The full error can be seen on AppVeyor for example:

https://ci.appveyor.com/project/Rantanen/intercom/build/129/job/0k9k54hkwk1f0sfw

The build works just fine on the previous nightly.

PS C:\Dev\Projects\rust-plugin-test\src> rustup run nightly-2017-12-14-gnu rustc --version
rustc 1.24.0-nightly (f8af59d95 2017-12-13)
PS C:\Dev\Projects\rust-plugin-test\src> rustup run nightly-2017-12-14-gnu rustc lib.rs --crat
e-type dylib

As far as I can tell, dbghelp is an MSVC dependency and should be omitted for the GNU toolchain.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-macros-2.0Area: Declarative macros 2.0 (#39412)C-bugCategory: This is a bug.O-windows-gnuToolchain: GNU, Operating system: Windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions