wafsamba: Support allow_undefined_symbols in SAMBA_SUBSYSTEM.
authorJelmer Vernooij <jelmer@samba.org>
Sat, 12 Nov 2011 19:24:35 +0000 (20:24 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Sun, 13 Nov 2011 17:06:06 +0000 (18:06 +0100)
buildtools/wafsamba/wafsamba.py

index 21b91e4cb49b926d1a68e36ee400ff0bc0731c5d..9318e3e330bcdde55eac14f0de5fa5d6ed668f35 100644 (file)
@@ -155,6 +155,10 @@ def SAMBA_LIBRARY(bld, libname, source,
     else:
         subsystem_group = group
 
+    if target_type == "PYTHON":
+        allow_undefined_symbols = True
+        pyext = True
+
     # first create a target for building the object files for this library
     # by separating in this way, we avoid recompiling the C files
     # separately for the install library and the build library
@@ -173,8 +177,9 @@ def SAMBA_LIBRARY(bld, libname, source,
                         depends_on     = depends_on,
                         hide_symbols   = hide_symbols,
                         pyembed        = pyembed,
-                        pyext          = pyext or (target_type == "PYTHON"),
+                        pyext          = pyext,
                         local_include  = local_include,
+                        allow_undefined_symbols = allow_undefined_symbols,
                         global_include = global_include)
 
     if BUILTIN_LIBRARY(bld, libname):
@@ -212,9 +217,8 @@ def SAMBA_LIBRARY(bld, libname, source,
     ldflags = TO_LIST(ldflags)
 
     features = 'cc cshlib symlink_lib install_lib'
-    if target_type == 'PYTHON':
+    if pyext:
         features += ' pyext'
-        allow_undefined_symbols = True
     if pyembed:
         features += ' pyembed'
 
@@ -493,6 +497,7 @@ def SAMBA_SUBSYSTEM(bld, modname, source,
                     subdir=None,
                     hide_symbols=False,
                     pyext=False,
+                    allow_undefined_symbols=False,
                     pyembed=False):
     '''define a Samba subsystem'''
 
@@ -536,7 +541,8 @@ def SAMBA_SUBSYSTEM(bld, modname, source,
         global_include = global_include,
         samba_subsystem= subsystem_name,
         samba_use_hostcc = use_hostcc,
-        samba_use_global_deps = use_global_deps
+        samba_use_global_deps = use_global_deps,
+        allow_undefined_symbols=allow_undefined_symbols,
         )
 
     if cflags_end is not None: