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

[3/3] Restructure LIBDIR: Move the Profiling module to a sub-directory #11200

Merged
merged 1 commit into from
May 9, 2022

Conversation

dra27
Copy link
Member

@dra27 dra27 commented Apr 16, 2022

This is the third PR in a series starting with #11198 which seek to separate the components in OCaml's $LIBDIR.

The profiling versions of the compiler (ocamlcp and ocamloptp) require a runtime module Profiling which is installed in $LIBDIR and therefore at present visible all the time. This PR moves profiling.* from $LIBDIR to $LIBDIR/profiling and updates the two tools to add -I +profiling to the command line. It remains the case that the user must avoid using a module called Profiling if they wish to use ocamlprof, but the already quite slim chance of inadvertently referring to Profiling without linking with it is now reduced to zero.

Note that this PR actually hardens the use of Profiling within ocamlprof, as using -I +profiling as the first -I directory ensures that Profiling always refers to ocamlprof's module.

@shindere
Copy link
Contributor

Thanks for that bit, too!

Have you considered factorizing the the profiling-lelated flags which are
at the moment hard-coded in both ocamlcp.ml and ocamloptp.ml?

ocamlcp and ocamloptp specify -I +profiling
@dra27
Copy link
Member Author

dra27 commented May 4, 2022

Thanks, @shindere! I hadn't considered unifying them (certainly not as part of this), although if you like the look of dra27@3056ab0 then I can open a PR for it!

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.

2 participants