diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-09-28 10:21:20 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-09-28 10:21:20 +0200 |
commit | 7c651e273c4db37f4babd91aaecf26800c50dd79 (patch) | |
tree | 21acf2b4172448f034a5cceb86ec34dd932fa4c0 /engine/SCons/Tool/gdc.py | |
parent | 1d9b9f9adaf7a3b7582c243643c6405d4f5cd135 (diff) |
New upstream version 3.0.0upstream/3.0.0
Diffstat (limited to 'engine/SCons/Tool/gdc.py')
-rw-r--r-- | engine/SCons/Tool/gdc.py | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/engine/SCons/Tool/gdc.py b/engine/SCons/Tool/gdc.py index c9ac972..f98fabc 100644 --- a/engine/SCons/Tool/gdc.py +++ b/engine/SCons/Tool/gdc.py @@ -1,3 +1,5 @@ +from __future__ import print_function + """SCons.Tool.gdc Tool-specific initialization for the GDC compiler. @@ -24,7 +26,7 @@ Lib tool variables: """ # -# Copyright (c) 2001 - 2016 The SCons Foundation +# Copyright (c) 2001 - 2017 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -46,13 +48,13 @@ Lib tool variables: # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/gdc.py rel_2.5.1:3735:9dc6cee5c168 2016/11/03 14:02:02 bdbaddog" +__revision__ = "src/engine/SCons/Tool/gdc.py rel_3.0.0:4395:8972f6a2f699 2017/09/18 12:59:24 bdbaddog" import SCons.Action import SCons.Defaults import SCons.Tool -import SCons.Tool.DCommon +import SCons.Tool.DCommon as DCommon def generate(env): @@ -63,7 +65,7 @@ def generate(env): static_obj.add_emitter('.d', SCons.Defaults.StaticObjectEmitter) shared_obj.add_emitter('.d', SCons.Defaults.SharedObjectEmitter) - env['DC'] = env.Detect('gdc') + env['DC'] = env.Detect('gdc') or 'gdc' env['DCOM'] = '$DC $_DINCFLAGS $_DVERFLAGS $_DDEBUGFLAGS $_DFLAGS -c -o $TARGET $SOURCES' env['_DINCFLAGS'] = '${_concat(DINCPREFIX, DPATH, DINCSUFFIX, __env__, RDirs, TARGET, SOURCE)}' env['_DVERFLAGS'] = '${_concat(DVERPREFIX, DVERSIONS, DVERSUFFIX, __env__)}' @@ -79,7 +81,7 @@ def generate(env): env['DDEBUG'] = [] if env['DC']: - SCons.Tool.DCommon.addDPATHToEnv(env, env['DC']) + DCommon.addDPATHToEnv(env, env['DC']) env['DINCPREFIX'] = '-I' env['DINCSUFFIX'] = '' @@ -95,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') - 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 '') @@ -116,22 +118,26 @@ 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) + env['BUILDERS']['ProgramAllAtOnce'] = SCons.Builder.Builder( + action='$DC $_DINCFLAGS $_DVERFLAGS $_DDEBUGFLAGS $_DFLAGS -o $TARGET $DLINKFLAGS $__DRPATH $SOURCES $_DLIBDIRFLAGS $_DLIBFLAGS', + emitter=DCommon.allAtOnceEmitter, + ) def exists(env): return env.Detect('gdc') + # Local Variables: # tab-width:4 # indent-tabs-mode:nil |