diff: handle_options.m: default to `-O2'

Fergus Henderson fjh at hydra.cs.mu.oz.au
Tue Sep 2 17:02:51 AEST 1997


compiler/handle_options.m:
	Set the default optimization level to `-O2'.
	The optimization level is also set in the `mc' script,
	but setting it here avoids an often-confusing difference
	between invoking mercury_compile via mc and invoking it directly.

Index: handle_options.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/compiler/handle_options.m,v
retrieving revision 1.28
diff -u -u -r1.28 handle_options.m
--- handle_options.m	1997/08/23 13:10:39	1.28
+++ handle_options.m	1997/09/01 15:04:40
@@ -42,7 +42,9 @@
 	% dump_arguments(Args0),
 	{ OptionOps = option_ops(short_option, long_option,
 		option_defaults, special_handler) },
-	{ getopt__process_options(OptionOps, Args0, Args, Result) },
+	% default to optimization level `-O2'
+	{ Args1 = ["-O2" | Args0] },
+	{ getopt__process_options(OptionOps, Args1, Args, Result) },
 	% io__write_string("final arguments\n"),
 	% dump_arguments(Args),
 	postprocess_options(Result, MaybeError),
-- 
Fergus Henderson <fjh at cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3         |     -- the last words of T. S. Garp.



More information about the developers mailing list