Skip to content

Commit a131ca3

Browse files
committed
Auto merge of #1478 - tlively:update-emscripten-types, r=gnzlbg
Update Emscripten system types These changes bring the types up to parity with recent Emscripten versions using the upstream LLVM wasm backend. These changes should be coordinated with the upgrade of rustc's Emscripten support. See https://internals.rust-lang.org/t/upgrading-rust-s-emscripten-support/10684
2 parents c1ea7f5 + 06c980e commit a131ca3

File tree

4 files changed

+12
-14
lines changed

4 files changed

+12
-14
lines changed

ci/docker/asmjs-unknown-emscripten/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ RUN apt-get update && \
77
gcc \
88
git \
99
libc6-dev \
10+
libxml2 \
1011
python \
1112
xz-utils
1213

ci/docker/wasm32-unknown-emscripten/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ RUN apt-get update && \
1010
gcc \
1111
git \
1212
libc6-dev \
13+
libxml2 \
1314
python \
1415
cmake \
1516
sudo \

ci/emscripten.sh

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,18 @@ exit 1
2828
set -x
2929
}
3030

31-
cd /
32-
curl --retry 5 -L https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz | \
33-
tar -xz
34-
31+
git clone https://github.com/emscripten-core/emsdk.git /emsdk-portable
3532
cd /emsdk-portable
36-
./emsdk update
37-
hide_output ./emsdk install sdk-1.38.15-64bit
38-
./emsdk activate sdk-1.38.15-64bit
33+
# TODO: switch to an upstream install once
34+
# https://github.com/rust-lang/rust/pull/63649 lands
35+
hide_output ./emsdk install 1.38.42
36+
./emsdk activate 1.38.42
3937

4038
# Compile and cache libc
4139
# shellcheck disable=SC1091
4240
source ./emsdk_env.sh
4341
echo "main(){}" > a.c
4442
HOME=/emsdk-portable/ emcc a.c
45-
HOME=/emsdk-portable/ emcc -s BINARYEN=1 a.c
4643
rm -f a.*
4744

4845
# Make emsdk usable by any user
@@ -53,4 +50,3 @@ chmod a+rxw -R /emsdk-portable
5350
cd /
5451
curl --retry 5 -L https://nodejs.org/dist/v12.3.1/node-v12.3.1-linux-x64.tar.xz | \
5552
tar -xJ
56-

src/unix/linux_like/emscripten/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ pub type dev_t = u32;
55
pub type socklen_t = u32;
66
pub type pthread_t = c_ulong;
77
pub type mode_t = u32;
8-
pub type ino64_t = u32;
9-
pub type off64_t = i32;
8+
pub type ino64_t = u64;
9+
pub type off64_t = i64;
1010
pub type blkcnt64_t = i32;
1111
pub type rlim64_t = u64;
1212
pub type shmatt_t = ::c_ulong;
@@ -16,14 +16,14 @@ pub type msglen_t = ::c_ulong;
1616
pub type nfds_t = ::c_ulong;
1717
pub type nl_item = ::c_int;
1818
pub type idtype_t = ::c_uint;
19-
pub type loff_t = i32;
19+
pub type loff_t = i64;
2020
pub type pthread_key_t = ::c_uint;
2121

2222
pub type clock_t = c_long;
2323
pub type time_t = c_long;
2424
pub type suseconds_t = c_long;
25-
pub type ino_t = u32;
26-
pub type off_t = i32;
25+
pub type ino_t = u64;
26+
pub type off_t = i64;
2727
pub type blkcnt_t = i32;
2828

2929
pub type blksize_t = c_long;

0 commit comments

Comments
 (0)