Skip to content

Commit dc52625

Browse files
authored
Rollup merge of #40821 - arielb1:fix-emscripten, r=TimNN
try to fix the build on emscripten The "upstream" emscripten tar.gz now extracts to `emsdk-portable` instead of `emsdk_portable`, breaking our CI. It might be better to vendor a specific version of emscripten instead of using the latest, but I could not find a good way of doing that. r? @alexcrichton
2 parents fbcb370 + 935d84a commit dc52625

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

src/ci/docker/emscripten/build-emscripten.sh

+18-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,24 @@ exit 1
2929
}
3030

3131
curl https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz | \
32-
tar xzf -
32+
tar xzf -
33+
34+
# Some versions of the EMSDK archive have their contents in .emsdk-portable
35+
# and others in emsdk_portable. Make sure the EMSDK ends up in a fixed path.
36+
if [ -d emsdk-portable ]; then
37+
mv emsdk-portable emsdk_portable
38+
fi
39+
40+
if [ ! -d emsdk_portable ]; then
41+
echo "ERROR: Invalid emsdk archive. Dumping working directory." >&2
42+
ls -l
43+
exit 1
44+
fi
45+
46+
# Some versions of the EMSDK set the permissions of the root directory to
47+
# 0700. Ensure the directory is readable by all users.
48+
chmod 755 emsdk_portable
49+
3350
source emsdk_portable/emsdk_env.sh
3451
hide_output emsdk update
3552
hide_output emsdk install --build=Release sdk-tag-1.37.1-32bit

0 commit comments

Comments
 (0)