Fix python3 issue in macOS logic (#327)
Fixes iodide-project/pyodide#84
This commit is contained in:
7
emsdk
7
emsdk
@@ -956,7 +956,10 @@ def cmake_configure(generator, build_root, src_root, build_type, extra_cmake_arg
|
||||
|
||||
def xcode_sdk_version():
|
||||
try:
|
||||
return subprocess.check_output(['xcrun', '--show-sdk-version']).strip().split('.')
|
||||
output = subprocess.check_output(['xcrun', '--show-sdk-version'])
|
||||
if sys.version_info >= (3,):
|
||||
output = output.decode('utf8')
|
||||
return output.strip().split('.')
|
||||
except:
|
||||
return subprocess.checkplatform.mac_ver()[0].split('.')
|
||||
|
||||
@@ -1018,7 +1021,7 @@ def build_llvm_tool(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 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']:
|
||||
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']
|
||||
|
||||
|
||||
Reference in New Issue
Block a user