summaryrefslogtreecommitdiffstats
path: root/taskcluster/scripts/misc/build-nodejs.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xtaskcluster/scripts/misc/build-nodejs.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/taskcluster/scripts/misc/build-nodejs.sh b/taskcluster/scripts/misc/build-nodejs.sh
new file mode 100755
index 0000000000..16e281d980
--- /dev/null
+++ b/taskcluster/scripts/misc/build-nodejs.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+set -x -e -v
+
+artifact=$(basename "$TOOLCHAIN_ARTIFACT")
+project=${artifact%.tar.*}
+workspace=$HOME/workspace
+
+cd $MOZ_FETCHES_DIR/$project
+
+gcc_major=8
+export CFLAGS=--sysroot=$MOZ_FETCHES_DIR/sysroot
+export CXXFLAGS"=--sysroot=$MOZ_FETCHES_DIR/sysroot -isystem $MOZ_FETCHES_DIR/sysroot/usr/include/c++/$gcc_major -isystem $MOZ_FETCHES_DIR/sysroot/usr/include/x86_64-linux-gnu/c++/$gcc_major"
+export LDFLAGS="--sysroot=$MOZ_FETCHES_DIR/sysroot -L$MOZ_FETCHES_DIR/sysroot/lib/x86_64-linux-gnu -L$MOZ_FETCHES_DIR/sysroot/usr/lib/x86_64-linux-gnu -L$MOZ_FETCHES_DIR/sysroot/usr/lib/gcc/x86_64-linux-gnu/$gcc_major"
+export CC=$MOZ_FETCHES_DIR/gcc/bin/gcc
+export CXX=$MOZ_FETCHES_DIR/gcc/bin/g++
+
+./configure --verbose --prefix=/
+make -j$(nproc) install DESTDIR=$workspace/$project
+
+tar -C $workspace -acvf $artifact $project
+mkdir -p $UPLOAD_DIR
+mv $artifact $UPLOAD_DIR