Merge pull request 'fix(windows): add memset_explicit symbol export for mingw cross-compilation' (#118) from fix/cargo-config-sodium into beta
Some checks failed
Release Beta / autotag (push) Successful in 10s
Release Beta / changelog (push) Successful in 1m19s
Test / frontend-tests (push) Successful in 1m49s
Test / frontend-typecheck (push) Successful in 2m2s
Release Beta / build-linux-amd64 (push) Successful in 10m32s
Release Beta / build-linux-arm64 (push) Successful in 13m1s
Test / rust-fmt-check (push) Successful in 17m22s
Test / rust-clippy (push) Successful in 19m8s
Test / rust-tests (push) Successful in 20m50s
Release Beta / build-windows-amd64 (push) Failing after 7m38s
Release Beta / build-macos-arm64 (push) Failing after 11m10s
Renovate / renovate (push) Failing after 32s
Some checks failed
Release Beta / autotag (push) Successful in 10s
Release Beta / changelog (push) Successful in 1m19s
Test / frontend-tests (push) Successful in 1m49s
Test / frontend-typecheck (push) Successful in 2m2s
Release Beta / build-linux-amd64 (push) Successful in 10m32s
Release Beta / build-linux-arm64 (push) Successful in 13m1s
Test / rust-fmt-check (push) Successful in 17m22s
Test / rust-clippy (push) Successful in 19m8s
Test / rust-tests (push) Successful in 20m50s
Release Beta / build-windows-amd64 (push) Failing after 7m38s
Release Beta / build-macos-arm64 (push) Failing after 11m10s
Renovate / renovate (push) Failing after 32s
Reviewed-on: #118
This commit is contained in:
commit
cf1dffb32b
@ -13,6 +13,8 @@ fn main() {
|
|||||||
.file("memset_s_shim.c")
|
.file("memset_s_shim.c")
|
||||||
.compile("memset_shim");
|
.compile("memset_shim");
|
||||||
println!("cargo:rerun-if-changed=memset_s_shim.c");
|
println!("cargo:rerun-if-changed=memset_s_shim.c");
|
||||||
|
// Explicitly link the shim library
|
||||||
|
println!("cargo:rustc-link-lib=static=memset_shim");
|
||||||
}
|
}
|
||||||
|
|
||||||
tauri_build::build()
|
tauri_build::build()
|
||||||
|
|||||||
@ -6,7 +6,13 @@
|
|||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
void memset_explicit(void *dest, int val, size_t n) {
|
#ifdef _WIN32
|
||||||
|
#define EXPORT __declspec(dllexport)
|
||||||
|
#else
|
||||||
|
#define EXPORT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
EXPORT void memset_explicit(void *dest, int val, size_t n) {
|
||||||
volatile unsigned char *p = (volatile unsigned char *)dest;
|
volatile unsigned char *p = (volatile unsigned char *)dest;
|
||||||
while (n--) {
|
while (n--) {
|
||||||
*p++ = (unsigned char)val;
|
*p++ = (unsigned char)val;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user