Ollama – v0.15.1-rc0: build: add -O3 optimization to CGO flags (#13877)

Ollama – v0.15.1-rc0: build: add -O3 optimization to CGO flags (#13877)

🚀 Ollama v0.15.1-rc0 just landed — and it’s fast now.

The secret sauce? `-O3` optimization is finally enabled for CGO code on macOS 🎯

Before, C/C++ components were built without optimization flags — even though Go uses `-O2` by default. Result? Sluggish release builds. Not anymore.

✅ Now: `-O3` in `CGO_CFLAGS` & `CGO_CXXFLAGS` → faster model loading

✅ Docker builds keep your custom flags (no more overwrites!)

✅ Your LLMs? They’ll spin up quicker — especially on edge devices or cloud VMs

No flashy UI, no new models… just pure, sweet performance gains.

If you’re running Ollama locally or in production — this one’s a game-changer.

Pro tip: Double-check your `CGO_CFLAGS` if building from source — don’t accidentally undo the magic! 🛠️

#Ollama #AI #Performance #GoLang #Optimization

🔗 View Release