Rename osx -> macos (#563)
This commit is contained in:
38
emsdk.py
38
emsdk.py
@@ -64,15 +64,15 @@ if os.getenv('MSYSTEM'):
|
||||
# https://stackoverflow.com/questions/37460073/msys-vs-mingw-internal-environment-variables
|
||||
print('Warning: MSYSTEM environment variable is present, and is set to "' + os.getenv('MSYSTEM') + '". This shell has not been tested with emsdk and may not work.')
|
||||
|
||||
OSX = False
|
||||
MACOS = False
|
||||
if platform.mac_ver()[0] != '':
|
||||
OSX = True
|
||||
MACOS = True
|
||||
|
||||
LINUX = False
|
||||
if not OSX and (platform.system() == 'Linux' or os.name == 'posix'):
|
||||
if not MACOS and (platform.system() == 'Linux' or os.name == 'posix'):
|
||||
LINUX = True
|
||||
|
||||
UNIX = (OSX or LINUX)
|
||||
UNIX = (MACOS or LINUX)
|
||||
|
||||
|
||||
# Pick which shell of 4 shells to use
|
||||
@@ -133,8 +133,8 @@ def os_name():
|
||||
return 'win'
|
||||
elif LINUX:
|
||||
return 'linux'
|
||||
elif OSX:
|
||||
return 'osx'
|
||||
elif MACOS:
|
||||
return 'macos'
|
||||
else:
|
||||
raise Exception('unknown OS')
|
||||
|
||||
@@ -144,7 +144,7 @@ def os_name_for_emscripten_releases():
|
||||
return 'win'
|
||||
elif LINUX:
|
||||
return 'linux'
|
||||
elif OSX:
|
||||
elif MACOS:
|
||||
return 'mac'
|
||||
else:
|
||||
raise Exception('unknown OS')
|
||||
@@ -738,7 +738,7 @@ def GIT(must_succeed=True):
|
||||
if must_succeed:
|
||||
if WINDOWS:
|
||||
msg = "ERROR: git executable was not found. Please install it by typing 'emsdk install git-1.9.4', or alternatively by installing it manually from http://git-scm.com/downloads . If you install git manually, remember to add it to PATH"
|
||||
elif OSX:
|
||||
elif MACOS:
|
||||
msg = "ERROR: git executable was not found. Please install git for this operation! This can be done from http://git-scm.com/ , or by installing XCode and then the XCode Command Line Tools (see http://stackoverflow.com/questions/9329243/xcode-4-4-command-line-tools )"
|
||||
elif LINUX:
|
||||
msg = "ERROR: git executable was not found. Please install git for this operation! This can be probably be done using your package manager, see http://git-scm.com/book/en/Getting-Started-Installing-Git"
|
||||
@@ -879,7 +879,7 @@ def build_env(generator):
|
||||
|
||||
# To work around a build issue with older Mac OS X builds, add -stdlib=libc++ to all builds.
|
||||
# See https://groups.google.com/forum/#!topic/emscripten-discuss/5Or6QIzkqf0
|
||||
if OSX:
|
||||
if MACOS:
|
||||
build_env['CXXFLAGS'] = ((build_env['CXXFLAGS'] + ' ') if hasattr(build_env, 'CXXFLAGS') else '') + '-stdlib=libc++'
|
||||
elif 'Visual Studio 15' in generator or 'Visual Studio 16' in generator:
|
||||
if 'Visual Studio 16' in generator:
|
||||
@@ -1015,8 +1015,8 @@ def cmake_configure(generator, build_root, src_root, build_type, extra_cmake_arg
|
||||
print('Installing this package requires CMake. Get it from http://www.cmake.org/', file=sys.stderr)
|
||||
elif LINUX:
|
||||
print('Installing this package requires CMake. Get it via your system package manager (e.g. sudo apt-get install cmake), or from http://www.cmake.org/', file=sys.stderr)
|
||||
elif OSX:
|
||||
print('Installing this package requires CMake. Get it via a OSX package manager (Homebrew: "brew install cmake", or MacPorts: "sudo port install cmake"), or from http://www.cmake.org/', file=sys.stderr)
|
||||
elif MACOS:
|
||||
print('Installing this package requires CMake. Get it via a macOS package manager (Homebrew: "brew install cmake", or MacPorts: "sudo port install cmake"), or from http://www.cmake.org/', file=sys.stderr)
|
||||
return False
|
||||
raise
|
||||
except Exception as e:
|
||||
@@ -1110,7 +1110,7 @@ def build_fastcomp(tool):
|
||||
|
||||
# MacOS < 10.13 workaround for LLVM build bug https://github.com/kripken/emscripten/issues/5418:
|
||||
# specify HAVE_FUTIMENS=0 in the build if building with target SDK that is older than 10.13.
|
||||
if OSX and (not os.environ.get('LLVM_CMAKE_ARGS') or 'HAVE_FUTIMENS' not in os.environ.get('LLVM_CMAKE_ARGS')) and xcode_sdk_version() < ['10', '13']:
|
||||
if MACOS and (not os.environ.get('LLVM_CMAKE_ARGS') or 'HAVE_FUTIMENS' not in os.environ.get('LLVM_CMAKE_ARGS')) and xcode_sdk_version() < ['10', '13']:
|
||||
print('Passing -DHAVE_FUTIMENS=0 to LLVM CMake configure to workaround https://github.com/kripken/emscripten/issues/5418. Please update to macOS 10.13 or newer')
|
||||
args += ['-DHAVE_FUTIMENS=0']
|
||||
|
||||
@@ -1617,15 +1617,15 @@ class Tool(object):
|
||||
if hasattr(self, 'os'):
|
||||
if self.os == 'all':
|
||||
return True
|
||||
if self.compatible_with_this_arch() and ((WINDOWS and 'win' in self.os) or (LINUX and ('linux' in self.os or 'unix' in self.os)) or (OSX and ('osx' in self.os or 'unix' in self.os))):
|
||||
if self.compatible_with_this_arch() and ((WINDOWS and 'win' in self.os) or (LINUX and ('linux' in self.os or 'unix' in self.os)) or (MACOS and ('macos' in self.os or 'unix' in self.os))):
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
else:
|
||||
if not hasattr(self, 'osx_url') and not hasattr(self, 'windows_url') and not hasattr(self, 'unix_url') and not hasattr(self, 'linux_url'):
|
||||
if not hasattr(self, 'macos_url') and not hasattr(self, 'windows_url') and not hasattr(self, 'unix_url') and not hasattr(self, 'linux_url'):
|
||||
return True
|
||||
|
||||
if OSX and hasattr(self, 'osx_url') and self.compatible_with_this_arch():
|
||||
if MACOS and hasattr(self, 'macos_url') and self.compatible_with_this_arch():
|
||||
return True
|
||||
|
||||
if LINUX and hasattr(self, 'linux_url') and self.compatible_with_this_arch():
|
||||
@@ -1792,8 +1792,8 @@ class Tool(object):
|
||||
def download_url(self):
|
||||
if WINDOWS and hasattr(self, 'windows_url'):
|
||||
return self.windows_url
|
||||
elif OSX and hasattr(self, 'osx_url'):
|
||||
return self.osx_url
|
||||
elif MACOS and hasattr(self, 'macos_url'):
|
||||
return self.macos_url
|
||||
elif LINUX and hasattr(self, 'linux_url'):
|
||||
return self.linux_url
|
||||
elif UNIX and hasattr(self, 'unix_url'):
|
||||
@@ -2102,7 +2102,7 @@ def fetch_emscripten_tags():
|
||||
print('Update complete, however skipped fetching the Emscripten tags, since git was not found, which is necessary for update-tags.')
|
||||
if WINDOWS:
|
||||
print("Please install git by typing 'emsdk install git-1.9.4', or alternatively by installing it manually from http://git-scm.com/downloads . If you install git manually, remember to add it to PATH.")
|
||||
elif OSX:
|
||||
elif MACOS:
|
||||
print("Please install git from http://git-scm.com/ , or by installing XCode and then the XCode Command Line Tools (see http://stackoverflow.com/questions/9329243/xcode-4-4-command-line-tools ).")
|
||||
elif LINUX:
|
||||
print("Pease install git using your package manager, see http://git-scm.com/book/en/Getting-Started-Installing-Git .")
|
||||
@@ -2867,7 +2867,7 @@ def main():
|
||||
sdk = find_sdk(name)
|
||||
return 'INSTALLED' if sdk and sdk.is_installed() else ''
|
||||
|
||||
if (LINUX or OSX or WINDOWS) and (ARCH == 'x86' or ARCH == 'x86_64'):
|
||||
if (LINUX or MACOS or WINDOWS) and (ARCH == 'x86' or ARCH == 'x86_64'):
|
||||
print('The *recommended* precompiled SDK download is %s (%s).' % (find_latest_releases_version(), find_latest_releases_hash()))
|
||||
print()
|
||||
print('To install/activate it, use one of:')
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
"bitness": 64,
|
||||
"arch": "x86_64",
|
||||
"linux_url": "https://storage.googleapis.com/webassembly/emscripten-releases-builds/linux/%releases-tag%/wasm-binaries.tbz2",
|
||||
"osx_url": "https://storage.googleapis.com/webassembly/emscripten-releases-builds/mac/%releases-tag%/wasm-binaries.tbz2",
|
||||
"macos_url": "https://storage.googleapis.com/webassembly/emscripten-releases-builds/mac/%releases-tag%/wasm-binaries.tbz2",
|
||||
"windows_url": "https://storage.googleapis.com/webassembly/emscripten-releases-builds/win/%releases-tag%/wasm-binaries.zip",
|
||||
"zipfile_prefix": "%releases-tag%-",
|
||||
"install_path": "upstream",
|
||||
@@ -109,7 +109,7 @@
|
||||
"bitness": 64,
|
||||
"arch": "x86_64",
|
||||
"linux_url": "https://storage.googleapis.com/webassembly/emscripten-releases-builds/linux/%releases-tag%/wasm-binaries.tbz2",
|
||||
"osx_url": "https://storage.googleapis.com/webassembly/emscripten-releases-builds/mac/%releases-tag%/wasm-binaries.tbz2",
|
||||
"macos_url": "https://storage.googleapis.com/webassembly/emscripten-releases-builds/mac/%releases-tag%/wasm-binaries.tbz2",
|
||||
"windows_url": "https://storage.googleapis.com/webassembly/emscripten-releases-builds/win/%releases-tag%/wasm-binaries.zip",
|
||||
"zipfile_prefix": "%releases-tag%-",
|
||||
"install_path": "fastcomp",
|
||||
@@ -125,7 +125,7 @@
|
||||
"bitness": 32,
|
||||
"arch": "x86",
|
||||
"windows_url": "llvm/tag/win_64bit/emscripten-llvm-e%precompiled_tag32%.zip",
|
||||
"osx_url": "llvm/tag/osx_64bit/emscripten-llvm-e%precompiled_tag32%.tar.gz",
|
||||
"macos_url": "llvm/tag/osx_64bit/emscripten-llvm-e%precompiled_tag32%.tar.gz",
|
||||
"linux_url": "llvm/tag/linux_64bit/emscripten-llvm-e%precompiled_tag32%.tar.gz",
|
||||
"activated_path": "%installation_dir%",
|
||||
"activated_cfg": "LLVM_ROOT='%installation_dir%';EMSCRIPTEN_NATIVE_OPTIMIZER='%installation_dir%/optimizer%.exe%';BINARYEN_ROOT='%installation_dir%/binaryen'",
|
||||
@@ -137,7 +137,7 @@
|
||||
"bitness": 64,
|
||||
"arch": "x86_64",
|
||||
"windows_url": "https://storage.googleapis.com/webassembly/emscripten-releases-builds/old/win/emscripten-llvm-e%precompiled_tag64%.zip",
|
||||
"osx_url": "https://storage.googleapis.com/webassembly/emscripten-releases-builds/old/mac/emscripten-llvm-e%precompiled_tag64%.tar.gz",
|
||||
"macos_url": "https://storage.googleapis.com/webassembly/emscripten-releases-builds/old/mac/emscripten-llvm-e%precompiled_tag64%.tar.gz",
|
||||
"linux_url": "https://storage.googleapis.com/webassembly/emscripten-releases-builds/old/linux/emscripten-llvm-e%precompiled_tag64%.tar.gz",
|
||||
"activated_path": "%installation_dir%",
|
||||
"activated_cfg": "LLVM_ROOT='%installation_dir%';EMSCRIPTEN_NATIVE_OPTIMIZER='%installation_dir%/optimizer%.exe%';BINARYEN_ROOT='%installation_dir%/binaryen'",
|
||||
@@ -169,7 +169,7 @@
|
||||
"version": "8.9.1",
|
||||
"bitness": 64,
|
||||
"arch": "x86_64",
|
||||
"osx_url": "node-v8.9.1-darwin-x64.tar.gz",
|
||||
"macos_url": "node-v8.9.1-darwin-x64.tar.gz",
|
||||
"windows_url": "node-v8.9.1-win-x64.zip",
|
||||
"linux_url": "node-v8.9.1-linux-x64.tar.xz",
|
||||
"activated_path": "%installation_dir%/bin",
|
||||
@@ -211,7 +211,7 @@
|
||||
"version": "12.18.1",
|
||||
"bitness": 64,
|
||||
"arch": "x86_64",
|
||||
"osx_url": "node-v12.18.1-darwin-x64.tar.gz",
|
||||
"macos_url": "node-v12.18.1-darwin-x64.tar.gz",
|
||||
"windows_url": "node-v12.18.1-win-x64.zip",
|
||||
"linux_url": "node-v12.18.1-linux-x64.tar.xz",
|
||||
"activated_path": "%installation_dir%/bin",
|
||||
@@ -293,7 +293,7 @@
|
||||
"version": "3.7.4",
|
||||
"bitness": 64,
|
||||
"arch": "x86_64",
|
||||
"osx_url": "python-3.7.4-macos.tar.gz",
|
||||
"macos_url": "python-3.7.4-macos.tar.gz",
|
||||
"activated_path": "%installation_dir%/bin",
|
||||
"activated_cfg": "PYTHON='%installation_dir%/bin/python3'",
|
||||
"activated_env": "EMSDK_PYTHON=%installation_dir%/bin/python3"
|
||||
@@ -486,7 +486,7 @@
|
||||
"version": "upstream-master",
|
||||
"bitness": 64,
|
||||
"uses": ["llvm-git-master-64bit", "node-12.18.1-64bit", "python-3.7.4-64bit", "emscripten-master-64bit", "binaryen-master-64bit"],
|
||||
"os": "osx"
|
||||
"os": "macos"
|
||||
},
|
||||
{
|
||||
"version": "upstream-master",
|
||||
@@ -516,7 +516,7 @@
|
||||
"version": "fastcomp-master",
|
||||
"bitness": 64,
|
||||
"uses": ["fastcomp-clang-master-64bit", "node-12.18.1-64bit", "python-3.7.4-64bit", "emscripten-master-64bit", "binaryen-master-64bit"],
|
||||
"os": "osx"
|
||||
"os": "macos"
|
||||
},
|
||||
{
|
||||
"version": "fastcomp-master",
|
||||
@@ -577,7 +577,7 @@
|
||||
"version": "releases-upstream-%releases-tag%",
|
||||
"bitness": 64,
|
||||
"uses": ["node-12.18.1-64bit", "python-3.7.4-64bit", "releases-upstream-%releases-tag%-64bit"],
|
||||
"os": "osx",
|
||||
"os": "macos",
|
||||
"custom_install_script": "emscripten_npm_install"
|
||||
},
|
||||
{
|
||||
@@ -598,7 +598,7 @@
|
||||
"version": "releases-fastcomp-%releases-tag%",
|
||||
"bitness": 64,
|
||||
"uses": ["node-12.18.1-64bit", "python-3.7.4-64bit", "releases-fastcomp-%releases-tag%-64bit"],
|
||||
"os": "osx",
|
||||
"os": "macos",
|
||||
"custom_install_script": "emscripten_npm_install"
|
||||
},
|
||||
{
|
||||
@@ -648,7 +648,7 @@
|
||||
"version": "fastcomp-%precompiled_tag32%",
|
||||
"bitness": 32,
|
||||
"uses": ["fastcomp-clang-e%precompiled_tag32%-32bit", "node-8.9.1-32bit", "python-3.7.4-64bit", "emscripten-%precompiled_tag32%"],
|
||||
"os": "osx",
|
||||
"os": "macos",
|
||||
"version_filter": [
|
||||
["%precompiled_tag32%", ">", "1.37.22"]
|
||||
]
|
||||
@@ -657,7 +657,7 @@
|
||||
"version": "fastcomp-%precompiled_tag64%",
|
||||
"bitness": 64,
|
||||
"uses": ["fastcomp-clang-e%precompiled_tag64%-64bit", "node-8.9.1-64bit", "python-3.7.4-64bit", "emscripten-%precompiled_tag64%"],
|
||||
"os": "osx",
|
||||
"os": "macos",
|
||||
"version_filter": [
|
||||
["%precompiled_tag64%", ">", "1.37.22"]
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user