In my use of case the data-layout metadata is needed. Taking a look at the llvm-alt crate, it seems that there is no way using the wrapper. However, calling directly to the llvm-sys underlying crate seems to work.
if let Some(ref layout) = opt.layout {
unsafe {
let c_target = std::ffi::CString::new(layout.to_string()).unwrap();
llvm::ffi::core::LLVMSetDataLayout(llvm_module.into(), c_target.as_ptr());
}
}
Hi @geky
In my use of case the data-layout metadata is needed. Taking a look at the llvm-alt crate, it seems that there is no way using the wrapper. However, calling directly to the llvm-sys underlying crate seems to work.
WDYT? Thanks in advance