Skip to content

Commit

Permalink
Fix aarch64 linux build. (#557)
Browse files Browse the repository at this point in the history
Building `melior` for Linux ARM doesn't work because of FFI types. This
PR fixes this by making the compiler select the target pointer type
automatically. It's the same issue we had in `tblgen-rs-alt`.
  • Loading branch information
azteca1998 committed Jun 15, 2024
1 parent cb869a1 commit 41c42b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion melior/src/string_ref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ impl<'a> StringRef<'a> {
/// Creates a string reference.
pub fn new(string: &'a str) -> Self {
let string = MlirStringRef {
data: string.as_bytes().as_ptr() as *const i8,
data: string.as_bytes().as_ptr() as *const _,
length: string.len(),
};

Expand Down

0 comments on commit 41c42b5

Please sign in to comment.