rustc: Add the ability to not run dsymutil#47784
Conversation
|
r? @estebank (rust_highfive has picked a reviewer for you, use r? to override) |
src/librustc_trans/back/link.rs
Outdated
There was a problem hiding this comment.
I'm sort of hoping that we can use a function like this to enable split dwarf on Linux over time as well!
|
Would |
|
A good question and one I forgot to verify! Looks like the answer is "no" though which is a bummer! @JohnColanduoni, out of curiosity, do you know if there's a way to get libbacktrace to relatively easily do the same logic that lldb is doing? (looking for object files in addition to the dSYM) |
|
@alexchrichton Not easily, it would probably make more sense to add this feature as part of a pure-Rust rewrite of libbacktrace. I didn’t know lldb had this functionality on Mac, I’ve had issues where lldb refuses to give me line numbers if Spotlight hasn’t yet indexed tbe dSYM. |
4bbc9c6 to
83c4363
Compare
|
Ah ok, thanks for the info @JohnColanduoni! In light of that I've now switched this to a |
src/librustc_trans/back/link.rs
Outdated
There was a problem hiding this comment.
I think you've changed the wrong variable...
[00:18:57] error[E0609]: no field `linker` on type `rustc::session::config::DebuggingOptions`
[00:18:57] --> librustc_trans/back/link.rs:80:56
[00:18:57] |
[00:18:57] 80 | if let Some(ref linker) = sess.opts.debugging_opts.linker {
[00:18:57] | ^^^^^^ unknown field
[00:18:57] |
[00:18:57] = note: available fields are: `codegen_backend`, `verbose`, `span_free_formats`, `identify_regions`, `emit_end_regions` ... and 89 others
src/librustc_trans/back/link.rs
Outdated
There was a problem hiding this comment.
... the cg ↦ debugging_opts should be applied here 😄
[00:18:57] error[E0609]: no field `run_dsymutil` on type `rustc::session::config::CodegenOptions`
[00:18:57] --> librustc_trans/back/link.rs:224:28
[00:18:57] |
[00:18:57] 224 | match sess.opts.cg.run_dsymutil {
[00:18:57] | ^^^^^^^^^^^^ unknown field
[00:18:57] |
[00:18:57] = note: available fields are: `ar`, `linker`, `link_arg`, `link_args`, `link_dead_code` ... and 28 others
83c4363 to
526feb6
Compare
|
@kennytm @alexcrichton Something seems odd here; GitHub isn't displaying the commits in which kennytm's review comments were resolved, if indeed they were resolved. What is the status on this? (Also, does @michaelwoerister still need to review, since kennytm already did?) |
|
Ah I think we're just waiting on review! @michaelwoerister I believe is on leave right now, but this isn't a particularly pressing PR so I'd be fine waiting. |
|
☔ The latest upstream changes (presumably #48053) made this pull request unmergeable. Please resolve the merge conflicts. |
526feb6 to
0d89143
Compare
michaelwoerister
left a comment
There was a problem hiding this comment.
Looks good to me! Thanks, @alexcrichton!
src/librustc_trans/back/link.rs
Outdated
There was a problem hiding this comment.
Not that it makes much of a difference but this if could be pulled out of the loop, I think.
0d89143 to
d83ddb9
Compare
This commit adds the ability for rustc to not run `dsymutil` by default on OSX. A new codegen option, `-Z run-dsymutil=no`, was added to specify that `dsymutil` should *not* run and instead the compiler should unconditionally keep the object files around in a compilation if necessary for debug information. cc rust-lang#47240
d83ddb9 to
0f16eee
Compare
|
@bors: r=michaelwoerister |
|
📌 Commit 0f16eee has been approved by |
|
@bors: rollup |
…elwoerister rustc: Add the ability to not run dsymutil This commit adds the ability for rustc to not run `dsymutil` by default on OSX. A new codegen option, `-Z run-dsymutil=no`, was added to specify that `dsymutil` should *not* run and instead the compiler should unconditionally keep the object files around in a compilation if necessary for debug information. cc rust-lang#47240
…elwoerister rustc: Add the ability to not run dsymutil This commit adds the ability for rustc to not run `dsymutil` by default on OSX. A new codegen option, `-Z run-dsymutil=no`, was added to specify that `dsymutil` should *not* run and instead the compiler should unconditionally keep the object files around in a compilation if necessary for debug information. cc rust-lang#47240
This commit adds the ability for rustc to not run
dsymutilby defaulton OSX. A new codegen option,
-Z run-dsymutil=no, was added to specifythat
dsymutilshould not run and instead the compiler shouldunconditionally keep the object files around in a compilation if
necessary for debug information.
cc #47240