From ae820bd6143c1e6d3b4bc53d331f0f9adafce735 Mon Sep 17 00:00:00 2001 From: Alex Burton Date: Fri, 12 May 2023 10:20:53 +1000 Subject: Fixed circular reference to SCons.Defaults. --- SCons/Tool/DCommon.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/SCons/Tool/DCommon.py b/SCons/Tool/DCommon.py index 64d1cbc..dc12a3c 100644 --- a/SCons/Tool/DCommon.py +++ b/SCons/Tool/DCommon.py @@ -28,9 +28,9 @@ Common code for the various D tools. Coded by Russel Winder (russel@winder.org.uk) 2012-09-06 """ +import SCons.Util import os.path -import SCons.Defaults def isD(env, source) -> int: if not source: @@ -57,7 +57,7 @@ def allAtOnceEmitter(target, source, env): env.Clean(target[0], str(target[0]) + '.o') return target, source -def _optWithIxes(pre,x,suf,env,f=lambda x: x, target=None, source=None): +def _optWithIxes(pre,x,suf,env,f=lambda x: x, target=None, source=None) -> str: # a single optional argument version of _concat # print ("_optWithIxes",str(target),str(source)) if x in env: @@ -76,11 +76,13 @@ def DObjectEmitter(target,source,env): return (target,source) def DStaticObjectEmitter(target,source,env): - target,source = SCons.Defaults.StaticObjectEmitter(target,source,env) + for tgt in target: + tgt.attributes.shared = None return DObjectEmitter(target,source,env) def DSharedObjectEmitter(target,source,env): - target,source = SCons.Defaults.SharedObjectEmitter(target,source,env) + for tgt in target: + tgt.attributes.shared = 1 return DObjectEmitter(target,source,env) # Local Variables: -- cgit v0.12