aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/compilers')
-rw-r--r--mesonbuild/compilers/__init__.py8
-rw-r--r--mesonbuild/compilers/compilers.py22
2 files changed, 15 insertions, 15 deletions
diff --git a/mesonbuild/compilers/__init__.py b/mesonbuild/compilers/__init__.py
index 8c5a7f7..217357b 100644
--- a/mesonbuild/compilers/__init__.py
+++ b/mesonbuild/compilers/__init__.py
@@ -28,7 +28,7 @@ __all__ = [
'all_languages',
'base_options',
'clib_langs',
- 'clike_langs',
+ 'clink_langs',
'c_suffixes',
'cpp_suffixes',
'get_macos_dylib_install_name',
@@ -42,7 +42,7 @@ __all__ = [
'is_source',
'lang_suffixes',
'sanitizer_compile_args',
- 'sort_clike',
+ 'sort_clink',
'ArmCCompiler',
'ArmCPPCompiler',
@@ -105,7 +105,7 @@ from .compilers import (
all_languages,
base_options,
clib_langs,
- clike_langs,
+ clink_langs,
c_suffixes,
cpp_suffixes,
get_macos_dylib_install_name,
@@ -119,7 +119,7 @@ from .compilers import (
is_library,
lang_suffixes,
sanitizer_compile_args,
- sort_clike,
+ sort_clink,
ClangCompiler,
CompilerArgs,
GnuCompiler,
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py
index 2c48d07..45caf55 100644
--- a/mesonbuild/compilers/compilers.py
+++ b/mesonbuild/compilers/compilers.py
@@ -54,11 +54,11 @@ clib_langs = ('objcpp', 'cpp', 'objc', 'c', 'fortran',)
# 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()
# XXX: Add Rust to this?
-clike_langs = ('d',) + clib_langs
-clike_suffixes = ()
-for _l in clike_langs + ('vala',):
- clike_suffixes += lang_suffixes[_l]
-clike_suffixes += ('h', 'll', 's')
+clink_langs = ('d',) + clib_langs
+clink_suffixes = ()
+for _l in clink_langs + ('vala',):
+ clink_suffixes += lang_suffixes[_l]
+clink_suffixes += ('h', 'll', 's')
soregex = re.compile(r'.*\.so(\.[0-9]+)?(\.[0-9]+)?(\.[0-9]+)?$')
@@ -72,18 +72,18 @@ cflags_mapping = {'c': 'CFLAGS',
'vala': 'VALAFLAGS',
'rust': 'RUSTFLAGS'}
-# All these are only for C-like languages; see `clike_langs` above.
+# All these are only for C-linkable languages; see `clink_langs` above.
-def sort_clike(lang):
+def sort_clink(lang):
'''
Sorting function to sort the list of languages according to
- reversed(compilers.clike_langs) and append the unknown langs in the end.
+ reversed(compilers.clink_langs) and append the unknown langs in the end.
The purpose is to prefer C over C++ for files that can be compiled by
both such as assembly, C, etc. Also applies to ObjC, ObjC++, etc.
'''
- if lang not in clike_langs:
+ if lang not in clink_langs:
return 1
- return -clike_langs.index(lang)
+ return -clink_langs.index(lang)
def is_header(fname):
if hasattr(fname, 'fname'):
@@ -95,7 +95,7 @@ def is_source(fname):
if hasattr(fname, 'fname'):
fname = fname.fname
suffix = fname.split('.')[-1].lower()
- return suffix in clike_suffixes
+ return suffix in clink_suffixes
def is_assembly(fname):
if hasattr(fname, 'fname'):