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.
pull/10572/head
Tristan Partin 3 years ago committed by Dylan Baker
parent 6096337904
commit af846a109f
  1. 7
      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:

Loading…
Cancel
Save