build: make CXX overridable (CXX ?= g++) for clang builds#45
Conversation
The Makefile hardcoded `CXX = g++`, which a `CXX=clang++ make` environment prefix does not override. Downstream (ProxySQL deps build) compiles this with clang in containers that ship only clang/clang++ (no g++), so the build failed with exit 127 (g++: command not found). Using `?=` lets the environment-provided compiler win while keeping g++ as the default.
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThe Makefile's C++ compiler variable assignment is updated from unconditional to conditional ( ChangesBuild Configuration Flexibility
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
MakefilehardcodedCXX = g++. ACXX=clang++ makeenvironment prefix does not override a Makefile=assignment, so downstream consumers that build ParserSQL with clang in containers shipping only clang/clang++ (no g++) failed with exit 127 (g++: command not found).Changing to
CXX ?= g++lets the environment-provided compiler win while keeping g++ as the default.Impact
Surfaced building ProxySQL 3.0.9/3.1.9 clang packages (16 distro variants failed). Cut as v1.0.9 and re-vendored into ProxySQL.
Test
CXX=clang++ make libnow compiles with clang++ (previously ignored).Summary by CodeRabbit