There exist the extra flag `-Zdwarf-version` that is planed to be [stabilized](https://github.com/rust-lang/rust/pull/136926) soon, that set the dwarf version used. From memory esp-idf only uses dwarf v4 version. If we don't provide the specific version on the rust site i am not sure it will use the right version.