改用 musl 全静态构建,零依赖跨发行版
Build and Release Mond / release (push) Successful in 19s
Build and Release Mond / build-and-test (amd64) (push) Successful in 4m11s
Build and Release Mond / build-and-test (arm64) (push) Successful in 9m19s

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-10 12:03:43 +08:00
co-authored by Claude Opus 4.8
parent 5430297ff9
commit b44b118be7
8 changed files with 111 additions and 126 deletions
+7
View File
@@ -50,6 +50,13 @@ find tests -type f -name "*.cpp" -exec sed -i 's/"Monero '"'"'/"Mond '"'"'/g' {}
# Uncomment the following lines if you want to remove Monero Project copyright
# find . -type f \( -name "*.cpp" -o -name "*.h" \) -exec sed -i '/Copyright.*The Monero Project/d' {} \;
# 8. musl fully-static patch(配合 docker/Dockerfile,产出无 interpreter、零外部依赖的 static-pie
# monero 官方"不支持 fully static"STATIC=ON 在 Linux 仅给 -static-libgcc/-static-libstdc++,且强制 -pie。
# 去掉 -pie(否则强制动态 PIE/带 musl interpreter,无法跨发行版)
sed -i 's|add_linker_flag_if_supported("-pie" LD_SECURITY_FLAGS)|# -pie removed for fully-static|' CMakeLists.txt
# Linux STATIC_FLAGS 从 -static-libgcc/-static-libstdc++ 改真 -static
sed -i 's|set(STATIC_FLAGS "-static-libgcc -static-libstdc++")|set(STATIC_FLAGS "-static")|' CMakeLists.txt
echo "Project successfully modified from Monero to Mond!"
echo "Binary output name: mond"
echo "Project name: mond"