Skip to content

rustc does not recognize "is-like-msvc" properly? #32818

Closed
@pravic

Description

@pravic

Here is a gist with the target specification.

When "linker": "link.exe" is specified, I get the following:

rustc --target=i786-pc-windows-msvc.json --crate-type=dylib lib.rs
note: LINK : warning LNK4044: unrecognized option '/L'; ignored
LINK : warning LNK4044: unrecognized option '/o'; ignored
LINK : warning LNK4044: unrecognized option '/nodefaultlibs'; ignored
LINK : warning LNK4044: unrecognized option '/L'; ignored
LINK : warning LNK4044: unrecognized option '/Wl,-Bstatic'; ignored
LINK : warning LNK4044: unrecognized option '/Wl,-Bdynamic'; ignored
LINK : warning LNK4044: unrecognized option '/shared'; ignored

If omit it, rustc calls cc:

rustc --target=i786-pc-windows-msvc.json --crate-type=dylib lib.rs
error: could not exec the linker `cc`

Why? This code shows that is-like-msvc must handle it properly. And such things as "-Wl,-Bstatic" is coming from GnuLinker.

Meta:

rustc 1.9.0-nightly (bf5da36 2016-04-06)
binary: rustc
commit-hash: bf5da36
commit-date: 2016-04-06
host: i686-pc-windows-msvc
release: 1.9.0-nightly

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions