Skip to content

Avoid using __builtin_cpu_supports#505

Merged
cataphract merged 1 commit into
masterfrom
glopes/avoid-builtin-cpu-supports
Jul 16, 2026
Merged

Avoid using __builtin_cpu_supports#505
cataphract merged 1 commit into
masterfrom
glopes/avoid-builtin-cpu-supports

Conversation

@cataphract

Copy link
Copy Markdown
Contributor

No description provided.

@cataphract
cataphract requested a review from a team as a code owner July 15, 2026 11:59
@cataphract
cataphract requested a review from Copilot July 15, 2026 12:05
@datadog-prod-us1-3

datadog-prod-us1-3 Bot commented Jul 15, 2026

Copy link
Copy Markdown

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 84.57% (+0.00%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 7d3104f | Docs | Datadog PR Page | Give us feedback!

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes reliance on __builtin_cpu_supports for SSE4.1 detection in the glibc-compat ceilf implementation on __x86_64__, replacing it with a local cpuid-based runtime check to avoid problematic relocations / missing symbols in some toolchain + Rust linking scenarios.

Changes:

  • Add a local cpu_supports_sse41() helper that checks SSE4.1 support via cpuid.
  • Switch the ceilf runtime dispatch to use cpu_supports_sse41() instead of __builtin_cpu_init() / __builtin_cpu_supports("sse4.1").

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/glibc-compat/math.c Outdated
Comment thread src/glibc-compat/math.c Outdated
Comment thread src/glibc-compat/math.c Outdated
@github-actions

Copy link
Copy Markdown

Dynamic Artifact Size Comparison 📦

Artifact Previous Release This PR Difference
darwin-arm64::libddwaf.dylib 2020272 2020272 0.00%
darwin-universal::libddwaf.dylib 4232112 4232112 0.00%
darwin-x86_64::libddwaf.dylib 2207728 2207728 0.00%
linux-aarch64::libddwaf.so 2387392 2387392 0.00%
linux-armv7::libddwaf.so 2056572 2056572 0.00%
linux-i386::libddwaf.so 2308204 2308204 0.00%
linux-x86_64::libddwaf.so 2581096 2576520 -0.17%
windows-arm64::ddwaf.dll 6726144 6726144 0.00%
windows-win32::ddwaf.dll 3328000 3328000 0.00%
windows-x64::ddwaf.dll 4066816 4066816 0.00%

Static Artifact Size Comparison 📦

Artifact Previous Release This PR Difference
darwin-arm64::libddwaf.a 92555960 92555960 0.00%
darwin-arm64::libddwaf.a.stripped 4717512 4717512 0.00%
darwin-universal::libddwaf.a 186638424 186638424 0.00%
darwin-universal::libddwaf.a.stripped 10047056 10047056 0.00%
darwin-x86_64::libddwaf.a 94082416 94082416 0.00%
darwin-x86_64::libddwaf.a.stripped 5329496 5329496 0.00%
linux-aarch64::libddwaf.a 75526438 75526438 0.00%
linux-aarch64::libddwaf.a.stripped 12185562 12185562 0.00%
linux-armv7::libddwaf.a 66734102 66734106 0.00%
linux-armv7::libddwaf.a.stripped 11193482 11193482 0.00%
linux-i386::libddwaf.a 64921342 64921346 0.00%
linux-i386::libddwaf.a.stripped 9680046 9680046 0.00%
linux-x86_64::libddwaf.a 76013242 76013338 0.00%
linux-x86_64::libddwaf.a.stripped 11989382 11989262 0.00%
windows-arm64::ddwaf.lib 16902 16902 0.00%
windows-arm64::ddwaf_static.lib 134713692 134713692 0.00%
windows-win32::ddwaf.lib 17228 17228 0.00%
windows-win32::ddwaf_static.lib 47488650 47488650 0.00%
windows-x64::ddwaf.lib 16902 16902 0.00%
windows-x64::ddwaf_static.lib 55265732 55265732 0.00%

@cataphract
cataphract force-pushed the glopes/avoid-builtin-cpu-supports branch from 0079324 to 7d3104f Compare July 15, 2026 13:34
@cataphract
cataphract merged commit 16a1015 into master Jul 16, 2026
56 checks passed
@cataphract
cataphract deleted the glopes/avoid-builtin-cpu-supports branch July 16, 2026 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants