-
-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #193657 from Homebrew/apache-arrow-llvm
apache-arrow: backport LLVM 19 support, update dependencies
- Loading branch information
Showing
2 changed files
with
63 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,20 +6,20 @@ class Vineyard < Formula | |
url "https://github.com/v6d-io/v6d/releases/download/v0.23.2/v6d-0.23.2.tar.gz" | ||
sha256 "2a2788ed77b9459477b3e90767a910e77e2035a34f33c29c25b9876568683fd4" | ||
license "Apache-2.0" | ||
revision 5 | ||
revision 6 | ||
|
||
bottle do | ||
rebuild 1 | ||
sha256 arm64_sequoia: "e0b3bb0b7d5d1d05ae0209c60e848be0ed63d9fdc7db6ff9b7cc51ce62b864b0" | ||
sha256 arm64_sonoma: "ab2d74aa237dffa7d8c3c6cfbcd3849644e1b2c202c0dc502e8ec4b929c1cd1f" | ||
sha256 arm64_ventura: "fd10aa8b7085f27018464b8bf91ac28d0f6b983d1e9c0ef32eb0435726245915" | ||
sha256 sonoma: "5676475adc6e6b9b58ab403d418fd14423128887c0436f17cf7f863d8bd36044" | ||
sha256 ventura: "ec2c89c0a1c723efc3ac0b21c58f83f1158f86c7a54d728107b83b0ca39cf9c4" | ||
sha256 cellar: :any_skip_relocation, x86_64_linux: "df83d67107663ce1c59b1f7c5ea63c1d4bab4608a6cce6a35ca48df509f85ac4" | ||
sha256 arm64_sequoia: "f207ec66068890b869177a0eadad0c42e5347f4da45b0536746d792b4559e76f" | ||
sha256 arm64_sonoma: "55bd20736624b45cb6c1315f64fe92f11b8c401a9ae4a6208208ddd4d6351383" | ||
sha256 arm64_ventura: "15f8603be5c0d72954bf36b5b78b2690c29649f497ba28f96366f0355fe43676" | ||
sha256 sonoma: "a813107094d2dd535d1e53133c397f8be7e6bf026812abe3528526b4c4aa903c" | ||
sha256 ventura: "33a196fda4385724478f30de6323fd65c3b6e143797ca3f199142fec5fc426ee" | ||
sha256 cellar: :any_skip_relocation, x86_64_linux: "a858805f653607fb358050102b941bb00a06fecdf99dc97d2296e8f76966d961" | ||
end | ||
|
||
depends_on "cmake" => [:build, :test] | ||
depends_on "llvm@18" => [:build, :test] | ||
depends_on "llvm" => :build # for clang Python bindings | ||
depends_on "openssl@3" => :build # indirect (not linked) but CMakeLists.txt checks for it | ||
depends_on "[email protected]" => :build | ||
depends_on "apache-arrow" | ||
depends_on "boost" | ||
|
@@ -28,55 +28,39 @@ class Vineyard < Formula | |
depends_on "etcd-cpp-apiv3" | ||
depends_on "gflags" | ||
depends_on "glog" | ||
depends_on "hiredis" | ||
depends_on "libgrape-lite" | ||
depends_on "open-mpi" | ||
depends_on "openssl@3" | ||
depends_on "protobuf" | ||
depends_on "redis" | ||
|
||
on_macos do | ||
depends_on "abseil" | ||
depends_on "c-ares" | ||
depends_on "re2" | ||
end | ||
|
||
fails_with gcc: "5" | ||
|
||
def llvm | ||
deps.map(&:to_formula).find { |f| f.name.match?(/^llvm(@\d+)?$/) } | ||
end | ||
|
||
resource "setuptools" do | ||
url "https://files.pythonhosted.org/packages/1c/1c/8a56622f2fc9ebb0df743373ef1a96c8e20410350d12f44ef03c588318c3/setuptools-70.1.0.tar.gz" | ||
sha256 "01a1e793faa5bd89abc851fa15d0a0db26f160890c7102cd8dce643e886b47f5" | ||
url "https://files.pythonhosted.org/packages/27/b8/f21073fde99492b33ca357876430822e4800cdf522011f18041351dfa74b/setuptools-75.1.0.tar.gz" | ||
sha256 "d59a21b17a275fb872a9c3dae73963160ae079f1049ed956880cd7c09b120538" | ||
end | ||
|
||
def install | ||
python = "python3.12" | ||
venv = virtualenv_create(libexec, python) | ||
python3 = "python3.12" | ||
venv = virtualenv_create(buildpath/"venv", python3) | ||
venv.pip_install resources | ||
# LLVM is keg-only. | ||
ENV.prepend_path "PYTHONPATH", llvm.opt_prefix/Language::Python.site_packages(python) | ||
|
||
# Work around an Xcode 15 linker issue which causes linkage against LLVM's | ||
# libunwind due to it being present in a library search path. | ||
ENV.remove "HOMEBREW_LIBRARY_PATHS", llvm.opt_lib if DevelopmentTools.clang_build_version >= 1500 | ||
ENV.append "LDFLAGS", "-Wl,-rpath,#{llvm.opt_lib}/#{Hardware::CPU.arch}-unknown-linux-gnu" if OS.linux? | ||
|
||
system "cmake", "-S", ".", "-B", "build", | ||
"-DCMAKE_CXX_STANDARD=17", | ||
"-DCMAKE_CXX_STANDARD_REQUIRED=TRUE", | ||
"-DPYTHON_EXECUTABLE=#{venv.root}/bin/python", | ||
"-DUSE_EXTERNAL_ETCD_LIBS=ON", | ||
"-DUSE_EXTERNAL_REDIS_LIBS=ON", | ||
"-DUSE_EXTERNAL_HIREDIS_LIBS=ON", | ||
"-DBUILD_VINEYARD_TESTS=OFF", | ||
"-DUSE_LIBUNWIND=OFF", | ||
"-DLIBGRAPELITE_INCLUDE_DIRS=#{Formula["libgrape-lite"].opt_include}", | ||
"-DOPENSSL_ROOT_DIR=#{Formula["openssl@3"].opt_prefix}", | ||
"-DBUILD_VINEYARD_SERVER_ETCD=OFF", # Fails with protobuf 27 | ||
*std_cmake_args | ||
llvm = deps.map(&:to_formula).find { |f| f.name.match?(/^llvm(@\d+)?$/) } | ||
ENV.prepend_path "PYTHONPATH", llvm.opt_prefix/Language::Python.site_packages(python3) | ||
|
||
args = [ | ||
"-DBUILD_VINEYARD_PYTHON_BINDINGS=OFF", | ||
"-DBUILD_VINEYARD_TESTS=OFF", | ||
"-DCMAKE_CXX_STANDARD=17", | ||
"-DCMAKE_CXX_STANDARD_REQUIRED=TRUE", | ||
"-DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON", # for newer protobuf | ||
"-DLIBGRAPELITE_INCLUDE_DIRS=#{Formula["libgrape-lite"].opt_include}", | ||
"-DOPENSSL_ROOT_DIR=#{Formula["openssl@3"].opt_prefix}", | ||
"-DPYTHON_EXECUTABLE=#{venv.root}/bin/python", | ||
"-DUSE_EXTERNAL_ETCD_LIBS=ON", | ||
"-DUSE_EXTERNAL_HIREDIS_LIBS=ON", | ||
"-DUSE_EXTERNAL_REDIS_LIBS=ON", | ||
"-DUSE_LIBUNWIND=OFF", | ||
] | ||
args << "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-dead_strip_dylibs" if OS.mac? | ||
|
||
system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args | ||
system "cmake", "--build", "build" | ||
system "cmake", "--install", "build" | ||
|
||
|
@@ -117,17 +101,12 @@ def install | |
target_link_libraries(vineyard-test PRIVATE ${VINEYARD_LIBRARIES}) | ||
EOS | ||
|
||
# Work around an Xcode 15 linker issue which causes linkage against LLVM's | ||
# libunwind due to it being present in a library search path. | ||
ENV.remove "HOMEBREW_LIBRARY_PATHS", llvm.opt_lib if DevelopmentTools.clang_build_version >= 1500 | ||
|
||
# Remove Homebrew's lib directory from LDFLAGS as it is not available during | ||
# `shell_output`. | ||
ENV.remove "LDFLAGS", "-L#{HOMEBREW_PREFIX}/lib" | ||
|
||
system "cmake", "-S", testpath, "-B", testpath/"build", | ||
*std_cmake_args | ||
system "cmake", "--build", testpath/"build" | ||
system "cmake", "-S", ".", "-B", "build", *std_cmake_args | ||
system "cmake", "--build", "build" | ||
|
||
# prepare vineyardd | ||
vineyardd_pid = spawn bin/"vineyardd", "--norpc", | ||
|