未验证 提交 ea39f46c 编写于 作者: M Matthias Krüger 提交者: GitHub

Rollup merge of #94365 - mati865:fix-mingw-detection-for-rawdylib, r=michaelwoerister

Fix MinGW target detection in raw-dylib

LLVM target doesn't have to be the same as Rust target so relying on it is wrong.

It was one of concerns in https://github.com/rust-lang/rust/pull/88801 that was not fixed in https://github.com/rust-lang/rust/pull/90782.
......@@ -151,7 +151,9 @@ fn inject_dll_import_lib(
output_path.with_extension("lib")
};
let mingw_gnu_toolchain = self.config.sess.target.llvm_target.ends_with("pc-windows-gnu");
let target = &self.config.sess.target;
let mingw_gnu_toolchain =
target.vendor == "pc" && target.os == "windows" && target.env == "gnu";
let import_name_and_ordinal_vector: Vec<(String, Option<u16>)> = dll_imports
.iter()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册