dmitry-chirkov-dremio commented on code in PR #55506:
URL: https://github.com/apache/arrow/pull/55506#discussion_r4559022797


##########
cpp/src/gandiva/engine.cc:
##########
@@ -117,9 +117,44 @@
 
 namespace gandiva {
 
+// Oldest macOS release for each architecture. Used as a floor and as the 
fallback when
+// the Darwin kernel version is missing or can't be converted.
+constexpr unsigned kMinMacOSMajorArm64 = 11;  // first Apple Silicon release
+constexpr unsigned kMinMacOSMinorArm64 = 0;
+constexpr unsigned kMinMacOSMajorX86 = 10;
+constexpr unsigned kMinMacOSMinorX86 = 15;
+
 extern const unsigned char kPrecompiledBitcode[];
 extern const size_t kPrecompiledBitcodeSize;
 
+llvm::Triple NormalizeDarwinTriple(llvm::Triple triple) {

Review Comment:
   Part of me wants to do something like this which is conditioned on 
https://github.com/llvm/llvm-project/pull/210674 making it into LLVM 24 (and 
then us supporting it). Thoughts?
   
   ```c++
   llvm::Triple triple(llvm::sys::getDefaultTargetTriple());
   
   #if LLVM_VERSION_MAJOR < 24
     if (triple.getOS() == llvm::Triple::Darwin) {
       if (triple.isAArch64()) {
         triple.setOSName("macosx11.0");
       } else if (triple.getArch() == llvm::Triple::x86_64) {
         triple.setOSName("macosx10.15");
       }
     }
   #endif
   
   llvm::orc::JITTargetMachineBuilder jtmb(triple);
   ```



-- 
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]

Reply via email to