Bug 1921532 - Update symbol upload scripts

- Add `--inlines`
- Add `VERSION` and `PRODUCTNAME` extra info args

Updated dump_syms to a recent version
This commit is contained in:
Ben Dean-Kawamura 2024-09-27 15:22:46 -04:00 коммит произвёл bendk
Родитель bffcd0e717
Коммит a4ef3c9d71
2 изменённых файлов: 30 добавлений и 6 удалений

Просмотреть файл

@ -1,9 +1,9 @@
[
{
"size": 8373536,
"filename": "dump_syms",
"visibility": "public",
"digest": "151fe6fbbd56410148b240da24128302059ff955e3bbd34747aa7bc89a8878e9a4477e1bdde444ccd268fc45b526eff28689ce301a8ae93d8049f9c0a8e7be4a",
"size": 12587216,
"algorithm": "sha512",
"filename": "dump_syms"
"digest": "03627869015d8fb88830c89c1539192f7ac1a18a64cc9776436721a187d4fd6e7a4e23aef032f116d9224b55607d1c45efbf570415cddff2f4c1f998e763fbb1"
}
]

Просмотреть файл

@ -116,6 +116,13 @@ def read_output(*args):
(stdout, _) = subprocess.Popen(args=args, stdout=subprocess.PIPE).communicate()
return stdout.decode("utf-8").rstrip()
def get_version(srcdirs):
for dir in srcdirs:
path_try = os.path.join(dir, "version.txt")
if os.path.exists(path_try):
return open(path_try).read().strip()
return "Unknown"
class GitHubRepoInfo:
"""
Info about a locally cloned Git repository that has its "origin" remote on GitHub.
@ -384,7 +391,15 @@ class Dumper:
Get the commandline used to invoke dump_syms.
'''
# The Mac dumper overrides this.
return [self.dump_syms, file]
return [self.dump_syms, "--inlines", file] + self.dump_syms_extra_info()
def dump_syms_extra_info(self):
return [
"--extra-info",
"VERSION {}".format(get_version(self.srcdirs)),
"--extra-info",
"PRODUCTNAME ApplicationServices",
]
def ProcessFileWork(self, file, arch_num, arch, vcs_root, dsymbundle=None):
t_start = time.time()
@ -403,7 +418,7 @@ class Dumper:
# MODULE os cpu guid debug_file
(guid, debug_file) = (module_line.split())[3:5]
# strip off .pdb extensions, and append .sym
sym_file = re.sub("\.pdb$", "", debug_file) + ".sym"
sym_file = re.sub(r"\.pdb$", "", debug_file) + ".sym"
# we do want forward slashes here
rel_path = os.path.join(debug_file,
guid,
@ -639,7 +654,16 @@ class Dumper_Mac(Dumper):
# in order to dump all the symbols.
if dsymbundle:
# This is the .dSYM bundle.
return [self.dump_syms] + arch.split() + ['-g', dsymbundle, file]
cmdline = [self.dump_syms]
cmdline.extend(arch.split())
cmdline.extend([
"--inlines",
"-j",
"2",
])
cmdline.extend(self.dump_syms_extra_info())
cmdline.extend([dsymbundle, file])
return cmdline
return Dumper.dump_syms_cmdline(self, file, arch)
def GenerateDSYM(self, file):