Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Formula/apache-arrow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class ApacheArrow < Formula
mirror "https://archive.apache.org/dist/arrow/arrow-4.0.1/apache-arrow-4.0.1.tar.gz"
sha256 "75ccbfa276b925c6b1c978a920ff2f30c4b0d3fdf8b51777915b6f69a211896e"
license "Apache-2.0"
revision 1
revision 2
head "https://github.com/apache/arrow.git"

bottle do
Expand All @@ -30,9 +30,13 @@ class ApacheArrow < Formula
depends_on "re2"
depends_on "snappy"
depends_on "thrift"
depends_on "utf8proc"
depends_on "zstd"

def install
# https://github.com/Homebrew/homebrew-core/issues/76537
ENV.runtime_cpu_detection if Hardware::CPU.intel?
Copy link
Member

Choose a reason for hiding this comment

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

@carlocab all ENV.runtime_cpu_detection calls will be gates by an if Hardware::CPU.intel?, right? What happens if you call it on ARM, do things break? I almost wonder if it just makes more sense to make it a no-op on ARM so it doesn't need the if statements

Copy link
Member Author

@carlocab carlocab Jul 5, 2021

Choose a reason for hiding this comment

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

Not necessarily -- I think it should also be safe (and desirable) to use unconditionally for formulae like openblas. I just don't know of a good way to actually inspect the binary objects to check that it probably does the right thing on ARM.


# link against system libc++ instead of llvm provided libc++
ENV.remove "HOMEBREW_LIBRARY_PATHS", Formula["llvm"].opt_lib
args = %W[
Expand All @@ -51,6 +55,7 @@ def install
-DARROW_WITH_LZ4=ON
-DARROW_WITH_SNAPPY=ON
-DARROW_WITH_BROTLI=ON
-DARROW_WITH_UTF8PROC=ON
-DARROW_INSTALL_NAME_RPATH=OFF
-DPYTHON_EXECUTABLE=#{Formula["python@3.9"].bin/"python3"}
]
Expand Down
3 changes: 3 additions & 0 deletions style_exceptions/runtime_cpu_detection_allowlist.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[
"apache-arrow"
]