Skip to content

Commit db6c1e5

Browse files
authored
flip the default for -g (#1546)
When the -g flag was introduced, it defaulted to true, so that DWARF experiments needn't set it. Now that tests can set //MOC-FLAG, that is not necessary any more. One exception is the hard setting of true when in linking mode, but this might be reconsidered in the future.
1 parent 75a854b commit db6c1e5

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/exes/mo_ld.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ let () =
5959
if !lib_file = "" then usage_err "no library file specified";
6060
if !out_file = "" then usage_err "no output file specified";
6161

62+
Mo_config.Flags.debug_info := true; (* linking mode: preserve debug info *)
6263

6364
let base = decode_file !base_file in
6465
let lib = decode_file !lib_file in

src/mo_config/flags.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ let print_warnings = ref true
1010
let print_depth = ref 2
1111
let release_mode = ref false
1212
let compile_mode = ref ICMode
13-
let debug_info = ref true
13+
let debug_info = ref false
1414
let multi_value = ref false
1515
let await_lowering = ref true
1616
let async_lowering = ref true

src/wasm-exts/customModuleEncode.ml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -650,8 +650,7 @@ let encode (em : extended_module) =
650650
section 2 (assoc_list (assoc_list string)) ns.locals_names (ns.locals_names <> []) in
651651

652652
custom_section "name" name_section_body ns
653-
(!Mo_config.Flags.debug_info &&
654-
(ns.module_ <> None || ns.function_names <> [] || ns.locals_names <> []))
653+
(ns.module_ <> None || ns.function_names <> [] || ns.locals_names <> [])
655654

656655
let uleb128 n = vu64 (Int64.of_int n)
657656
let sleb128 n = vs64 (Int64.of_int n)

0 commit comments

Comments
 (0)