diff --git a/build/moz.configure/rust.configure b/build/moz.configure/rust.configure index 5d8bf0284f43..156241f7f7db 100644 --- a/build/moz.configure/rust.configure +++ b/build/moz.configure/rust.configure @@ -234,6 +234,9 @@ def rust_target_env_name(triple): # converting a string to uppercase. set_config('RUST_TARGET_ENV_NAME', rust_target_env_name) +# This is used for putting source info into symbol files. +set_config('RUSTC_COMMIT', depends(rustc_info)(lambda i: i.commit)) + # Until we remove all the other Rust checks in old-configure. add_old_configure_assignment('RUSTC', rustc) add_old_configure_assignment('RUST_TARGET', rust_target_triple) diff --git a/toolkit/crashreporter/tools/symbolstore.py b/toolkit/crashreporter/tools/symbolstore.py index a0c2df9256a1..828f87bc4c4c 100755 --- a/toolkit/crashreporter/tools/symbolstore.py +++ b/toolkit/crashreporter/tools/symbolstore.py @@ -394,6 +394,20 @@ class Dumper: if repo_manifest: self.parse_repo_manifest(repo_manifest) self.file_mapping = file_mapping or {} + # Add a static mapping for Rust sources. + target_os = buildconfig.substs['OS_ARCH'] + rust_srcdir = None + if target_os == 'WINNT': + rust_srcdir = 'C:/projects/rust/src/' + elif target_os == 'Darwin': + rust_srcdir = '/Users/travis/build/rust-lang/rust/src/' + elif target_os == 'Linux': + rust_srcdir = '/checkout/src/' + if rust_srcdir is not None: + self.srcdirs.append(rust_srcdir) + Dumper.srcdirRepoInfo[rust_srcdir] = GitRepoInfo(rust_srcdir, + buildconfig.substs['RUSTC_COMMIT'], + 'https://github.com/rust-lang/rust/') def parse_repo_manifest(self, repo_manifest): """