From 39902041e7671a94abcf691fa4a769b5cb4fc4fb Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 30 Mar 2020 02:34:03 +0300 Subject: project.cmake: make it --platform aware --- project/boost/toolchain.py | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) (limited to 'project/boost') diff --git a/project/boost/toolchain.py b/project/boost/toolchain.py index cacc2c2..a77c073 100644 --- a/project/boost/toolchain.py +++ b/project/boost/toolchain.py @@ -18,7 +18,7 @@ import abc from contextlib import contextmanager import logging -import project.os +import project.mingw from project.utils import temp_file @@ -61,28 +61,9 @@ class MinGW(Toolchain): def get_b2_args(self): return [f'--user-config={self.config_path}', f'toolset=gcc-{MinGW.TAG}'] - @staticmethod - def _get_compiler_prefix(platform): - target_arch = platform.get_address_model() - if target_arch == 32: - return 'i686' - if target_arch == 64: - return 'x86_64' - raise RuntimeError(f'unexpected address model: {target_arch}') - - @staticmethod - def _get_compiler_path(platform): - prefix = MinGW._get_compiler_prefix(platform) - ext = '' - if project.os.on_windows_like(): - # Boost.Build wants the .exe extension at the end on Cygwin. - ext = '.exe' - path = f'{prefix}-w64-mingw32-g++{ext}' - return path - @staticmethod def _format_mingw_user_config(platform): - compiler = MinGW._get_compiler_path(platform) + compiler = project.mingw.get_gxx(platform) features = { 'target-os': 'windows', 'address-model': platform.get_address_model(), -- cgit v1.2.3