Fix creating dist for mips64el

Note that dump_syms can not parse mips64 binaries, so we don't have
symbols archive for mips64 arch.
This commit is contained in:
Cheng Zhao 2017-11-22 19:29:39 +09:00
parent a2f95c5f90
commit 7cc73140f8
4 changed files with 35 additions and 27 deletions

View file

@ -12,7 +12,7 @@ if sys.platform == "win32":
import _winreg
from lib.config import BASE_URL, PLATFORM, enable_verbose_mode, \
get_target_arch, get_zip_name
get_target_arch, get_zip_name, build_env
from lib.util import scoped_cwd, rm_rf, get_electron_version, make_zip, \
execute, electron_gyp
@ -210,15 +210,15 @@ def strip_binaries():
def strip_binary(binary_path):
if get_target_arch() == 'arm':
strip = 'arm-linux-gnueabihf-strip'
elif get_target_arch() == 'arm64':
strip = 'aarch64-linux-gnu-strip'
elif get_target_arch() == 'mips64el':
strip = 'mips64el-redhat-linux-strip'
else:
strip = 'strip'
execute([strip, binary_path])
if get_target_arch() == 'arm':
strip = 'arm-linux-gnueabihf-strip'
elif get_target_arch() == 'arm64':
strip = 'aarch64-linux-gnu-strip'
elif get_target_arch() == 'mips64el':
strip = 'mips64el-redhat-linux-strip'
else:
strip = 'strip'
execute([strip, binary_path], env=build_env())
def create_version():
@ -228,6 +228,9 @@ def create_version():
def create_symbols():
if get_target_arch() == 'mips64el':
return
destination = os.path.join(DIST_DIR, '{0}.breakpad.syms'.format(PROJECT_NAME))
dump_symbols = os.path.join(SOURCE_ROOT, 'script', 'dump-symbols.py')
execute([sys.executable, dump_symbols, destination])
@ -288,6 +291,9 @@ def create_ffmpeg_zip():
def create_symbols_zip():
if get_target_arch() == 'mips64el':
return
dist_name = get_zip_name(PROJECT_NAME, ELECTRON_VERSION, 'symbols')
zip_file = os.path.join(DIST_DIR, dist_name)
licenses = ['LICENSE', 'LICENSES.chromium.html', 'version']