Skip to content

Use dynamic linking and download LLVM from CI for rustc across platforms #77084

Closed

Description

@jyn514

From #76810:

Longer-term I do think it's best to get back to a point where we're consistently doing the same thing for LLVM across all our platforms. It's been the case for quite some time that LLVM is built with ThinLTO on Linux but nowhere else. Differing in linkage is also unfortunate across the major platforms too.

I've given up on trying to make link-shared work well across the board -- see PR description and the last few CI failures -- it seems link LLVM is just not ready for a shared link on macOS or when cross-compiling, which excludes almost all of our builders.

Switching to static linking would preclude any of the improvements from #76349, so it would be better to use dynamic linking instead which would allow any contributor to get started without building LLVM from source or using system LLVM. That said, it sounds like dynamic linking will be very hard to do on other platforms.

cc @Mark-Simulacrum

Activity

  1. added
    A-linkage
    E-hard
    T-bootstrap
    C-feature-request
    A-contributor-roadblock
    on Sep 22, 2020
  2. Mark-Simulacrum commented on Sep 23, 2020

    @Mark-Simulacrum
    Member

    Cc @cuviper @nikic @nagisa - do we know what the right way to bring the issues (bugs?) I found to LLVM developers? Are there active maintainers of LLVMs build system?

  3. added
    A-LLVM
    on Sep 23, 2020
  4. nagisa commented on Sep 23, 2020

    @nagisa
    Member

    LLVM’s bugzilla is pretty much the only place for bug reports. If its something less defined than a precise bug report, talking it out on the mailing lists is the way to go.

  5. est31 commented on Sep 23, 2020

    @est31
    Member

    Switching to static linking would preclude any of the improvements from #76349, so it would be better to use dynamic linking instead

    In which way is static linking making downloaded LLVM impossible?

  6. Mark-Simulacrum commented on Sep 23, 2020

    @Mark-Simulacrum
    Member

    I don't think it's impossible to download/ship the statically linked LLVM, it's something I want to explore. That said, we want to move to dynamically linking LLVM because we ideally want to be applying ThinLTO to LLVM everywhere, not just on x86_64-unknown-linux-gnu, and since LTO happens at link-time, we want that to happen once, not on the multiple LLVM links occurring during CI.

  7. added 3 commits that reference this issue on Jan 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMA-contributor-roadblockA-linkageC-feature-requestE-hardT-bootstrap

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions