Godot CLI Guide
This guide should assist when using Godot at the command line
compile for Linux/BSD
scons -j4 platform=linuxbsd tools=yes target=release_debug
compile for Linux/BSD with link time optimization (possibly uses 7GB RAM during build)
scons -j4 platform=linuxbsd tools=yes target=release_debug use_lto=yes
compile for Linux/BSD using Clang and LLD (possibly faster than GCC at linking)
scons -j4 platform=linuxbsd tools=yes target=release_debug use_llvm=yes use_lld=yes
compile export templates for Linux/BSD
scons platform=linuxbsd tools=no target=release bits=32
scons platform=linuxbsd tools=no target=release_debug bits=32
scons platform=linuxbsd tools=no target=release bits=64
scons platform=linuxbsd tools=no target=release_debug bits=64
cross-compile for Windows
scons -j4 platform=windows tools=yes target=release_debug
cross-compile for macOS
git clone --depth=1 https://github.com/tpoechtrager/osxcross.git "$HOME/osxcross"
export OSXCROSS_ROOT="$HOME/osxcross"
scons -j4 platform=osx tools=yes target=release_debug
compile headless build with tools (used for automating project builds/exports)
scons -j4 platform=server tools=yes target=release_debug
compile server build with remote debug
scons -j4 platform=server tools=no target=release_debug
compile server build for dedicated game servers
scons -j4 platform=server tools=no target=release