mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 08:23:09 +00:00
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,9 +74,19 @@ let
|
||||
"--with-lcms=system"
|
||||
"--with-stdc++lib=dynamic"
|
||||
"--disable-warnings-as-errors"
|
||||
] ++ lib.optional stdenv.isx86_64 "--with-jvm-features=zgc"
|
||||
++ lib.optional headless "--enable-headless-only"
|
||||
++ lib.optional (!headless && enableJavaFX) "--with-import-modules=${openjfx}";
|
||||
]
|
||||
# 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 && enableJavaFX) "--with-import-modules=${openjfx}";
|
||||
|
||||
separateDebugInfo = true;
|
||||
|
||||
|
@ -98,8 +98,15 @@ let
|
||||
"--with-zlib=system"
|
||||
"--with-lcms=system"
|
||||
"--with-stdc++lib=dynamic"
|
||||
] ++ lib.optional headless "--enable-headless-only"
|
||||
++ lib.optional (!headless && enableJavaFX) "--with-import-modules=${openjfx}";
|
||||
]
|
||||
++ 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}";
|
||||
|
||||
separateDebugInfo = true;
|
||||
|
||||
|
@ -100,8 +100,15 @@ let
|
||||
"--with-zlib=system"
|
||||
"--with-lcms=system"
|
||||
"--with-stdc++lib=dynamic"
|
||||
] ++ lib.optional headless "--enable-headless-only"
|
||||
++ lib.optional (!headless && enableJavaFX) "--with-import-modules=${openjfx}";
|
||||
]
|
||||
++ 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}";
|
||||
|
||||
separateDebugInfo = true;
|
||||
|
||||
|
@ -98,8 +98,15 @@ let
|
||||
"--with-zlib=system"
|
||||
"--with-lcms=system"
|
||||
"--with-stdc++lib=dynamic"
|
||||
] ++ lib.optional headless "--enable-headless-only"
|
||||
++ lib.optional (!headless && enableJavaFX) "--with-import-modules=${openjfx}";
|
||||
]
|
||||
++ 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}";
|
||||
|
||||
separateDebugInfo = true;
|
||||
|
||||
|
@ -91,9 +91,16 @@ let
|
||||
"--with-zlib=system"
|
||||
"--with-lcms=system"
|
||||
"--with-stdc++lib=dynamic"
|
||||
] ++ lib.optional stdenv.isx86_64 "--with-jvm-features=zgc"
|
||||
++ lib.optional headless "--enable-headless-only"
|
||||
++ lib.optional (!headless && enableJavaFX) "--with-import-modules=${openjfx}";
|
||||
]
|
||||
++ 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 && enableJavaFX) "--with-import-modules=${openjfx}";
|
||||
|
||||
separateDebugInfo = true;
|
||||
|
||||
|
@ -156,6 +156,12 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
"--with-lcms=system"
|
||||
"--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 && enableJavaFX) "--with-import-modules=${openjfx}";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user