Mir

Code review comment for lp://qastaging/~alan-griffiths/mir/deduplicate-platform-plugin-symbols-maps

Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

> I think that our (or anyone else's) platform plugins /ought/ to conform to a common interface.

They do conform to a common interface from Mir's point of view: they export create_client_platform_factory. However, they may need to conform to other interfaces too, required for hardware platform integration.

> One solution would be to drop the local: *; stanza.

That would defeat the main goal of the symbol map in this case, which is to reduce the number of exported symbols to the minimum possible.

Only platform plugins themselves know what they need to export to keep both Mir and the hardware platform happy, and this should be expressed inside the (build) code of each platform plugin.

I am OK with completely separate version scripts for now, but another option is for the plugins to start with a common symbol map template (e.g. src/client/pluginsymbols.map.in just exporting what mir needs which is currently create_client_platform_factory), and be able to extend that with any symbols they need for hardware platform integration:

MIR_CLIENTPLATFORM_1 {
  global:
    create_client_platform_factory;
    $PLATFORM_SPECIFIC_EXPORTS
  local: *;
};

// Or a custom clause if we don't platform specific exports to be versioned with MIR ABI?
// Not sure how/if version scripts support this.
// $PLATFORM_SPECIFIC_EXPORTS_CLAUSE

review: Needs Fixing

« Back to merge proposal