diff options
| -rw-r--r-- | mesonbuild/backend/ninjabackend.py | 6 | ||||
| -rw-r--r-- | mesonbuild/compilers/asm.py | 3 | ||||
| -rw-r--r-- | mesonbuild/compilers/compilers.py | 3 |
3 files changed, 9 insertions, 3 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index 0196e84d2..ba3f1d36e 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -2614,7 +2614,7 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47485''')) command = compiler.get_exelist() args = ['$ARGS'] + depargs + NinjaCommandArg.list(compiler.get_output_args('$out'), Quoting.none) + ['-cm', '$in'] description = 'Compiling to C object $in' - if compiler.get_argument_syntax() == 'msvc': + if compiler.get_depfile_format() == 'msvc': deps = 'msvc' depfile = None else: @@ -2672,7 +2672,7 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47485''')) command = compiler.get_exelist() args = ['$ARGS'] + depargs + NinjaCommandArg.list(compiler.get_output_args('$out'), Quoting.none) + compiler.get_compile_only_args() + ['$in'] description = f'Compiling {compiler.get_display_language()} object $out' - if compiler.get_argument_syntax() == 'msvc': + if compiler.get_depfile_format() == 'msvc': deps = 'msvc' depfile = None else: @@ -2698,7 +2698,7 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47485''')) else: command = compiler.get_exelist() + ['$ARGS'] + depargs + output + compiler.get_compile_only_args() + ['$in'] description = 'Precompiling header $in' - if compiler.get_argument_syntax() == 'msvc': + if compiler.get_depfile_format() == 'msvc': deps = 'msvc' depfile = None else: diff --git a/mesonbuild/compilers/asm.py b/mesonbuild/compilers/asm.py index fd6a0de33..052e83329 100644 --- a/mesonbuild/compilers/asm.py +++ b/mesonbuild/compilers/asm.py @@ -266,6 +266,9 @@ class MasmARMCompiler(ASMCompiler): def get_crt_compile_args(self, crt_val: str, buildtype: str) -> T.List[str]: return [] + def get_depfile_format(self) -> str: + return 'msvc' + def depfile_for_object(self, objfile: str) -> T.Optional[str]: return None diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index 34520bbb6..4432f198a 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -1240,6 +1240,9 @@ class Compiler(HoldableObject, metaclass=abc.ABCMeta): def get_include_args(self, path: str, is_system: bool) -> T.List[str]: return [] + def get_depfile_format(self) -> str: + return 'msvc' if self.get_argument_syntax() == 'msvc' else 'gcc' + def depfile_for_object(self, objfile: str) -> T.Optional[str]: return objfile + '.' + self.get_depfile_suffix() |
