Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

suggestion: detect obj wordsize mismatching chain type #69

Open
zeromus opened this issue Oct 26, 2018 · 3 comments
Open

suggestion: detect obj wordsize mismatching chain type #69

zeromus opened this issue Oct 26, 2018 · 3 comments

Comments

@zeromus
Copy link

zeromus commented Oct 26, 2018

I was just stumped for a while by a dumb mistake: I used -chain msvc to process x64 .obj files. The error that manifested was Unsupported 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.

@zeromus
Copy link
Author

zeromus commented Oct 26, 2018

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.

@dra27
Copy link
Member

dra27 commented Apr 11, 2020

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!

@dra27
Copy link
Member

dra27 commented Apr 11, 2020

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants