binaryen: omit binaryen-unittests in non-cross too (#547287)

This commit is contained in:
Will Cohen
2026-08-01 01:19:26 +00:00
committed by GitHub

View File

@@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
strictDeps = true;
preConfigure = ''
if [ $doCheck -eq 1 ]; then
if [ -n "$doCheck" ]; then
sed -i '/gtest/d' third_party/CMakeLists.txt
rmdir test/spec/testsuite
ln -s ${testsuite} test/spec/testsuite
@@ -62,6 +62,14 @@ stdenv.mkDerivation rec {
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib python3 ../check.py $tests
'';
# bin/binaryen-unittests is absent on cross builds which don't have doCheck,
# so delete it on non-cross builds too (thus removing gtest from the closure).
postInstall = ''
if [ -n "$doCheck" ]; then
rm "$out/bin/binaryen-unittests"
fi
'';
tests = [
"version"
"wasm-opt"