Skip to content

Fix configure --llvm-root #6802

Closed
Closed
@pnkfelix

Description

@pnkfelix
Member

Rust currently uses a patched version of llvm. Some time ago, we added a --llvm-root option to configure (#1123), to allow the user to point the build at an LLVM outside the build tree.

Some recent discussion on #4259 and on wiki packaging leads me to conclude that the llvm-root switch is broken.

We may want to fix it, e.g. to test, once our patches have landed upstream, whether a new version of LLVM works.

(Also, I would be curious if there is a way to build the LLVM source once and share it amongst multiple clones of the Rust git repository. Doing that was the impetus for my interest in this matter, though in hindsight it is possible that --llvm-root never actually supported that use-case.)

Activity

fabiand

fabiand commented on Jul 9, 2013

@fabiand
Contributor

I'll be happy to test anything related to unbundling llvm.

bblum

bblum commented on Aug 20, 2013

@bblum
Contributor

nominating feature-complete milestone

catamorphism

catamorphism commented on Aug 29, 2013

@catamorphism
Contributor

Just a bug -- internal implementation issue.

fabiand

fabiand commented on Aug 29, 2013

@fabiand
Contributor

Fixing this would really help us to get rust into fedora. A bundled llvm is a major blocker.

Tim Chevalier notifications@github.com schrieb:

Just a bug -- internal implementation issue.


Reply to this email directly or view it on GitHub.

alexcrichton

alexcrichton commented on Aug 30, 2013

@alexcrichton
Member

Sadly, until we get our patches into LLVM upstream we won't be able to do this.

pnkfelix

pnkfelix commented on Aug 30, 2013

@pnkfelix
MemberAuthor

Well, I would think we could fix the --llvm-root switch, regardless of whether the patches are upstream. I.e. being able to make one checkout of our fork and share it among multiple clones of rust. (I'm just pointing out that #4259 does not actually block this.)

fabiand

fabiand commented on Sep 4, 2013

@fabiand
Contributor

Will the --llvm-root actually require all llvm source, or just the headers+libs?

alexcrichton

alexcrichton commented on Sep 6, 2013

@alexcrichton
Member

In theory all we need are the headers and libraries, the source shouldn't be necessary at all.

dmski

dmski commented on Mar 5, 2014

@dmski
Contributor

--llvm-root is actually working fine for me on macos and linux (though i last checked it on linux about 2 months ago).

I have llvm built with ./configure --enable-targets=x86,x86_64,arm,mips --enable-optimized --enable-assertions --disable-docs --enable-bindings=none --disable-terminfo --disable-zlib --disable-libffi --with-python=/usr/bin/python2.7 --prefix=/path/to/installed/llvm and installed to a separate directory.

Building rustc with configure --llvm-root=/path/to/installed/llvm then skips building and configuring llvm (though still retrieves its sources from git) and resultant rust binaries successfully pass make check.

alexcrichton

alexcrichton commented on Mar 5, 2014

@alexcrichton
Member

Indeed, we're using --llvm-root on travis today, and we're doing just fine.

added 2 commits that reference this issue on Mar 11, 2021

Auto merge of rust-lang#6802 - camsteffen:dogfood-fix, r=llogiq

Auto merge of rust-lang#6849 - flip1995:dogfood-fix, r=matthiaskrgr

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-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @alexcrichton@fabiand@pnkfelix@catamorphism@dmski

        Issue actions

          Fix configure --llvm-root · Issue #6802 · rust-lang/rust