build: Remove binaries and libraries build groups
authorAndrew Bartlett <abartlet@samba.org>
Sun, 26 May 2013 13:11:03 +0000 (23:11 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 27 May 2013 01:56:46 +0000 (11:56 +1000)
Build groups are used in Samba to ensure that even if the dependency
chain for a target is not perfect, that it builds reliably.  This
matters most in the early build stages, where we are building the asn1
compiler and autogenerating files.

Once we get to the main stage, dependencies between C files, libraries
and binaries are much clearer, because the C compiler and linker takes
these as inputs anyway.

Groups were added to our waf build for stability during early
development, as dependency information was first imported from the
previous autoconf/perl based build system.

I don't think we need this distinction in the main build of C files
into .o, and when linking these into binaries, because the invocation
of these tools is very well defined, and we will find any missing
inputs very quickly.

As such, I've removed the libraries and binaries targets,
consolidating them with 'main'

By making this change, a build of smbtorture only on a clean tree
drops from 3778 to 2489 targets, and much of the expensive linker
stage is skipped.  The time for a null build of smbtorture only also
drops from 4.673s to as low as 2.499s on my laptop.

Andrew Bartlett

Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
buildtools/wafsamba/wafsamba.py
source4/heimdal_build/wscript_build

index 3559cc196fe339b62d0a570db34169be429b29a7..2ef68b11239b08302ab56061e57d85c4569b5ff4 100644 (file)
@@ -110,7 +110,7 @@ def SAMBA_LIBRARY(bld, libname, source,
                   realname=None,
                   autoproto=None,
                   autoproto_extra_source='',
-                  group='libraries',
+                  group='main',
                   depends_on='',
                   local_include=True,
                   global_include=True,
@@ -306,7 +306,7 @@ def SAMBA_BINARY(bld, binname, source,
                  use_hostcc=False,
                  use_global_deps=True,
                  compiler=None,
-                 group='binaries',
+                 group='main',
                  manpages=None,
                  local_include=True,
                  global_include=True,
@@ -629,8 +629,6 @@ def SETUP_BUILD_GROUPS(bld):
     bld.add_group('headers')
     bld.add_group('main')
     bld.add_group('symbolcheck')
-    bld.add_group('libraries')
-    bld.add_group('binaries')
     bld.add_group('syslibcheck')
     bld.add_group('final')
 Build.BuildContext.SETUP_BUILD_GROUPS = SETUP_BUILD_GROUPS
index f4471159eb00c985ac851e12ef21226fe2f547cd..44634b4d838bc117e172bebad5c44e3e67c2f2f2 100644 (file)
@@ -243,7 +243,7 @@ def HEIMDAL_LIBRARY(libname, source, deps, vnum, version_script, includes=''):
 
     features = 'cc cshlib symlink_lib install_lib'
 
-    bld.set_group('libraries')
+    bld.set_group('main')
     t = bld(
         features        = features,
         source          = [],
@@ -298,7 +298,7 @@ def HEIMDAL_BINARY(binname, source,
                  use_hostcc=False,
                  use_global_deps=True,
                  compiler=None,
-                 group='binaries',
+                 group='main',
                  install=True,
                  install_path=None):
     '''define a Samba binary'''