Skip to content

offload: add libLLVM rpath for libomptarget - #162860

Open
sgasho wants to merge 1 commit into
rust-lang:mainfrom
sgasho:offload-remove-ldlibrarypath
Open

sgasho wants to merge 1 commit into
rust-lang:mainfrom
sgasho:offload-remove-ldlibrarypath

Conversation

@sgasho

@sgasho sgasho commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

fix: #162309 (comment)

We can remove LD_LIBRARY_PATH=$(rustc +nightly --print sysroot)/lib when we run the offload code after this PR lands.

libomptarget.so is in lib/rustlib/${target}/lib, and libLLVM is in lib/, three hierarchy above libomptarget. So we can specify $ORIGIN/../../../

Lld::run uses the same logic.

スクリーンショット 2026-09-17 3 16 48 スクリーンショット 2026-09-17 3 17 02

I have not verified if it works yet. I'll share the result I can test on my local machine later, but testing using tarballs would be better?

r? @ZuseZ4

@rustbot

rustbot commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

This PR changes how LLVM is built. Consider updating src/bootstrap/download-ci-llvm-stamp.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Sep 16, 2026
@ZuseZ4

ZuseZ4 commented Sep 17, 2026

Copy link
Copy Markdown
Member

I think you'll need to rebase before this works, but let's try.

@bors try jobs=dist-x86_64-linux

@rust-bors

This comment has been minimized.

@ZuseZ4

ZuseZ4 commented Sep 17, 2026

Copy link
Copy Markdown
Member

I tested dist locally and it works. You just shouldn't need the target check anymore after the rebase, since we simplified the build in a pr merged yesterday.

@rust-cloud-vms
rust-cloud-vms Bot force-pushed the offload-remove-ldlibrarypath branch from c5e7260 to 0db4e55 Compare September 17, 2026 13:23
@ZuseZ4

ZuseZ4 commented Sep 17, 2026

Copy link
Copy Markdown
Member

@bors try jobs=dist-x86_64-linux

rust-bors Bot pushed a commit that referenced this pull request Sep 17, 2026
offload: add libLLVM rpath for libomptarget


try-job: dist-x86_64-linux
@rust-bors

This comment has been minimized.

@rust-bors

rust-bors Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: f0c72e2 (f0c72e29adf7edd84cb0d60241f2c8923c631036)
Base parent: c999cef (c999cef531ea9059e189e82fe0e82c5daf249bc9)

@ZuseZ4

ZuseZ4 commented Sep 17, 2026

Copy link
Copy Markdown
Member

@bors r+ rollup

@rust-bors

rust-bors Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 0db4e55 has been approved by ZuseZ4

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 17, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Sep 17, 2026
…h, r=ZuseZ4

offload: add libLLVM rpath for libomptarget

fix: rust-lang#162309 (comment)

We can remove LD_LIBRARY_PATH=$(rustc +nightly --print sysroot)/lib when we run the offload code after this PR lands.

libomptarget.so is in lib/rustlib/${target}/lib, and libLLVM is in lib/, three hierarchy above libomptarget. So we can specify $ORIGIN/../../../

Lld::run uses the same logic.

<img width="520" height="285" alt="スクリーンショット 2026-09-17 3 16 48" src="https://github.com/user-attachments/assets/d8f4938d-7e37-4e56-af61-9f2ed7f2e5fc" />

<img width="589" height="454" alt="スクリーンショット 2026-09-17 3 17 02" src="https://github.com/user-attachments/assets/b5e8bf27-38b1-460c-a113-20176a669a05" />

I have not verified if it works yet. I'll share the result I can test on my local machine later, but testing using tarballs would be better?

r? @ZuseZ4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants