Skip to content

Commit bf95d0f

Browse files
committed
- fixed build issue on AIX. Build both shared and static library is now only activated on Linux. Building static library on other platforms.
1 parent 4e19f18 commit bf95d0f

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

SConstruct

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,32 +148,28 @@ elif platform == 'msvc6':
148148
for tool in ['msvc', 'msvs', 'mslink', 'masm', 'mslib']:
149149
env.Tool( tool )
150150
env['CXXFLAGS']='-GR -GX /nologo /MT'
151-
env['SHARED_LIB_ENABLED'] = False
152151
elif platform == 'msvc70':
153152
env['MSVS_VERSION']='7.0'
154153
for tool in ['msvc', 'msvs', 'mslink', 'masm', 'mslib']:
155154
env.Tool( tool )
156155
env['CXXFLAGS']='-GR -GX /nologo /MT'
157-
env['SHARED_LIB_ENABLED'] = False
158156
elif platform == 'msvc71':
159157
env['MSVS_VERSION']='7.1'
160158
for tool in ['msvc', 'msvs', 'mslink', 'masm', 'mslib']:
161159
env.Tool( tool )
162160
env['CXXFLAGS']='-GR -GX /nologo /MT'
163-
env['SHARED_LIB_ENABLED'] = False
164161
elif platform == 'msvc80':
165162
env['MSVS_VERSION']='8.0'
166163
for tool in ['msvc', 'msvs', 'mslink', 'masm', 'mslib']:
167164
env.Tool( tool )
168165
env['CXXFLAGS']='-GR -EHsc /nologo /MT'
169-
env['SHARED_LIB_ENABLED'] = False
170166
elif platform == 'mingw':
171167
env.Tool( 'mingw' )
172168
env.Append( CPPDEFINES=[ "WIN32", "NDEBUG", "_MT" ] )
173-
env['SHARED_LIB_ENABLED'] = False
174169
elif platform.startswith('linux-gcc'):
175170
env.Tool( 'default' )
176171
env.Append( LIBS = ['pthread'], CCFLAGS = "-Wall" )
172+
env['SHARED_LIB_ENABLED'] = True
177173
else:
178174
print "UNSUPPORTED PLATFORM."
179175
env.Exit(1)
@@ -191,7 +187,9 @@ if short_platform.startswith('msvc'):
191187
short_platform = short_platform[2:]
192188
# Notes: on Windows you need to rebuild the source for each variant
193189
# Build script does not support that yet so we only build static libraries.
194-
env['SHARED_LIB_ENABLED'] = env.get('SHARED_LIB_ENABLED', True)
190+
# This also fails on AIX because both dynamic and static library ends with
191+
# extension .a.
192+
env['SHARED_LIB_ENABLED'] = env.get('SHARED_LIB_ENABLED', False)
195193
env['LIB_PLATFORM'] = short_platform
196194
env['LIB_LINK_TYPE'] = 'lib' # static
197195
env['LIB_CRUNTIME'] = 'mt'

0 commit comments

Comments
 (0)