diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2013-12-27 00:25:45 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2013-12-27 00:25:45 +0200 |
commit | 3500ddb8bb311bd99d2a76c6cd7bfe0788d5ad23 (patch) | |
tree | d1f8c846835244c8758bfb9fa7b8de2ea14559d4 /interpreter.py | |
parent | e5b59ac9e9d641fef5b12c39c69ed1320682e475 (diff) | |
download | meson-3500ddb8bb311bd99d2a76c6cd7bfe0788d5ad23.zip meson-3500ddb8bb311bd99d2a76c6cd7bfe0788d5ad23.tar.gz meson-3500ddb8bb311bd99d2a76c6cd7bfe0788d5ad23.tar.bz2 |
Skip extraction test during Unity build because the object file is not generated.
Diffstat (limited to 'interpreter.py')
-rw-r--r-- | interpreter.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/interpreter.py b/interpreter.py index e655697..402a185 100644 --- a/interpreter.py +++ b/interpreter.py @@ -522,13 +522,14 @@ class MesonMain(InterpreterObject): self.methods.update({'get_compiler': self.get_compiler_method, 'is_cross_build' : self.is_cross_build_method, 'has_exe_wrapper' : self.has_exe_wrapper_method, + 'is_unity' : self.is_unity_method, }) def has_exe_wrapper_method(self, args, kwargs): if self.is_cross_build_method(None, None): return 'exe_wrap' in self.build.environment.cross_info return True # This is semantically confusing. - + def is_cross_build_method(self, args, kwargs): return self.build.environment.is_cross_build() @@ -553,6 +554,9 @@ class MesonMain(InterpreterObject): return CompilerHolder(c, self.build.environment) raise InterpreterException('Tried to access compiler for unspecified language "%s".' % cname) + def is_unity_method(self, args, kwargs): + return self.build.environment.coredata.unity + class Interpreter(): def __init__(self, build, subproject=''): @@ -1181,6 +1185,8 @@ class Interpreter(): else: obj = self.evaluate_statement(invokable) method_name = node.method_name.get_value() + if method_name == 'extract_objects' and self.environment.coredata.unity: + raise InterpreterException('Single object files can not be extracted in Unity builds.') args = node.arguments if isinstance(obj, nodes.StringStatement): obj = obj.get_value() |