Skip to content

Use -fvisibility=hidden and explicitly mark symbols for shared object export #248

@fgvanzee

Description

@fgvanzee

Picking up on the discussion that developed in pull request #37, it would probably be best for BLIS to not automatically export all symbols in its shared libraries, but rather only export the ones that correspond to "public" APIs.

In summary, this means:

  • compiling with -fvisibility=hidden, which sets the default symbol visibility to hidden;
  • marking all BLAS/CBLAS functions as public;
  • marking some subset of BLIS typed API functions as public;
  • marking some subset of BLIS object API functions as public.

Also, if the export statements (that mark a symbol as public) are macroized, the macro can be defined conditionally based on whether we are building a Linux shared object or a Windows DLL.

GNU gcc documentation on symbol visibility can be found here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions