Fix symupload script.

This commit is contained in:
Roman Telezhynskyi 2024-06-10 10:41:35 +03:00
parent 0e5c693129
commit 501fe56e48

View File

@ -55,13 +55,21 @@ def generate_sym_files(install_root):
# Copy debug file with corrected name # Copy debug file with corrected name
corrected_debug_path = os.path.join(debug_dir, corrected_debug_name) corrected_debug_path = os.path.join(debug_dir, corrected_debug_name)
if debug_file != corrected_debug_path:
if sys.platform == "darwin":
shutil.copytree(debug_file, corrected_debug_path)
else:
shutil.copy(debug_file, corrected_debug_path) shutil.copy(debug_file, corrected_debug_path)
sym_file = os.path.splitext(corrected_debug_name)[0] + ".sym" sym_file = os.path.splitext(corrected_debug_name)[0] + ".sym"
dump_syms_cmd = ["dump_syms", '-o', sym_file, '--inlines', corrected_debug_path] dump_syms_cmd = ["dump_syms", '-o', sym_file, '--inlines', corrected_debug_path]
subprocess.run(dump_syms_cmd, check=True) subprocess.run(dump_syms_cmd, check=True)
if debug_file != corrected_debug_path:
# Remove temporary debug file # Remove temporary debug file
if sys.platform == "darwin":
os.rmtree(corrected_debug_path)
else:
os.remove(corrected_debug_path) os.remove(corrected_debug_path)
sym_files.append((debug_file, sym_file)) sym_files.append((debug_file, sym_file))