@vrotaru wrote:
Can it be done?
Context: I’m trying to build LinearML using dune and one remaining stumbling block is this. The compiler
limlc
build, but when when compiling LinearMLstdlib
it fails with the following:
../compiler/limlc: Symbol
LLVMConstNull’ causes overflow in R_X86_64_PC32 relocation`Same for
LLVMSizeOf
Looking at the output of 2 commands
dune build --verbose
ocamlfind ocamlopt -package llvm,llvm.scalar_opts,llvm.analysis,llvm.bitwriter,unix -predicates llvm.static -linkpkg -only-show
where the important part is
-pedicates llvm.static
I’ve managed to build an executable which uses the staticllvm
libs and it works. Now I’m wondering if that can be somehow automated.Just in case here is the compiler dune file
(executable (public_name limlc) (name main) (libraries llvm llvm.scalar_opts llvm.analysis llvm.bitwriter unix) (flags (:standard -w -27-35)) (link_flags (:standard -linkall))) (ocamllex (modules lexer)) (ocamlyacc (modules parser))
Posts: 7
Participants: 3