aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2020-08-17 22:23:34 -0700
committerDylan Baker <dylan@pnwbakers.com>2020-08-22 10:49:35 -0700
commitb6c28d282c99a0a7915f9924d98d620f70403814 (patch)
treeec2e44a13f71668c9245d060e3cf308112dfd8a0 /mesonbuild/compilers
parent7092efabb5a0488b694418c823463048ddbb310c (diff)
downloadmeson-b6c28d282c99a0a7915f9924d98d620f70403814.zip
meson-b6c28d282c99a0a7915f9924d98d620f70403814.tar.gz
meson-b6c28d282c99a0a7915f9924d98d620f70403814.tar.bz2
compilers: Add Apple subclasses for ObjC and ObjC++
These are needed because in some cases we need to be able to know if we're using vanilla clang or Apple's clang.
Diffstat (limited to 'mesonbuild/compilers')
-rw-r--r--mesonbuild/compilers/__init__.py4
-rw-r--r--mesonbuild/compilers/objc.py5
-rw-r--r--mesonbuild/compilers/objcpp.py6
3 files changed, 15 insertions, 0 deletions
diff --git a/mesonbuild/compilers/__init__.py b/mesonbuild/compilers/__init__.py
index fd47545..5b765a6 100644
--- a/mesonbuild/compilers/__init__.py
+++ b/mesonbuild/compilers/__init__.py
@@ -36,6 +36,8 @@ __all__ = [
'AppleClangCCompiler',
'AppleClangCPPCompiler',
+ 'AppleClangObjCCompiler',
+ 'AppleClangObjCPPCompiler',
'ArmCCompiler',
'ArmCPPCompiler',
'ArmclangCCompiler',
@@ -183,11 +185,13 @@ from .fortran import (
from .java import JavaCompiler
from .objc import (
ObjCCompiler,
+ AppleClangObjCCompiler,
ClangObjCCompiler,
GnuObjCCompiler,
)
from .objcpp import (
ObjCPPCompiler,
+ AppleClangObjCPPCompiler,
ClangObjCPPCompiler,
GnuObjCPPCompiler,
)
diff --git a/mesonbuild/compilers/objc.py b/mesonbuild/compilers/objc.py
index d351c88..254a609 100644
--- a/mesonbuild/compilers/objc.py
+++ b/mesonbuild/compilers/objc.py
@@ -92,3 +92,8 @@ class ClangObjCCompiler(ClangCompiler, ObjCCompiler):
'1': default_warn_args,
'2': default_warn_args + ['-Wextra'],
'3': default_warn_args + ['-Wextra', '-Wpedantic']}
+
+
+class AppleClangObjCCompiler(ClangObjCCompiler):
+
+ """Handle the differences between Apple's clang and vanilla clang."""
diff --git a/mesonbuild/compilers/objcpp.py b/mesonbuild/compilers/objcpp.py
index 10555b4..3197abc 100644
--- a/mesonbuild/compilers/objcpp.py
+++ b/mesonbuild/compilers/objcpp.py
@@ -90,3 +90,9 @@ class ClangObjCPPCompiler(ClangCompiler, ObjCPPCompiler):
'1': default_warn_args,
'2': default_warn_args + ['-Wextra'],
'3': default_warn_args + ['-Wextra', '-Wpedantic']}
+
+
+
+class AppleClangObjCPPCompiler(ClangObjCPPCompiler):
+
+ """Handle the differences between Apple's clang and vanilla clang."""