Files
cs420/compile.sh
2025-06-17 04:37:00 +00:00

12 lines
281 B
Bash
Executable File

#!/bin/bash
# 사용법 확인
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <path-to-c-file>"
echo "Example: $0 examples/c/unary.c"
exit 1
fi
cargo run --features=build-bin -- "$1" --optimize --iroutput > "hello.ir"
cargo run --features=build-bin -- "$1" --optimize > "hello.S"