aboutsummaryrefslogtreecommitdiff
path: root/compilers.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2015-12-26 20:28:23 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2015-12-28 18:35:41 +0200
commit7e1df7540d519f63b4309b380e69b10ca5bff103 (patch)
treeba210c90a5c74ec81ffeb4bb6d1d5323f1d4cc44 /compilers.py
parent5e12c03db6c0bf7b266fc351dc24e13d4e6f737e (diff)
downloadmeson-7e1df7540d519f63b4309b380e69b10ca5bff103.zip
meson-7e1df7540d519f63b4309b380e69b10ca5bff103.tar.gz
meson-7e1df7540d519f63b4309b380e69b10ca5bff103.tar.bz2
Handle custom targets that produce static libraries that are then linked to other targets.
Diffstat (limited to 'compilers.py')
-rw-r--r--compilers.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/compilers.py b/compilers.py
index 06dd1d0..73fd8cd 100644
--- a/compilers.py
+++ b/compilers.py
@@ -28,6 +28,7 @@ cpp_suffixes = ['cc', 'cpp', 'cxx', 'h', 'hh', 'hpp', 'hxx', 'c++']
c_suffixes = ['c']
clike_suffixes = c_suffixes + cpp_suffixes
obj_suffixes = ['o', 'obj', 'res']
+lib_suffixes = ['a', 'lib', 'dll', 'dylib', 'so']
def is_header(fname):
if hasattr(fname, 'fname'):
@@ -47,6 +48,12 @@ def is_object(fname):
suffix = fname.split('.')[-1]
return suffix in obj_suffixes
+def is_library(fname):
+ if hasattr(fname, 'fname'):
+ fname = fname.fname
+ suffix = fname.split('.')[-1]
+ return suffix in lib_suffixes
+
gnulike_buildtype_args = {'plain' : [],
'debug' : ['-g'],
'debugoptimized' : ['-O2', '-g'],