Changeset View
Changeset View
Standalone View
Standalone View
libraries/source/spidermonkey/build.sh
#!/bin/sh | #!/bin/sh | ||||
# This script is called by update-workspaces.sh / build-osx-libraries.sh | # This script is called by update-workspaces.sh / build-osx-libraries.sh | ||||
set -e | set -e | ||||
# This should match the version in config/milestone.txt | # This should match the version in config/milestone.txt | ||||
FOLDER="mozjs-78.6.0" | FOLDER="mozjs-78.6.0" | ||||
# If same-version changes are needed, increment this. | # If same-version changes are needed, increment this. | ||||
LIB_VERSION="78.6.0+2" | LIB_VERSION="78.6.0+3" | ||||
LIB_NAME="mozjs78-ps" | LIB_NAME="mozjs78-ps" | ||||
# Since this script is called by update-workspaces.sh, we want to quickly | # Since this script is called by update-workspaces.sh, we want to quickly | ||||
# avoid doing any work if SpiderMonkey is already built and up-to-date. | # avoid doing any work if SpiderMonkey is already built and up-to-date. | ||||
# Running SM's Makefile is a bit slow and noisy, so instead we'll make a | # Running SM's Makefile is a bit slow and noisy, so instead we'll make a | ||||
# special file and only rebuild if the build.sh version differs. | # special file and only rebuild if the build.sh version differs. | ||||
if [ -e .already-built ] && [ "$(cat .already-built)" = "${LIB_VERSION}" ] | if [ -e .already-built ] && [ "$(cat .already-built)" = "${LIB_VERSION}" ] | ||||
then | then | ||||
Show All 27 Lines | |||||
then | then | ||||
CONF_OPTS="${CONF_OPTS} --with-visual-studio-version=2017 --target=i686" | CONF_OPTS="${CONF_OPTS} --with-visual-studio-version=2017 --target=i686" | ||||
else | else | ||||
CONF_OPTS="${CONF_OPTS}" | CONF_OPTS="${CONF_OPTS}" | ||||
fi | fi | ||||
if [ "`uname -s`" = "Darwin" ] | if [ "`uname -s`" = "Darwin" ] | ||||
then | then | ||||
# Explicitly target x86_64. | |||||
CONF_OPTS="${CONF_OPTS} --target=x86_64-apple-darwin" | |||||
# Link to custom-built zlib | # Link to custom-built zlib | ||||
export PKG_CONFIG_PATH="=${ZLIB_DIR}:${PKG_CONFIG_PATH}" | export PKG_CONFIG_PATH="=${ZLIB_DIR}:${PKG_CONFIG_PATH}" | ||||
CONF_OPTS="${CONF_OPTS} --with-system-zlib" | CONF_OPTS="${CONF_OPTS} --with-system-zlib" | ||||
# Specify target versions and SDK | # Specify target versions and SDK | ||||
if [ "${MIN_OSX_VERSION}" ] && [ "${MIN_OSX_VERSION-_}" ]; then | if [ "${MIN_OSX_VERSION}" ] && [ "${MIN_OSX_VERSION-_}" ]; then | ||||
CONF_OPTS="${CONF_OPTS} --enable-macos-target=$MIN_OSX_VERSION" | CONF_OPTS="${CONF_OPTS} --enable-macos-target=$MIN_OSX_VERSION" | ||||
fi | fi | ||||
if [ "${SYSROOT}" ] && [ "${SYSROOT-_}" ]; then | if [ "${SYSROOT}" ] && [ "${SYSROOT-_}" ]; then | ||||
▲ Show 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | then | ||||
# Clean up header files that may be left over by earlier versions of SpiderMonkey | # Clean up header files that may be left over by earlier versions of SpiderMonkey | ||||
rm -rf include-unix-debug | rm -rf include-unix-debug | ||||
rm -rf include-unix-release | rm -rf include-unix-release | ||||
# Apply patches | # Apply patches | ||||
cd "$FOLDER" | cd "$FOLDER" | ||||
. ../patch.sh | . ../patch.sh | ||||
# Copy a more recent autoconf config.guess to handle ARM macs properly. | |||||
cp -f ../config.guess build/autoconf/ | |||||
# Prevent complaining that configure is outdated. | # Prevent complaining that configure is outdated. | ||||
touch ./js/src/configure | touch ./js/src/configure | ||||
else | else | ||||
cd "$FOLDER" | cd "$FOLDER" | ||||
fi | fi | ||||
# Debug version of SM is broken on FreeBSD. | # Debug version of SM is broken on FreeBSD. | ||||
if [ "$(uname -s)" != "FreeBSD" ]; then | if [ "$(uname -s)" != "FreeBSD" ]; then | ||||
▲ Show 20 Lines • Show All 116 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator