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

Fix autodetection of -opaque and -g #80

Merged
merged 1 commit into from
Oct 20, 2024

Conversation

stedolan
Copy link
Contributor

The autodetection of whether -opaque and -g are supported by the compiler is broken since OCaml 5.2 (as debugged by @emillon in issue #78), because now ocamlc -opaque gives an error even though the -opaque flag is supported.

This patch changes the tested command to be ocamlc -opaque -version (which succeeds if -opaque is supported and fails if not, even on recent OCaml), and likewise for -g.

Copy link
Member

@dra27 dra27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good trick (nicer than grep'ping -help which was my initial thought).

You'll be relieved to know that ocamlc -opaque -version returns an error code right the way back to OCaml 3.08.0...

@gerdstolpmann gerdstolpmann merged commit 6287a77 into ocaml:master Oct 20, 2024
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

Successfully merging this pull request may close these issues.

3 participants