Correct usage of llvm bindings

I recently installed the llvm package (version 19-static) via opam on an iMac M4. All seemed to go OK. When I came to build a small dune project to play with llvm I got a warning:
ld: warning: ignoring duplicate libraries: '-lLLVMAArch64AsmParser', '-lLLVMAArch64CodeGen', '-lLLVMAArch64Desc', '-lLLVMAArch64Disassembler', ... '-lLLVMXCoreInfo', '-lc++', '-lm', '-lz', '-lzstd'

The project executed as I expected but I’m wondering how to get rid of the warning?

Here’s the dune file for the project:

(executable
 (name Targets)
 (libraries
    base
    stdio
    llvm
    llvm.target
    llvm.all_backends
    llvm.executionengine
 )
)

Any suggestions gratefully received.

I once made a working example for llvm-14 and llvm-16 at arbipher/llvm-ocaml-tutorial, but I haven’t touched it for a while.

Can you share your full code, so that I can look at it recently?