Build with optimization.