linkLinuxCppImplStubs function
Creates a Linux-specific C++ impl starter stub for every Linux-C++
module, mirroring linkWindowsCppImplStubs. Writing this stub does NOT
by itself make Linux use it instead of the shared src/HybridXxx.cpp —
that's a separate, opt-in decision (see hasCustomPlatformImpl and
ModuleInfo.linuxRequestsSeparateImpl, read by _linkDesktopCMake). Until
then it just sits alongside the shared file as an option, same as
Windows's stub always has.
Implementation
void linkLinuxCppImplStubs(
List<ModuleInfo> moduleInfos, {
String baseDir = '.',
}) {
for (final m in moduleInfos.where((m) => m.linuxIsCpp)) {
_writeOrMigratePlatformImplStub(
baseDir: baseDir,
platform: 'linux',
lib: m.lib,
requestsSeparateImpl: m.linuxRequestsSeparateImpl,
genericStubContent: t.linuxCppStubContent(lib: m.lib, className: _toPascalCase(m.lib)),
);
}
}