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
Store local configuration in an external file, not in the compilers #6200
Comments
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc. |
I think this is still relevant. |
One side-effect of storing the configuration in config.ml is that the approximations in config.cmx contain it, so changing it changes the compiler-libs ABI and therefore needs recompilation of all reverse dependencies, which is not always wanted (see #9800 for an example). The proposal here would "fix" that (compiling config.ml with -opaque and hiding config.cmx would also I guess). |
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc. |
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc. |
Original bug ID: 6200
Reporter: @alainfrisch
Status: acknowledged (set by @damiendoligez on 2014-06-04T20:09:49Z)
Resolution: open
Priority: normal
Severity: feature
Target version: later
Category: configure and build/install
Monitored by: @gasche @hcarty
Bug description
Some local configuration is stored directly in utils/config.ml (obtained from utils/config.mlp mostly by substituting variables from config/Makefile).
This is another point preventing the bootstrapping of ocamlc to be idempotent on various machines/working copies (see also #6199). Moreover, it makes it difficult to tweak those variables (for instance to use a different C compiler, or to change the standard_runtime path in order to relocate the toolchain in the filesystem).
Wouldn't it be better to keep all these variables in an external text file, parsed by ocamlc/ocamlopt? This file could be located (by default) in the same directory as the compiler itself (or at a fixed relative path from it), and an environment variable could be used to specify a different file. The overhead of reading this external file is probably small compared to the I/O operations required by the compiler (in particular, loading many .cmi files). (One problem could be that other tools linking against compilerlib would then also depend on this external file.)
The text was updated successfully, but these errors were encountered: