Handle a cross compilation setup that only has a C compiler.

pull/11478/head
Jussi Pakkanen 2 years ago
parent bc38db035e
commit 2aa4d6e54e
  1. 5
      mesonbuild/scripts/env2mfile.py

@ -145,7 +145,10 @@ def deb_detect_cmake(infos: MachineInfo, data: T.Dict[str, str]) -> None:
system_processor_map = {'arm': 'armv7l', 'mips64el': 'mips64', 'powerpc64le': 'ppc64le'}
infos.cmake["CMAKE_C_COMPILER"] = infos.compilers['c']
infos.cmake["CMAKE_CXX_COMPILER"] = infos.compilers['cpp']
try:
infos.cmake["CMAKE_CXX_COMPILER"] = infos.compilers['cpp']
except KeyError:
pass
infos.cmake["CMAKE_SYSTEM_NAME"] = system_name_map[data['DEB_HOST_ARCH_OS']]
infos.cmake["CMAKE_SYSTEM_PROCESSOR"] = system_processor_map.get(data['DEB_HOST_GNU_CPU'],
data['DEB_HOST_GNU_CPU'])

Loading…
Cancel
Save