Uploaded image for project: 'Qpid Proton'
  1. Qpid Proton
  2. PROTON-250

Add -fvisibility option when building shared libraries

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.3
    • Fix Version/s: 0.13.0
    • Component/s: proton-c
    • Labels:
    • Environment:
      GNU Compiler

      Description

      Add an option to "hide" symbols in shared libraries except when they are declared public.
      Extends efforts already in place for Windows builds.
      Excludes an effort to determine what symbols should be considered "public" interfaces.

      The gcc 4 -fvisibility option is said to:

      ...very substantially improve linking and load times of shared object libraries, produce more optimized code, provide near-perfect API export and prevent symbol clashes. It is strongly recommended that you use this in any shared objects you distribute.

      See here: http://gcc.gnu.org/wiki/Visibility

      Attached patch (patch.txt) will build libqpid-proton.so shared library using this flag.
      It reduces number of symbols from 700+ to 500+.

        Attachments

        1. proton.patch
          2 kB
          Irina Boverman

          Activity

            People

            • Assignee:
              astitcher Andrew Stitcher
              Reporter:
              iboverma Irina Boverman
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: