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

Make ocamlc/ocamlopt fail when not given input files #12613

Merged
merged 2 commits into from
Oct 5, 2023

Conversation

MisterDA
Copy link
Contributor

An invocation such as ocamlc (without any command-line parameters), or ocamlc -o a.out will now fail with an error message and an error code.

cc @shindere who reviewed the PR offline
fixes #12497

@shindere
Copy link
Contributor

shindere commented Sep 28, 2023 via email

@damiendoligez damiendoligez self-assigned this Oct 4, 2023
An invocation such as `ocamlc` (without any command-line parameters),
or `ocamlc -o a.out` will now fail with an error message and an error
code.
@MisterDA
Copy link
Contributor Author

MisterDA commented Oct 4, 2023

Rebased to fix conflicts in Changes.

@shindere
Copy link
Contributor

shindere commented Oct 4, 2023

This has been discussed in triaging meeting and it has been agreed that
the behaviour of failing when no input file is provided is what we want, even
when no -o foo option is specified.

This PR should be good to go once it has been rebased to solve the conflict
in Changes.

@xavierleroy
Copy link
Contributor

As discussed during today's triage meeting: the "no input files" error behavior looks good, that's what GCC, Clang and CompCert do.

@Octachron Octachron merged commit 4df33cc into ocaml:trunk Oct 5, 2023
10 checks passed
@MisterDA MisterDA deleted the no-input-file branch October 5, 2023 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compiler behaviour on -o foo and no input files
5 participants