Browse Source

fixed -no-opt

Nicolas Cannasse 15 years ago
parent
commit
42c299ba5a
2 changed files with 5 additions and 1 deletions
  1. 1 0
      doc/CHANGES.txt
  2. 4 1
      main.ml

+ 1 - 0
doc/CHANGES.txt

@@ -15,6 +15,7 @@
 	std : added haxe.SHA1
 	compiler : added TCast, allow cast optimization on flash9/cpp
 	as3 : fixed Std.__init__ generating 'null'
+	compiler : fixed -no-opt
 
 2010-01-09: 2.05
 	js : added js.Scroll

+ 4 - 1
main.ml

@@ -402,7 +402,10 @@ try
 		("--no-output", Arg.Unit (fun() -> no_output := true),": compiles but does not generate any file");
 		("--times", Arg.Unit (fun() -> measure_times := true),": measure compilation times");
 		("--no-inline", define "no_inline", ": disable inlining");
-		("--no-opt", define "no_opt", ": disable code optimizations");
+		("--no-opt", Arg.Unit (fun() -> 
+			com.foptimize <- false;
+			Common.define com "no_opt";
+		), ": disable code optimizations");
 		("--php-front",Arg.String (fun f ->
 			if com.php_front <> None then raise (Arg.Bad "Multiple --php-front");
 			com.php_front <- Some f;