From: cournape Date: Wed, 3 Sep 2008 08:32:35 +0000 (+0000) Subject: Use our CompileSharedObject builder in CheckSH* (fix tests failure). X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=af481bd3ff9ae78c6b181174b20fb9e0f081e5b4;p=scons.git Use our CompileSharedObject builder in CheckSH* (fix tests failure). git-svn-id: http://scons.tigris.org/svn/scons/trunk@3335 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- diff --git a/src/engine/SCons/Conftest.py b/src/engine/SCons/Conftest.py index d9db9577..ba7dbf13 100644 --- a/src/engine/SCons/Conftest.py +++ b/src/engine/SCons/Conftest.py @@ -178,7 +178,7 @@ int foo() return 0; } """ - ret = _check_empty_program(context, 'SHCC', text, 'C') + ret = _check_empty_program(context, 'SHCC', text, 'C', use_shared = True) _YesNoResult(context, ret, None, text) return ret @@ -218,11 +218,11 @@ int main() return 0; } """ - ret = _check_empty_program(context, 'SHCXX', text, 'C++') + ret = _check_empty_program(context, 'SHCXX', text, 'C++', use_shared = True) _YesNoResult(context, ret, None, text) return ret -def _check_empty_program(context, comp, text, language): +def _check_empty_program(context, comp, text, language, use_shared = False): """Return 0 on success, 1 otherwise.""" if not context.env.has_key(comp) or not context.env[comp]: # The compiler construction variable is not set or empty @@ -232,7 +232,10 @@ def _check_empty_program(context, comp, text, language): if msg: return 1 - return context.CompileProg(text, suffix) + if use_shared: + return context.CompileSharedObject(text, suffix) + else: + return context.CompileProg(text, suffix) def CheckFunc(context, function_name, header = None, language = None):