Skip to content
  • Alex Crichton's avatar
    trans: Don't link whole rlibs to executables · cc719d2d
    Alex Crichton authored
    Back in 9bc8e6d1 the linking of rlibs changed to using the `link_whole_rlib`
    function. This change, however was only intended to affect dylibs, not
    executables. For executables we don't actually want to link entire rlibs because
    we want the linker to strip out as much as possible.
    
    This commit adds a conditional to this logic to only link entire rlibs if we're
    creating a dylib, and otherwise an executable just links an rlib as usual. A
    test is included which will fail to link if this behavior is reverted.
    cc719d2d