From 2bd85c614a4c4c513b025680e23afb6697da95dd Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Wed, 7 Aug 2019 13:49:17 -0700 Subject: [PATCH] unittests: Create a fake DynamicLinker when necessary --- run_unittests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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'])