mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-09 06:08:29 +00:00
Add bcrypt which is required by newer getrandom crate on Windows.
This commit is contained in:
@@ -279,9 +279,13 @@ impl LinkCode {
|
|||||||
command
|
command
|
||||||
};
|
};
|
||||||
// Add libraries required per platform.
|
// Add libraries required per platform.
|
||||||
// We need userenv, sockets (Ws2_32), and advapi32 to call a system call (for random numbers I think).
|
// We need userenv, sockets (Ws2_32), advapi32 for some system calls and bcrypt for random numbers.
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
let command = command.arg("-luserenv").arg("-lWs2_32").arg("-ladvapi32");
|
let command = command
|
||||||
|
.arg("-luserenv")
|
||||||
|
.arg("-lWs2_32")
|
||||||
|
.arg("advapi32")
|
||||||
|
.arg("-lbcrypt");
|
||||||
// On unix we need dlopen-related symbols, libmath for a few things, and pthreads.
|
// On unix we need dlopen-related symbols, libmath for a few things, and pthreads.
|
||||||
#[cfg(not(windows))]
|
#[cfg(not(windows))]
|
||||||
let command = command.arg("-ldl").arg("-lm").arg("-pthread");
|
let command = command.arg("-ldl").arg("-lm").arg("-pthread");
|
||||||
|
|||||||
@@ -50,7 +50,11 @@ impl LinkCode {
|
|||||||
)
|
)
|
||||||
.arg(&self.libwasmer_path.canonicalize()?);
|
.arg(&self.libwasmer_path.canonicalize()?);
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
let command = command.arg("-luserenv").arg("-lWs2_32").arg("-ladvapi32");
|
let command = command
|
||||||
|
.arg("-luserenv")
|
||||||
|
.arg("-lWs2_32")
|
||||||
|
.arg("-ladvapi32")
|
||||||
|
.arg("-lbcrypt");
|
||||||
#[cfg(not(windows))]
|
#[cfg(not(windows))]
|
||||||
let command = command.arg("-ldl").arg("-lm").arg("-pthread");
|
let command = command.arg("-ldl").arg("-lm").arg("-pthread");
|
||||||
let output = command.arg("-o").arg(&self.output_path).output()?;
|
let output = command.arg("-o").arg(&self.output_path).output()?;
|
||||||
|
|||||||
Reference in New Issue
Block a user