From c7d2f207c4629a77b914b491889e569b72194ac5 Mon Sep 17 00:00:00 2001 From: Russel Winder Date: Fri, 16 Jun 2017 18:32:00 +0100 Subject: Make the symbol naming more consistent. --- src/engine/SCons/Tool/dmd.py | 16 ++++++++-------- src/engine/SCons/Tool/dmd.xml | 7 +++++-- src/engine/SCons/Tool/gdc.py | 16 ++++++++-------- src/engine/SCons/Tool/ldc.py | 18 +++++++++--------- 4 files changed, 30 insertions(+), 27 deletions(-) (limited to 'src') diff --git a/src/engine/SCons/Tool/dmd.py b/src/engine/SCons/Tool/dmd.py index 64beea53..ac4b0185 100644 --- a/src/engine/SCons/Tool/dmd.py +++ b/src/engine/SCons/Tool/dmd.py @@ -107,9 +107,9 @@ def generate(env): env['DLINKFLAGS'] = SCons.Util.CLVar('') env['DLINKCOM'] = '$DLINK -of$TARGET $DLINKFLAGS $__DRPATH $SOURCES $_DLIBDIRFLAGS $_DLIBFLAGS' - env['DSHLINK'] = '$DC' - env['DSHLINKFLAGS'] = SCons.Util.CLVar('$DLINKFLAGS -shared -defaultlib=libphobos2.so') - env['SHDLINKCOM'] = '$DLINK -of$TARGET $DSHLINKFLAGS $__DSHLIBVERSIONFLAGS $__DRPATH $SOURCES $_DLIBDIRFLAGS $_DLIBFLAGS' + env['SHDLINK'] = '$DC' + env['SHDLINKFLAGS'] = SCons.Util.CLVar('$DLINKFLAGS -shared -defaultlib=libphobos2.so') + env['SHDLINKCOM'] = '$DLINK -of$TARGET $SHDLINKFLAGS $__SHDLIBVERSIONFLAGS $__DRPATH $SOURCES $_DLIBDIRFLAGS $_DLIBFLAGS' env['DLIBLINKPREFIX'] = '' if env['PLATFORM'] == 'win32' else '-L-l' env['DLIBLINKSUFFIX'] = '.lib' if env['PLATFORM'] == 'win32' else '' @@ -134,15 +134,15 @@ def generate(env): env['_DRPATH'] = '${_concat(DRPATHPREFIX, RPATH, DRPATHSUFFIX, __env__)}' # Support for versioned libraries - env['_DSHLIBVERSIONFLAGS'] = '$DSHLIBVERSIONFLAGS -L-soname=$_DSHLIBSONAME' - env['_DSHLIBSONAME'] = '${DShLibSonameGenerator(__env__,TARGET)}' + env['_SHDLIBVERSIONFLAGS'] = '$SHDLIBVERSIONFLAGS -L-soname=$_SHDLIBSONAME' + env['_SHDLIBSONAME'] = '${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 + # NOTE: this is only for further reference, currently $SHDLIBVERSION does # not work, the user must use $SHLIBVERSION - env['DSHLIBVERSION'] = '$SHLIBVERSION' - env['DSHLIBVERSIONFLAGS'] = [] + env['SHDLIBVERSION'] = '$SHLIBVERSION' + env['SHDLIBVERSIONFLAGS'] = [] SCons.Tool.createStaticLibBuilder(env) diff --git a/src/engine/SCons/Tool/dmd.xml b/src/engine/SCons/Tool/dmd.xml index 8fb22ced..301afb22 100644 --- a/src/engine/SCons/Tool/dmd.xml +++ b/src/engine/SCons/Tool/dmd.xml @@ -63,8 +63,11 @@ Sets construction variables for D language compiler DMD. DLIBFLAGSUFFIX DLINKFLAGPREFIX DLINKFLAGSUFFIX -RPATHPREFIX -RPATHSUFFIX +DRPATHPREFIX +DRPATHSUFFIX +DShLibSonameGenerator +SHDLIBVERSION +SHDLIBVERSIONFLAGS diff --git a/src/engine/SCons/Tool/gdc.py b/src/engine/SCons/Tool/gdc.py index fdfe867b..939f5b95 100644 --- a/src/engine/SCons/Tool/gdc.py +++ b/src/engine/SCons/Tool/gdc.py @@ -97,9 +97,9 @@ def generate(env): env['DLINKFLAGS'] = SCons.Util.CLVar('') env['DLINKCOM'] = '$DLINK -o $TARGET $DLINKFLAGS $__RPATH $SOURCES $_LIBDIRFLAGS $_LIBFLAGS' - env['DSHLINK'] = '$DC' - env['DSHLINKFLAGS'] = SCons.Util.CLVar('$DLINKFLAGS -shared -shared-libphobos') - env['SHDLINKCOM'] = '$DLINK -o $TARGET $DSHLINKFLAGS $__DSHLIBVERSIONFLAGS $__RPATH $SOURCES $_LIBDIRFLAGS $_LIBFLAGS' + env['SHDLINK'] = '$DC' + env['SHDLINKFLAGS'] = SCons.Util.CLVar('$DLINKFLAGS -shared -shared-libphobos') + env['SHDLINKCOM'] = '$DLINK -o $TARGET $SHDLINKFLAGS $__SHDLIBVERSIONFLAGS $__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 '') @@ -118,15 +118,15 @@ def generate(env): env['_RPATH'] = '${_concat(RPATHPREFIX, RPATH, RPATHSUFFIX, __env__)}' # Support for versioned libraries - env['_DSHLIBVERSIONFLAGS'] = '$DSHLIBVERSIONFLAGS -Wl,-soname=$_DSHLIBSONAME' - env['_DSHLIBSONAME'] = '${DShLibSonameGenerator(__env__,TARGET)}' + env['_SHDLIBVERSIONFLAGS'] = '$SHDLIBVERSIONFLAGS -Wl,-soname=$_SHDLIBSONAME' + env['_SHDLIBSONAME'] = '${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 + # NOTE: this is only for further reference, currently $SHDLIBVERSION does # not work, the user must use $SHLIBVERSION - env['DSHLIBVERSION'] = '$SHLIBVERSION' - env['DSHLIBVERSIONFLAGS'] = '$SHLIBVERSIONFLAGS' + env['SHDLIBVERSION'] = '$SHLIBVERSION' + env['SHDLIBVERSIONFLAGS'] = '$SHLIBVERSIONFLAGS' SCons.Tool.createStaticLibBuilder(env) diff --git a/src/engine/SCons/Tool/ldc.py b/src/engine/SCons/Tool/ldc.py index 215c3e7f..b62fe11d 100644 --- a/src/engine/SCons/Tool/ldc.py +++ b/src/engine/SCons/Tool/ldc.py @@ -102,16 +102,16 @@ def generate(env): env['DLINKFLAGS'] = SCons.Util.CLVar('') env['DLINKCOM'] = '$DLINK -of=$TARGET $DLINKFLAGS $__DRPATH $SOURCES $_DLIBDIRFLAGS $_DLIBFLAGS' - env['DSHLINK'] = '$DC' - env['DSHLINKFLAGS'] = SCons.Util.CLVar('$DLINKFLAGS -shared -defaultlib=phobos2-ldc') + env['SHDLINK'] = '$DC' + env['SHDLINKFLAGS'] = SCons.Util.CLVar('$DLINKFLAGS -shared -defaultlib=phobos2-ldc') #### START DEPRECATION 2017-05-21 # Hack for Fedora the packages of which use the wrong name :-( if os.path.exists('/usr/lib64/libphobos-ldc.so') or os.path.exists('/usr/lib32/libphobos-ldc.so') or os.path.exists('/usr/lib/libphobos-ldc.so'): - env['DSHLINKFLAGS'] = SCons.Util.CLVar('$DLINKFLAGS -shared -defaultlib=phobos-ldc') + env['SHDLINKFLAGS'] = SCons.Util.CLVar('$DLINKFLAGS -shared -defaultlib=phobos-ldc') #### END DEPRECATION 2017-05-21 - env['SHDLINKCOM'] = '$DLINK -of=$TARGET $DSHLINKFLAGS $__DSHLIBVERSIONFLAGS $__DRPATH $SOURCES $_DLIBDIRFLAGS $_DLIBFLAGS' + env['SHDLINKCOM'] = '$DLINK -of=$TARGET $SHDLINKFLAGS $__SHDLIBVERSIONFLAGS $__DRPATH $SOURCES $_DLIBDIRFLAGS $_DLIBFLAGS' env['DLIBLINKPREFIX'] = '' if env['PLATFORM'] == 'win32' else '-L-l' env['DLIBLINKSUFFIX'] = '.lib' if env['PLATFORM'] == 'win32' else '' @@ -137,15 +137,15 @@ def generate(env): env['_DRPATH'] = '${_concat(DRPATHPREFIX, RPATH, DRPATHSUFFIX, __env__)}' # Support for versioned libraries - env['_DSHLIBVERSIONFLAGS'] = '$DSHLIBVERSIONFLAGS -L-soname=$_DSHLIBSONAME' - env['_DSHLIBSONAME'] = '${DShLibSonameGenerator(__env__,TARGET)}' + env['_SHDLIBVERSIONFLAGS'] = '$SHDLIBVERSIONFLAGS -L-soname=$_SHDLIBSONAME' + env['_SHDLIBSONAME'] = '${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 + # NOTE: this is only for further reference, currently $SHDLIBVERSION does # not work, the user must use $SHLIBVERSION - env['DSHLIBVERSION'] = '$SHLIBVERSION' - env['DSHLIBVERSIONFLAGS'] = [] + env['SHDLIBVERSION'] = '$SHLIBVERSION' + env['SHDLIBVERSIONFLAGS'] = [] SCons.Tool.createStaticLibBuilder(env) -- cgit v1.2.1 From 9b496647dbe5c45d5412f36bb24ae525ad15b1cb Mon Sep 17 00:00:00 2001 From: Russel Winder Date: Wed, 21 Jun 2017 09:35:08 +0100 Subject: Keep all D tool XML files consistent. --- src/engine/SCons/Tool/dmd.xml | 7 -- src/engine/SCons/Tool/gdc.xml | 144 +++++++++++++++++++++++++++++++++++++++++- src/engine/SCons/Tool/ldc.xml | 144 +++++++++++++++++++++++++++++++++++++++++- 3 files changed, 284 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/engine/SCons/Tool/dmd.xml b/src/engine/SCons/Tool/dmd.xml index 301afb22..7e220dca 100644 --- a/src/engine/SCons/Tool/dmd.xml +++ b/src/engine/SCons/Tool/dmd.xml @@ -163,8 +163,6 @@ List of linker flags. - - @@ -207,7 +205,6 @@ List of linker flags. - @@ -345,10 +342,6 @@ List of linker flags. - - - - diff --git a/src/engine/SCons/Tool/gdc.xml b/src/engine/SCons/Tool/gdc.xml index 5ef1f9a7..d44489e6 100644 --- a/src/engine/SCons/Tool/gdc.xml +++ b/src/engine/SCons/Tool/gdc.xml @@ -63,8 +63,11 @@ Sets construction variables for the D language compiler GDC. DLIBFLAGSUFFIX DLINKFLAGPREFIX DLINKFLAGSUFFIX -RPATHPREFIX -RPATHSUFFIX +DRPATHPREFIX +DRPATHSUFFIX +DShLibSonameGenerator +SHDLIBVERSION +SHDLIBVERSIONFLAGS @@ -202,6 +205,143 @@ List of linker flags. + + + + DVERSUFFIX. + + + + + + + + DVERPREFIX. + + + + + + + + DLINKFLAGSUFFIX. + + + + + + + + DLINKFLAGPREFIX. + + + + + + + + DLIBLINKSUFFIX. + + + + + + + + DLIBLINKPREFIX. + + + + + + + + DLIBFLAGSUFFIX. + + + + + + + + DLIBFLAGPREFIX. + + + + + + + + DLIBLINKSUFFIX. + + + + + + + + DLIBLINKPREFIX. + + + + + + + + DLIBFLAGSUFFIX. + + + + + + + + + DINCPREFIX. + + + + + + + + DFLAGSUFFIX. + + + + + + + + DFLAGPREFIX. + + + + + + + + DFILESUFFIX. + + + + + + + + DDEBUGPREFIX. + + + + + + + + DDEBUGSUFFIX. + + + + diff --git a/src/engine/SCons/Tool/ldc.xml b/src/engine/SCons/Tool/ldc.xml index 9593f410..495b8bc7 100644 --- a/src/engine/SCons/Tool/ldc.xml +++ b/src/engine/SCons/Tool/ldc.xml @@ -63,8 +63,11 @@ Sets construction variables for the D language compiler LDC2. DLIBFLAGSUFFIX DLINKFLAGPREFIX DLINKFLAGSUFFIX -RPATHPREFIX -RPATHSUFFIX +DRPATHPREFIX +DRPATHSUFFIX +DShLibSonameGenerator +SHDLIBVERSION +SHDLIBVERSIONFLAGS @@ -202,6 +205,143 @@ List of linker flags. + + + + DVERSUFFIX. + + + + + + + + DVERPREFIX. + + + + + + + + DLINKFLAGSUFFIX. + + + + + + + + DLINKFLAGPREFIX. + + + + + + + + DLIBLINKSUFFIX. + + + + + + + + DLIBLINKPREFIX. + + + + + + + + DLIBFLAGSUFFIX. + + + + + + + + DLIBFLAGPREFIX. + + + + + + + + DLIBLINKSUFFIX. + + + + + + + + DLIBLINKPREFIX. + + + + + + + + DLIBFLAGSUFFIX. + + + + + + + + + DINCPREFIX. + + + + + + + + DFLAGSUFFIX. + + + + + + + + DFLAGPREFIX. + + + + + + + + DFILESUFFIX. + + + + + + + + DDEBUGPREFIX. + + + + + + + + DDEBUGSUFFIX. + + + + -- cgit v1.2.1 From e5e35a4992a2d91bd69628a118503b2f56769811 Mon Sep 17 00:00:00 2001 From: Russel Winder Date: Wed, 21 Jun 2017 10:17:32 +0100 Subject: Amend the missed name changes. --- src/engine/SCons/Tool/ldc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/engine/SCons/Tool/ldc.py b/src/engine/SCons/Tool/ldc.py index 96032b10..3e12199b 100644 --- a/src/engine/SCons/Tool/ldc.py +++ b/src/engine/SCons/Tool/ldc.py @@ -105,7 +105,7 @@ def generate(env): env['SHDLINK'] = '$DC' env['SHDLINKFLAGS'] = SCons.Util.CLVar('$DLINKFLAGS -shared -defaultlib=phobos2-ldc') - env['SHDLINKCOM'] = '$DLINK -of=$TARGET $DSHLINKFLAGS $__DSHLIBVERSIONFLAGS $__DRPATH $SOURCES $_DLIBDIRFLAGS $_DLIBFLAGS -L-ldruntime-ldc' + env['SHDLINKCOM'] = '$DLINK -of=$TARGET $SHDLINKFLAGS $__SHDLIBVERSIONFLAGS $__DRPATH $SOURCES $_DLIBDIRFLAGS $_DLIBFLAGS -L-ldruntime-ldc' env['DLIBLINKPREFIX'] = '' if env['PLATFORM'] == 'win32' else '-L-l' env['DLIBLINKSUFFIX'] = '.lib' if env['PLATFORM'] == 'win32' else '' -- cgit v1.2.1