Skip to content

Commit

Permalink
node path
Browse files Browse the repository at this point in the history
  • Loading branch information
pmp-p committed Dec 19, 2024
1 parent 6316f8f commit 181ac12
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions config
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ do
fi
done

export SYS_NODE=$(echo -n $SDKROOT/emsdk/node/??.??.*/bin/node)

# this is python used for emsdk : ${SYS_PYTHON} -> ${EMSDK_PYTHON}
# sane default
Expand Down
13 changes: 11 additions & 2 deletions scripts/emsdk-fetch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -222,14 +222,22 @@ END

curl -fsSL https://bun.sh/install | bash

export SYS_NODE=$(echo -n $SDKROOT/emsdk/node/??.??.*/bin/node)

# emsdk shipped node cannot run on alpine
if [ -f /alpine ]
then
cp -vf /usr/bin/node $ROOT/emsdk/node/??.??.*/bin/node
if [ -f $SYS_NODE.glibc ]
then
echo "node alpine node version already selected"
else
mv $SYS_NODE $SYS_NODE.glibc
cp -vf /usr/bin/node $SYS_NODE
fi
fi

export PATH=$(echo -n ${SDKROOT}/emsdk/node/??.??.*/bin):$PATH
$ROOT/emsdk/node/??.??.*/bin/npm install --prefix $ROOT/emsdk/node/??.??.* -g pnpm@^9.0.0
$SDKROOT/emsdk/node/??.??.*/bin/npm install --prefix $SDKROOT/emsdk/node/??.??.* -g pnpm@^9.0.0

# maybe rewrite that in python and move it to emcc.py

Expand Down Expand Up @@ -560,6 +568,7 @@ END
[ -f $FIXED ] || cp $TRUE $FIXED
done

export SYS_NODE=$(echo -n $SDKROOT/emsdk/node/??.??.*/bin/node)

export NPROC=1
export EMSDK_NUM_CORES=$NPROC
Expand Down

0 comments on commit 181ac12

Please sign in to comment.