Fix discrepancy in emcmake vs emconfigure scripts that CMAKE_CROSSCOMPILING_EMULATOR was was set only if emcmake was called, and not when emconfigure was used. The intention is that emcmake is just an alias to emconfigure.
This commit is contained in:
Родитель
cc38a8bcce
Коммит
8bc65b8139
7
emcmake
7
emcmake
|
@ -4,10 +4,5 @@ import os, subprocess, sys
|
|||
from tools import shared
|
||||
|
||||
configure_path = shared.path_from_root('emconfigure')
|
||||
node_js = shared.NODE_JS
|
||||
if type(node_js) is list: node_js = ' '.join(node_js)
|
||||
node_js = node_js.replace('"', '\"')
|
||||
|
||||
exit(subprocess.call([shared.PYTHON, configure_path] + \
|
||||
[sys.argv[1]] + \
|
||||
['-DCMAKE_CROSSCOMPILING_EMULATOR="' + node_js +'"'] + sys.argv[2:]))
|
||||
exit(subprocess.call([shared.PYTHON, configure_path] + sys.argv[1:]))
|
||||
|
|
|
@ -31,9 +31,14 @@ variables so that emcc etc. are used. Typical usage:
|
|||
(but you can run any command instead of configure)
|
||||
|
||||
'''
|
||||
elif 'cmake' in sys.argv[1]:
|
||||
node_js = shared.NODE_JS
|
||||
if type(node_js) is list: node_js = ' '.join(node_js)
|
||||
node_js = node_js.replace('"', '\"')
|
||||
sys.argv = sys.argv[:2] + ['-DCMAKE_CROSSCOMPILING_EMULATOR="' + node_js +'"'] + sys.argv[2:]
|
||||
|
||||
try:
|
||||
shared.Building.configure(sys.argv[1:])
|
||||
shared.Building.configure(sys.argv[1:])
|
||||
except CalledProcessError, e:
|
||||
sys.exit(e.returncode)
|
||||
sys.exit(e.returncode)
|
||||
|
||||
|
|
|
@ -433,6 +433,7 @@ f.close()
|
|||
cmd = [emconfigure, 'cmake', '-DCMAKE_BUILD_TYPE=' + configuration, cmake_arguments[i], '-G', generator, cmakelistsdir]
|
||||
env = os.environ.copy()
|
||||
|
||||
print str(cmd)
|
||||
ret = Popen(cmd, stdout=None if EM_BUILD_VERBOSE_LEVEL >= 2 else PIPE, stderr=None if EM_BUILD_VERBOSE_LEVEL >= 1 else PIPE, env=env).communicate()
|
||||
if len(ret) > 1 and ret[1] != None and len(ret[1].strip()) > 0:
|
||||
logging.error(ret[1]) # If there were any errors, print them directly to console for diagnostics.
|
||||
|
|
Загрузка…
Ссылка в новой задаче