diff --git a/dev/tasks/homebrew-formulae/apache-arrow.rb b/dev/tasks/homebrew-formulae/apache-arrow.rb index b037b832cac83..a78806314406e 100644 --- a/dev/tasks/homebrew-formulae/apache-arrow.rb +++ b/dev/tasks/homebrew-formulae/apache-arrow.rb @@ -57,6 +57,10 @@ class ApacheArrow < Formula fails_with gcc: "5" def install + # This isn't for https://github.com/Homebrew/homebrew-core/issues/76537 . + # This may improve performance. + ENV.runtime_cpu_detection if Hardware::CPU.intel? + # link against system libc++ instead of llvm provided libc++ ENV.remove "HOMEBREW_LIBRARY_PATHS", Formula["llvm"].opt_lib args = %W[ @@ -87,6 +91,11 @@ def install -DARROW_WITH_ZSTD=ON -DPARQUET_BUILD_EXECUTABLES=ON ] + # Disable runtime SIMD dispatch. It may cause "illegal opcode" + # error on Intel Mac because of one-definition-rule violation. + # + # https://github.com/apache/arrow/issues/36685 + args << "-DARROW_RUNTIME_SIMD_LEVEL=OFF" if OS.mac? and Hardware::CPU.intel? system "cmake", "-S", "cpp", "-B", "build", *args, *std_cmake_args system "cmake", "--build", "build"