mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
fix memcpy segfault windows llvm
This commit is contained in:
parent
e76c63f448
commit
446cff6157
1 changed files with 9 additions and 1 deletions
|
@ -28,7 +28,15 @@ 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 => {
|
||||
return memcpy_target(dest, src, len);
|
||||
// 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);
|
||||
}
|
||||
},
|
||||
else => {
|
||||
return musl.memcpy(dest, src, len);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue