Skip to content

Commit

Permalink
Re-use clang.py's 'clang_color_args' (identical to 'clangcl_color_args')
Browse files Browse the repository at this point in the history
  • Loading branch information
GertyP committed Aug 1, 2023
1 parent d07ed78 commit 50ae7fb
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions mesonbuild/compilers/mixins/visualstudio.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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):

Expand Down Expand Up @@ -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'):
Expand Down

0 comments on commit 50ae7fb

Please sign in to comment.