summaryrefslogtreecommitdiff
path: root/engine/SCons/Tool/dmd.py
diff options
context:
space:
mode:
Diffstat (limited to 'engine/SCons/Tool/dmd.py')
-rw-r--r--engine/SCons/Tool/dmd.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/engine/SCons/Tool/dmd.py b/engine/SCons/Tool/dmd.py
index 327da15..c556151 100644
--- a/engine/SCons/Tool/dmd.py
+++ b/engine/SCons/Tool/dmd.py
@@ -58,7 +58,7 @@ Lib tool variables:
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/dmd.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
+__revision__ = "src/engine/SCons/Tool/dmd.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog"
import os
import subprocess
@@ -114,7 +114,7 @@ def generate(env):
env['DSHLINK'] = '$DC'
env['DSHLINKFLAGS'] = SCons.Util.CLVar('$DLINKFLAGS -shared -defaultlib=libphobos2.so')
- env['SHDLINKCOM'] = '$DLINK -of$TARGET $DSHLINKFLAGS $__DRPATH $SOURCES $_DLIBDIRFLAGS $_DLIBFLAGS'
+ env['SHDLINKCOM'] = '$DLINK -of$TARGET $DSHLINKFLAGS $__DSHLIBVERSIONFLAGS $__DRPATH $SOURCES $_DLIBDIRFLAGS $_DLIBFLAGS'
env['DLIBLINKPREFIX'] = '' if env['PLATFORM'] == 'win32' else '-L-l'
env['DLIBLINKSUFFIX'] = '.lib' if env['PLATFORM'] == 'win32' else ''
@@ -139,6 +139,17 @@ def generate(env):
env['DRPATHSUFFIX'] = ''
env['_DRPATH'] = '${_concat(DRPATHPREFIX, RPATH, DRPATHSUFFIX, __env__)}'
+ # Support for versioned libraries
+ env['_DSHLIBVERSIONFLAGS'] = '$DSHLIBVERSIONFLAGS -L-soname=$_DSHLIBSONAME'
+ env['_DSHLIBSONAME'] = '${DShLibSonameGenerator(__env__,TARGET)}'
+ # NOTE: this is a quick hack, the soname will only work if there is
+ # c/c++ linker loaded which provides callback for the ShLibSonameGenerator
+ env['DShLibSonameGenerator'] = SCons.Tool.ShLibSonameGenerator
+ # NOTE: this is only for further reference, currently $DSHLIBVERSION does
+ # not work, the user must use $SHLIBVERSION
+ env['DSHLIBVERSION'] = '$SHLIBVERSION'
+ env['DSHLIBVERSIONFLAGS'] = []
+
SCons.Tool.createStaticLibBuilder(env)