Merge pull request #316300 from nessdoor/openjdk-clang
openjdk: enable Clang-based builds of jdk{11,17,19,20,21,22}
This commit is contained in:
commit
a773e50715
@ -74,7 +74,17 @@ let
|
|||||||
"--with-lcms=system"
|
"--with-lcms=system"
|
||||||
"--with-stdc++lib=dynamic"
|
"--with-stdc++lib=dynamic"
|
||||||
"--disable-warnings-as-errors"
|
"--disable-warnings-as-errors"
|
||||||
] ++ lib.optional stdenv.isx86_64 "--with-jvm-features=zgc"
|
]
|
||||||
|
# Cannot be built by recent versions of Clang, as far as I can tell (see
|
||||||
|
# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260319). Known to
|
||||||
|
# compile with LLVM 12.
|
||||||
|
++ lib.optionals stdenv.cc.isClang [
|
||||||
|
"--with-toolchain-type=clang"
|
||||||
|
# Explicitly tell Clang to compile C++ files as C++, see
|
||||||
|
# https://github.com/NixOS/nixpkgs/issues/150655#issuecomment-1935304859
|
||||||
|
"--with-extra-cxxflags=-xc++"
|
||||||
|
]
|
||||||
|
++ lib.optional stdenv.isx86_64 "--with-jvm-features=zgc"
|
||||||
++ lib.optional headless "--enable-headless-only"
|
++ lib.optional headless "--enable-headless-only"
|
||||||
++ lib.optional (!headless && enableJavaFX) "--with-import-modules=${openjfx}";
|
++ lib.optional (!headless && enableJavaFX) "--with-import-modules=${openjfx}";
|
||||||
|
|
||||||
|
@ -98,7 +98,14 @@ let
|
|||||||
"--with-zlib=system"
|
"--with-zlib=system"
|
||||||
"--with-lcms=system"
|
"--with-lcms=system"
|
||||||
"--with-stdc++lib=dynamic"
|
"--with-stdc++lib=dynamic"
|
||||||
] ++ lib.optional headless "--enable-headless-only"
|
]
|
||||||
|
++ lib.optionals stdenv.cc.isClang [
|
||||||
|
"--with-toolchain-type=clang"
|
||||||
|
# Explicitly tell Clang to compile C++ files as C++, see
|
||||||
|
# https://github.com/NixOS/nixpkgs/issues/150655#issuecomment-1935304859
|
||||||
|
"--with-extra-cxxflags=-xc++"
|
||||||
|
]
|
||||||
|
++ lib.optional headless "--enable-headless-only"
|
||||||
++ lib.optional (!headless && enableJavaFX) "--with-import-modules=${openjfx}";
|
++ lib.optional (!headless && enableJavaFX) "--with-import-modules=${openjfx}";
|
||||||
|
|
||||||
separateDebugInfo = true;
|
separateDebugInfo = true;
|
||||||
|
@ -100,7 +100,14 @@ let
|
|||||||
"--with-zlib=system"
|
"--with-zlib=system"
|
||||||
"--with-lcms=system"
|
"--with-lcms=system"
|
||||||
"--with-stdc++lib=dynamic"
|
"--with-stdc++lib=dynamic"
|
||||||
] ++ lib.optional headless "--enable-headless-only"
|
]
|
||||||
|
++ lib.optionals stdenv.cc.isClang [
|
||||||
|
"--with-toolchain-type=clang"
|
||||||
|
# Explicitly tell Clang to compile C++ files as C++, see
|
||||||
|
# https://github.com/NixOS/nixpkgs/issues/150655#issuecomment-1935304859
|
||||||
|
"--with-extra-cxxflags=-xc++"
|
||||||
|
]
|
||||||
|
++ lib.optional headless "--enable-headless-only"
|
||||||
++ lib.optional (!headless && enableJavaFX) "--with-import-modules=${openjfx}";
|
++ lib.optional (!headless && enableJavaFX) "--with-import-modules=${openjfx}";
|
||||||
|
|
||||||
separateDebugInfo = true;
|
separateDebugInfo = true;
|
||||||
|
@ -98,7 +98,14 @@ let
|
|||||||
"--with-zlib=system"
|
"--with-zlib=system"
|
||||||
"--with-lcms=system"
|
"--with-lcms=system"
|
||||||
"--with-stdc++lib=dynamic"
|
"--with-stdc++lib=dynamic"
|
||||||
] ++ lib.optional headless "--enable-headless-only"
|
]
|
||||||
|
++ lib.optionals stdenv.cc.isClang [
|
||||||
|
"--with-toolchain-type=clang"
|
||||||
|
# Explicitly tell Clang to compile C++ files as C++, see
|
||||||
|
# https://github.com/NixOS/nixpkgs/issues/150655#issuecomment-1935304859
|
||||||
|
"--with-extra-cxxflags=-xc++"
|
||||||
|
]
|
||||||
|
++ lib.optional headless "--enable-headless-only"
|
||||||
++ lib.optional (!headless && enableJavaFX) "--with-import-modules=${openjfx}";
|
++ lib.optional (!headless && enableJavaFX) "--with-import-modules=${openjfx}";
|
||||||
|
|
||||||
separateDebugInfo = true;
|
separateDebugInfo = true;
|
||||||
|
@ -91,7 +91,14 @@ let
|
|||||||
"--with-zlib=system"
|
"--with-zlib=system"
|
||||||
"--with-lcms=system"
|
"--with-lcms=system"
|
||||||
"--with-stdc++lib=dynamic"
|
"--with-stdc++lib=dynamic"
|
||||||
] ++ lib.optional stdenv.isx86_64 "--with-jvm-features=zgc"
|
]
|
||||||
|
++ lib.optionals stdenv.cc.isClang [
|
||||||
|
"--with-toolchain-type=clang"
|
||||||
|
# Explicitly tell Clang to compile C++ files as C++, see
|
||||||
|
# https://github.com/NixOS/nixpkgs/issues/150655#issuecomment-1935304859
|
||||||
|
"--with-extra-cxxflags=-xc++"
|
||||||
|
]
|
||||||
|
++ lib.optional stdenv.isx86_64 "--with-jvm-features=zgc"
|
||||||
++ lib.optional headless "--enable-headless-only"
|
++ lib.optional headless "--enable-headless-only"
|
||||||
++ lib.optional (!headless && enableJavaFX) "--with-import-modules=${openjfx}";
|
++ lib.optional (!headless && enableJavaFX) "--with-import-modules=${openjfx}";
|
||||||
|
|
||||||
|
@ -156,6 +156,12 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
"--with-lcms=system"
|
"--with-lcms=system"
|
||||||
"--with-stdc++lib=dynamic"
|
"--with-stdc++lib=dynamic"
|
||||||
]
|
]
|
||||||
|
++ lib.optionals stdenv.cc.isClang [
|
||||||
|
"--with-toolchain-type=clang"
|
||||||
|
# Explicitly tell Clang to compile C++ files as C++, see
|
||||||
|
# https://github.com/NixOS/nixpkgs/issues/150655#issuecomment-1935304859
|
||||||
|
"--with-extra-cxxflags=-xc++"
|
||||||
|
]
|
||||||
++ lib.optional headless "--enable-headless-only"
|
++ lib.optional headless "--enable-headless-only"
|
||||||
++ lib.optional (!headless && enableJavaFX) "--with-import-modules=${openjfx}";
|
++ lib.optional (!headless && enableJavaFX) "--with-import-modules=${openjfx}";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user