Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-12588

Application of -fvisibility=hidden to CCFLAGS comes too late to affect shared client library build

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Build
    • None
    • ALL

      SConscript.client applies -fvisibility=hidden to both CCFLAGS and SHLINKFLAGS in the sharedLibEnv, with the aim of making the default visibility for the library hidden. However, the application to CCFLAGS in that environment has no effect on compilation, since the object files were already compiled by the 'libEnv' Environment. This was done to share the compilation artifacts between the static and shared build of the library.

      As a result, none of the .cpp files actually have hidden visibility applied. While the application of -fvisibility=hidden to SHLINKFLAGS is necessary, it is not sufficient.

            Assignee:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Reporter:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: