How do you make a single shared library from both C and C++ code?

I see cpp-library (and a hack to make it work with C instead of C++) and that a c-library is proposed for the future. What I find strange about this is that this plugins seem to presume that a single native shared library will not be created from multiple languages.

How do you intend to create a native library that is built from both C and C++ source files? (and possibly Objective-C, Swift, Rust, etc…)