Skip to content

Commit

Permalink
Disable runtime SIMD dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Jul 26, 2023
1 parent d625270 commit 695b7b4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions dev/tasks/homebrew-formulae/apache-arrow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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[
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 695b7b4

Please sign in to comment.