diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2019-04-30 10:53:39 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2019-05-03 10:36:50 -0700 |
commit | 541523eebab8f62b182643296deab26a47117f6f (patch) | |
tree | b5db369f05d6407125c9eee947adb96221844ab7 /run_unittests.py | |
parent | 604b2534e8516e5ddade6d2d2514b3078275d711 (diff) | |
download | meson-541523eebab8f62b182643296deab26a47117f6f.zip meson-541523eebab8f62b182643296deab26a47117f6f.tar.gz meson-541523eebab8f62b182643296deab26a47117f6f.tar.bz2 |
compilers: Split C-Like functionality into a mixin classes
Currently C++ inherits C, which can lead to diamond problems. By pulling
the code out into a standalone mixin class that the C, C++, ObjC, and
Objc++ compilers can inherit and override as necessary we remove one
source of diamonding. I've chosen to split this out into it's own file
as the CLikeCompiler class is over 1000 lines by itself. This also
breaks the VisualStudio derived classes inheriting from each other, to
avoid the same C -> CPP inheritance problems. This is all one giant
patch because there just isn't a clean way to separate this.
I've done the same for Fortran since it effectively inherits the
CCompiler (I say effectively because was it actually did was gross
beyond explanation), it's probably not correct, but it seems to work for
now. There really is a lot of layering violation going on in the
Compilers, and a really good scrubbing would do this code a lot of good.
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/run_unittests.py b/run_unittests.py index 3a473ea..7a7c006 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -1939,8 +1939,8 @@ class AllPlatformTests(BasePlatformTests): gnu = mesonbuild.compilers.GnuCompiler clang = mesonbuild.compilers.ClangCompiler intel = mesonbuild.compilers.IntelCompiler - msvc = mesonbuild.compilers.VisualStudioCCompiler - clangcl = mesonbuild.compilers.ClangClCCompiler + msvc = (mesonbuild.compilers.VisualStudioCCompiler, mesonbuild.compilers.VisualStudioCPPCompiler) + clangcl = (mesonbuild.compilers.ClangClCCompiler, mesonbuild.compilers.ClangClCPPCompiler) ar = mesonbuild.linkers.ArLinker lib = mesonbuild.linkers.VisualStudioLinker langs = [('c', 'CC'), ('cpp', 'CXX')] |