Improve the packing mechanism used to build Dynlink#2268
Improve the packing mechanism used to build Dynlink#2268mshinwell merged 24 commits intoocaml:trunkfrom
Conversation
|
P.S. This is based on the old version of #2265; I will rebase once that's merged. |
|
There seem to be some problems with this - I've discussed with @stedolan and hopefully have a solution, which I shall put in place next week. |
2b10e1a to
c06a0fa
Compare
|
@dra27 This is now ready for you to look at. |
c06a0fa to
d86d2c7
Compare
|
I've made the change about |
d86d2c7 to
722887d
Compare
After consultation on the core developers' list I am proposing this patch to remove support for compiler plugins. The main motivations for removing compiler plugins are: - They are a potential security risk. - They increase the complexity of the build system and make maintenance of the Dynlink libraries more difficult (although actually, this complexity could probably be reduced after #2268 is merged). - Many applications of plugins should be able to be expressed by building custom compiler drivers that link against compilerlibs. * Remove compiler plugins and hooks * Add new function Dynlink.unsafe_get_global_symbol but keep it outside the documented API. * Remove otherlibs/dynlink/nodynlink.ml * Update Changes
42dc4a4 to
121595b
Compare
|
@dra27 Please approve and merge once CI passes. |
dra27
left a comment
There was a problem hiding this comment.
Two (dull) questions regarding copyright headers and two REMOVE_ME comment headers which should have gone during the rebase
|
Apologies - the email notification of that review may have included a whole load of outdated comments from days ago which GitHub hid from the editor and then magically restored when I finished it! |
dra27
left a comment
There was a problem hiding this comment.
Precheck #221 (the layout alterations haven't been through precheck) and assuming green/blue all good to merge.
|
This is not to be merged yet, I need to investigate a failure on ppc64le. |
Refactoring to deal with make -j failing on the directory construction.
Co-Authored-By: mshinwell <mshinwell@gmail.com>
Co-Authored-By: mshinwell <mshinwell@gmail.com>
37762d8 to
c462b40
Compare
|
I've rebased this and sent it to precheck (#225). I hope it's going to work this time. Assuming it does and the CI on this page is green, this can be merged. |
|
There was one failure on precheck, but it appears to have been a github-related failure that also occurred for another pull request being tested. The relevant platform passed precheck for this GPR on the previous round, so I'm certain enough that this is ok to merge now. |
|
I just tracked a dependency problem in our Makefiles that comes from this PR. It introduces Then some tools, in particular To test this, build |
|
I think that the simplest fix for this issue would be to turn thse Another approarch would be to split compilerlibs-archive-variables in _CMO and _CMI variants. If we had a concept of "cmi archive", we could only expose the |
This pull request improves the packing mechanism used in the Dynlink makefile so that we can reference compilerlibs from both the bytecode and native dynlink implementations. (At present, it can only be referenced from the bytecode one.) In turn, this means that we can improve the types that are used to describe the format of
.cmxsfiles, as will feature in another patch I am preparing. This is all on the path to merging the gdb work.This patch means that the dynlink code is no longer "special" as regards what can be referenced, which makes it easier to modify and reduces code duplication.
If you are interested in the details, which are quite grim, please see the various comments that are added in this patch to
otherlibs/dynlink/Makefile. These explain the problems with the existing packing mechanism and various nuances that have to be dealt with.Splitting the
.cmxsformat from the.cmxformat descriptions inasmcomp/was done both because I was going to do it in another patch; and because it substantially decreases the amount of modules that have to form part of the dynlink-specific pack.