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:
parent
a2f95c5f90
commit
7cc73140f8
4 changed files with 35 additions and 27 deletions
|
@ -5,7 +5,7 @@ import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from lib.config import MIPS64EL_GCC, get_target_arch
|
from lib.config import MIPS64EL_GCC, get_target_arch, build_env
|
||||||
from lib.util import electron_gyp, import_vs_env
|
from lib.util import electron_gyp, import_vs_env
|
||||||
|
|
||||||
|
|
||||||
|
@ -70,20 +70,5 @@ def parse_args():
|
||||||
return parser.parse_args()
|
return parser.parse_args()
|
||||||
|
|
||||||
|
|
||||||
def build_env():
|
|
||||||
env = os.environ.copy()
|
|
||||||
if get_target_arch() == "mips64el":
|
|
||||||
gcc_dir = os.path.join(VENDOR_DIR, MIPS64EL_GCC)
|
|
||||||
ldlib_dirs = [
|
|
||||||
gcc_dir + '/usr/x86_64-unknown-linux-gnu/mips64el-redhat-linux/lib',
|
|
||||||
gcc_dir + '/usr/lib64',
|
|
||||||
gcc_dir + '/usr/mips64el-redhat-linux/lib64',
|
|
||||||
gcc_dir + '/usr/mips64el-redhat-linux/sysroot/lib64',
|
|
||||||
gcc_dir + '/usr/mips64el-redhat-linux/sysroot/usr/lib64',
|
|
||||||
]
|
|
||||||
env['LD_LIBRARY_PATH'] = os.pathsep.join(ldlib_dirs)
|
|
||||||
env['PATH'] = os.pathsep.join([gcc_dir + '/usr/bin', env['PATH']])
|
|
||||||
return env
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
sys.exit(main())
|
sys.exit(main())
|
||||||
|
|
|
@ -12,7 +12,7 @@ if sys.platform == "win32":
|
||||||
import _winreg
|
import _winreg
|
||||||
|
|
||||||
from lib.config import BASE_URL, PLATFORM, enable_verbose_mode, \
|
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, \
|
from lib.util import scoped_cwd, rm_rf, get_electron_version, make_zip, \
|
||||||
execute, electron_gyp
|
execute, electron_gyp
|
||||||
|
|
||||||
|
@ -218,7 +218,7 @@ def strip_binary(binary_path):
|
||||||
strip = 'mips64el-redhat-linux-strip'
|
strip = 'mips64el-redhat-linux-strip'
|
||||||
else:
|
else:
|
||||||
strip = 'strip'
|
strip = 'strip'
|
||||||
execute([strip, binary_path])
|
execute([strip, binary_path], env=build_env())
|
||||||
|
|
||||||
|
|
||||||
def create_version():
|
def create_version():
|
||||||
|
@ -228,6 +228,9 @@ def create_version():
|
||||||
|
|
||||||
|
|
||||||
def create_symbols():
|
def create_symbols():
|
||||||
|
if get_target_arch() == 'mips64el':
|
||||||
|
return
|
||||||
|
|
||||||
destination = os.path.join(DIST_DIR, '{0}.breakpad.syms'.format(PROJECT_NAME))
|
destination = os.path.join(DIST_DIR, '{0}.breakpad.syms'.format(PROJECT_NAME))
|
||||||
dump_symbols = os.path.join(SOURCE_ROOT, 'script', 'dump-symbols.py')
|
dump_symbols = os.path.join(SOURCE_ROOT, 'script', 'dump-symbols.py')
|
||||||
execute([sys.executable, dump_symbols, destination])
|
execute([sys.executable, dump_symbols, destination])
|
||||||
|
@ -288,6 +291,9 @@ def create_ffmpeg_zip():
|
||||||
|
|
||||||
|
|
||||||
def create_symbols_zip():
|
def create_symbols_zip():
|
||||||
|
if get_target_arch() == 'mips64el':
|
||||||
|
return
|
||||||
|
|
||||||
dist_name = get_zip_name(PROJECT_NAME, ELECTRON_VERSION, 'symbols')
|
dist_name = get_zip_name(PROJECT_NAME, ELECTRON_VERSION, 'symbols')
|
||||||
zip_file = os.path.join(DIST_DIR, dist_name)
|
zip_file = os.path.join(DIST_DIR, dist_name)
|
||||||
licenses = ['LICENSE', 'LICENSES.chromium.html', 'version']
|
licenses = ['LICENSE', 'LICENSES.chromium.html', 'version']
|
||||||
|
|
|
@ -84,3 +84,21 @@ def get_zip_name(name, version, suffix=''):
|
||||||
if suffix:
|
if suffix:
|
||||||
zip_name += '-' + suffix
|
zip_name += '-' + suffix
|
||||||
return zip_name + '.zip'
|
return zip_name + '.zip'
|
||||||
|
|
||||||
|
|
||||||
|
def build_env():
|
||||||
|
env = os.environ.copy()
|
||||||
|
if get_target_arch() == "mips64el":
|
||||||
|
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
|
||||||
|
VENDOR_DIR = os.path.join(SOURCE_ROOT, 'vendor')
|
||||||
|
gcc_dir = os.path.join(VENDOR_DIR, MIPS64EL_GCC)
|
||||||
|
ldlib_dirs = [
|
||||||
|
gcc_dir + '/usr/x86_64-unknown-linux-gnu/mips64el-redhat-linux/lib',
|
||||||
|
gcc_dir + '/usr/lib64',
|
||||||
|
gcc_dir + '/usr/mips64el-redhat-linux/lib64',
|
||||||
|
gcc_dir + '/usr/mips64el-redhat-linux/sysroot/lib64',
|
||||||
|
gcc_dir + '/usr/mips64el-redhat-linux/sysroot/usr/lib64',
|
||||||
|
]
|
||||||
|
env['LD_LIBRARY_PATH'] = os.pathsep.join(ldlib_dirs)
|
||||||
|
env['PATH'] = os.pathsep.join([gcc_dir + '/usr/bin', env['PATH']])
|
||||||
|
return env
|
||||||
|
|
|
@ -100,7 +100,6 @@ function assetsForVersion (version) {
|
||||||
`electron-${version}-linux-armv7l.zip`,
|
`electron-${version}-linux-armv7l.zip`,
|
||||||
`electron-${version}-linux-ia32-symbols.zip`,
|
`electron-${version}-linux-ia32-symbols.zip`,
|
||||||
`electron-${version}-linux-ia32.zip`,
|
`electron-${version}-linux-ia32.zip`,
|
||||||
`electron-${version}-linux-mips64el-symbols.zip`,
|
|
||||||
`electron-${version}-linux-mips64el.zip`,
|
`electron-${version}-linux-mips64el.zip`,
|
||||||
`electron-${version}-linux-x64-symbols.zip`,
|
`electron-${version}-linux-x64-symbols.zip`,
|
||||||
`electron-${version}-linux-x64.zip`,
|
`electron-${version}-linux-x64.zip`,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue