mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
Fix spidermonkey profiling build
Instruments is macOS only, so don't try to enable it on other platforms.
Also don't quote ${JOBS} as it might be unset and passing an empty
string to "mach build" may result in configure failing.
Fixes: #7470
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This commit is contained in:
@@ -6,7 +6,7 @@ cd "$(dirname "$0")"
|
|||||||
# This should match the version in config/milestone.txt
|
# This should match the version in config/milestone.txt
|
||||||
FOLDER="mozjs-115.16.1"
|
FOLDER="mozjs-115.16.1"
|
||||||
# If same-version changes are needed, increment this.
|
# If same-version changes are needed, increment this.
|
||||||
LIB_VERSION="115.16.1+2"
|
LIB_VERSION="115.16.1+3"
|
||||||
LIB_NAME="mozjs115"
|
LIB_NAME="mozjs115"
|
||||||
|
|
||||||
echo "Building SpiderMonkey..."
|
echo "Building SpiderMonkey..."
|
||||||
@@ -72,11 +72,16 @@ tar xfJ "${FOLDER}.tar.xz"
|
|||||||
export MOZBUILD_STATE_PATH="${MOZBUILD_STATE_PATH:=$(pwd)/mozbuild-state}"
|
export MOZBUILD_STATE_PATH="${MOZBUILD_STATE_PATH:=$(pwd)/mozbuild-state}"
|
||||||
|
|
||||||
if [ -n "$PROFILE" ]; then
|
if [ -n "$PROFILE" ]; then
|
||||||
CONF_OPTS="$CONF_OPTS --enable-profiling
|
CONF_OPTS="$CONF_OPTS
|
||||||
|
--enable-profiling
|
||||||
--enable-perf
|
--enable-perf
|
||||||
--enable-instruments
|
|
||||||
--enable-jitspew
|
--enable-jitspew
|
||||||
--with-jitreport-granularity=3"
|
--with-jitreport-granularity=3"
|
||||||
|
|
||||||
|
if [ "${OS}" = "Darwin" ]; then
|
||||||
|
CONF_OPTS="$CONF_OPTS
|
||||||
|
--enable-instruments"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${OS}" = "Windows_NT" ]; then
|
if [ "${OS}" = "Windows_NT" ]; then
|
||||||
@@ -119,20 +124,22 @@ tar xfJ "${FOLDER}.tar.xz"
|
|||||||
# Build
|
# Build
|
||||||
# Debug (broken on FreeBSD)
|
# Debug (broken on FreeBSD)
|
||||||
if [ "${OS}" != "FreeBSD" ]; then
|
if [ "${OS}" != "FreeBSD" ]; then
|
||||||
|
# shellcheck disable=SC2086
|
||||||
MOZCONFIG="$(pwd)/../mozconfig" \
|
MOZCONFIG="$(pwd)/../mozconfig" \
|
||||||
MOZCONFIG_OPTIONS="${CONF_OPTS} \
|
MOZCONFIG_OPTIONS="${CONF_OPTS} \
|
||||||
--enable-debug \
|
--enable-debug \
|
||||||
--disable-optimize \
|
--disable-optimize \
|
||||||
--enable-gczeal" \
|
--enable-gczeal" \
|
||||||
BUILD_DIR="build-debug" \
|
BUILD_DIR="build-debug" \
|
||||||
./mach build "${JOBS}"
|
./mach build ${JOBS}
|
||||||
fi
|
fi
|
||||||
# Release
|
# Release
|
||||||
|
# shellcheck disable=SC2086
|
||||||
MOZCONFIG="$(pwd)/../mozconfig" \
|
MOZCONFIG="$(pwd)/../mozconfig" \
|
||||||
MOZCONFIG_OPTIONS="${CONF_OPTS} \
|
MOZCONFIG_OPTIONS="${CONF_OPTS} \
|
||||||
--enable-optimize" \
|
--enable-optimize" \
|
||||||
BUILD_DIR="build-release" \
|
BUILD_DIR="build-release" \
|
||||||
./mach build "${JOBS}"
|
./mach build ${JOBS}
|
||||||
)
|
)
|
||||||
|
|
||||||
# install
|
# install
|
||||||
|
|||||||
Reference in New Issue
Block a user