src/third_party/mozjs/README.md
Follow these steps to upgrade MozJS. This is supposed to work on minor updates of
MozJS ESR 91.
Note: You first need to prepare the MozJS repo and make sure that you have an upgraded branch under the mongodb-forks/spidermonkey repo.
Edit get-sources.sh and update the LIB_GIT_REVISION variable with the branch name of
the new version of MozJS.
autoconf2.13 installed.Check whether you have autoconf2.13 installed by running either of the
autoconf2.13 --version, autoconf213 --version or autoconf-2.13 --version commands depending on
your target platform.
If not installed, you can install it like this:
sudo apt-get install autoconf2.13
brew install [email protected]
wget ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.13.tar.gz
tar -xf autoconf-2.13.tar.gz
cd autoconf-2.13
./configure --prefix=$HOME/local
make
make install
cp $HOME/local/bin/autoconf $HOME/local/bin/autoconf2.13
PATH="$PATH:$HOME/local/bin"
export PATH
mongo repository used for MozJS upgradecd $HOME
git clone [email protected]:10gen/mongo.git
cd mongo
git checkout -b <your_branch_name> origin/<your_branch_name>
cd $HOME/mongo/src/third_party/mozjs
rm -rf mozilla-release
./get-sources.sh
cd $HOME/mongo/src/third_party/mozjs
rm -rf extract include
./extract.sh
Run one of the following invocations of the 'gen-config.sh' script for your target platform:
cd $HOME/mongo/src/third_party/mozjs
./gen-config.sh x86_64 linux
cd $HOME/mongo/src/third_party/mozjs
# ./gen-config.sh x86_64 macOS
cd $HOME/mongo/src/third_party/mozjs
# ./gen-config.sh x86_64 windows
cd $HOME/mongo/src/third_party/mozjs
# ./gen-config.sh aarch64 linux
cd $HOME/mongo/src/third_party/mozjs
# ./gen-config.sh aarch64 macOS
cd $HOME/mongo/src/third_party/mozjs
# ./gen-config.sh ppc64le linux
cd $HOME/mongo/src/third_party/mozjs
# ./gen-config.sh s390x linux
You need to run through all of these steps once for each supported platform.