Fix emsdk activate step to pass the correct path to Emscripten optimizer when using --vs2015.
This commit is contained in:
12
emsdk
12
emsdk
@@ -105,6 +105,12 @@ if WINDOWS:
|
|||||||
if VERBOSE: print('CMAKE_GENERATOR: ' + CMAKE_GENERATOR)
|
if VERBOSE: print('CMAKE_GENERATOR: ' + CMAKE_GENERATOR)
|
||||||
sys.argv = filter(lambda x: x not in ['--mingw', '--vs2013', '--vs2015'], sys.argv)
|
sys.argv = filter(lambda x: x not in ['--mingw', '--vs2013', '--vs2015'], sys.argv)
|
||||||
|
|
||||||
|
# Computes a suitable path prefix to use when building with a given generator.
|
||||||
|
def cmake_generator_prefix():
|
||||||
|
if CMAKE_GENERATOR == 'Visual Studio 14': return '_vs2015'
|
||||||
|
elif CMAKE_GENERATOR == 'MinGW Makefiles': return '_mingw'
|
||||||
|
return '' # Unix Makefiles and Visual Studio 2013 do not specify a path prefix for backwards path compatibility
|
||||||
|
|
||||||
# Removes a directory tree even if it was readonly, and doesn't throw exception on failure.
|
# Removes a directory tree even if it was readonly, and doesn't throw exception on failure.
|
||||||
def remove_tree(d):
|
def remove_tree(d):
|
||||||
if VERBOSE: print('remove_tree(' + str(d) + ')')
|
if VERBOSE: print('remove_tree(' + str(d) + ')')
|
||||||
@@ -685,9 +691,7 @@ def build_fastcomp_tool(tool):
|
|||||||
def optimizer_build_root(tool):
|
def optimizer_build_root(tool):
|
||||||
build_root = tool.installation_path().strip()
|
build_root = tool.installation_path().strip()
|
||||||
if build_root.endswith('/') or build_root.endswith('\\'): build_root = build_root[:-1]
|
if build_root.endswith('/') or build_root.endswith('\\'): build_root = build_root[:-1]
|
||||||
generator_prefix = '' # Unix Makefiles and Visual Studio 2013 do not specify a path prefix for backwards path compatibility
|
generator_prefix = cmake_generator_prefix()
|
||||||
if CMAKE_GENERATOR == 'Visual Studio 14': generator_prefix = '_vs2015'
|
|
||||||
elif CMAKE_GENERATOR == 'MinGW Makefiles': generator_prefix = '_mingw'
|
|
||||||
build_root = build_root + generator_prefix + '_' + str(tool.bitness) + 'bit_optimizer'
|
build_root = build_root + generator_prefix + '_' + str(tool.bitness) + 'bit_optimizer'
|
||||||
return build_root
|
return build_root
|
||||||
|
|
||||||
@@ -896,6 +900,8 @@ class Tool:
|
|||||||
str = str.replace('%cmake_build_type_on_win%', (decide_cmake_build_type(self) + '/') if WINDOWS else '')
|
str = str.replace('%cmake_build_type_on_win%', (decide_cmake_build_type(self) + '/') if WINDOWS else '')
|
||||||
if '%installation_dir%' in str:
|
if '%installation_dir%' in str:
|
||||||
str = str.replace('%installation_dir%', sdk_path(self.installation_dir()))
|
str = str.replace('%installation_dir%', sdk_path(self.installation_dir()))
|
||||||
|
if '%generator_prefix%' in str:
|
||||||
|
str = str.replace('%generator_prefix%', cmake_generator_prefix())
|
||||||
str = str.replace('%.exe%', '.exe' if WINDOWS else '')
|
str = str.replace('%.exe%', '.exe' if WINDOWS else '')
|
||||||
if '%fastcomp_build_dir%' in str:
|
if '%fastcomp_build_dir%' in str:
|
||||||
str = str.replace('%fastcomp_build_dir%', fastcomp_build_dir(self))
|
str = str.replace('%fastcomp_build_dir%', fastcomp_build_dir(self))
|
||||||
|
|||||||
@@ -618,7 +618,7 @@
|
|||||||
"windows_url": "https://github.com/kripken/emscripten/archive/%tag%.zip",
|
"windows_url": "https://github.com/kripken/emscripten/archive/%tag%.zip",
|
||||||
"unix_url": "https://github.com/kripken/emscripten/archive/%tag%.tar.gz",
|
"unix_url": "https://github.com/kripken/emscripten/archive/%tag%.tar.gz",
|
||||||
"zipfile_prefix": "emscripten-e",
|
"zipfile_prefix": "emscripten-e",
|
||||||
"activated_cfg": "EMSCRIPTEN_ROOT='%installation_dir%';EMSCRIPTEN_NATIVE_OPTIMIZER='%installation_dir%_32bit_optimizer/%cmake_build_type_on_win%optimizer%.exe%'",
|
"activated_cfg": "EMSCRIPTEN_ROOT='%installation_dir%';EMSCRIPTEN_NATIVE_OPTIMIZER='%installation_dir%%generator_prefix%_32bit_optimizer/%cmake_build_type_on_win%optimizer%.exe%'",
|
||||||
"activated_path": "%installation_dir%",
|
"activated_path": "%installation_dir%",
|
||||||
"activated_env": "EMSCRIPTEN=%installation_dir%",
|
"activated_env": "EMSCRIPTEN=%installation_dir%",
|
||||||
"cmake_build_type": "RelWithDebInfo",
|
"cmake_build_type": "RelWithDebInfo",
|
||||||
@@ -633,7 +633,7 @@
|
|||||||
"append_bitness": false,
|
"append_bitness": false,
|
||||||
"windows_url": "https://github.com/kripken/emscripten/archive/%tag%.zip",
|
"windows_url": "https://github.com/kripken/emscripten/archive/%tag%.zip",
|
||||||
"unix_url": "https://github.com/kripken/emscripten/archive/%tag%.tar.gz",
|
"unix_url": "https://github.com/kripken/emscripten/archive/%tag%.tar.gz",
|
||||||
"activated_cfg": "EMSCRIPTEN_ROOT='%installation_dir%';EMSCRIPTEN_NATIVE_OPTIMIZER='%installation_dir%_64bit_optimizer/%cmake_build_type_on_win%optimizer%.exe%'",
|
"activated_cfg": "EMSCRIPTEN_ROOT='%installation_dir%';EMSCRIPTEN_NATIVE_OPTIMIZER='%installation_dir%%generator_prefix%_64bit_optimizer/%cmake_build_type_on_win%optimizer%.exe%'",
|
||||||
"activated_path": "%installation_dir%",
|
"activated_path": "%installation_dir%",
|
||||||
"activated_env": "EMSCRIPTEN=%installation_dir%",
|
"activated_env": "EMSCRIPTEN=%installation_dir%",
|
||||||
"cmake_build_type": "RelWithDebInfo",
|
"cmake_build_type": "RelWithDebInfo",
|
||||||
@@ -648,7 +648,7 @@
|
|||||||
"append_bitness": false,
|
"append_bitness": false,
|
||||||
"url": "https://github.com/kripken/emscripten/",
|
"url": "https://github.com/kripken/emscripten/",
|
||||||
"git_branch": "incoming",
|
"git_branch": "incoming",
|
||||||
"activated_cfg": "EMSCRIPTEN_ROOT='%installation_dir%';EMSCRIPTEN_NATIVE_OPTIMIZER='%installation_dir%_32bit_optimizer/%cmake_build_type_on_win%optimizer%.exe%'",
|
"activated_cfg": "EMSCRIPTEN_ROOT='%installation_dir%';EMSCRIPTEN_NATIVE_OPTIMIZER='%installation_dir%%generator_prefix%_32bit_optimizer/%cmake_build_type_on_win%optimizer%.exe%'",
|
||||||
"activated_path": "%installation_dir%",
|
"activated_path": "%installation_dir%",
|
||||||
"activated_env": "EMSCRIPTEN=%installation_dir%",
|
"activated_env": "EMSCRIPTEN=%installation_dir%",
|
||||||
"cmake_build_type": "RelWithDebInfo",
|
"cmake_build_type": "RelWithDebInfo",
|
||||||
@@ -663,7 +663,7 @@
|
|||||||
"append_bitness": false,
|
"append_bitness": false,
|
||||||
"url": "https://github.com/kripken/emscripten/",
|
"url": "https://github.com/kripken/emscripten/",
|
||||||
"git_branch": "master",
|
"git_branch": "master",
|
||||||
"activated_cfg": "EMSCRIPTEN_ROOT='%installation_dir%';EMSCRIPTEN_NATIVE_OPTIMIZER='%installation_dir%_32bit_optimizer/%cmake_build_type_on_win%optimizer%.exe%'",
|
"activated_cfg": "EMSCRIPTEN_ROOT='%installation_dir%';EMSCRIPTEN_NATIVE_OPTIMIZER='%installation_dir%%generator_prefix%_32bit_optimizer/%cmake_build_type_on_win%optimizer%.exe%'",
|
||||||
"activated_path": "%installation_dir%",
|
"activated_path": "%installation_dir%",
|
||||||
"activated_env": "EMSCRIPTEN=%installation_dir%",
|
"activated_env": "EMSCRIPTEN=%installation_dir%",
|
||||||
"cmake_build_type": "Release",
|
"cmake_build_type": "Release",
|
||||||
@@ -678,7 +678,7 @@
|
|||||||
"append_bitness": false,
|
"append_bitness": false,
|
||||||
"url": "https://github.com/kripken/emscripten/",
|
"url": "https://github.com/kripken/emscripten/",
|
||||||
"git_branch": "incoming",
|
"git_branch": "incoming",
|
||||||
"activated_cfg": "EMSCRIPTEN_ROOT='%installation_dir%';EMSCRIPTEN_NATIVE_OPTIMIZER='%installation_dir%_64bit_optimizer/%cmake_build_type_on_win%optimizer%.exe%'",
|
"activated_cfg": "EMSCRIPTEN_ROOT='%installation_dir%';EMSCRIPTEN_NATIVE_OPTIMIZER='%installation_dir%%generator_prefix%_64bit_optimizer/%cmake_build_type_on_win%optimizer%.exe%'",
|
||||||
"activated_path": "%installation_dir%",
|
"activated_path": "%installation_dir%",
|
||||||
"activated_env": "EMSCRIPTEN=%installation_dir%",
|
"activated_env": "EMSCRIPTEN=%installation_dir%",
|
||||||
"cmake_build_type": "RelWithDebInfo",
|
"cmake_build_type": "RelWithDebInfo",
|
||||||
@@ -693,7 +693,7 @@
|
|||||||
"append_bitness": false,
|
"append_bitness": false,
|
||||||
"url": "https://github.com/kripken/emscripten/",
|
"url": "https://github.com/kripken/emscripten/",
|
||||||
"git_branch": "master",
|
"git_branch": "master",
|
||||||
"activated_cfg": "EMSCRIPTEN_ROOT='%installation_dir%';EMSCRIPTEN_NATIVE_OPTIMIZER='%installation_dir%_64bit_optimizer/%cmake_build_type_on_win%optimizer%.exe%'",
|
"activated_cfg": "EMSCRIPTEN_ROOT='%installation_dir%';EMSCRIPTEN_NATIVE_OPTIMIZER='%installation_dir%%generator_prefix%_64bit_optimizer/%cmake_build_type_on_win%optimizer%.exe%'",
|
||||||
"activated_path": "%installation_dir%",
|
"activated_path": "%installation_dir%",
|
||||||
"activated_env": "EMSCRIPTEN=%installation_dir%",
|
"activated_env": "EMSCRIPTEN=%installation_dir%",
|
||||||
"cmake_build_type": "Release",
|
"cmake_build_type": "Release",
|
||||||
|
|||||||
Reference in New Issue
Block a user