Bug 1953015 - Fix missing ProcessPrng@8 symbol in MinGW build r=glandium

Differential Revision: https://phabricator.services.mozilla.com/D241736
This commit is contained in:
Chris Martin
2025-04-04 20:22:20 +00:00
parent f2ee09496e
commit 436a283a1c
3 changed files with 17 additions and 0 deletions

View File

@@ -252,3 +252,9 @@ fn try_run(config: &mut Arc<Config>) -> anyhow::Result<bool> {
logic::ReportCrash::new(config.clone(), extra)?.run()
}
}
// `std` uses `raw-dylib` to link this dll, but that doesn't work properly on x86 MinGW, so we explicitly
// have to link it.
#[cfg(all(target_os = "windows", target_env = "gnu"))]
#[link(name="bcryptprimitives")]
extern "C" {}

View File

@@ -11,3 +11,8 @@ OS_LIBS += [
"userenv",
"ws2_32",
]
# `std` uses `raw-dylib` to link this dll, but that doesn't work properly on x86 MinGW, so we explicitly
# have to link it.
if CONFIG["OS_ARCH"] == "WINNT" and CONFIG["CC_TYPE"] != "clang-cl":
OS_LIBS += ["bcryptprimitives"]

View File

@@ -27,6 +27,7 @@ def Libxul(name, output_category=None):
DELAYLOAD_DLLS += [
"avrt.dll",
"bcryptprimitives.dll",
"comdlg32.dll",
"credui.dll",
"d3d11.dll",
@@ -379,6 +380,11 @@ if CONFIG["OS_ARCH"] == "WINNT":
"runtimeobject",
]
# `std` uses `raw-dylib` to link this dll, but that doesn't work properly on x86 MinGW, so we explicitly
# have to link it.
if CONFIG["CC_TYPE"] != "clang-cl":
OS_LIBS += ["bcryptprimitives"]
if CONFIG["ACCESSIBILITY"]:
OS_LIBS += [
"oleacc",