From 26d3084ead84df8536be8c8df8a52acaee2f800c Mon Sep 17 00:00:00 2001 From: Artem Pavlenko Date: Thu, 30 Jan 2020 08:56:25 +0000 Subject: [PATCH] Revert "scons: improve parsing CUSTOM_LDFLAGS" -- this change introduced `env.ParseFlags` which broke mason/travis integration This reverts commit a25f53e667c6e4ec123e3968e097804e0d847987. Revert "SCons.Util.CLVar: fix __str__ method to flatten tuples + revert "add print to debug travis (temp)"" This reverts commit 2e7895943558b0fe39751dc9bfed0db27a5e44a8. Revert "add print to debug travis (temp)" This reverts commit 65dce899cb777494d870e411f04beabfa522445f. ref #4120 --- SConstruct | 19 +------------------ scons/scons-local-3.0.1/SCons/Util.py | 2 +- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/SConstruct b/SConstruct index e1dd2e6c3..13f6395f0 100644 --- a/SConstruct +++ b/SConstruct @@ -495,7 +495,6 @@ pickle_store = [# Scons internal variables 'LIBPATH', 'LIBS', 'LINKFLAGS', - 'RPATH', 'CUSTOM_LDFLAGS', # user submitted 'CUSTOM_DEFINES', # user submitted 'CUSTOM_CXXFLAGS', # user submitted @@ -1421,23 +1420,7 @@ if not preconfigured: env.Append(CXXFLAGS = env['CUSTOM_CXXFLAGS']) env.Append(CFLAGS = env['CUSTOM_CFLAGS']) env.Append(LINKFLAGS = DEFAULT_CXX14_LINKFLAGS) - - custom_ldflags = env.ParseFlags(env['CUSTOM_LDFLAGS']) - # ParseFlags puts everything it does not recognize into CCFLAGS, - # but let's assume the user knows better, put those in LINKFLAGS - env.Append(LINKFLAGS = custom_ldflags.pop('CCFLAGS')) - env.Append(LINKFLAGS = custom_ldflags.pop('LINKFLAGS'), - LIBS = custom_ldflags.pop('LIBS')) - env.AppendUnique(FRAMEWORKS = custom_ldflags.pop('FRAMEWORKS'), - LIBPATH = custom_ldflags.pop('LIBPATH'), - RPATH = custom_ldflags.pop('RPATH')) - - invalid_ldflags = {k:v for k,v in custom_ldflags.items() if v} - if invalid_ldflags: - color_print(3, 'Warning: CUSTOM_LDFLAGS contained some flags that SCons recognized as not for linker.') - color_print(3, 'The following flags will be ignored:') - for key, value in invalid_ldflags.items(): - color_print(3, '\t%s = %r' % (key, value)) + env.Append(LINKFLAGS = env['CUSTOM_LDFLAGS']) ### platform specific bits diff --git a/scons/scons-local-3.0.1/SCons/Util.py b/scons/scons-local-3.0.1/SCons/Util.py index 9fa079251..c9aa2b53d 100644 --- a/scons/scons-local-3.0.1/SCons/Util.py +++ b/scons/scons-local-3.0.1/SCons/Util.py @@ -1032,7 +1032,7 @@ class CLVar(UserList): def __coerce__(self, other): return (self, CLVar(other)) def __str__(self): - return ' '.join([' '.join(f) if type(f) is tuple else f for f in self.data]) + return ' '.join(self.data) # A dictionary that preserves the order in which items are added. # Submitted by David Benjamin to ActiveState's Python Cookbook web site: