Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustbuild: Tweak LLVM distribution layout #53955

Merged
merged 1 commit into from
Sep 6, 2018

Commits on Sep 5, 2018

  1. rustbuild: Tweak LLVM distribution layout

    This commit tweaks the layout of a few components that we distribute to
    hopefully fix across all platforms the recent issues with LLD being unable to
    find the LLVM shared object. In rust-lang#53245 we switched to building LLVM as a dynamic
    library, which means that LLVM tools by default link to LLVM dynamically rather
    than statically. This in turn means that the tools, at runtime, need to find the
    LLVM shared library.
    
    LLVM's shared library is currently distributed as part of the rustc component.
    This library is located, however, at `$sysroot/lib`. The LLVM tools we ship are
    in two locations:
    
    * LLD is shipped at `$sysroot/lib/rustlib/$host/bin/rust-lld`
    * Other LLVM tools are shipped at `$sysroot/bin`
    
    Each LLVM tool has an embedded rpath directive indicating where it will search
    for dynamic libraries. This currently points to `../lib` and is presumably
    inserted by LLVM's build system. Unfortunately, though, this directive is only
    correct for the LLVM tools at `$sysroot/bin`, not LLD!
    
    This commit is targeted at fixing this situation by making two changes:
    
    * LLVM tools other than LLD are moved in the distribution to
      `$sysroot/lib/rustlib/$host/bin`. This moves them next to LLD and should
      position them for...
    * The LLVM shared object is moved to `$sysroot/lib/rustlib/$host/lib`
    
    Together this means that all tools should natively be able to find the shared
    object and the shared object should be installed all the time for the various
    tools. Overall this should...
    
    Closes rust-lang#53813
    alexcrichton committed Sep 5, 2018
    Configuration menu
    Copy the full SHA
    bce09b6 View commit details
    Browse the repository at this point in the history