diff options
author | Mark Shinwell <mshinwell@gmail.com> | 2019-03-13 10:46:37 +0000 |
---|---|---|
committer | Xavier Leroy <xavierleroy@users.noreply.github.com> | 2019-03-13 11:46:37 +0100 |
commit | 36c163248d77e7df0803c1e9893ad01948846081 (patch) | |
tree | bf7776ff60eadb76b9ef6b1f6360d7c24beb48e6 /driver/main.ml | |
parent | f5ab75bd63164d6354620878d6f860b0d93697dd (diff) | |
download | ocaml-36c163248d77e7df0803c1e9893ad01948846081.tar.gz |
Remove support for compiler plugins (#2276)
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
Diffstat (limited to 'driver/main.ml')
-rw-r--r-- | driver/main.ml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/driver/main.ml b/driver/main.ml index 005a9b91b0..ae98c63f2c 100644 --- a/driver/main.ml +++ b/driver/main.ml @@ -95,7 +95,7 @@ module Options = Main_args.Make_bytecomp_options (struct let _pack = set make_package let _pp s = preprocessor := Some s let _ppx s = first_ppx := s :: !first_ppx - let _plugin p = Compplugin.load p + let _plugin _p = plugin := true let _principal = set principal let _no_principal = unset principal let _rectypes = set recursive_types @@ -155,6 +155,8 @@ let main () = readenv ppf Before_args; Clflags.parse_arguments anonymous usage; Compmisc.read_clflags_from_env (); + if !Clflags.plugin then + fatal "-plugin is only supported up to OCaml 4.08.0"; begin try Compenv.process_deferred_actions (ppf, |