Skip to content

Commit

Permalink
Fix macOS build (#996)
Browse files Browse the repository at this point in the history
* Fix macOS build. See WebAssembly/binaryen#4299

* Update comment
  • Loading branch information
juj authored Mar 23, 2022
1 parent 637777b commit 497595e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions emsdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -1033,16 +1033,16 @@ def cmake_configure(generator, build_root, src_root, build_type, extra_cmake_arg
generator = []

cmdline = ['cmake'] + generator + ['-DCMAKE_BUILD_TYPE=' + build_type, '-DPYTHON_EXECUTABLE=' + sys.executable]
# Target macOS 10.11 at minimum, to support widest range of Mac devices from "Mid 2007" and newer:
# https://en.wikipedia.org/wiki/MacBook_Pro#Supported_macOS_releases
cmdline += ['-DCMAKE_OSX_DEPLOYMENT_TARGET=10.11']
# Target macOS 10.14 at minimum, to support widest range of Mac devices from "Early 2008" and newer:
# https://en.wikipedia.org/wiki/MacBook_(2006–2012)#Supported_operating_systems
cmdline += ['-DCMAKE_OSX_DEPLOYMENT_TARGET=10.14']
cmdline += extra_cmake_args + [src_root]

print('Running CMake: ' + str(cmdline))

# Specify the deployment target also as an env. var, since some Xcode versions
# read this instead of the CMake field.
os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.11'
os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.14'

def quote_parens(x):
if ' ' in x:
Expand Down

0 comments on commit 497595e

Please sign in to comment.