--debug is a third flag beside --dev and the optimisation level because it answers a third question. --dev is "can I redefine this while it runs"; --debug is "can I stop it and read it". Either is useful without the other, and a REPL session that is not being stepped should not pay for DWARF. Not implied by -O0 in particular, for a reason already written down in this file: the acceptance table runs the same programs at -O0 and -O2 to compare the emitted IR against what mem2reg makes of it. If -O0 pulled in debug info, every one of those comparisons would be against a different module. It does imply -O0 downwards, and sets it. The whole mechanism is an llvm.dbg.declare hanging off an alloca, and mem2reg deletes the alloca. Refused for wasm32 by name. The member offsets in the DWARF are computed for the host — ptr is 8 bytes — and wasm32's pointer is 4, so a slice's len sits at byte 8 there and byte 16 here. Emitting the host numbers would hand a debugger a confident wrong answer for every slice and every struct holding one, which is the exact failure this project keeps meeting at the FFI boundary. Silence would be worse than the refusal. -g reaches the C compiles too, and joins compile_c's digest key with it, or an object built without it would be served to a build that asked for it.
Description
Languages
OCaml
67.2%
Emacs Lisp
15.2%
C
10.4%
HTML
2.9%
Standard ML
2.8%
Other
1.5%