Files
ziran/tests/mutex_linux.sh
T
waozi da76a21675 Remove the C++, Rust and Plan 9 targets
Ziran now generates C, Go, Python and portable .zx. zi2cpp, zi2rust, the
C++ mode of the shared C emitter, the Plan 9 post-pass and the std Plan 9
modules are gone; --target=cpp|rust|plan9-c and zi2c --plan9 are rejected
as unknown targets. Generated C headers keep avoiding C++ keywords in
exported names, so C++ hosts can still include them.
2026-10-24 00:57:29 -03:00

17 lines
764 B
Bash

#!/bin/sh
set -eu
ziran=${1:?pass the ziran command}
unset DISPLAY WAYLAND_DISPLAY XAUTHORITY DBUS_SESSION_BUS_ADDRESS
work=$(mktemp -d)
trap 'rm -rf "$work"' EXIT HUP INT TERM
"$ziran" check --root tests/spec --module-path std tests/spec/mutex_linux_test.zi
"$ziran" ir --root tests/spec --module-path std -o "$work/ir" tests/spec/mutex_linux_test.zi
for form in source saved; do
input=tests/spec/mutex_linux_test.zi
if test "$form" = saved; then input="$work/ir/mutex_linux_test.zir"; fi
"$ziran" build --target=c --exe --entry mutex_linux_test:Main --root tests/spec \
--module-path std -o "$work/$form-c" "$input"
"$work/$form-c/mutex_linux_test"
done
echo 'Mutex lifecycle and eight concurrent writers pass C from source and saved IR'