From 0c22798b1ad4678abb205280060175678a790c4a Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Wed, 21 Aug 2019 13:12:30 -0700 Subject: compilers: replace CompilerType with MachineInfo Now that the linkers are split out of the compilers this enum is only used to know what platform we're compiling for. Which is what the MachineInfo class is for --- mesonbuild/compilers/java.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'mesonbuild/compilers/java.py') diff --git a/mesonbuild/compilers/java.py b/mesonbuild/compilers/java.py index fb1a190..cc195ff 100644 --- a/mesonbuild/compilers/java.py +++ b/mesonbuild/compilers/java.py @@ -12,17 +12,23 @@ # See the License for the specific language governing permissions and # limitations under the License. -import os.path, shutil, subprocess +import os.path +import shutil +import subprocess +import typing from ..mesonlib import EnvironmentException, MachineChoice - from .compilers import Compiler, java_buildtype_args from .mixins.islinker import BasicLinkerIsCompilerMixin +if typing.TYPE_CHECKING: + from ..envconfig import MachineInfo + class JavaCompiler(BasicLinkerIsCompilerMixin, Compiler): - def __init__(self, exelist, version, for_machine: MachineChoice): + def __init__(self, exelist, version, for_machine: MachineChoice, + info: 'MachineInfo'): self.language = 'java' - super().__init__(exelist, version, for_machine) + super().__init__(exelist, version, for_machine, info) self.id = 'unknown' self.is_cross = False self.javarunner = 'java' -- cgit v1.1