From 50ae7fb095a26c4df7b02256a6549fe15fef14f4 Mon Sep 17 00:00:00 2001 From: Dan Hawson <18214721+GertyP@users.noreply.github.com> Date: Sat, 29 Jul 2023 15:21:53 +0100 Subject: [PATCH] Re-use clang.py's 'clang_color_args' (identical to 'clangcl_color_args') --- mesonbuild/compilers/mixins/visualstudio.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/mesonbuild/compilers/mixins/visualstudio.py b/mesonbuild/compilers/mixins/visualstudio.py index 32b4cc10fcb5..fa022ae2ea55 100644 --- a/mesonbuild/compilers/mixins/visualstudio.py +++ b/mesonbuild/compilers/mixins/visualstudio.py @@ -25,6 +25,7 @@ from ... import mesonlib from ... import mlog from mesonbuild.compilers.compilers import CompileCheckMode +from .clang import clang_color_args if T.TYPE_CHECKING: from ...environment import Environment @@ -458,11 +459,6 @@ def get_instruction_set_args(self, instruction_set: str) -> T.Optional[T.List[st def get_pch_base_name(self, header: str) -> str: return os.path.basename(header) -clangcl_color_args: T.Dict[str, T.List[str]] = { - 'auto': ['-fcolor-diagnostics'], - 'always': ['-fcolor-diagnostics'], - 'never': ['-fno-color-diagnostics'], -} class ClangClCompiler(VisualStudioLikeCompiler): @@ -511,7 +507,7 @@ def get_dependency_compile_args(self, dep: 'Dependency') -> T.List[str]: return dep.get_compile_args() def get_colorout_args(self, colortype: str) -> T.List[str]: - return clangcl_color_args[colortype][:] + return clang_color_args[colortype][:] def get_lto_compile_args(self, *, threads: int = 0, mode: str = 'default') -> T.List[str]: if not mesonlib.version_compare(self.version, '>=15.0.1'):