From 3fedd978a2cec2f9b74468501de76829b5bd22d3 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 26 Sep 2023 14:27:42 +0200 Subject: [PATCH] python/build/meson: disable ccache because Meson detects it automatically --- python/build/meson.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/python/build/meson.py b/python/build/meson.py index 6469e4d58..1a7311955 100644 --- a/python/build/meson.py +++ b/python/build/meson.py @@ -6,6 +6,11 @@ from typing import Optional, Sequence, Union from build.project import Project from .toolchain import AnyToolchain +def __no_ccache(cmd: str) -> str: + if cmd.startswith('ccache '): + cmd = cmd[7:] + return cmd + def make_cross_file(toolchain: AnyToolchain) -> str: if toolchain.is_windows: system = 'windows' @@ -40,8 +45,8 @@ def make_cross_file(toolchain: AnyToolchain) -> str: with open(path, 'w') as f: f.write(f""" [binaries] -c = '{toolchain.cc}' -cpp = '{toolchain.cxx}' +c = '{__no_ccache(toolchain.cc)}' +cpp = '{__no_ccache(toolchain.cxx)}' ar = '{toolchain.ar}' strip = '{toolchain.strip}' pkgconfig = '{toolchain.pkg_config}'