@needs_dlfcn
def test_dylink_syslibs(self):
    return self.skipTest('Currently not working due to duplicate symbol errors in wasm-ld')

    def test(syslibs, expect_pass=True, need_reverse=True):
        print('syslibs', syslibs, self.get_setting('ASSERTIONS'))
        passed = True
        try:
            with env_modify({'EMCC_FORCE_STDLIBS': syslibs}):
                self.dylink_test(main='\n            void side();\n            int main() {\n              side();\n              return 0;\n            }\n          ', side='\n            #include <iostream>\n            void side() { std::cout << "cout hello from side\\n"; }\n          ', expected=['cout hello from side\n'], need_reverse=need_reverse, assert_returncode=None)
        except Exception as e:
            if expect_pass:
                raise
            print('(seeing expected fail)')
            passed = False
            assertion = 'build the MAIN_MODULE with EMCC_FORCE_STDLIBS=1 in the environment'
            if self.get_setting('ASSERTIONS'):
                self.assertContained(assertion, str(e))
            else:
                self.assertNotContained(assertion, str(e))
        assert (passed == expect_pass), ['saw', passed, 'but expected', expect_pass]
    test('libc++')
    test('1')
    if (not self.has_changed_setting('ASSERTIONS')):
        self.set_setting('ASSERTIONS', 0)
        test('', expect_pass=False, need_reverse=False)
        self.set_setting('ASSERTIONS', 1)
        test('', expect_pass=False, need_reverse=False)
@needs_dlfcn
def test_dylink_syslibs(self):
    return self.skipTest('Currently not working due to duplicate symbol errors in wasm-ld')

    def test(syslibs, expect_pass=True, need_reverse=True):
        print('syslibs', syslibs, self.get_setting('ASSERTIONS'))
        passed = True
        try:
            with env_modify({'EMCC_FORCE_STDLIBS': syslibs}):
                self.dylink_test(main='\n            void side();\n            int main() {\n              side();\n              return 0;\n            }\n          ', side='\n            #include <iostream>\n            void side() { std::cout << "cout hello from side\\n"; }\n          ', expected=['cout hello from side\n'], need_reverse=need_reverse, assert_returncode=None)
        except Exception as e:
            if expect_pass:
                raise
            print('(seeing expected fail)')
            passed = False
            assertion = 'build the MAIN_MODULE with EMCC_FORCE_STDLIBS=1 in the environment'
            if self.get_setting('ASSERTIONS'):
                self.assertContained(assertion, str(e))
            else:
                self.assertNotContained(assertion, str(e))
        assert (passed == expect_pass), ['saw', passed, 'but expected', expect_pass]
    test('libc++')
    test('1')
    if (not self.has_changed_setting('ASSERTIONS')):
        self.set_setting('ASSERTIONS', 0)
        test(, expect_pass=False, need_reverse=False)
        self.set_setting('ASSERTIONS', 1)
        test(, expect_pass=False, need_reverse=False)