Skip to content

Commit cc14ed1

Browse files
authored
[Java.Interop.BootstrapTasks] <JdkInfo/> requires include dir (dotnet#366)
The Microsoft OpenJDK package does *not* contain the `includes` directory, or `jdk.h`, or anything else needed to build native code. Consequently, it is not useful for *building* Java.Interop. Update the `<JdkInfo/>` task to require that `JdkInfo.IncludePath` includes directories. (We don't currently check that `jdk.h` exists, but we could do so in the future if necessary.) This causes the Microsoft OpenJDK package to be *skipped* during `make prepare`, causing the Java.Interop build to instead use a "system" JDK installation which *does* provide the `include` directories.
1 parent 659711c commit cc14ed1

File tree

1 file changed

+1
-0
lines changed
  • build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks

1 file changed

+1
-0
lines changed

build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks/JdkInfo.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public override bool Execute ()
4242

4343
XATInfo jdk = XATInfo.GetKnownSystemJdkInfos (CreateLogger ())
4444
.Where (j => maxVersion != null ? j.Version <= maxVersion : true)
45+
.Where (j => j.IncludePath.Any ())
4546
.FirstOrDefault ();
4647

4748
if (jdk == null) {

0 commit comments

Comments
 (0)