summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changes4
-rw-r--r--driver/main_args.ml9
-rw-r--r--driver/main_args.mli1
-rw-r--r--man/ocamlc.13
-rw-r--r--man/ocamlopt.13
-rw-r--r--manual/src/cmds/unified-options.etex5
6 files changed, 24 insertions, 1 deletions
diff --git a/Changes b/Changes
index 0db1fd4a1b..17fb599f73 100644
--- a/Changes
+++ b/Changes
@@ -155,6 +155,10 @@ Working version
- #11653: Add the -no-absname option to ocamlc, ocamlopt and ocamldep.
(Abiola Abdulsalam, review by Sébastien Hinderer and Florian Angeletti)
+- #11696: Add the -no-g option to ocamlc and ocamlopt.
+ (Abiola Abdulsalam, review by Sébastien Hinderer, Nicolás Ojeda Bär and
+ Florian Angeletti)
+
### Internal/compiler-libs changes:
- #11027: Separate typing counter-examples from type_pat into retype_pat;
type_pat is no longer in CPS.
diff --git a/driver/main_args.ml b/driver/main_args.ml
index e4db050585..c3f74735b9 100644
--- a/driver/main_args.ml
+++ b/driver/main_args.ml
@@ -138,6 +138,10 @@ let mk_g_byt f =
let mk_g_opt f =
"-g", Arg.Unit f, " Record debugging information for exception backtrace"
+let mk_no_g f =
+ "-no-g", Arg.Unit f,
+ " Do not record debugging information (default)"
+
let mk_i f =
"-i", Arg.Unit f, " Print inferred interface"
@@ -816,6 +820,7 @@ module type Compiler_options = sig
val _config_var : string -> unit
val _for_pack : string -> unit
val _g : unit -> unit
+ val _no_g : unit -> unit
val _stop_after : string -> unit
val _i : unit -> unit
val _impl : string -> unit
@@ -847,7 +852,6 @@ module type Compiler_options = sig
val _where : unit -> unit
val _color : string -> unit
val _error_style : string -> unit
-
val _match_context_rows : int -> unit
val _dtimings : unit -> unit
val _dprofile : unit -> unit
@@ -1017,6 +1021,7 @@ struct
mk_dtypes F._annot;
mk_for_pack_byt F._for_pack;
mk_g_byt F._g;
+ mk_no_g F._no_g;
mk_stop_after ~native:false F._stop_after;
mk_i F._i;
mk_I F._I;
@@ -1206,6 +1211,7 @@ struct
mk_dtypes F._annot;
mk_for_pack_opt F._for_pack;
mk_g_opt F._g;
+ mk_no_g F._no_g;
mk_function_sections F._function_sections;
mk_stop_after ~native:true F._stop_after;
mk_save_ir_after ~native:true F._save_ir_after;
@@ -1725,6 +1731,7 @@ module Default = struct
let _dump_dir s = dump_dir := Some s
let _for_pack s = for_package := (Some s)
let _g = set debug
+ let _no_g = clear debug
let _i = set print_types
let _impl = Compenv.impl
let _intf = Compenv.intf
diff --git a/driver/main_args.mli b/driver/main_args.mli
index 2e5f98dd62..e7427d2838 100644
--- a/driver/main_args.mli
+++ b/driver/main_args.mli
@@ -85,6 +85,7 @@ module type Compiler_options = sig
val _config_var : string -> unit
val _for_pack : string -> unit
val _g : unit -> unit
+ val _no_g : unit -> unit
val _stop_after : string -> unit
val _i : unit -> unit
val _impl : string -> unit
diff --git a/man/ocamlc.1 b/man/ocamlc.1
index bd3b0136c3..1e5c77e9d6 100644
--- a/man/ocamlc.1
+++ b/man/ocamlc.1
@@ -391,6 +391,9 @@ required in order to be able to debug the program with
and to produce stack backtraces when
the program terminates on an uncaught exception.
.TP
+.B \-no-g
+Do not record debugging information (default).
+.TP
.B \-i
Cause the compiler to print all defined names (with their inferred
types or their definitions) when compiling an implementation (.ml
diff --git a/man/ocamlopt.1 b/man/ocamlopt.1
index f93333470c..9f41d15c1e 100644
--- a/man/ocamlopt.1
+++ b/man/ocamlopt.1
@@ -294,6 +294,9 @@ required in order to produce stack backtraces when
the program terminates on an uncaught exception (see
.BR ocamlrun (1)).
.TP
+.B \-no-g
+Do not record debugging information (default).
+.TP
.B \-i
Cause the compiler to print all defined names (with their inferred
types or their definitions) when compiling an implementation (.ml
diff --git a/manual/src/cmds/unified-options.etex b/manual/src/cmds/unified-options.etex
index 7351c8dd0c..85a5ad5430 100644
--- a/manual/src/cmds/unified-options.etex
+++ b/manual/src/cmds/unified-options.etex
@@ -260,6 +260,11 @@ section~\ref{s:ocamlrun-options}).
}%notop
\notop{%
+\item["-no-g"]
+Do not record debugging information (default).
+}%notop
+
+\notop{%
\item["-i"]
Cause the compiler to print all defined names (with their inferred
types or their definitions) when compiling an implementation (".ml"