diff --git a/emcc.py b/emcc.py index d02b5276873d2..e734d282e4461 100755 --- a/emcc.py +++ b/emcc.py @@ -4167,6 +4167,8 @@ def process_libraries(state, linker_inputs): new_flags.append((i, flag)) continue lib = strip_prefix(flag, '-l') + if lib == "c": + continue logger.debug('looking for library "%s"', lib) js_libs, native_lib = building.map_to_js_libs(lib) diff --git a/test/test_other.py b/test/test_other.py index 0d41f9713d3b9..f85ddf70ef8f7 100644 --- a/test/test_other.py +++ b/test/test_other.py @@ -13493,3 +13493,7 @@ def test_preload_module(self, args): def test_standalone_whole_archive(self): self.emcc_args += ['-sSTANDALONE_WASM', '-pthread', '-Wl,--whole-archive', '-lbulkmemory', '-lstandalonewasm', '-Wl,--no-whole-archive'] self.do_runf(test_file('hello_world.c')) + + def test_lc_side_module(self): + create_file('side.c', 'int sidey() { return 42; }') + self.run_process([EMCC, '-sSIDE_MODULE', 'side.c', '-o', 'libside.so', '-lc'])