aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2016-12-09 12:49:56 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2016-12-13 09:20:34 +0530
commit0fc4ad2a0bc8f60f0c9336a39cf71746d1dab9b9 (patch)
tree1dd364d26cadc9fa5eb1a17ea405c0f40843dcfb /mesonbuild/compilers.py
parent7b3d00fee4bc76e9b6492321572db7ddd6d7f674 (diff)
downloadmeson-0fc4ad2a0bc8f60f0c9336a39cf71746d1dab9b9.zip
meson-0fc4ad2a0bc8f60f0c9336a39cf71746d1dab9b9.tar.gz
meson-0fc4ad2a0bc8f60f0c9336a39cf71746d1dab9b9.tar.bz2
Also use objects to populate target compilers
This avoids us having no compilers at all for targets that are composed entirely of objects with no sources. Now we will always have a compiler for a target even if it is composed entirely of objects generated with custom targets unless it has completely unknown sources.
Diffstat (limited to 'mesonbuild/compilers.py')
-rw-r--r--mesonbuild/compilers.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/mesonbuild/compilers.py b/mesonbuild/compilers.py
index aa53444..a1dbbb3 100644
--- a/mesonbuild/compilers.py
+++ b/mesonbuild/compilers.py
@@ -45,8 +45,15 @@ lang_suffixes = {
}
cpp_suffixes = lang_suffixes['cpp'] + ('h',)
c_suffixes = lang_suffixes['c'] + ('h',)
-clike_suffixes = lang_suffixes['c'] + lang_suffixes['cpp'] + ('h',)
-
+# List of languages that can be linked with C code directly by the linker
+# used in build.py:process_compilers() and build.py:get_dynamic_linker()
+clike_langs = ('objcpp', 'objc', 'd', 'cpp', 'c', 'fortran',)
+clike_suffixes = ()
+for l in clike_langs:
+ clike_suffixes += lang_suffixes[l]
+clike_suffixes += ('h',)
+
+# These are used in backend/backends.py:generated_target()
def is_header(fname):
if hasattr(fname, 'fname'):
fname = fname.fname