From 1a1aad317f71731d8440f695d29bc12c28011de2 Mon Sep 17 00:00:00 2001 From: Tristan Partin Date: Sun, 23 Oct 2022 10:41:29 -0500 Subject: [PATCH] Move JNISystemDependency to dependencies.base.detect_compiler Only searches if the project already added that language before. --- mesonbuild/dependencies/dev.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mesonbuild/dependencies/dev.py b/mesonbuild/dependencies/dev.py index 5e7ccd4b0..606bb4fa6 100644 --- a/mesonbuild/dependencies/dev.py +++ b/mesonbuild/dependencies/dev.py @@ -27,10 +27,9 @@ import typing as T from mesonbuild.interpreterbase.decorators import FeatureDeprecated from .. import mesonlib, mlog -from ..compilers.detect import detect_compiler_for from ..environment import get_llvm_tool_names from ..mesonlib import version_compare, stringlistify, extract_as_list -from .base import DependencyException, DependencyMethods, strip_system_libdirs, SystemDependency, ExternalDependency, DependencyTypeName +from .base import DependencyException, DependencyMethods, detect_compiler, strip_system_libdirs, SystemDependency, ExternalDependency, DependencyTypeName from .cmake import CMakeDependency from .configtool import ConfigToolDependency from .factory import DependencyFactory @@ -532,7 +531,7 @@ class JNISystemDependency(SystemDependency): m = self.env.machines[self.for_machine] if 'java' not in environment.coredata.compilers[self.for_machine]: - detect_compiler_for(environment, 'java', self.for_machine) + detect_compiler(self.name, environment, self.for_machine, 'java') self.javac = environment.coredata.compilers[self.for_machine]['java'] self.version = self.javac.version