mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-01 10:52:18 +00:00
try to force the sysv calling convention
This commit is contained in:
parent
fa0a7fabb8
commit
cd89775176
2 changed files with 3 additions and 11 deletions
|
@ -28,15 +28,7 @@ pub fn memcpy(noalias dest: [*]u8, noalias src: [*]const u8, len: usize) callcon
|
|||
switch (arch) {
|
||||
// x86_64 has a special optimized memcpy that can use avx2.
|
||||
.x86_64 => {
|
||||
// On windows the folly memcpy segfaults for unclear reasons
|
||||
// TODO investigate why it segfaults
|
||||
if (builtin.os.tag == .windows) {
|
||||
std.mem.copy(u8, dest[0..len], src[0..len]);
|
||||
|
||||
return dest;
|
||||
} else {
|
||||
return memcpy_target(dest, src, len);
|
||||
}
|
||||
return memcpy_target(dest, src, len);
|
||||
},
|
||||
else => {
|
||||
return musl.memcpy(dest, src, len);
|
||||
|
|
|
@ -14,5 +14,5 @@ comptime {
|
|||
}
|
||||
}
|
||||
|
||||
pub extern fn __folly_memcpy_prefetchw(noalias dest: [*]u8, noalias src: [*]const u8, len: usize) callconv(.C) [*]u8;
|
||||
pub extern fn __folly_memcpy_prefetcht0(noalias dest: [*]u8, noalias src: [*]const u8, len: usize) callconv(.C) [*]u8;
|
||||
pub extern fn __folly_memcpy_prefetchw(noalias dest: [*]u8, noalias src: [*]const u8, len: usize) callconv(.SysV) [*]u8;
|
||||
pub extern fn __folly_memcpy_prefetcht0(noalias dest: [*]u8, noalias src: [*]const u8, len: usize) callconv(.SysV) [*]u8;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue