LLVM C API defines initialization APIs as , e.g. LLVMInitializeAllTargets as static inline functions, and these symbols does not exist in the shared library. llvm-sys/wrapper/target.c create public ABI of these functions to call from Rust. However, this way cannot be used with this crate because it needs to compile C code (target.c) with the LLVM library.
rustc-llvm-proxy cannot link
llvm_sys::target::LLVM_InitializeAllTargets
and other initialization function listed at https://github.com/tari/llvm-sys.rs/blob/36cdcf413a0f452ffb0c7c7ba7dd5954b0a59214/src/target.rs#L169.LLVM C API defines initialization APIs as , e.g.
LLVMInitializeAllTargets
asstatic inline
functions, and these symbols does not exist in the shared library. llvm-sys/wrapper/target.c create public ABI of these functions to call from Rust. However, this way cannot be used with this crate because it needs to compile C code (target.c) with the LLVM library.I re-implement these as rust code.