bazel: Use jdk11_headless to build bazel
Use the same JDK for building bazel and for its runtime.
Effectively, the former `toolchain_hostjdk8` java toolchain has been deprecated
and should no longer be used (in newer bazel)[1]:
```
# Deprecated, do not use.
# It will be removed after migration to Java toolchain resolution.
default_java_toolchain(
name = "toolchain_hostjdk8",
...
)
```
[1]: 4fc4868065/tools/jdk/BUILD.tools (L384-L387)
This commit is contained in:
parent
6d8c431eb0
commit
e22cf98520
@ -100,7 +100,7 @@ let
|
|||||||
[ bash coreutils findutils gawk gnugrep gnutar gnused gzip which unzip file zip ];
|
[ bash coreutils findutils gawk gnugrep gnutar gnused gzip which unzip file zip ];
|
||||||
|
|
||||||
# Java toolchain used for the build and tests
|
# Java toolchain used for the build and tests
|
||||||
javaToolchain = "@bazel_tools//tools/jdk:toolchain_host${buildJdkName}";
|
javaToolchain = "@bazel_tools//tools/jdk:toolchain_${buildJdkName}";
|
||||||
|
|
||||||
platforms = lib.platforms.linux ++ lib.platforms.darwin;
|
platforms = lib.platforms.linux ++ lib.platforms.darwin;
|
||||||
|
|
||||||
|
@ -11677,8 +11677,8 @@ in
|
|||||||
bazel_3 = callPackage ../development/tools/build-managers/bazel/bazel_3 {
|
bazel_3 = callPackage ../development/tools/build-managers/bazel/bazel_3 {
|
||||||
inherit (darwin) cctools;
|
inherit (darwin) cctools;
|
||||||
inherit (darwin.apple_sdk.frameworks) CoreFoundation CoreServices Foundation;
|
inherit (darwin.apple_sdk.frameworks) CoreFoundation CoreServices Foundation;
|
||||||
buildJdk = jdk8_headless;
|
buildJdk = jdk11_headless;
|
||||||
buildJdkName = "jdk8";
|
buildJdkName = "java11";
|
||||||
runJdk = jdk11_headless;
|
runJdk = jdk11_headless;
|
||||||
stdenv = if stdenv.cc.isClang then llvmPackages_6.stdenv else stdenv;
|
stdenv = if stdenv.cc.isClang then llvmPackages_6.stdenv else stdenv;
|
||||||
bazel_self = bazel_3;
|
bazel_self = bazel_3;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user