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.
This commit is contained in:
parent
b5915abdcc
commit
d0747bd481
|
@ -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 = [
|
||||
|
|
Loading…
Reference in a new issue