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

Dynamic builds should use --no-as-needed for executables, not just libraries

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.4.1, 3.5.1
    • Component/s: Build
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v3.4
    • Sprint:
      Platforms 2017-01-23

      Description

      We currently add -Wl,--no-as-needed to SHLINKFLAGS, so that we don't silently drop library to library dependency edges if there is no symbolic dependency on platforms where -Wl,--no-as-needed is on by default. We don't want to drop those edges because even though there is no symbol level dependency, there may be a "hidden" dependency on static initializers or mongo initializers.

      However, we have not done the same thing for executable to library edges, so we can still end up dropping a dependency edge.

      We should add -Wl,--no-as-needed to LINKFLAGS instead of SHLINKFLAGS, so it is applied to both executables and dynamic libraries.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: