diff options
Diffstat (limited to 'mesonbuild/backend/backends.py')
-rw-r--r-- | mesonbuild/backend/backends.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py index a77047b..6a00d17 100644 --- a/mesonbuild/backend/backends.py +++ b/mesonbuild/backend/backends.py @@ -306,7 +306,7 @@ class Backend: # With unity builds, there's just one object that contains all the # sources, and we only support extracting all the objects in this mode, # so just return that. - if self.get_option_for_target('unity', target): + if self.is_unity(target): comp = get_compiler_for_source(extobj.target.compilers.values(), extobj.srclist[0]) # There is a potential conflict here, but it is unlikely that @@ -607,6 +607,13 @@ class Backend: libs.append(os.path.join(self.get_target_dir(t), f)) return libs + def is_unity(self, target): + optval = self.get_option_for_target('unity', target) + if optval == 'on' or (optval == 'subprojects' and target.subproject != ''): + return True + return False + + def get_custom_target_sources(self, target): ''' Custom target sources can be of various object types; strings, File, |