Files
hakorune/tools/archive_rust_llvm.sh
Selfhosting Dev 658a0d46da feat(llvm-py): Major breakthrough in Python LLVM backend! 🎉
 Print and FileBox paths now working correctly
 Resolver simplified by removing overly aggressive fast-path optimization
 Both OFF/ON in compare_harness_on_off.sh now use Python version
 String handle propagation issues resolved

Key changes:
- Removed instruction reordering in llvm_builder.py (respecting MIR order)
- Resolver now more conservative but reliable
- compare_harness_on_off.sh updated to use Python backend for both paths

This marks a major milestone towards Phase 15 self-hosting with Python/llvmlite!

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-14 00:44:28 +09:00

34 lines
857 B
Bash

#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR=$(cd "$(dirname "$0")/.." && pwd)
SRC_DIR="$ROOT_DIR/src/backend/llvm"
ARCHIVED_DIR="$ROOT_DIR/archived"
LEGACY_DIR="$ROOT_DIR/src/backend/llvm_legacy"
mkdir -p "$ARCHIVED_DIR"
if [ ! -d "$SRC_DIR" ]; then
echo "[archive] nothing to archive: $SRC_DIR not found" >&2
exit 0
fi
STAMP=$(date +%Y%m%d)
TAR_PATH="$ARCHIVED_DIR/rust_llvm_${STAMP}.tar.gz"
echo "[archive] creating archive: $TAR_PATH"
tar -czf "$TAR_PATH" -C "$ROOT_DIR" \
src/backend/llvm \
--exclude="*.o" --exclude="*.so" --exclude="target" || true
if [ -d "$LEGACY_DIR" ]; then
echo "[archive] legacy directory already exists: $LEGACY_DIR"
else
echo "[archive] moving to legacy: $LEGACY_DIR"
mv "$SRC_DIR" "$LEGACY_DIR"
echo "# DEPRECATED - Use src/llvm_py/ instead" > "$LEGACY_DIR/DEPRECATED.md"
fi
echo "[archive] done."