lriggs opened a new pull request, #55506:
URL: https://github.com/apache/arrow/pull/55506
### Rationale for this change
An incorrect target machine setting leads to an undefined function reference
in LLVM resulting in a crash for MacOS.
Gandiva builds its JIT target machine from
llvm::sys::getDefaultTargetTriple(), which on macOS is an
unversioned/kernel-versioned arm64-apple-darwin<N>. LLVM only enables macOS
libcalls such as __exp10 for the macosx OS name. With optimization off, pow(10,
x) (used by get_scale_multiplier for scales outside 0..19) is
lowered to llvm.exp10, and the backend finds no libcall for it.
### What changes are included in this PR?
Changes to the target machine configuration on Mac. Unit test.
### Are these changes tested?
Yes manual with a repro and unit test.
### Are there any user-facing changes?
No.
**This PR contains a "Critical Fix".** Fixes a potential crash on MacOs when
optimization is disabled for llvm.
### Was AI used for this PR?
**PR code and description written by:**
- [X] Human
- [X] AI
**Reviewed before submission by:**
- [X] Human
- [ ] AI
- [ ] Not reviewed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]