11class Libomp < Formula
22 desc "LLVM's OpenMP runtime library"
33 homepage "https://openmp.llvm.org/"
4- url "https://github.com/llvm/llvm-project/releases/download/llvmorg-21 .1.1/openmp-21 .1.1 .src.tar.xz"
5- sha256 "eb10379045844c2d2f1b89a15fd1beaf9cd0de524180c6648e9ea17a0661ece2 "
4+ url "https://github.com/llvm/llvm-project/releases/download/llvmorg-22 .1.2/llvm-project-22 .1.2 .src.tar.xz"
5+ sha256 "62f2f13ff25b1bb28ea507888e858212d19aafb65e8e72b4a65ee0629ec4ae0c "
66 license "MIT"
7+ compatibility_version 1
78
89 livecheck do
910 url :stable
1011 regex ( /^llvmorg[._-]v?(\d +(?:\. \d +)+)$/i )
1112 end
1213
1314 bottle do
14- sha256 cellar : :any , arm64_tahoe : "9cb33c9a98f8641ee9a93e73599a76f8818da51a4af97c69a0681d4dd58430d7"
15- sha256 cellar : :any , arm64_sequoia : "5204e2053f959a16ed6edfff053f003087a0b83c987327c3c6232cb1a7798578"
16- sha256 cellar : :any , arm64_sonoma : "afb6e5bc3a861eaeef2b99efbff1826445d2632c8057146ecb338e79bdf8d533"
17- sha256 cellar : :any , arm64_ventura : "9beb2682487c5d6a7539ea3c9edabb37a06e41f145615bb7ce16bf4316ce11c9"
18- sha256 cellar : :any , sonoma : "d5f577174311174ad4f980fb7a7e721f029f9c7bec0adc5d917298e9c3eedfbd"
19- sha256 cellar : :any , ventura : "c0c00008299a9156df71d4421ae52354944cf686ad2711aeeb8e45ad4f91c444"
20- sha256 cellar : :any_skip_relocation , arm64_linux : "597261ad147b32f06ed8b25e22447c6a47514b04dc8f794405e6c03e344bbeb3"
21- sha256 cellar : :any_skip_relocation , x86_64_linux : "02160edec57a67db8722e046033aee4f12311dd065dd7452c09da87b5a98b00f"
15+ sha256 cellar : :any , arm64_tahoe : "82f432712cb1f241632bfcea9598cd728c7e4e581e49cd3dc3cbb401fe549a31"
16+ sha256 cellar : :any , arm64_sequoia : "2f17e338c69f7d875b22b95e738ea8c3ef5f62fcd0849715be682c1d50cb5d71"
17+ sha256 cellar : :any , arm64_sonoma : "9f27e4eff9f59796a750ddc868266d484513b9206ad497552bbd3ae143c49c6b"
18+ sha256 cellar : :any , sonoma : "4573c77b99131736d7bcd4a7fcd7482da0d33651e3b8dd83d89be5ec64e9f8a7"
19+ sha256 cellar : :any_skip_relocation , arm64_linux : "33fe5e2b84cec1ff8c626c03acafdf88b1837174f58bc76253ec3132850068f8"
20+ sha256 cellar : :any_skip_relocation , x86_64_linux : "8e3b1fe1d7d935ef3ba8bbe2e0a7d1949d557ffe193d02acf49258ecb485e636"
2221 end
2322
2423 # Ref: https://github.com/Homebrew/homebrew-core/issues/112107
2524 keg_only "it can override GCC headers and result in broken builds"
2625
2726 depends_on "cmake" => :build
28- depends_on "lit" => :build
2927 uses_from_macos "llvm" => :build
3028
3129 on_linux do
32- depends_on "python@3.13"
33- end
34-
35- resource "cmake" do
36- url "https://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.1/cmake-21.1.1.src.tar.xz"
37- sha256 "9c0b9064b7d0f2a3004f1d034aadf84d2af4e5dca2135ebf697b0a1eb85ef769"
38-
39- livecheck do
40- formula :parent
41- end
30+ depends_on "python@3.14"
4231 end
4332
4433 def install
45- odie "cmake resource needs to be updated" if version != resource ( "cmake" ) . version
46-
47- ( buildpath /"src" ) . install buildpath . children
48- ( buildpath /"cmake" ) . install resource ( "cmake" )
49-
5034 # Disable LIBOMP_INSTALL_ALIASES, otherwise the library is installed as
5135 # libgomp alias which can conflict with GCC's libgomp.
52- args = [ "-DLIBOMP_INSTALL_ALIASES=OFF" ]
36+ args = %w[
37+ -DLIBOMP_INSTALL_ALIASES=OFF
38+ -DLLVM_ENABLE_RUNTIMES=openmp
39+ -DOPENMP_ENABLE_OMPT_TOOLS=OFF
40+ ]
5341 args << "-DOPENMP_ENABLE_LIBOMPTARGET=OFF" if OS . linux?
5442
5543 # Build universal binary #Flycast
@@ -58,13 +46,13 @@ def install
5846 args << "-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64"
5947 args << "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15"
6048
61- # system "cmake", "-S", "src ", "-B", "build/shared", *std_cmake_args , *args
49+ # system "cmake", "-S", "runtimes ", "-B", "build/shared", *args , *std_cmake_args
6250 # system "cmake", "--build", "build/shared"
6351 # system "cmake", "--install", "build/shared"
6452
65- system "cmake" , "-S" , "src " , "-B" , "build/static" ,
53+ system "cmake" , "-S" , "runtimes " , "-B" , "build/static" ,
6654 "-DLIBOMP_ENABLE_SHARED=OFF" ,
67- *std_cmake_args , *args
55+ *args , *std_cmake_args
6856 system "cmake" , "--build" , "build/static"
6957 system "cmake" , "--install" , "build/static"
7058 end
0 commit comments