unittests: Create a fake DynamicLinker when necessary

pull/5681/head
Dylan Baker 5 years ago
parent 3fbb450166
commit 2bd85c614a
  1. 3
      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'])

Loading…
Cancel
Save