summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Partin <tristan@partin.io>2022-04-04 18:35:49 -0500
committerDylan Baker <dylan@pnwbakers.com>2022-07-06 12:04:59 -0700
commitaf846a109f70b0b063b9d3c7a30225a22949bb48 (patch)
tree41669ad4bbd4b0ecd010440a09c05556964e89fd
parent6096337904da94486195b0d96b3913024b17b9d6 (diff)
downloadmeson-af846a109f70b0b063b9d3c7a30225a22949bb48.tar.gz
Detect Cython and Vala compilers on the build machine always
Transpilers need to run on the build machine in order to generate their output, which can then be taken by a cross-compiler to create the final output.
-rw-r--r--mesonbuild/compilers/detect.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/mesonbuild/compilers/detect.py b/mesonbuild/compilers/detect.py
index 5e147a848..a503535c7 100644
--- a/mesonbuild/compilers/detect.py
+++ b/mesonbuild/compilers/detect.py
@@ -14,7 +14,7 @@
from __future__ import annotations
from ..mesonlib import (
- MesonException, EnvironmentException,
+ MesonException, EnvironmentException, MachineChoice,
search_version, is_windows, Popen_safe, windows_proof_rm,
)
from ..envconfig import BinaryTable
@@ -149,7 +149,6 @@ if T.TYPE_CHECKING:
from .objcpp import ObjCPPCompiler
from ..linkers import StaticLinker
from ..environment import Environment
- from ..mesonlib import MachineChoice
from ..programs import ExternalProgram
@@ -941,7 +940,7 @@ def detect_cs_compiler(env: 'Environment', for_machine: MachineChoice) -> Compil
def detect_cython_compiler(env: 'Environment', for_machine: MachineChoice) -> Compiler:
"""Search for a cython compiler."""
- compilers, _, _ = _get_compilers(env, 'cython', for_machine)
+ compilers, _, _ = _get_compilers(env, 'cython', MachineChoice.BUILD)
is_cross = env.is_cross_build(for_machine)
info = env.machines[for_machine]
@@ -962,7 +961,7 @@ def detect_cython_compiler(env: 'Environment', for_machine: MachineChoice) -> Co
raise EnvironmentException('Unreachable code (exception to make mypy happy)')
def detect_vala_compiler(env: 'Environment', for_machine: MachineChoice) -> Compiler:
- exelist = env.lookup_binary_entry(for_machine, 'vala')
+ exelist = env.lookup_binary_entry(MachineChoice.BUILD, 'vala')
is_cross = env.is_cross_build(for_machine)
info = env.machines[for_machine]
if exelist is None: