aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mesonlib/universal.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2021-09-28 17:32:44 +0300
committerGitHub <noreply@github.com>2021-09-28 17:32:44 +0300
commitfa47d8dab048f8880091f24b77eb192b82a35e9e (patch)
tree764b54a18eb49003e334fe2fbb7fc0b4025d6bac /mesonbuild/mesonlib/universal.py
parent5fa0fd3b473f792bd7333cf6ae6e2f4c851b6108 (diff)
parent32dbdff3b2d37d1ec7ef976c0b4f30d1d0472e70 (diff)
downloadmeson-fa47d8dab048f8880091f24b77eb192b82a35e9e.zip
meson-fa47d8dab048f8880091f24b77eb192b82a35e9e.tar.gz
meson-fa47d8dab048f8880091f24b77eb192b82a35e9e.tar.bz2
Merge pull request #9014 from bonzini/mixed-language-link
Use appropriate compiler for the source file for "links" tests with file argument
Diffstat (limited to 'mesonbuild/mesonlib/universal.py')
-rw-r--r--mesonbuild/mesonlib/universal.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/mesonbuild/mesonlib/universal.py b/mesonbuild/mesonlib/universal.py
index 1680541..f81c01a 100644
--- a/mesonbuild/mesonlib/universal.py
+++ b/mesonbuild/mesonlib/universal.py
@@ -421,6 +421,10 @@ class File(HoldableObject):
absdir = builddir
return os.path.join(absdir, self.relative_name())
+ @property
+ def suffix(self) -> str:
+ return os.path.splitext(self.fname)[1][1:].lower()
+
def endswith(self, ending: str) -> bool:
return self.fname.endswith(ending)