@needs_dlfcn
def test_dylink_dot_a(self):
    create_test_file('third.cpp', 'extern "C" int sidef() { return 36; }')
    create_test_file('fourth.cpp', 'extern "C" int sideg() { return 17; }')
    run_process(([EMCC, '-c', 'third.cpp', '-o', 'third.o'] + self.get_emcc_args()))
    run_process(([EMCC, '-c', 'fourth.cpp', '-o', 'fourth.o'] + self.get_emcc_args()))
    run_process([EMAR, 'rc', 'libfourth.a', 'fourth.o'])
    self.dylink_test(main='\n      #include <stdio.h>\n      #include <emscripten.h>\n      extern "C" int sidef();\n      extern "C" int sideg();\n      int main() {\n        printf("sidef: %d, sideg: %d.\\n", sidef(), sideg());\n      }\n    ', side=['libfourth.a', 'third.o'], expected=['sidef: 36, sideg: 17.\n'])
@needs_dlfcn
def test_dylink_dot_a(self):
    create_test_file('third.cpp', 'extern "C" int sidef() { return 36; }')
    create_test_file('fourth.cpp', 'extern "C" int sideg() { return 17; }')
    run_process(([EMCC, '-c', 'third.cpp', '-o', 'third.o'] + self.get_emcc_args()))
    run_process(([EMCC, '-c', 'fourth.cpp', '-o', 'fourth.o'] + self.get_emcc_args()))
    run_process([EMAR, 'rc', 'libfourth.a', 'fourth.o'])
    self.dylink_test(main='\n      #include <stdio.h>\n      #include <emscripten.h>\n      extern "C" int sidef();\n      extern "C" int sideg();\n      int main() {\n        printf("sidef: %d, sideg: %d.\\n", sidef(), sideg());\n      }\n    ', side=['libfourth.a', 'third.o'], expected=['sidef: 36, sideg: 17.\n'])