summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/__init__.py
diff options
context:
space:
mode:
authorDaniel Mensinger <daniel@mensinger-ka.de>2021-06-02 19:30:55 +0200
committerDaniel Mensinger <daniel@mensinger-ka.de>2021-06-25 19:34:48 +0200
commit3f889606c7debafacd3da9c9e74caa61b45a13ff (patch)
tree2bc4821baebd6e50bfd2999d034328d60c596ff2 /mesonbuild/compilers/__init__.py
parent0f237b8d1d84e4906c758bbef44d81e93207f8e4 (diff)
downloadmeson-3f889606c7debafacd3da9c9e74caa61b45a13ff.tar.gz
Split compiler detection from Environment
This moves all the compiler detection logic into the new compilers.detect module. This dramatically reduces the size and complexity of Environment.
Diffstat (limited to 'mesonbuild/compilers/__init__.py')
-rw-r--r--mesonbuild/compilers/__init__.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/mesonbuild/compilers/__init__.py b/mesonbuild/compilers/__init__.py
index be4809f24..3d39c9b2f 100644
--- a/mesonbuild/compilers/__init__.py
+++ b/mesonbuild/compilers/__init__.py
@@ -35,6 +35,22 @@ __all__ = [
'lang_suffixes',
'sort_clink',
+ 'compiler_from_language',
+ 'detect_compiler_for',
+ 'detect_static_linker',
+ 'detect_c_compiler',
+ 'detect_cpp_compiler',
+ 'detect_cuda_compiler',
+ 'detect_fortran_compiler',
+ 'detect_objc_compiler',
+ 'detect_objcpp_compiler',
+ 'detect_java_compiler',
+ 'detect_cs_compiler',
+ 'detect_vala_compiler',
+ 'detect_rust_compiler',
+ 'detect_d_compiler',
+ 'detect_swift_compiler',
+
'AppleClangCCompiler',
'AppleClangCPPCompiler',
'AppleClangObjCCompiler',
@@ -133,6 +149,23 @@ from .compilers import (
LANGUAGES_USING_LDFLAGS,
sort_clink,
)
+from .detect import (
+ compiler_from_language,
+ detect_compiler_for,
+ detect_static_linker,
+ detect_c_compiler,
+ detect_cpp_compiler,
+ detect_cuda_compiler,
+ detect_objc_compiler,
+ detect_objcpp_compiler,
+ detect_fortran_compiler,
+ detect_java_compiler,
+ detect_cs_compiler,
+ detect_vala_compiler,
+ detect_rust_compiler,
+ detect_d_compiler,
+ detect_swift_compiler,
+)
from .c import (
CCompiler,
AppleClangCCompiler,