aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/vala.py
diff options
context:
space:
mode:
authorTristan Partin <tristan@partin.io>2023-07-12 15:12:36 -0500
committerTristan Partin <tristan@partin.io>2023-07-12 18:56:06 -0500
commit1624354f33bf0a33f0e715ba1ca391ae0154ad19 (patch)
tree0a62b985ee62c5feba912abc190f478a48effa7b /mesonbuild/compilers/vala.py
parentab21dc0384e1d03806b561b47942fb28da052efe (diff)
downloadmeson-1624354f33bf0a33f0e715ba1ca391ae0154ad19.zip
meson-1624354f33bf0a33f0e715ba1ca391ae0154ad19.tar.gz
meson-1624354f33bf0a33f0e715ba1ca391ae0154ad19.tar.bz2
Use CompileCheckMode enum
There were a ton of naked strings with TODOs telling us to use the enum.
Diffstat (limited to 'mesonbuild/compilers/vala.py')
-rw-r--r--mesonbuild/compilers/vala.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/compilers/vala.py b/mesonbuild/compilers/vala.py
index 40cfc14..e1477b9 100644
--- a/mesonbuild/compilers/vala.py
+++ b/mesonbuild/compilers/vala.py
@@ -19,7 +19,7 @@ import typing as T
from .. import mlog
from ..mesonlib import EnvironmentException, version_compare, OptionKey
-from .compilers import Compiler, LibType
+from .compilers import CompileCheckMode, Compiler, LibType
if T.TYPE_CHECKING:
from ..envconfig import MachineInfo
@@ -100,7 +100,7 @@ class ValaCompiler(Compiler):
extra_flags += self.get_compile_only_args()
else:
extra_flags += environment.coredata.get_external_link_args(self.for_machine, self.language)
- with self.cached_compile(code, environment.coredata, extra_args=extra_flags, mode='compile') as p:
+ with self.cached_compile(code, environment.coredata, extra_args=extra_flags, mode=CompileCheckMode.COMPILE) as p:
if p.returncode != 0:
msg = f'Vala compiler {self.name_string()!r} cannot compile programs'
raise EnvironmentException(msg)
@@ -122,7 +122,7 @@ class ValaCompiler(Compiler):
args += env.coredata.get_external_args(self.for_machine, self.language)
vapi_args = ['--pkg', libname]
args += vapi_args
- with self.cached_compile(code, env.coredata, extra_args=args, mode='compile') as p:
+ with self.cached_compile(code, env.coredata, extra_args=args, mode=CompileCheckMode.COMPILE) as p:
if p.returncode == 0:
return vapi_args
# Not found? Try to find the vapi file itself.