Skip to content

Commit 1e3ed77

Browse files
committed
Turn on the mem-unaligned feature for bpf targets
Fixes the following LLVM segfault: Error: e: 05:02:06 [ERROR] fatal error: "Cannot select: 0x55e970a357d0: i64,ch = AtomicLoad<(load unordered (s64) from %ir.45)> 0x55e970410be8, 0x55e970a358a0\n 0x55e970a358a0: i64,ch = CopyFromReg 0x55e970410be8, Register:i64 %19\n 0x55e970a35490: i64 = Register %19\nIn function: memcpy" PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace. Stack dump: 0. Running pass 'Function Pass Manager' on module 'unroll-loop'. 1. Running pass 'BPF DAG->DAG Pattern Instruction Selection' on function '@memcpy'
1 parent 86aa192 commit 1e3ed77

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

build.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ fn main() {
3434
}
3535

3636
// These targets have hardware unaligned access support.
37-
if target.contains("x86_64") || target.contains("i686") || target.contains("aarch64") {
37+
if target.contains("x86_64")
38+
|| target.contains("i686")
39+
|| target.contains("aarch64")
40+
|| target.contains("bpf")
41+
{
3842
println!("cargo:rustc-cfg=feature=\"mem-unaligned\"");
3943
}
4044

0 commit comments

Comments
 (0)