From 07777e15d47dbddaf849d24b3a30c85745c533ca Mon Sep 17 00:00:00 2001 From: John Ericson Date: Thu, 4 Oct 2018 20:52:08 -0400 Subject: Purge `is_cross` and friends without changing user interfaces In most cases instead pass `for_machine`, the name of the relevant machines (what compilers target, what targets run on, etc). This allows us to use the cross code path in the native case, deduplicating the code. As one can see, environment got bigger as more information is kept structured there, while ninjabackend got a smaller. Overall a few amount of lines were added, but the hope is what's added is a lot simpler than what's removed. --- mesonbuild/compilers/java.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mesonbuild/compilers/java.py') diff --git a/mesonbuild/compilers/java.py b/mesonbuild/compilers/java.py index 5d7f865..ea1fa0f 100644 --- a/mesonbuild/compilers/java.py +++ b/mesonbuild/compilers/java.py @@ -14,14 +14,14 @@ import os.path, shutil, subprocess -from ..mesonlib import EnvironmentException +from ..mesonlib import EnvironmentException, MachineChoice from .compilers import Compiler, java_buildtype_args class JavaCompiler(Compiler): - def __init__(self, exelist, version): + def __init__(self, exelist, version, for_machine: MachineChoice): self.language = 'java' - super().__init__(exelist, version) + super().__init__(exelist, version, for_machine) self.id = 'unknown' self.is_cross = False self.javarunner = 'java' -- cgit v1.1