You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is an option on the flx program to allow emitting debug symbols.
--debug : put debug symbols in generated binaries
This doesn't appear to do anything at the moment. The option is parsed and managed by the frontend, but it doesn't appear to be passed all the way down to the compiler when building flx programs.
This should be added so we can do proper debugging with MSVC, gdb, or lldb.
The text was updated successfully, but these errors were encountered:
It is passed, at least sometimes. See email. For clang and gcc, -g is always on anyhow. However --debug does more, it sets optimisation to -O1. It also should impact Felix compiler, reducing inlining and so making more smaller C functions/classes. Actually --debug should just do what flx --help says: emit debug symbols, nothing more. But flx --usage=debug should do the lot.
For MSVC the toolchain says:
method fun debug_flags () => list[string] "-g";
but i just checked and that method is never used in the toolchain :-)
I think to do this correctly, this needs to include an "emit_debug_symbols" field:
and then all the toolchain methods that need to would check that value, and if set, put the right switch in the shell command. But this is a BIG job, because it impacts every toolchain, will break all builds including the bootstrap, and also requires that "flx" pass the flag. Also there are other objects that invoke compilers via toolchains that would need fixing, for example, the RTL builder tool flx_build_rtl.flx
Also note, its hard to test. There are clang/gcc chains for linux and macos, and also iPhone as well as msvc. Most developers can only test one or two of these.
(Creating this as as an issue for tracking.)
There is an option on the flx program to allow emitting debug symbols.
--debug : put debug symbols in generated binaries
This doesn't appear to do anything at the moment. The option is parsed and managed by the frontend, but it doesn't appear to be passed all the way down to the compiler when building flx programs.
This should be added so we can do proper debugging with MSVC, gdb, or lldb.
The text was updated successfully, but these errors were encountered: