summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2018-12-29 19:42:08 +0100
committerChristoph Reiter <reiter.christoph@gmail.com>2018-12-30 13:15:57 +0000
commitd1e234ec171e9f60bd54837071ef60ca7b0568c7 (patch)
tree776a270ac2c006e2496397ab1c93bda1cd5cb3e9 /tests
parente7dd95f4ea463fe355e12962c727eebffc913b92 (diff)
downloadgobject-introspection-d1e234ec171e9f60bd54837071ef60ca7b0568c7.tar.gz
customize_compiler: also replace the linker command if CC is set
Otherwise when you set CC=clang then distuils will still use gcc for linking. While it seems we don't invoke the link command atm this shouldn't hurt. The upstream customize_compiler() does the same thing on macOS and there is a bug for enabling it everywhere: https://bugs.python.org/issue24935
Diffstat (limited to 'tests')
-rw-r--r--tests/scanner/test_ccompiler.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/scanner/test_ccompiler.py b/tests/scanner/test_ccompiler.py
index ac50e245..dd8700d8 100644
--- a/tests/scanner/test_ccompiler.py
+++ b/tests/scanner/test_ccompiler.py
@@ -62,6 +62,11 @@ class UnixCCompilerTest(unittest.TestCase):
except ValueError:
self.fail('%r is not a subsequence of %r' % (list1, list2))
+ def test_link_args_override(self):
+ with Environ(dict(CC="foobar")):
+ compiler = CCompiler()
+ self.assertEqual(compiler.compiler.linker_so[0], "foobar")
+
def compile_args(self, environ={}, compiler_name='unix',
pkg_config_cflags=[], cpp_includes=[],
source='a.c', init_sections=[]):