From d0747bd481ec4f3ddd3ebdbea087c41d0ef71df4 Mon Sep 17 00:00:00 2001 From: Kp Date: Sat, 22 Apr 2017 21:23:54 +0000 Subject: [PATCH] Rename user_settings.LDFLAGS to user_settings.LINKFLAGS SConstruct prefers to refer to linker flags for the main executable as LINKFLAGS, not LDFLAGS. Rename the internal storage to eliminate a special case in accessing it. Continue to use the environment variable $LDFLAGS as an initial value, since many tools expect to pass linker flags through $LDFLAGS. --- SConstruct | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/SConstruct b/SConstruct index b6800e330..80331fc90 100644 --- a/SConstruct +++ b/SConstruct @@ -3043,7 +3043,7 @@ class DXXCommon(LazyObjectConstructor): 'arguments': ( ('CPPFLAGS', getenv('CPPFLAGS'), 'C preprocessor flags'), ('CXXFLAGS', getenv('CXXFLAGS'), 'C++ compiler flags'), - ('LDFLAGS', getenv('LDFLAGS'), 'Linker flags'), + ('LINKFLAGS', getenv('LDFLAGS'), 'Linker flags'), ('LIBS', getenv('LIBS'), 'Libraries to link'), # These are intentionally undocumented. They are # meant for developers who know the implications of @@ -3493,12 +3493,10 @@ class DXXCommon(LazyObjectConstructor): if self.user_settings.editor: add_flags['CPPPATH'] = ['common/include/editor'] CLVar = SCons.Util.CLVar - for flags in ('CPPFLAGS', 'CXXFLAGS', 'LIBS'): + for flags in ('CPPFLAGS', 'CXXFLAGS', 'LIBS', 'LINKFLAGS'): value = getattr(self.user_settings, flags) if value is not None: add_flags[flags] = CLVar(value) - if self.user_settings.LDFLAGS: - add_flags['LINKFLAGS'] = CLVar(self.user_settings.LDFLAGS) env.Append(**add_flags) if self.user_settings.lto: env.Append(CXXFLAGS = [