aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/compilers.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/compilers/compilers.py')
-rw-r--r--mesonbuild/compilers/compilers.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py
index bcd5820..771d543 100644
--- a/mesonbuild/compilers/compilers.py
+++ b/mesonbuild/compilers/compilers.py
@@ -503,6 +503,7 @@ class Compiler(HoldableObject, metaclass=abc.ABCMeta):
linker: T.Optional['DynamicLinker'] = None,
full_version: T.Optional[str] = None, is_cross: bool = False):
self.exelist = ccache + exelist
+ self.exelist_no_ccache = exelist
# In case it's been overridden by a child class already
if not hasattr(self, 'file_suffixes'):
self.file_suffixes = lang_suffixes[self.language]
@@ -593,8 +594,8 @@ class Compiler(HoldableObject, metaclass=abc.ABCMeta):
def symbols_have_underscore_prefix(self, env: 'Environment') -> bool:
raise EnvironmentException('%s does not support symbols_have_underscore_prefix ' % self.get_id())
- def get_exelist(self) -> T.List[str]:
- return self.exelist.copy()
+ def get_exelist(self, ccache: bool = True) -> T.List[str]:
+ return self.exelist.copy() if ccache else self.exelist_no_ccache.copy()
def get_linker_exelist(self) -> T.List[str]:
return self.linker.get_exelist()
@@ -815,7 +816,7 @@ class Compiler(HoldableObject, metaclass=abc.ABCMeta):
if extra_args:
commands += extra_args
# Generate full command-line with the exelist
- command_list = self.get_exelist() + commands.to_native()
+ command_list = self.get_exelist(ccache=not no_ccache) + commands.to_native()
mlog.debug('Running compile:')
mlog.debug('Working directory: ', tmpdirname)
mlog.debug('Command line: ', ' '.join(command_list), '\n')