@@ -205,14 +205,6 @@ let eval (s : string) ~suffix =
205
205
206
206
(* let (//) = Filename.concat *)
207
207
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
-
216
208
let print_standard_library () =
217
209
let standard_library = Config. standard_library in
218
210
print_string standard_library;
@@ -297,11 +289,7 @@ let buckle_script_flags : (string * Bsc_args.spec * string) array =
297
289
( " -bs-syntax-only" ,
298
290
set Js_config. syntax_only,
299
291
" *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" );
305
293
( " -bs-package-name" ,
306
294
string_call Js_packages_state. set_package_name,
307
295
" *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 =
323
311
( " -unboxed-types" ,
324
312
set Clflags. unboxed_types,
325
313
" *internal* Unannotated unboxable types will be unboxed" );
326
- ( " -bs-D" ,
327
- string_call define_variable,
328
- " Define conditional variable e.g, -D DEBUG=true" );
329
314
( " -bs-unsafe-empty-array" ,
330
315
set Config. unsafe_empty_array,
331
316
" *internal* Allow [||] to be polymorphic" );
@@ -341,9 +326,6 @@ let buckle_script_flags : (string * Bsc_args.spec * string) array =
341
326
The current heuristic for 'auto'\n \
342
327
checks that the TERM environment variable exists and is\n \
343
328
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" );
347
329
( " -e" ,
348
330
string_call (fun s -> eval s ~suffix: Literals. suffix_res),
349
331
" (experimental) set the string to be evaluated in ReScript syntax" );
0 commit comments