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
Trying to build the manual (make -C manual/manual etex-files) when
your current opan switch is stale (for example, 4.05.0 when working on
the current 4.07.0+dev trunk) results in the following error:
make[1]: Entering directory '/home/gasche/Prog/ocaml/github-trunk/manual/manual/tutorials'
Fatal error: cannot load shared library dllunix
Reason: /home/gasche/.opam/4.05.0/lib/ocaml/stublibs/dllunix.so: undefined symbol: caml_strdup
Failure when generating coreexamples.tex
Fatal error: cannot load shared library dllunix
Reason: /home/gasche/.opam/4.05.0/lib/ocaml/stublibs/dllunix.so: undefined symbol: caml_strdup
Failure when generating lablexamples.tex
Fatal error: cannot load shared library dllunix
Reason: /home/gasche/.opam/4.05.0/lib/ocaml/stublibs/dllunix.so: undefined symbol: caml_strdup
Failure when generating objectexamples.tex
Fatal error: cannot load shared library dllunix
Reason: /home/gasche/.opam/4.05.0/lib/ocaml/stublibs/dllunix.so: undefined symbol: caml_strdup
Failure when generating moduleexamples.tex
Fatal error: cannot load shared library dllunix
Reason: /home/gasche/.opam/4.05.0/lib/ocaml/stublibs/dllunix.so: undefined symbol: caml_strdup
Failure when generating advexamples.tex
Fatal error: cannot load shared library dllunix
Reason: /home/gasche/.opam/4.05.0/lib/ocaml/stublibs/dllunix.so: undefined symbol: caml_strdup
Failure when generating polymorphism.tex
make[1]: Leaving directory '/home/gasche/Prog/ocaml/github-trunk/manual/manual/tutorials'
This PR fixes the issue by using Makefile.tools' SET_LD_PATH variable
to set a LD_PATH containing the required build directory's otherlibs/
libraries, instead of looking in an installed path.
(no change entry needed)
This commit creates a file unified-options.etex which regroups at
source level the description of the compilers and toplevel options.
Difference of options between native/bytecode compilers and toplevel
are handled via conditional tex macros.
We introduce a `pregen-etex` Makefile rule that only build the .etex
files of the manual (whose OCaml examples may be tested and expected
to produce certain outputs), without also building the
standard-library documentation. This is faster than the previous
`pregen` rule as ocamldoc on the standard library was the
bottleneck. On my machine, `pregen-etex` completes in 1.5s-2s, while
`pregen` completes in 6s-7s.
This commit modifies the build process of the manual to make it fails in
case of problems during the generation of the tex files from the etex
sources files.