emscripten: 3.1.64 -> 3.1.73 (#343743)
This commit is contained in:
@@ -1,53 +1,61 @@
|
||||
{ lib, stdenv, cmake, python3, fetchFromGitHub, emscripten,
|
||||
gtest, lit, nodejs, filecheck
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "binaryen";
|
||||
version = "118";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
let
|
||||
testsuite = fetchFromGitHub {
|
||||
owner = "WebAssembly";
|
||||
repo = "binaryen";
|
||||
rev = "version_${version}";
|
||||
hash = "sha256-akMW3S2/qUyLK8F77EtnaXPDXvIMpkGfNB2jOD6hQho=";
|
||||
repo = "testsuite";
|
||||
rev = "e05365077e13a1d86ffe77acfb1a835b7aa78422";
|
||||
hash = "sha256-yvZ5AZTPUA6nsD3xpFC0VLthiu2CxVto66RTXBXXeJM=";
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "binaryen";
|
||||
version = "119";
|
||||
|
||||
nativeBuildInputs = [ cmake python3 ];
|
||||
src = fetchFromGitHub {
|
||||
owner = "WebAssembly";
|
||||
repo = "binaryen";
|
||||
rev = "version_${version}";
|
||||
hash = "sha256-JYXtN3CW4qm/nnjGRvv3GxQ0x9O9wHtNYQLqHIYTTOA=";
|
||||
};
|
||||
|
||||
preConfigure = ''
|
||||
if [ $doCheck -eq 1 ]; then
|
||||
sed -i '/googletest/d' third_party/CMakeLists.txt
|
||||
else
|
||||
cmakeFlagsArray=($cmakeFlagsArray -DBUILD_TESTS=0)
|
||||
fi
|
||||
'';
|
||||
nativeBuildInputs = [ cmake python3 ];
|
||||
|
||||
nativeCheckInputs = [ gtest lit nodejs filecheck ];
|
||||
checkPhase = ''
|
||||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib python3 ../check.py $tests
|
||||
'';
|
||||
preConfigure = ''
|
||||
if [ $doCheck -eq 1 ]; then
|
||||
sed -i '/googletest/d' third_party/CMakeLists.txt
|
||||
rmdir test/spec/testsuite
|
||||
ln -s ${testsuite} test/spec/testsuite
|
||||
else
|
||||
cmakeFlagsArray=($cmakeFlagsArray -DBUILD_TESTS=0)
|
||||
fi
|
||||
'';
|
||||
|
||||
tests = [
|
||||
"version" "wasm-opt" "wasm-dis"
|
||||
"crash" "dylink" "ctor-eval"
|
||||
"wasm-metadce" "wasm-reduce" "spec"
|
||||
"lld" "wasm2js" "validator"
|
||||
"example" "unit"
|
||||
# "binaryenjs" "binaryenjs_wasm" # not building this
|
||||
"lit" "gtest"
|
||||
];
|
||||
doCheck = stdenv.hostPlatform.isLinux;
|
||||
nativeCheckInputs = [ gtest lit nodejs filecheck ];
|
||||
checkPhase = ''
|
||||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib python3 ../check.py $tests
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/WebAssembly/binaryen";
|
||||
description = "Compiler infrastructure and toolchain library for WebAssembly, in C++";
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ asppsa willcohen ];
|
||||
license = licenses.asl20;
|
||||
};
|
||||
tests = [
|
||||
"version" "wasm-opt" "wasm-dis"
|
||||
"crash" "dylink" "ctor-eval"
|
||||
"wasm-metadce" "wasm-reduce" "spec"
|
||||
"lld" "wasm2js" "validator"
|
||||
"example" "unit"
|
||||
# "binaryenjs" "binaryenjs_wasm" # not building this
|
||||
"lit" "gtest"
|
||||
];
|
||||
doCheck = stdenv.isLinux;
|
||||
|
||||
passthru.tests = {
|
||||
inherit emscripten;
|
||||
};
|
||||
}
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/WebAssembly/binaryen";
|
||||
description = "Compiler infrastructure and toolchain library for WebAssembly, in C++";
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ asppsa willcohen ];
|
||||
license = licenses.asl20;
|
||||
};
|
||||
passthru.tests = {
|
||||
inherit emscripten;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "emscripten";
|
||||
version = "3.1.64";
|
||||
version = "3.1.73";
|
||||
|
||||
llvmEnv = symlinkJoin {
|
||||
name = "emscripten-llvm-${version}";
|
||||
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
|
||||
name = "emscripten-node-modules-${version}";
|
||||
inherit pname version src;
|
||||
|
||||
npmDepsHash = "sha256-2dsIuB6P+Z3wflIsn6QaZvjHeHHGzsFAI3GcP3SfiP4=";
|
||||
npmDepsHash = "sha256-bqxUlxpIH1IAx9RbnaMq4dZW8fy+M/Q02Q7VrW/AKNQ=";
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
@@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
|
||||
src = fetchFromGitHub {
|
||||
owner = "emscripten-core";
|
||||
repo = "emscripten";
|
||||
hash = "sha256-AbO1b4pxZ7I6n1dRzxhLC7DnXIUnaCK9SbLy96Qxqr0=";
|
||||
hash = "sha256-QlC2k2rhF3/Pz+knnrlBDV8AfHHBSlGr7b9Ae6TNsxY=";
|
||||
rev = version;
|
||||
};
|
||||
|
||||
@@ -51,6 +51,9 @@ stdenv.mkDerivation rec {
|
||||
|
||||
patchShebangs .
|
||||
|
||||
# emscripten 3.1.67 requires LLVM tip-of-tree instead of LLVM 18
|
||||
sed -i -e "s/EXPECTED_LLVM_VERSION = 20/EXPECTED_LLVM_VERSION = 19/g" tools/shared.py
|
||||
|
||||
# fixes cmake support
|
||||
sed -i -e "s/print \('emcc (Emscript.*\)/sys.stderr.write(\1); sys.stderr.flush()/g" emcc.py
|
||||
|
||||
|
||||
Reference in New Issue
Block a user