Skip to content

Commit 44f4fa6

Browse files
authored
Remove some #ifdef (#6228)
1 parent 60c48ef commit 44f4fa6

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

jscomp/bsc/rescript_compiler_main.ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,8 @@ let file_level_flags_handler (e : Parsetree.expression option) =
466466

467467
let _ : unit =
468468
Bs_conditional_initial.setup_env ();
469+
Clflags.color := Some Always;
470+
469471
let flags = "flags" in
470472
Ast_config.add_structure
471473
flags file_level_flags_handler;

jscomp/core/bs_conditional_initial.ml

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@ let setup_env () =
3434
Clflags.dump_location := false;
3535
Config.syntax_kind := `rescript;
3636
Parmatch.print_res_pat := Pattern_printer.print_pattern;
37-
#ifdef BROWSER
38-
#else
39-
Clflags.color := Some Always;
40-
#endif
4137
(* default true
4238
otherwise [bsc -I sc src/hello.ml ] will include current directory to search path
4339
*)
@@ -53,21 +49,11 @@ let setup_env () =
5349
Lambda.blk_record := Record_attributes_check.blk_record;
5450
Matching.names_from_construct_pattern :=
5551
Matching_polyfill.names_from_construct_pattern;
56-
#ifndef RELEASE
57-
(let root_dir =
58-
Filename.dirname
59-
(Filename.dirname Sys.executable_name) in
60-
let (//) = Filename.concat in
61-
Clflags.include_dirs :=
62-
(root_dir//"jscomp"//"others") ::
63-
(root_dir//"jscomp"//"stdlib-406") ::
64-
!Clflags.include_dirs);
65-
#endif
66-
Rescript_cpp.replace_directive_bool "BS" true;
52+
53+
Rescript_cpp.replace_directive_bool "BS" true;
6754
Rescript_cpp.replace_directive_bool "JS" true;
6855
Rescript_cpp.replace_directive_string "BS_VERSION" Bs_version.version
6956
(*; Switch.cut := 100*) (* tweakable but not very useful *)
7057

71-
7258
let () =
7359
at_exit (fun _ -> Format.pp_print_flush Format.err_formatter ())

0 commit comments

Comments
 (0)