Skip to content

Windows rust-lld does not support the MSVC manifestdependency .drectve #85642

Closed
@ChrisDenton

Description

@ChrisDenton

Minimal reproduction (Windows only):

#[link_section = ".drectve"]
#[used]
static DIRECTIVE: [u8; 164] = *br#""/manifestdependency:type='Win32' name='Test.Research.SampleAssembly' version='6.0.0.0' processorArchitecture='X86' publicKeyToken='0000000000000000' language='*'" "#;

fn main() {}

Using the default MSVC linker works:

rustc main.rs

However when using rust-lld.exe it fails:

rustc -C linker="rust-lld.exe" main.rs

The error says it's unsupported:

note: rust-lld: error: /manifestdependency: is not allowed in .drectve


LLD tracking issue: #71520

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions