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

Extend -opaque to .cmi and warn on missing .cmx files #7053

Closed
vicuna opened this issue Nov 19, 2015 · 2 comments
Closed

Extend -opaque to .cmi and warn on missing .cmx files #7053

vicuna opened this issue Nov 19, 2015 · 2 comments
Assignees
Milestone

Comments

@vicuna
Copy link

vicuna commented Nov 19, 2015

Original bug ID: 7053
Reporter: @gasche
Assigned to: @lpw25
Status: closed (set by @alainfrisch on 2016-01-27T08:26:57Z)
Resolution: fixed
Priority: normal
Severity: feature
Version: 4.03.0+dev / +beta1
Target version: 4.03.0+dev / +beta1
Fixed in version: 4.03.0+dev / +beta1
Category: ~DO NOT USE (was: OCaml general)
Monitored by: @diml

Bug description

Leo proposes to warn on missing .cmx files (a compilation mode that is rather unspecified but was supported for a long time), unless the "-opaque" flag has been used to compile the corresponding .cmi (as a way to indicate that there may be none or several .cmx files in competition for that implementation, and that dependent modules should thus not commit to one of them).

Additional information

Note that it is possible to create "morally empty" .cmx file by using the -opaque option to compile the module. If you were previously removing the .cmx files for some reason, using -opaque at cmx-production time is likely to be what you are looking for.

The reason for warning on missing .cmx files is that these missing files tricks make it really hard for the compiler backend to reason on cross-module optimization. For example a module A may compile against a dependency B, both having a shared dependency C, but B say C's cmx file while A doesn't see it. Then the optimizer code needs to reason transitively and that is hard to get right.

@vicuna
Copy link
Author

vicuna commented Dec 2, 2015

Comment author: @alainfrisch

#319

@vicuna
Copy link
Author

vicuna commented Jan 27, 2016

Comment author: @alainfrisch

The Github PR has been merged.

@vicuna vicuna closed this as completed Jan 27, 2016
@vicuna vicuna added this to the 4.03.0 milestone Mar 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants