Skip to content

Commit 337b082

Browse files
authored
emscripten: 3.1.64 -> 3.1.73 (#343743)
2 parents 16c6170 + e255a90 commit 337b082

File tree

2 files changed

+62
-51
lines changed

2 files changed

+62
-51
lines changed
Lines changed: 56 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,61 @@
11
{ lib, stdenv, cmake, python3, fetchFromGitHub, emscripten,
22
gtest, lit, nodejs, filecheck
33
}:
4-
5-
stdenv.mkDerivation rec {
6-
pname = "binaryen";
7-
version = "118";
8-
9-
src = fetchFromGitHub {
4+
let
5+
testsuite = fetchFromGitHub {
106
owner = "WebAssembly";
11-
repo = "binaryen";
12-
rev = "version_${version}";
13-
hash = "sha256-akMW3S2/qUyLK8F77EtnaXPDXvIMpkGfNB2jOD6hQho=";
14-
};
15-
16-
nativeBuildInputs = [ cmake python3 ];
17-
18-
preConfigure = ''
19-
if [ $doCheck -eq 1 ]; then
20-
sed -i '/googletest/d' third_party/CMakeLists.txt
21-
else
22-
cmakeFlagsArray=($cmakeFlagsArray -DBUILD_TESTS=0)
23-
fi
24-
'';
25-
26-
nativeCheckInputs = [ gtest lit nodejs filecheck ];
27-
checkPhase = ''
28-
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib python3 ../check.py $tests
29-
'';
30-
31-
tests = [
32-
"version" "wasm-opt" "wasm-dis"
33-
"crash" "dylink" "ctor-eval"
34-
"wasm-metadce" "wasm-reduce" "spec"
35-
"lld" "wasm2js" "validator"
36-
"example" "unit"
37-
# "binaryenjs" "binaryenjs_wasm" # not building this
38-
"lit" "gtest"
39-
];
40-
doCheck = stdenv.hostPlatform.isLinux;
41-
42-
meta = with lib; {
43-
homepage = "https://github.com/WebAssembly/binaryen";
44-
description = "Compiler infrastructure and toolchain library for WebAssembly, in C++";
45-
platforms = platforms.all;
46-
maintainers = with maintainers; [ asppsa willcohen ];
47-
license = licenses.asl20;
48-
};
49-
50-
passthru.tests = {
51-
inherit emscripten;
7+
repo = "testsuite";
8+
rev = "e05365077e13a1d86ffe77acfb1a835b7aa78422";
9+
hash = "sha256-yvZ5AZTPUA6nsD3xpFC0VLthiu2CxVto66RTXBXXeJM=";
5210
};
53-
}
11+
in
12+
stdenv.mkDerivation rec {
13+
pname = "binaryen";
14+
version = "119";
15+
16+
src = fetchFromGitHub {
17+
owner = "WebAssembly";
18+
repo = "binaryen";
19+
rev = "version_${version}";
20+
hash = "sha256-JYXtN3CW4qm/nnjGRvv3GxQ0x9O9wHtNYQLqHIYTTOA=";
21+
};
22+
23+
nativeBuildInputs = [ cmake python3 ];
24+
25+
preConfigure = ''
26+
if [ $doCheck -eq 1 ]; then
27+
sed -i '/googletest/d' third_party/CMakeLists.txt
28+
rmdir test/spec/testsuite
29+
ln -s ${testsuite} test/spec/testsuite
30+
else
31+
cmakeFlagsArray=($cmakeFlagsArray -DBUILD_TESTS=0)
32+
fi
33+
'';
34+
35+
nativeCheckInputs = [ gtest lit nodejs filecheck ];
36+
checkPhase = ''
37+
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib python3 ../check.py $tests
38+
'';
39+
40+
tests = [
41+
"version" "wasm-opt" "wasm-dis"
42+
"crash" "dylink" "ctor-eval"
43+
"wasm-metadce" "wasm-reduce" "spec"
44+
"lld" "wasm2js" "validator"
45+
"example" "unit"
46+
# "binaryenjs" "binaryenjs_wasm" # not building this
47+
"lit" "gtest"
48+
];
49+
doCheck = stdenv.isLinux;
50+
51+
meta = with lib; {
52+
homepage = "https://github.com/WebAssembly/binaryen";
53+
description = "Compiler infrastructure and toolchain library for WebAssembly, in C++";
54+
platforms = platforms.all;
55+
maintainers = with maintainers; [ asppsa willcohen ];
56+
license = licenses.asl20;
57+
};
58+
passthru.tests = {
59+
inherit emscripten;
60+
};
61+
}

pkgs/development/compilers/emscripten/default.nix

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
stdenv.mkDerivation rec {
1010
pname = "emscripten";
11-
version = "3.1.64";
11+
version = "3.1.73";
1212

1313
llvmEnv = symlinkJoin {
1414
name = "emscripten-llvm-${version}";
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
1919
name = "emscripten-node-modules-${version}";
2020
inherit pname version src;
2121

22-
npmDepsHash = "sha256-2dsIuB6P+Z3wflIsn6QaZvjHeHHGzsFAI3GcP3SfiP4=";
22+
npmDepsHash = "sha256-bqxUlxpIH1IAx9RbnaMq4dZW8fy+M/Q02Q7VrW/AKNQ=";
2323

2424
dontBuild = true;
2525

@@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
3232
src = fetchFromGitHub {
3333
owner = "emscripten-core";
3434
repo = "emscripten";
35-
hash = "sha256-AbO1b4pxZ7I6n1dRzxhLC7DnXIUnaCK9SbLy96Qxqr0=";
35+
hash = "sha256-QlC2k2rhF3/Pz+knnrlBDV8AfHHBSlGr7b9Ae6TNsxY=";
3636
rev = version;
3737
};
3838

@@ -51,6 +51,9 @@ stdenv.mkDerivation rec {
5151
5252
patchShebangs .
5353
54+
# emscripten 3.1.67 requires LLVM tip-of-tree instead of LLVM 18
55+
sed -i -e "s/EXPECTED_LLVM_VERSION = 20/EXPECTED_LLVM_VERSION = 19/g" tools/shared.py
56+
5457
# fixes cmake support
5558
sed -i -e "s/print \('emcc (Emscript.*\)/sys.stderr.write(\1); sys.stderr.flush()/g" emcc.py
5659

0 commit comments

Comments
 (0)