浏览代码

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

see #7550
Simon Krajewski 7 年之前
父节点
当前提交
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 () ->