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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 3.4.1, 3.5.1
    • Affects Version/s: None
    • Component/s: Build
    • None
    • Fully Compatible
    • ALL
    • v3.4
    • Platforms 2017-01-23
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Andrew Morrow (Inactive)
            Reporter:
            Andrew Morrow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: