"--oformat" is not supported [windows]

kinke noone at nowhere.com
Wed Dec 30 14:15:11 UTC 2020


With -link-internally, LDC uses the builtin LLD; we don't 
recommend it on the cross-compile Wiki for non-Windows targets 
(and a C compiler like clang instead). LLD comes with different 
driver flavors (usually determined by the LLD executable 
filename, e.g., lld-link.exe and ld.lld.exe) with differing CLI; 
plain lld as used for non-Windows targets with -link-internally 
apparently expects `--format=elf` instead of `--oformat`. So 
either use something like `-link-internally -L--format=binary` or 
`-gcc=clang -Xcc=-target -Xcc=armv7em-none-eabi -linker=lld 
-L--oformat -Lbinary`.


More information about the digitalmars-d-ldc mailing list