diff options
author | makise-homura <akemi_homura@kurisa.ch> | 2020-01-13 17:20:07 +0300 |
---|---|---|
committer | makise-homura <akemi_homura@kurisa.ch> | 2020-01-27 22:35:26 +0300 |
commit | 7ca53e40a378ec633f6513113dbe2193dca62d19 (patch) | |
tree | 1fbb2a5685b97ae6826c352a206c0a2f5b751b74 | |
parent | ca1f7726d5137a6cdd510c07e2b413f1b6b31967 (diff) | |
download | meson-7ca53e40a378ec633f6513113dbe2193dca62d19.zip meson-7ca53e40a378ec633f6513113dbe2193dca62d19.tar.gz meson-7ca53e40a378ec633f6513113dbe2193dca62d19.tar.bz2 |
ObjC/ObjC++ compilers are not available for Elbrus, so don't fail
-rw-r--r-- | mesonbuild/environment.py | 18 | ||||
-rwxr-xr-x | run_unittests.py | 2 |
2 files changed, 14 insertions, 6 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index da670f3..7dd0d29 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -586,11 +586,19 @@ class Environment: self.default_objcpp = ['c++', 'g++'] self.default_cs = ['csc', 'mcs'] else: - self.default_c = ['cc', 'gcc', 'clang', 'pgcc', 'icc'] - self.default_cpp = ['c++', 'g++', 'clang++', 'pgc++', 'icpc'] + if platform.machine().lower() == 'e2k': + # There are no objc or objc++ compilers for Elbrus, + # and there's no clang which can build binaries for host. + self.default_c = ['cc', 'gcc', 'lcc'] + self.default_cpp = ['c++', 'g++', 'l++'] + self.default_objc = [] + self.default_objcpp = [] + else: + self.default_c = ['cc', 'gcc', 'clang', 'pgcc', 'icc'] + self.default_cpp = ['c++', 'g++', 'clang++', 'pgc++', 'icpc'] + self.default_objc = ['cc', 'gcc', 'clang'] + self.default_objcpp = ['c++', 'g++', 'clang++'] self.default_fortran = ['gfortran', 'flang', 'pgfortran', 'ifort', 'g95'] - self.default_objc = ['cc', 'gcc', 'clang'] - self.default_objcpp = ['c++', 'g++', 'clang++'] self.default_cs = ['mcs', 'csc'] self.default_d = ['ldc2', 'ldc', 'gdc', 'dmd'] self.default_java = ['javac'] @@ -1265,7 +1273,7 @@ class Environment: popen_exceptions[' '.join(compiler + arg)] = e continue version = search_version(out) - if 'Free Software Foundation' in out or ('e2k' in out and 'lcc' in out): + if 'Free Software Foundation' in out: defines = self.get_gnu_compiler_defines(compiler) if not defines: popen_exceptions[' '.join(compiler)] = 'no pre-processor defines' diff --git a/run_unittests.py b/run_unittests.py index ae12f4e..3b8e49f 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -2290,7 +2290,7 @@ class AllPlatformTests(BasePlatformTests): ar = mesonbuild.linkers.ArLinker lib = mesonbuild.linkers.VisualStudioLinker langs = [('c', 'CC'), ('cpp', 'CXX')] - if not is_windows(): + if not is_windows() and platform.machine().lower() != 'e2k': langs += [('objc', 'OBJC'), ('objcpp', 'OBJCXX')] testdir = os.path.join(self.unit_test_dir, '5 compiler detection') env = get_fake_env(testdir, self.builddir, self.prefix) |