diff options
author | Pawel Tomulik <ptomulik@meil.pw.edu.pl> | 2015-09-20 20:22:10 (GMT) |
---|---|---|
committer | Pawel Tomulik <ptomulik@meil.pw.edu.pl> | 2015-09-20 20:22:10 (GMT) |
commit | 0662dc87640b0b2b42e51b87aa611e666c8a99eb (patch) | |
tree | 33ef24fd583ab0a31599d755090a2096e9e81deb | |
parent | 11711340ea36b162fcef4462f4f01d1d223700cf (diff) | |
download | SCons-0662dc87640b0b2b42e51b87aa611e666c8a99eb.zip SCons-0662dc87640b0b2b42e51b87aa611e666c8a99eb.tar.gz SCons-0662dc87640b0b2b42e51b87aa611e666c8a99eb.tar.bz2 |
gdc: support soname in D versioned libraries
-rw-r--r-- | src/engine/SCons/Defaults.py | 1 | ||||
-rw-r--r-- | src/engine/SCons/Tool/gdc.py | 10 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/engine/SCons/Defaults.py b/src/engine/SCons/Defaults.py index 744da5f..c8170c3 100644 --- a/src/engine/SCons/Defaults.py +++ b/src/engine/SCons/Defaults.py @@ -512,7 +512,6 @@ ConstructionEnvironment = { '__libversionflags' : __libversionflags, '__SHLIBVERSIONFLAGS' : '${__libversionflags(__env__,"SHLIBVERSION","_SHLIBVERSIONFLAGS")}', '__LDMODULEVERSIONFLAGS' : '${__libversionflags(__env__,"LDMODULEVERSION","_LDMODULEVERSIONFLAGS")}', - '__DSHLIBVERSIONFLAGS' : '${__libversionflags(__env__,"DSHLIBVERSION","_DSHLIBVERSIONFLAGS")}', 'TEMPFILE' : NullCmdGenerator, 'Dir' : Variable_Method_Caller('TARGET', 'Dir'), diff --git a/src/engine/SCons/Tool/gdc.py b/src/engine/SCons/Tool/gdc.py index 347efef..255e6f1 100644 --- a/src/engine/SCons/Tool/gdc.py +++ b/src/engine/SCons/Tool/gdc.py @@ -97,7 +97,15 @@ def generate(env): env['DSHLINK'] = '$DC' env['DSHLINKFLAGS'] = SCons.Util.CLVar('$DLINKFLAGS -shared') - env['SHDLINKCOM'] = '$DLINK -o $TARGET $DSHLINKFLAGS $__DSHLIBVERSIONFLAGS $__RPATH $SOURCES $_LIBDIRFLAGS $_LIBFLAGS' + # NOTE: using $__SHLIBVERSIONFLAGS here is just a quick hack. The macro + # $__SHLIBVERSIONFLAGS involves _SHLIBVERSIONFLAGS, which are set by + # current linker tool. If the current linker tool is not same as that used + # by gdc, and SHLIBVERSION is defined, an invalid flags may be generated + # for the gdc linker. It looks like the D tools should define its own + # set of variables (__DSHLIBVERSIONFLAGS, _DSHLIBVERSIONFLAGS, + # DSHLIBVERSIONFLAGS, DSHLIBVERSION, etc...) and duplicate the versioning + # machinery. + env['SHDLINKCOM'] = '$DLINK -o $TARGET $DSHLINKFLAGS $__SHLIBVERSIONFLAGS $__RPATH $SOURCES $_LIBDIRFLAGS $_LIBFLAGS' env['DLIB'] = 'lib' if env['PLATFORM'] == 'win32' else 'ar cr' env['DLIBCOM'] = '$DLIB $_DLIBFLAGS {0}$TARGET $SOURCES $_DLINKLIBFLAGS'.format('-c ' if env['PLATFORM'] == 'win32' else '') |