From 7460e4ccda339d167402bd077dcaa364fab5e172 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Mon, 25 Nov 2019 12:05:19 -0800 Subject: compilers: Make get_display_language a class or static method Currently this is done at the instance level, but we need it at the class level to allow compiler "lang" args to be gotten early enough. This patch also removes a couple of instance of branch/leaf classes providing their own implementation that is identical to the Compiler version. --- mesonbuild/compilers/cpp.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mesonbuild/compilers/cpp.py') diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py index 0cf77ab..a2dd60f 100644 --- a/mesonbuild/compilers/cpp.py +++ b/mesonbuild/compilers/cpp.py @@ -67,7 +67,8 @@ class CPPCompiler(CLikeCompiler, Compiler): Compiler.__init__(self, exelist, version, for_machine, info, **kwargs) CLikeCompiler.__init__(self, is_cross, exe_wrap) - def get_display_language(self): + @staticmethod + def get_display_language(): return 'C++' def get_no_stdinc_args(self): -- cgit v1.1