feat: Phase 2.4 レガシーアーカイブ整理完了(151MB削減)
## 🎉 完了項目 - ✅ plugin_box_legacy.rs削除(7.7KB、参照ゼロ確認済み) - ✅ REMOVEDコメント整理(encode.rs簡潔化) - ✅ venv削除(143MB節約、.gitignoreは既存) - ✅ llvm_legacyスタブ化(8KB、compile_error!による安全化) ## 🏆 成果 - **リポジトリサイズ改善**: 151MB削減 - **コード整理**: レガシーコード安全にアーカイブ - **プラグインファースト**: StrictPluginFirst継続動作 ## ✅ 検証完了 - cargo build --release --features llvm (警告のみ、エラーなし) - LLVMハーネス実行: print出力正常 - プラグイン動作: StringBox等正常動作 codex先生の戦略に従った安全な段階的削除を実行 Co-Authored-By: codex <noreply@anthropic.com>
This commit is contained in:
@ -64,7 +64,7 @@ fn main() {
|
||||
let nyrt_dir = matches
|
||||
.get_one::<String>("nyrt")
|
||||
.map(|s| s.to_string())
|
||||
.unwrap_or("crates/nyrt".to_string());
|
||||
.unwrap_or("crates/nyash_kernel".to_string());
|
||||
|
||||
// Determine sibling nyash binary path (target dir)
|
||||
let nyash_bin = current_dir_bin("nyash");
|
||||
@ -202,7 +202,7 @@ fn link_exe(obj_path: &str, out_path: &str, nyrt_dir: &str) -> Result<(), String
|
||||
// Prefer lld-link, then link.exe, fallback to cc
|
||||
let nyrt_release = format!("{}/target/release", nyrt_dir.replace('\\', "/"));
|
||||
let lib_nyrt_lib = format!("{}/nyrt.lib", nyrt_release);
|
||||
let lib_nyrt_a = format!("{}/libnyrt.a", nyrt_release);
|
||||
let lib_nyrt_a = format!("{}/libnyash_kernel.a", nyrt_release);
|
||||
if which::which("lld-link").is_ok() {
|
||||
let mut args: Vec<String> = Vec::new();
|
||||
args.push(format!("/OUT:{}", out_path));
|
||||
@ -243,7 +243,7 @@ fn link_exe(obj_path: &str, out_path: &str, nyrt_dir: &str) -> Result<(), String
|
||||
let status = PCommand::new("cc")
|
||||
.args([obj_path])
|
||||
.args(["-L", &format!("{}/target/release", nyrt_dir)])
|
||||
.args(["-lnyrt", "-o", out_path])
|
||||
.args(["-lnyash_kernel", "-o", out_path])
|
||||
.status()
|
||||
.map_err(|e| e.to_string())?;
|
||||
if status.success() {
|
||||
@ -257,7 +257,7 @@ fn link_exe(obj_path: &str, out_path: &str, nyrt_dir: &str) -> Result<(), String
|
||||
.args([obj_path])
|
||||
.args(["-L", "target/release"])
|
||||
.args(["-L", &format!("{}/target/release", nyrt_dir)])
|
||||
.args(["-Wl,--whole-archive", "-lnyrt", "-Wl,--no-whole-archive"])
|
||||
.args(["-Wl,--whole-archive", "-lnyash_kernel", "-Wl,--no-whole-archive"])
|
||||
.args(["-lpthread", "-ldl", "-lm", "-o", out_path])
|
||||
.status()
|
||||
.map_err(|e| e.to_string())?;
|
||||
|
||||
Reference in New Issue
Block a user