Skip to content

Restore the {ocamlc,ocamlopt}_{cflags,cppflags} config vars#13244

Merged
shindere merged 1 commit intoocaml:trunkfrom
shindere:restore-c-cpp-config-vars
Jun 21, 2024
Merged

Restore the {ocamlc,ocamlopt}_{cflags,cppflags} config vars#13244
shindere merged 1 commit intoocaml:trunkfrom
shindere:restore-c-cpp-config-vars

Conversation

@shindere
Copy link
Copy Markdown
Contributor

These variables have been renamed by #13201 but should actually have
been preserved so that the use of ocamlc -config remains
backward-compatible.

@shindere shindere force-pushed the restore-c-cpp-config-vars branch from e4de813 to dd209cd Compare June 18, 2024 11:55
Copy link
Copy Markdown
Contributor

@anmonteiro anmonteiro left a comment

Choose a reason for hiding this comment

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

Thank you

Copy link
Copy Markdown
Contributor

@MisterDA MisterDA left a comment

Choose a reason for hiding this comment

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

typo

Changes Outdated
Miod Vallat and Samuel Hym)

* #13201: Fix and speedup builds with TSan.
- #13201j #13244: Fix and speedup builds with TSan.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
- #13201j #13244: Fix and speedup builds with TSan.
- #13201 #13244: Fix and speedup builds with TSan.

These variables have been renamed by ocaml#13201 but should actually have been
preserved so that the use of `ocamlc -config` remains backward-compatible.
@shindere shindere force-pushed the restore-c-cpp-config-vars branch from dd209cd to 1f97e10 Compare June 18, 2024 16:55
@shindere
Copy link
Copy Markdown
Contributor Author

shindere commented Jun 18, 2024 via email

Copy link
Copy Markdown
Contributor

@OlivierNicole OlivierNicole left a comment

Choose a reason for hiding this comment

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

Approving on behalf of @anmonteiro, @MisterDA and @dustanddreams. I note that we may one day want to design a way to deprecate the old variables, but that is a longer discussion and for a later PR.

@shindere
Copy link
Copy Markdown
Contributor Author

shindere commented Jun 21, 2024 via email

@shindere shindere merged commit 04c90bf into ocaml:trunk Jun 21, 2024
@emillon
Copy link
Copy Markdown
Contributor

emillon commented Jun 21, 2024

Perhaps emiting a warning on stderr could work.

I don't think that's possible in the current interface, since users do ocamlc -config | grep $NAME: | cut -d: -f2 or similar, so ocamlc doesn't know what options are used.

@shindere
Copy link
Copy Markdown
Contributor Author

shindere commented Jun 21, 2024 via email

@shindere shindere deleted the restore-c-cpp-config-vars branch June 21, 2024 12:09
punchagan added a commit to punchagan/sandmark that referenced this pull request Jun 21, 2024
This reverts commits 19c98b1 and
7e5deb0. Upstream restored the
variables that were removed in ocaml/ocaml#13201 in ocaml/ocaml#13244
for backward-compatibility.
punchagan added a commit to ocaml-bench/sandmark that referenced this pull request Jun 21, 2024
This reverts commits 19c98b1 and
7e5deb0. Upstream restored the
variables that were removed in ocaml/ocaml#13201 in ocaml/ocaml#13244
for backward-compatibility.
@Octachron
Copy link
Copy Markdown
Member

Concerning the deprecation policy and backward-compatibility guarantees, I think that the Config is one of the compiler output that could benefit from using the structured diagnostic versioning policy described in ocaml/RFCs#45 .

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.

6 participants