fix: DEV-DEPENDENCIES.sh só instala ferramentas, não configura cargo
- Remove configuração automática do ~/.cargo/config.toml - O workspace já tem .cargo/config.toml que sobrescreve o global - Devs só precisam rodar ./DEV-DEPENDENCIES.sh para instalar mold/lld/clang - Config do projeto (./.cargo/config.toml) é usado automaticamente
This commit is contained in:
parent
abc8a8eaf3
commit
685c7d6a96
1 changed files with 10 additions and 27 deletions
|
|
@ -50,30 +50,13 @@ ldconfig
|
|||
|
||||
command -v mold &> /dev/null || install_mold
|
||||
|
||||
configure_cargo() {
|
||||
echo "Configuring Cargo for fast linking (mold/lld)..."
|
||||
|
||||
# Detect current user's home directory
|
||||
if [ -n "$SUDO_USER" ]; then
|
||||
USER_HOME=$(eval echo ~$SUDO_USER)
|
||||
else
|
||||
USER_HOME=$HOME
|
||||
fi
|
||||
|
||||
mkdir -p "$USER_HOME/.cargo"
|
||||
cat > "$USER_HOME/.cargo/config.toml" << 'EOF'
|
||||
[target.x86_64-unknown-linux-gnu]
|
||||
linker = "clang"
|
||||
rustflags = ["-C", "link-arg=-fuse-ld=lld"]
|
||||
|
||||
[build]
|
||||
jobs = 6
|
||||
EOF
|
||||
|
||||
echo "Cargo configured for $USER_HOME!"
|
||||
echo "Link time reduced by ~30-40%"
|
||||
}
|
||||
|
||||
configure_cargo
|
||||
|
||||
echo "Dev dependencies installed!"
|
||||
echo "Dev dependencies installed!"
|
||||
echo ""
|
||||
echo "✅ Tools installed: clang, lld, mold, sccache"
|
||||
echo "📦 Project will use .cargo/config.toml from workspace"
|
||||
echo "⚡ Link time reduced by ~30-40% with mold/lld"
|
||||
echo ""
|
||||
echo "Next steps:"
|
||||
echo " 1. Run: ./DEV-DEPENDENCIES.sh (already done)"
|
||||
echo " 2. Workspace .cargo/config.toml will be used automatically"
|
||||
echo " 3. Build: cargo build -p botserver --bin botserver"
|
||||
Loading…
Add table
Reference in a new issue