Final touches to unity builds.

pull/15/head
Jussi Pakkanen 11 years ago
parent a04a10d29c
commit 088d333699
  1. 4
      backends.py
  2. 2
      meson.py

@ -161,7 +161,7 @@ class Backend():
language = comp.get_language()
suffix = '.' + comp.get_default_suffix()
if language not in langlist:
outfilename = os.path.join(self.get_target_private_dir(target), target.name + suffix)
outfilename = os.path.join(self.get_target_private_dir(target), target.name + '-unity' + suffix)
outfileabs = os.path.join(self.environment.get_build_dir(), outfilename)
outfileabs_tmp = outfileabs + '.tmp'
abs_files.append(outfileabs)
@ -231,7 +231,7 @@ class Backend():
raise MesonException('Unknown data type in object list.')
if is_unity:
for src in self.generate_unity_files(target, unity_src):
obj_list.append(self.generate_single_compile(target, outfile, src, True, unity_deps))
obj_list.append(self.generate_single_compile(target, outfile, src, True, unity_deps + header_deps))
linker = self.determine_linker(target, src_list)
elem = self.generate_link(target, outfile, outname, obj_list, linker)
self.generate_shlib_aliases(target, self.get_target_dir(target), outfile, elem)

@ -60,7 +60,7 @@ parser.add_option('--enable-gcov', action='store_true', dest='coverage', default
help='measure test coverage')
parser.add_option('--disable-pch', action='store_false', dest='use_pch', default=True,\
help='do not use precompiled headers')
parser.add_option('--unity', action='store_true', dest='unity', default=True,\
parser.add_option('--unity', action='store_true', dest='unity', default=False,\
help='unity build')
parser.add_option('--cross-file', default=None, dest='cross_file',
help='file describing cross compilation environment')

Loading…
Cancel
Save