bazel_4: 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]:
```
default_java_toolchain(
name = "toolchain_hostjdk8",
...
)
```
[1]: https://github.com/bazelbuild/bazel/blob/4fc48680653a71aacbfd555436ba8f9a0742d3d9/tools/jdk/BUILD.tools#L384-L387
This commit is contained in:
committed by
Dmitry Ivankov
parent
b461c9e5bc
commit
b56ac70602
@@ -106,7 +106,7 @@ let
|
|||||||
[ bash coreutils findutils gawk gnugrep gnutar gnused gzip which unzip file zip python27 python3 ];
|
[ bash coreutils findutils gawk gnugrep gnutar gnused gzip which unzip file zip python27 python3 ];
|
||||||
|
|
||||||
# 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;
|
||||||
|
|
||||||
|
|||||||
@@ -11737,8 +11737,8 @@ in
|
|||||||
bazel_4 = callPackage ../development/tools/build-managers/bazel/bazel_4 {
|
bazel_4 = callPackage ../development/tools/build-managers/bazel/bazel_4 {
|
||||||
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.stdenv else stdenv;
|
stdenv = if stdenv.cc.isClang then llvmPackages.stdenv else stdenv;
|
||||||
bazel_self = bazel_4;
|
bazel_self = bazel_4;
|
||||||
|
|||||||
Reference in New Issue
Block a user