-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix regression with -o
when compiling C files
#10610
Comments
I didn't forget, thanks!
|
Fixed. |
@nojb concerning your second point, as far as I can see, this behavior has been constant since at least OCaml 4.04? In particular, ocamlopt -o exe a.c b.ml generates an executable named |
Indeed, that seems to be the case... |
Nicolás Ojeda Bär (2021/09/08 06:10 -0700):
> @nojb concerning your second point, as far as I can see, this behavior has been constant since at least OCaml 4.04? In particular,
Indeed, that seems to be the case...
How about just
```
ocamlc -o hello hello.c
```
In my tests this was generating an object file, not an executable. And
my understanding was that my patch in #9960 did change this, and htat I
needed to fix that, too.
Taht's why I added the "else" part. But I forgot to re-run the testsuite
after that. Before I added the "else" part, with just the other part of
hte patch, the testsuite was happy.
|
The issue is that without ocamlc -o anything hello.c generates |
Everything seems clear to me now, thanks.
I pushed a version of the code that does not try to fix a problem that
does actually not exist, many thanks to you, @Octachron, for having
spotted that.
|
Would it be possible to have tests in the testsuite for the behaviors that we have decided to preserve? |
It does not seem trivial to add test for the C compilation command, but it might it be a good idea on the medium term. Since #10619 fixed the regression with out-of-thin-air |
A friendly reminder that we shouldn't forget about this regression introduced in #9960 that needs to be fixed before 4.13 is released.
There are two issues with this patch:
ocaml
when you don't pass-o
:This causes problems when people use:
which was necessary before this PR.
-o
flag toocaml{c,opt}
is ignored if-c
is not passed as well when compiling C files.Originally posted by @nojb in #9960 (comment)
cc @shindere
The text was updated successfully, but these errors were encountered: