@@ -206,8 +206,8 @@ let buckle_script_flags : (string * Arg.spec * string) list =
206206 " Define conditional variable e.g, -D DEBUG=true"
207207 )
208208 ::
209- (" -bs-quiet " , Arg. Unit ( fun _ -> () ) ,
210- " (Deprecated using -w a) Quiet mode (no warnings printed) "
209+ (" -bs-unsafe-empty-array " , Arg. Clear Js_config. mono_empty_array ,
210+ " Allow [||] to be polymorphic "
211211 )
212212 ::
213213 (" -nostdlib" , Arg. Set Js_config. no_stdlib,
@@ -357,14 +357,15 @@ let buckle_script_flags : (string * Arg.spec * string) list =
357357let file_level_flags_handler (e : Parsetree.expression option ) =
358358 match e with
359359 | None -> ()
360- | Some {pexp_desc = Pexp_array args } ->
360+ | Some {pexp_desc = Pexp_array args ; pexp_loc } ->
361361 let args = Array. of_list
362362 (Sys. executable_name :: Ext_list. map args (fun e ->
363363 match e.pexp_desc with
364364 | Pexp_constant (Pconst_string(name ,_ )) -> name
365365 | _ -> Location. raise_errorf ~loc: e.pexp_loc " string literal expected" )) in
366- Arg. parse_argv ~current: (ref 0 )
366+ ( try Arg. parse_argv ~current: (ref 0 )
367367 args buckle_script_flags ignore usage
368+ with _ -> Location. prerr_warning pexp_loc (Preprocessor " invalid flags for bsc" ))
368369 (* ;Format.fprintf Format.err_formatter "%a %b@."
369370 Ext_obj.pp_any args !Js_config.cross_module_inline; *)
370371 | Some e ->
0 commit comments