Support unicode in LDFLAGS returned by extensions
authorEdouard Tisserant
Mon, 07 May 2018 15:10:39 +0200
changeset 2003 2076df8743b5
parent 2002 15cd0000350d
child 2004 28af541d776b
Support unicode in LDFLAGS returned by extensions
ConfigTreeNode.py
--- a/ConfigTreeNode.py	Mon May 07 14:19:08 2018 +0200
+++ b/ConfigTreeNode.py	Mon May 07 15:10:39 2018 +0200
@@ -274,15 +274,14 @@
             LocationCFilesAndCFLAGS = []
 
         # confnode asks for some LDFLAGS
-        if CTNLDFLAGS:
+        LDFLAGS = []
+        if CTNLDFLAGS is not None:
             # LDFLAGS can be either string
-            if isinstance(CTNLDFLAGS, str):
-                LDFLAGS = [CTNLDFLAGS]
+            if isinstance(CTNLDFLAGS, str) or isinstance(CTNLDFLAGS, unicode):
+                LDFLAGS += [CTNLDFLAGS]
             # or list of strings
             elif isinstance(CTNLDFLAGS, list):
-                LDFLAGS = CTNLDFLAGS[:]
-        else:
-            LDFLAGS = []
+                LDFLAGS += CTNLDFLAGS
 
         # recurse through all children, and stack their results
         for CTNChild in self.IECSortedChildren():