-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rustc doesn't seem to acknowledge llvm-args's dwarf-version flag #101892
Comments
I believe setting the dwarf version with However there is a nightly flag |
Thanks @Urgau,
Is this an incorrect behavior for the flag or is it permissive towards the code-gen in this way? |
This is probably because the units who don't have version 3 comes from the pre-compiled standard libraries units. Those are not affected by your
I don't think it's a incorrect behavior because it's doing what you told him to do. Which is to compile your crate and it's dependencies (if they are not already compiled, like for core, alloc, std, ...) with the flags your provided. So if one if these dependency has another dwarf version it will simply be merged with the other one. If you compile the standard libraries yourself with
NOTE: I have not tested this, I may be wrong. |
I'm trying to get DWARF version 3 in my binary with
rustc main.rs -o ./out -g -Cllvm-args="--dwarf-version=3"
but it doesn't seem to work:For context: the reason I want to do this is because I want to use the Coz profiler with Rust and it seemingly doesn't like DWARF version 5 which Rust generates (its dying words are:
unknown compilation unit version 5
), so I want to compile with version 3 because that's what the Coz README specifies. See also Coz issues #193, #107.A few notes:
-C link-arg=-gdwarf-3
as mentioned in the first comment to the first issue above which didn't help.dwarf-version
flag fromrustc -Cllvm-args="--help"
.rustc
help message informing of the option, rather than the code-generation.I'm on x86_64 Arch Linux and rustc 1.65.0-nightly (1d37ed6 2022-09-09).
The text was updated successfully, but these errors were encountered: