Quantcast
Channel: OCaml - Topics tagged dune
Viewing all articles
Browse latest Browse all 521

Using output of `ocamlfind -only-show` in a dune build

$
0
0

@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 LinearML stdlib it fails with the following:

../compiler/limlc: SymbolLLVMConstNull’ 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 static llvm 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

Read full topic


Viewing all articles
Browse latest Browse all 521

Trending Articles