Repository navigation
fix: build bundled Linux dependencies with -O2 - #64
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe build environment now adds a Linux-only libcrypt exclusion to ChangesLinux build flags
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The changes align with the stated Linux build objectives, with no merge-blocking risk identified. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The changes are confined to Linux build configuration, with no demonstrated new attack path or weakened security control. However, the resulting executable’s symbol exports and native-extension cryptographic provider binding remain unverified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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 |
4eff425 to
0d521a4
Compare
|
0d521a4 to
e5c426d
Compare
On Linux, dependency_build_env set CFLAGS to just -fPIC (plus -mno-outline-atomics on arm64). Setting CFLAGS replaces each project's default optimization level, so libyaml, libffi, libxcrypt, zlib, OpenSSL, ncurses, and libedit were all compiled at -O0. zlib compression, bcrypt, and the C parts of OpenSSL ran several times slower than with distro builds of the same libraries. Put -O2 ahead of any inherited CFLAGS, so dependencies are optimized even when CFLAGS is set, while an -O level in CFLAGS still takes precedence. -fPIC stays last so it always applies. -O2 matches what Ubuntu builds these libraries with, except zlib, which Ubuntu and upstream build at -O3. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
e5c426d to
8f85b3b
Compare
On Linux,
dependency_build_envsetCFLAGS="-fPIC", which replaces each project's default optimization level, so libyaml, libffi, libxcrypt, zlib, OpenSSL, ncurses, and libedit were all compiled at-O0. With Ruby 3.4.10 held constant, bcrypt is about 5.7x slower and zlib about 4.7x slower than on the officialruby:3.4.10image. bcrypt is affected because the gem'scrypt_racalls resolve to the libxcrypt linked intoruby.This puts
-O2ahead of any inheritedCFLAGS, so dependencies are optimized even whenCFLAGSis set, while an-Olevel inCFLAGSstill takes precedence.-fPICstays last so it always applies.-O2matches what Ubuntu builds these libraries with, except zlib, which Ubuntu and upstream build at-O3.Reproduction
docker run --rm -i ruby:3.4.10 bash -s < repro.shOn arm64 Linux:
🤖 Generated with Claude Code