Small repro:
$ cat dune-project
(lang dune 3.24)
(using mdx 0.4)
$ cat dune-workspace
(lang dune 3.24)
(env (dev (link_flags (:standard -cclib -Wl,-MARKER))))
$ cat dune
(mdx)
(executable (name main))
$ dune build @all --verbose 2>&1 | grep -E '^Running.*(main\.exe|mdx_gen)'
Running[5]: … ocamlc.opt -g -o mdx_gen.bc.exe -output-complete-exe … -linkall
Running[6]: … ocamlopt.opt … -o main.exe … -cclib -Wl,-MARKER
So main.exe gets the flag, butmdx_gen.bc.exe gets -g -linkall and nothing else. (as src/dune_rules/mdx.ml:507-513 passes a hardcoded ~link_args:(A "-linkall") and ~env:Env.empty).
The direct impact of this is that's once you start using mdx on macOS there is no way to disable this warning (while you can turn it off for other link steps):
ld: warning: ignoring duplicate libraries: '-lzstd'
Small repro:
So
main.exegets the flag, butmdx_gen.bc.exegets-g -linkalland nothing else. (assrc/dune_rules/mdx.ml:507-513passes a hardcoded~link_args:(A "-linkall")and~env:Env.empty).The direct impact of this is that's once you start using mdx on macOS there is no way to disable this warning (while you can turn it off for other link steps):