Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x265: disable SVE2 on arm64 Linux #212513

Merged
merged 1 commit into from
Mar 21, 2025
Merged
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
33 changes: 19 additions & 14 deletions Formula/x/x265.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,34 +24,39 @@ class X265 < Formula
def install
ENV.runtime_cpu_detection
# Build based off the script at ./build/linux/multilib.sh
args = std_cmake_args + %W[
args = %W[
-DLINKED_10BIT=ON
-DLINKED_12BIT=ON
-DEXTRA_LINK_FLAGS=-L.
-DEXTRA_LIB=x265_main10.a;x265_main12.a
-DCMAKE_INSTALL_RPATH=#{rpath}
]
high_bit_depth_args = std_cmake_args + %w[
args << "-DENABLE_SVE2=OFF" if OS.linux? && Hardware::CPU.arm?
high_bit_depth_args = %w[
-DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF
-DENABLE_SHARED=OFF -DENABLE_CLI=OFF
]
high_bit_depth_args << "-DENABLE_SVE2=OFF" if OS.linux? && Hardware::CPU.arm?

(buildpath/"8bit").mkpath
system "cmake", "-S", buildpath/"source", "-B", "10bit",
"-DENABLE_HDR10_PLUS=ON",
*high_bit_depth_args,
*std_cmake_args
system "cmake", "--build", "10bit"
mv "10bit/libx265.a", buildpath/"8bit/libx265_main10.a"

mkdir "10bit" do
system "cmake", buildpath/"source", "-DENABLE_HDR10_PLUS=ON", *high_bit_depth_args
system "make"
mv "libx265.a", buildpath/"8bit/libx265_main10.a"
end
system "cmake", "-S", buildpath/"source", "-B", "12bit",
"-DMAIN12=ON",
*high_bit_depth_args,
*std_cmake_args
system "cmake", "--build", "12bit"
mv "12bit/libx265.a", buildpath/"8bit/libx265_main12.a"

mkdir "12bit" do
system "cmake", buildpath/"source", "-DMAIN12=ON", *high_bit_depth_args
system "make"
mv "libx265.a", buildpath/"8bit/libx265_main12.a"
end
system "cmake", "-S", buildpath/"source", "-B", "8bit", *args, *std_cmake_args
system "cmake", "--build", "8bit"

cd "8bit" do
system "cmake", buildpath/"source", *args
system "make"
mv "libx265.a", "libx265_main.a"

if OS.mac?
Expand Down
Loading