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

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 3.4.1, 3.5.1
    • Build
    • None
    • Fully Compatible
    • ALL
    • v3.4
    • 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

            andrew.morrow@mongodb.com Andrew Morrow
            andrew.morrow@mongodb.com Andrew Morrow
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: