Просмотр исходного кода

[cli] don't make -D no-copt imply --no-opt

see #7550
Simon Krajewski 7 лет назад
Родитель
Сommit
63d5e7ef51
1 измененных файлов с 1 добавлено и 4 удалено
  1. 1 4
      src/compiler/main.ml

+ 1 - 4
src/compiler/main.ml

@@ -564,10 +564,7 @@ try
 			Common.raw_define com l;
 		),"<name[:ver]>","use a haxelib library");
 		("Compilation",["-D";"--define"],[],Arg.String (fun var ->
-			begin match var with
-				| "no_copt" | "no-copt" -> com.foptimize <- false;
-				| _ -> 	if List.mem var reserved_flags then raise (Arg.Bad (var ^ " is a reserved compiler flag and cannot be defined from command line"));
-			end;
+			if List.mem var reserved_flags then raise (Arg.Bad (var ^ " is a reserved compiler flag and cannot be defined from command line"));
 			Common.raw_define com var;
 		),"<var[=value]>","define a conditional compilation flag");
 		("Debug",["-v";"--verbose"],[],Arg.Unit (fun () ->