Merge pull request #14868 from electron/fix-win-dump-syms
chore: fix windows dump syms
This commit is contained in:
commit
531a4c5b8c
6 changed files with 52 additions and 23 deletions
|
@ -5,7 +5,8 @@ import os
|
|||
import sys
|
||||
|
||||
from lib.config import PLATFORM, enable_verbose_mode, is_verbose_mode
|
||||
from lib.util import get_electron_branding, execute, rm_rf, get_out_dir
|
||||
from lib.util import get_electron_branding, execute, rm_rf, get_out_dir, \
|
||||
GN_SRC_DIR
|
||||
|
||||
ELECTRON_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
||||
SOURCE_ROOT = os.path.abspath(os.path.dirname(ELECTRON_ROOT))
|
||||
|
@ -30,12 +31,12 @@ def main():
|
|||
helper_app = os.path.join(build_path, '{0}.app'.format(helper_name),
|
||||
'Contents', 'MacOS', product_name + " Helper")
|
||||
binaries = [main_app, helper_app]
|
||||
for binary in binaries:
|
||||
generate_posix_symbols(binary, source_root, build_path,
|
||||
for binary in binaries:
|
||||
generate_posix_symbols(binary, source_root, build_path,
|
||||
args.destination)
|
||||
else:
|
||||
binary = os.path.join(build_path, project_name)
|
||||
generate_posix_symbols(binary, source_root, build_path,
|
||||
generate_posix_symbols(binary, source_root, build_path,
|
||||
args.destination)
|
||||
|
||||
else:
|
||||
|
@ -45,8 +46,16 @@ def main():
|
|||
'--symbols-dir={0}'.format(args.destination),
|
||||
'--jobs=16',
|
||||
os.path.relpath(build_path),
|
||||
]
|
||||
execute([sys.executable, generate_breakpad_symbols] + args)
|
||||
]
|
||||
if is_verbose_mode():
|
||||
args += ['-v']
|
||||
#Make sure msdia140.dll is in the path (needed for dump_syms.exe)
|
||||
env = os.environ.copy()
|
||||
msdia140_dll_path = os.path.join(GN_SRC_DIR, 'third_party', 'llvm-build',
|
||||
'Release+Asserts', 'bin')
|
||||
env['PATH'] = os.path.pathsep.join(
|
||||
[env.get('PATH', '')] + [msdia140_dll_path])
|
||||
execute([sys.executable, generate_breakpad_symbols] + args, env)
|
||||
|
||||
def get_names_from_branding():
|
||||
variables = get_electron_branding()
|
||||
|
@ -62,9 +71,9 @@ def generate_posix_symbols(binary, source_root, build_dir, destination):
|
|||
'--jobs=16',
|
||||
'--binary={0}'.format(binary),
|
||||
]
|
||||
if is_verbose_mode():
|
||||
if is_verbose_mode():
|
||||
args += ['-v']
|
||||
execute([sys.executable, generate_breakpad_symbols] + args)
|
||||
execute([sys.executable, generate_breakpad_symbols] + args)
|
||||
|
||||
def parse_args():
|
||||
parser = argparse.ArgumentParser(description='Create breakpad symbols')
|
||||
|
@ -83,7 +92,7 @@ def parse_args():
|
|||
required=False)
|
||||
parser.add_argument('-v', '--verbose',
|
||||
action='store_true',
|
||||
help='Prints the output of the subprocesses')
|
||||
help='Prints the output of the subprocesses')
|
||||
return parser.parse_args()
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
@ -10,16 +10,13 @@ from lib.util import get_electron_branding, execute, rm_rf, safe_mkdir, s3put, \
|
|||
|
||||
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
||||
RELEASE_DIR = get_out_dir()
|
||||
GEN_DIR = os.path.join(RELEASE_DIR, 'gen')
|
||||
|
||||
|
||||
PROJECT_NAME = get_electron_branding()['project_name']
|
||||
PRODUCT_NAME = get_electron_branding()['product_name']
|
||||
|
||||
if PLATFORM == 'win32':
|
||||
SYMBOLS_DIR = os.path.join(GEN_DIR, 'symbols')
|
||||
else:
|
||||
SYMBOLS_DIR = os.path.join(GEN_DIR, '{0}.breakpad.syms'.format(PROJECT_NAME))
|
||||
SYMBOLS_DIR = os.path.join(
|
||||
RELEASE_DIR, '{0}.breakpad.syms'.format(PROJECT_NAME)
|
||||
)
|
||||
|
||||
PDB_LIST = [
|
||||
os.path.join(RELEASE_DIR, '{0}.exe.pdb'.format(PROJECT_NAME))
|
||||
|
|
|
@ -65,7 +65,7 @@ def main():
|
|||
upload_electron(release, electron_zip, args)
|
||||
if get_target_arch() != 'mips64el':
|
||||
symbols_zip = os.path.join(OUT_DIR, SYMBOLS_NAME)
|
||||
shutil.copy2(os.path.join(OUT_DIR, 'symobls.zip'), symbols_zip)
|
||||
shutil.copy2(os.path.join(OUT_DIR, 'symbols.zip'), symbols_zip)
|
||||
upload_electron(release, symbols_zip, args)
|
||||
if PLATFORM == 'darwin':
|
||||
api_path = os.path.join(OUT_DIR, 'electron-api.json')
|
||||
|
@ -77,12 +77,15 @@ def main():
|
|||
shutil.copy2(os.path.join(OUT_DIR, 'dsym.zip'), dsym_zip)
|
||||
upload_electron(release, dsym_zip, args)
|
||||
elif PLATFORM == 'win32':
|
||||
upload_electron(release, os.path.join(OUT_DIR, PDB_NAME), args)
|
||||
pdb_zip = os.path.join(OUT_DIR, PDB_NAME)
|
||||
shutil.copy2(os.path.join(OUT_DIR, 'pdb.zip'), pdb_zip)
|
||||
upload_electron(release, pdb_zip, args)
|
||||
|
||||
# Upload free version of ffmpeg.
|
||||
ffmpeg = get_zip_name('ffmpeg', ELECTRON_VERSION)
|
||||
ffmpeg_zip = os.path.join(OUT_DIR, ffmpeg)
|
||||
shutil.copy2(os.path.join(OUT_DIR, 'ffmpeg.zip'), ffmpeg_zip)
|
||||
ffmpeg_build_path = os.path.join(GN_SRC_DIR, 'out', 'ffmpeg', 'ffmpeg.zip')
|
||||
shutil.copy2(ffmpeg_build_path, ffmpeg_zip)
|
||||
upload_electron(release, ffmpeg_zip, args)
|
||||
|
||||
chromedriver = get_zip_name('chromedriver', ELECTRON_VERSION)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue