Closed antoyo closed 5 months ago
@antoyo please i will love to work on this issue and submit the PR to link as we discuss earlier in the mail
Good. Feel free to ask any questions if you need help.
@antoyo if i understand the config.rs file correctly RUSTFLAGS is what collect all the the environment variables and join them into string, thus removing the "-Cdebuginfo=2" from vector, mean the debug option will not get emitted
The standard library shipped with rustup is built with -Cdebuginfo=1
.
@bjorn3 i see, does this mean, -Cdebuginfo=1
will not emit debug information, while -Cdebuginfo=2
emit debug information
-Cdebuginfo=1
only emits the line tables part of the debug info (+ some other things), while -Cdebuginfo=2
emits all debug info. Now that I'm taking a closer look, I see that debuginfo is already enabled for the standard library outside of the -Cdebuginfo=2
your PR removes, so I think your PR is fine. (It is enabled for the standard library at https://github.com/rust-lang/rustc_codegen_gcc/blob/7ff5d39980b7ac84d702ff0e82df02163dfe9265/build_sysroot/Cargo.toml#L21)
This will emit all debug info, though, so we might as well change this to:
debug = "limited"
@mubarak23: Could you please add this change to your PR?
@antoyo i will add it to the PR and push
PR updated with changes requested @antoyo
Thanks a lot! I'll merge it when the CI is done.
Currently, debug info is always emmited.
context.set_debug_info(true);
should not always be called insrc/base.rs
.-Cdebuginfo=2
should probably not be always added inbuild_system/src/config.rs
.