-
Notifications
You must be signed in to change notification settings - Fork 86
Merge Flambda 2 .cmxa/.a files into new ocamloptcomp.cmxa/.a #141
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
Merge Flambda 2 .cmxa/.a files into new ocamloptcomp.cmxa/.a #141
Conversation
1752159
to
86a7f51
Compare
86a7f51
to
493da09
Compare
let magic = | ||
really_input_string chan (String.length Config.cmxa_magic_number) | ||
in | ||
let (cmxa : Cmx_format.library_infos) = input_value chan in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like we should check the magic number here;
there is a consistency check in the function below, but
my fear is the unmarshaling of something with the wrong
shape (and the segfault that could follow).
Or is it written this way because you would like to be
compatible across versions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It deliberately doesn't check the magic number so it can be used across versions (it used to, and was problematic).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it has the potential of failing badly, but again this is for
power users so we can let them shoot themselves in the foot
since they are powerful enough to recover.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see, because you mean that "library_infos" might have changed. I think this is probably ok for an internal build system tool.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that type or any one transitively used from it.
In the end I agree it is fine; the tool is simple enough so that
if we see an unexplained failure, it will come from the unmarshaling.
I understand this is an internal tool for power users, so I did not |
Regarding ordering: the |
I was a tiny bit worried about |
|
ea24c50
to
77d2a80
Compare
ea89813 Merge pull request #154 from ocaml-flambda/merge-flambda-backend 23cf5a5 Merge flambda-backend changes b3af0c4 Unboxed types version 3 tests (#82) 1282d16 Functions with no clauses aren't local-returning (#149) 15d38c0 `make install` puts ocamlc at workspace root (#152) b4928ee Remove -absname to improve build errors (#151) f5b5e49 Remove `type_unpacks` (#150) 50d54db Remove arity-interrupting elaboration of module patterns (#146) 4382869 Remove the need to manually update the `tools/debug_printers` file (#148) 06a1d91 Add `promote-failed` targets to the Makefiles (#144) d04eb58 Cleanup of comprehensions and immutable arrays (#127) a45df79 Add a Module_strengthening extension (#142) 163c4b9 Add support for extensions in module types (#141) 74aa974 Some small patch-ups around matching on extensions (#140) 07127fe Remove raw_body from modular extensions setup (#137) 3f9bd64 Don't copy when resolving aliases in try_modtypes (#143) aba6294 Immediacy rework (#122) cf4eeef Add no-stack-allocation variant of some tests that print lambda (#133) 8f22438 Fully switch over Jane Street Merlin support to `.local-*` (#136) 5482a8d Remove `Lev_module_definition` from lambda (#135) 261e016 Change modular extensions to produce `AST_desc` types (#132) 0760c82 Disable module patterns in comprehensions (#131) 6acac80 Add Ctype global state debug printers (#130) bc32037 Enable support for Jane Street's internal Merlin configuration (#64) d1a8d03 Split out `Clflags.Extension` into a new file, `Language_extension` (#125) 435de6d Fix bootstrap and add legacy CI (#126) 7e5a626 Improve the API of language extensions to better support upstream compatibility (and also tooling) (#13) c4e17b0 Replace var with local for faster mode checking (#53) 6d477d8 Merge pull request #124 from riaqn/merge-backend d737533 minor fixes after merge f1710d6 Merge flambda-backend changes cc18534 Just run make boostrap (#123) git-subtree-dir: ocaml git-subtree-split: ea89813
This will avoid clients of compilerlibs having to explicitly link against the Flambda 2 archives. There is currently no tool for merging
.cmxa
files as far as I know, so I wrote one. This may need to be extended in the future to handle.cma
files too.