summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2019-08-07 13:49:17 -0700
committerDylan Baker <dylan@pnwbakers.com>2019-08-14 13:13:23 -0700
commit2bd85c614a4c4c513b025680e23afb6697da95dd (patch)
treec851608d10e80842ef53e81fa3a657d5dbba0a79
parent3fbb45016610deba863630b20e95f60d2d49a487 (diff)
downloadmeson-2bd85c614a4c4c513b025680e23afb6697da95dd.tar.gz
unittests: Create a fake DynamicLinker when necessary
-rwxr-xr-xrun_unittests.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/run_unittests.py b/run_unittests.py
index 09b6e00e0..c79b4e27f 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -444,7 +444,8 @@ class InternalTests(unittest.TestCase):
def test_compiler_args_class_gnuld(self):
cargsfunc = mesonbuild.compilers.CompilerArgs
## Test --start/end-group
- gcc = mesonbuild.compilers.GnuCCompiler([], 'fake', mesonbuild.compilers.CompilerType.GCC_STANDARD, False, MachineChoice.HOST)
+ linker = mesonbuild.linkers.GnuDynamicLinker([], MachineChoice.HOST, 'fake')
+ gcc = mesonbuild.compilers.GnuCCompiler([], 'fake', mesonbuild.compilers.CompilerType.GCC_STANDARD, False, MachineChoice.HOST, linker=linker)
## Test that 'direct' append and extend works
l = cargsfunc(gcc, ['-Lfoodir', '-lfoo'])
self.assertEqual(l.to_native(copy=True), ['-Lfoodir', '-Wl,--start-group', '-lfoo', '-Wl,--end-group'])