Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ChrisDenton opened this issue May 24, 2021 · 3 comments
Closed
Labels
C-bug Category: This is a bug.

Comments

@ChrisDenton
Copy link
Member

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

@ChrisDenton ChrisDenton added the C-bug Category: This is a bug. label May 24, 2021
@roblabla
Copy link
Contributor

Upstream bug: https://bugs.llvm.org/show_bug.cgi?id=38797

@nico
Copy link

nico commented Aug 25, 2021

I tried to fix this in llvm/llvm-project@400a1de . It might work now (well, at llvm HEAD. It'll be in LLVM 14. If it's important, we can try to merge it to the LLVM 13 branch.)

@ChrisDenton
Copy link
Member Author

Rust recently upgraded to LLVM 14 so I'm closing this as resolved. I'll also comment on the tracking issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

3 participants