summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Defaults.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/SCons/Defaults.py')
-rw-r--r--src/engine/SCons/Defaults.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/engine/SCons/Defaults.py b/src/engine/SCons/Defaults.py
index 364798c..461d770 100644
--- a/src/engine/SCons/Defaults.py
+++ b/src/engine/SCons/Defaults.py
@@ -102,12 +102,12 @@ class SharedFlagChecker:
for tgt in target:
tgt.attributes.shared = self.shared
- for src in source:
- if hasattr(src.attributes, 'shared'):
- if self.shared and not src.attributes.shared:
- raise SCons.Errors.UserError, "Source file: %s is static and is not compatible with shared target: %s" % (src, target[0])
- elif not self.shared and src.attributes.shared:
- raise SCons.Errors.UserError, "Source file: %s is shared and is not compatible with static target: %s" % (src, target[0])
+ same = env.subst('$STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME')
+ if same == '0' or same == '' or same == 'False':
+ for src in source:
+ if hasattr(src.attributes, 'shared'):
+ if self.shared and not src.attributes.shared:
+ raise SCons.Errors.UserError, "Source file: %s is static and is not compatible with shared target: %s" % (src, target[0])
SharedCheck = SCons.Action.Action(SharedFlagChecker(1, 0), None)
StaticCheck = SCons.Action.Action(SharedFlagChecker(0, 0), None)