I want to log information about the compilation settings used for my app. Specifically, I want to determine whether LTO was enabled, whether panic=unwind
or panic=abort
was used, and possibly other relevant flags. Is there a way to embed this information into the binary?
Example:
fn log_basic_data() {
info!(
"LTO used: {}, panic mode: {}",
build_params.get("lto"),
build_params.get("panic")
);
}