Skip to content

SpiderMonkey upgrade details

Josh Matthews edited this page May 27, 2014 · 18 revisions

Latest revision: 5ecd532a167e

Grab latest SpiderMonkey source:

cd ~/mozilla-central
make -C objdir/js/src source-package
cd ~/servo/src/support/mozjs
rm -rf .
cp ~/mozilla-central/objdir/mozjs-31.0.1.tar.bz2 .
tar xvjf mozjs-31.0.1.tar.bz2 --strip 1

Port non-upstreamed patches forward:

Upgrade bindgen:

  • Check out external copy of LLVM, follow clang instructions
  • Update to last official revision used by Servo's Rust's copy
  • Check out revisions of compiler-rt and clang that are from approximately the same date as official revision
  • configure --enable-optimized; make
  • Add a symlink to the newly built libclang.so and libclang.a sitting in rust-bindgen's working dir
  • Find a revision of bindgen that builds with Servo's current rustc
  • Build bindgen with Servo's rustc.

./bindgen -allow-bitfields -o jsapi.rs -match js -x c++ -std=c++11 -D __STDC_LIMIT_MACROS -D SERVO_NO_OVERLOAD ~/sdb/servo/src/support/spidermonkey/mozjs/js/src/jsapi.h -I ~/sdb/servo/build/x86_64-unknown-linux-gnu/src/support/spidermonkey/mozjs/dist/include/ -isystem /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5/include -isystem /usr/lib/gcc/x86_64-redhat-linux/4.7.0/include -isystem /usr/local/include/c++/4.6.3/ -isystem /usr/local/include/c++/4.6.3/x86_64-unknown-linux-gnu/

Clone this wiki locally