unittests: Fix 51 ldflagdedup on Solaris
If the linker doesn't support --export-dynamic, skip test to deduplicate
it, since it always fails finding 0 copies instead of 1.
@@ -6772,6 +6772,11 @@ class LinuxlikeTests(BasePlatformTests):
testdir = os.path.join(self.unit_test_dir, '52 ldflagdedup')
if is_cygwin() or is_osx():
raise unittest.SkipTest('Not applicable on Cygwin or OSX.')
+ env = get_fake_env()
+ cc = env.detect_c_compiler(MachineChoice.HOST)
+ linker = cc.linker
+ if not linker.export_dynamic_args(env):
+ raise unittest.SkipTest('Not applicable for linkers without --export-dynamic')
self.init(testdir)
build_ninja = os.path.join(self.builddir, 'build.ninja')
max_count = 0
