@@ -205,14 +205,6 @@ let eval (s : string) ~suffix =
205205
206206(* let (//) = Filename.concat *)
207207
208- module Pp = Rescript_cpp
209- let define_variable s =
210- match Ext_string. split ~keep_empty: true s '=' with
211- | [key; v] ->
212- if not (Pp. define_key_value key v) then
213- Bsc_args. bad_arg (" illegal definition: " ^ s)
214- | _ -> Bsc_args. bad_arg (" illegal definition: " ^ s)
215-
216208let print_standard_library () =
217209 let standard_library = Config. standard_library in
218210 print_string standard_library;
@@ -297,11 +289,7 @@ let buckle_script_flags : (string * Bsc_args.spec * string) array =
297289 ( " -bs-syntax-only" ,
298290 set Js_config. syntax_only,
299291 " *internal* Only check syntax" );
300- ( " -bs-g" ,
301- unit_call (fun _ ->
302- Js_config. debug := true ;
303- Pp. replace_directive_bool " DEBUG" true ),
304- " Debug mode" );
292+ (" -bs-g" , set Js_config. debug, " Debug mode" );
305293 ( " -bs-package-name" ,
306294 string_call Js_packages_state. set_package_name,
307295 " *internal* Set package name, useful when you want to produce npm \
@@ -323,9 +311,6 @@ let buckle_script_flags : (string * Bsc_args.spec * string) array =
323311 ( " -unboxed-types" ,
324312 set Clflags. unboxed_types,
325313 " *internal* Unannotated unboxable types will be unboxed" );
326- ( " -bs-D" ,
327- string_call define_variable,
328- " Define conditional variable e.g, -D DEBUG=true" );
329314 ( " -bs-unsafe-empty-array" ,
330315 set Config. unsafe_empty_array,
331316 " *internal* Allow [||] to be polymorphic" );
@@ -341,9 +326,6 @@ let buckle_script_flags : (string * Bsc_args.spec * string) array =
341326 The current heuristic for 'auto'\n \
342327 checks that the TERM environment variable exists and is\n \
343328 not empty or \" dumb\" , and that isatty(stderr) holds." );
344- ( " -bs-list-conditionals" ,
345- unit_call (fun () -> Pp. list_variables Format. err_formatter),
346- " *internal* List existing conditional variables" );
347329 ( " -e" ,
348330 string_call (fun s -> eval s ~suffix: Literals. suffix_res),
349331 " (experimental) set the string to be evaluated in ReScript syntax" );
0 commit comments