-
-
Notifications
You must be signed in to change notification settings - Fork 12.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Let's test whether this builds with `llvm@17` to help track down the build failure with Apple Clang 16.
- Loading branch information
Showing
1 changed file
with
8 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,7 @@ class Openjdk < Formula | |
keg_only :shadowed_by_macos | ||
|
||
depends_on "autoconf" => :build | ||
depends_on "llvm@17" => :build | ||
depends_on "pkg-config" => :build | ||
depends_on xcode: :build | ||
depends_on "giflib" | ||
|
@@ -38,20 +39,6 @@ class Openjdk < Formula | |
uses_from_macos "zip" | ||
uses_from_macos "zlib" | ||
|
||
on_macos do | ||
if DevelopmentTools.clang_build_version == 1600 | ||
depends_on "llvm" => :build | ||
|
||
fails_with :clang do | ||
cause <<~EOS | ||
Exception in thread "main" java.lang.ClassFormatError: StackMapTable format error: bad verification type | ||
at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:64) | ||
at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:52) | ||
EOS | ||
end | ||
end | ||
end | ||
|
||
on_linux do | ||
depends_on "alsa-lib" | ||
depends_on "fontconfig" | ||
|
@@ -92,10 +79,8 @@ class Openjdk < Formula | |
end | ||
|
||
def install | ||
Check failure on line 81 in Formula/o/openjdk.rb GitHub Actions / Linux`brew install --verbose --formula --build-bottle openjdk` failed on Linux!
|
||
if DevelopmentTools.clang_build_version == 1600 | ||
ENV.llvm_clang | ||
ENV.remove "HOMEBREW_LIBRARY_PATHS", Formula["llvm"].opt_lib | ||
end | ||
ENV["CC"] = Formula["llvm@17"].opt_bin/"clang" | ||
ENV["CXX"] = Formula["llvm@17"].opt_bin/"clang++" | ||
|
||
boot_jdk = buildpath/"boot-jdk" | ||
resource("boot-jdk").stage boot_jdk | ||
|
@@ -145,8 +130,13 @@ def install | |
--with-stdc++lib=dynamic | ||
] | ||
end | ||
ldflags += deps.filter_map { |dep| "-L#{dep.to_formula.opt_lib}" unless dep.build? } | ||
args << "--with-extra-ldflags=#{ldflags.join(" ")}" | ||
|
||
cflags = deps.filter_map { |dep| "-I#{dep.to_formula.opt_include}" unless dep.build? } | ||
args << "--with-extra-cflags=#{cflags.join(" ")}" | ||
args << "--with-extra-cxxflags=#{cflags.join(" ")}" | ||
|
||
system "bash", "configure", *args | ||
|
||
ENV["MAKEFLAGS"] = "JOBS=#{ENV.make_jobs}" | ||
|