-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Add rustc SHA to released DWARF debuginfo #53829
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
cc @luser, this will likely affect Gecko if we decide to merge! cc @yurydelendik, I think this should do what you were requesting on IRC @bors: try I'd like to poke around these artifacts before landing to double check it's all as expected. |
⌛ Trying commit 8bdc6f79ac792303051bb23a053f7c45f4616267 with merge 5eaeeb3b3e3e2540410740229dcfc8b883091b10... |
Oh, excellent! We currently just fetch the sha from |
One other thing to consider here would be trying to apply this to vendored C sources that you compile as well. |
☀️ Test successful - status-travis |
8bdc6f7
to
4b790ad
Compare
Sure enough C code was still mentioning @bors: try |
⌛ Trying commit 4b790ad1f8e78f61e2847058071b42a264e712f3 with merge 37655c8000de5017c6d28454888e55af3d6e5040... |
4b790ad
to
cc4c606
Compare
@bors: try |
Add rustc SHA to released DWARF debuginfo This commit updates the debuginfo that is encoded in all of our released artifacts by default. Currently it has paths like `/checkout/src/...` but these are a little inconsistent and have changed over time. This commit instead attempts to actually define the file paths in our debuginfo to be consistent between releases. All debuginfo paths are now intended to be `/rustc/$sha` where `$sha` is the git sha of the released compiler. Sub-paths are all paths into the git repo at that `$sha`.
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
💔 Test failed - status-travis |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
☀️ Test successful - status-travis |
cc4c606
to
3286a69
Compare
Alright should be good to go! |
src/bootstrap/lib.rs
Outdated
@@ -766,6 +775,12 @@ impl Build { | |||
if &*target == "i686-pc-windows-gnu" { | |||
base.push("-fno-omit-frame-pointer".into()); | |||
} | |||
|
|||
if self.cc(target).ends_with("clang") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why only Clang? Gcc should accept the same flag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh sure! I was unaware of that
(eventually we'll need to figure out how to pass this to clang-cl as well)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-cl seems to accept it if you stick -Xclang
before it, from cursory testing:
c:\build>c:\Users\ted\.mozbuild\clang\bin\clang-cl.exe -Fohello.obj -c c:\build\hello.c -Ic:\build -Z7 -Xclang -fdebug-prefix-map=c:\build=\src
$ stringsext hello.obj | rg src
\src\src\hello.c
Looks great, thanks Alex! @bors r+ |
📌 Commit 3286a6957193e34c1f20a2d0f0c15bcdcbab9462 has been approved by |
💔 Test failed - status-travis |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
@bors: retry |
3rd failure because of 50-minute timeout. Travis broke? |
@mati865 Yes, and Travis is aware of the bug already. |
⌛ Testing commit 5595aeb with merge 48e6312571a6498927ddf63f91e3649e05e36ab9... |
💔 Test failed - status-travis |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
@bors retry treeclosed=1 50 minute timeout |
…ichaelwoerister Add rustc SHA to released DWARF debuginfo This commit updates the debuginfo that is encoded in all of our released artifacts by default. Currently it has paths like `/checkout/src/...` but these are a little inconsistent and have changed over time. This commit instead attempts to actually define the file paths in our debuginfo to be consistent between releases. All debuginfo paths are now intended to be `/rustc/$sha` where `$sha` is the git sha of the released compiler. Sub-paths are all paths into the git repo at that `$sha`.
Rollup of 11 pull requests Successful merges: - #53371 (Do not emit E0277 on incorrect tuple destructured binding) - #53829 (Add rustc SHA to released DWARF debuginfo) - #53950 (Allow for opting out of ThinLTO and clean up LTO related cli flag handling.) - #53976 (Replace unwrap calls in example by expect) - #54070 (Add Error::description soft-deprecation to RELEASES) - #54076 (miri loop detector hashing) - #54119 (Add some unit tests for find_best_match_for_name) - #54147 (Add a test that tries to modify static memory at compile-time) - #54150 (Updated 1.29 release notes with --document-private-items flag) - #54163 (Update stage 0 to latest beta) - #54170 (COMPILER_TESTS.md has been moved)
…les. r=gsvelto Since Rust 1.30 the Rust standard library is built with its source maps remapped to start with "/rustc/<sha>/": rust-lang/rust#53829 This patch changes the source file mapping logic in symbolstore.py to match. Differential Revision: https://phabricator.services.mozilla.com/D14991 --HG-- extra : moz-landing-system : lando
…les. r=gsvelto Since Rust 1.30 the Rust standard library is built with its source maps remapped to start with "/rustc/<sha>/": rust-lang/rust#53829 This patch changes the source file mapping logic in symbolstore.py to match. Differential Revision: https://phabricator.services.mozilla.com/D14991
@@ -8,6 +8,8 @@ | |||
// option. This file may not be copied, modified, or distributed | |||
// except according to those terms. | |||
|
|||
// ignore-musl | |||
// ignore-x86 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see this discussed explicitly. What is causing the problem these ignore
s are, well, ignoring? Was an issue ever opened to track it.
This showed up again in #58140 (comment), and while I'm fine with copying the two directives from here, this seems like a bug that should be tracked, if not investigated right away.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The failure happened here and I wasn't really interested in debugging this, but I agree I should have opened up an issue to track it.
This commit updates the debuginfo that is encoded in all of our released
artifacts by default. Currently it has paths like
/checkout/src/...
but theseare a little inconsistent and have changed over time. This commit instead
attempts to actually define the file paths in our debuginfo to be consistent
between releases.
All debuginfo paths are now intended to be
/rustc/$sha
where$sha
is the gitsha of the released compiler. Sub-paths are all paths into the git repo at that
$sha
.