From 864b9b1957bef39b9437b1a73c014e43607b7759 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Thu, 24 Nov 2016 03:51:11 +0530 Subject: Only check for unity compat when doing unity builds Also don't bother setting self.unity_compatible since it will never be checked. Closes #1097 --- mesonbuild/backend/backends.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'mesonbuild/backend') diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py index c37ae2a..49b6008 100644 --- a/mesonbuild/backend/backends.py +++ b/mesonbuild/backend/backends.py @@ -279,13 +279,9 @@ class Backend(): result = [] targetdir = self.get_target_private_dir(extobj.target) # With unity builds, there's just one object that contains all the - # sources, so if we want all the objects, just return that. + # sources, and we only support extracting all the objects in this mode, + # so just return that. if self.environment.coredata.get_builtin_option('unity'): - if not extobj.unity_compatible: - # This should never happen - msg = 'BUG: Meson must not allow extracting single objects ' \ - 'in Unity builds' - raise AssertionError(msg) comp = get_compiler_for_source(extobj.target.compilers.values(), extobj.srclist[0]) # The unity object name uses the full absolute path of the source file -- cgit v1.1