Open zeromus opened 5 years ago
And while we're on the subject... it would be nice if -o myfile.exe
without -exe
printed a warning; or in otherwords, a mismatch of extension and -exe/non-exe option should print a warning.
I know, I'm dumb.
Yes, this would be a good (and straightforward) addition, although I'd be more explicit that it's the machine type which doesn't match - ARM64 support will arrive at some point, when I fire up the machine on my desk for long enough to do it!
I don't think it's dumb to forget the .exe
! However, OCaml behaves the same way, so we can't add a warning here without forcing that on ocamlopt
as well. FWIW, annoying though it is, there occasions where you don't want the .exe
and the semantics of the warning become unclear if the name you give has other dots in it. I, for example, have an old Windows-only project which compiles foo.cgi and would be irritated to start getting warnings about foo.cgi
not ending it .exe
. Equally, the vast number of ocamlbuild
projects out there which still emit foo.native
really could with a warning that you might have wanted foo.native.exe
!
I was just stumped for a while by a dumb mistake: I used
-chain msvc
to process x64 .obj files. The error that manifested wasUnsupported relocation kind 0008
; it would be nice if I had got.obj wordsize (64) mismatches selected chain wordsize (32)
instead.Maybe there's a technical reason for this check not being present, but I think it's more likely nobody's ever done anything as stupid as what I did before.