[Proof of concept] Build shared LLVM lib for gnullvm#151795
[Proof of concept] Build shared LLVM lib for gnullvm#151795mati865 wants to merge 2 commits intorust-lang:mainfrom
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
This comment has been minimized.
This comment has been minimized.
Build shared LLVM lib for gnullvm try-job: dist-x86_64-llvm-mingw try-job: dist-aarch64-llvm-mingw
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment has been minimized.
This comment has been minimized.
Build shared LLVM lib for gnullvm try-job: dist-x86_64-llvm-mingw
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
So much fun. This is not related to When doing Running
With my libdir change, first Second
|
|
@bors try jobs=dist-x86_64-llvm-mingw,dist-aarch64-llvm-mingw |
This comment has been minimized.
This comment has been minimized.
Build shared LLVM lib for gnullvm try-job: dist-x86_64-llvm-mingw try-job: dist-aarch64-llvm-mingw
|
cc @ZuseZ4, this draft is a proof of concept shared LLVM library regarding #151774 |
| pub fn maybe_install_llvm_runtime(builder: &Builder<'_>, target: TargetSelection, sysroot: &Path) { | ||
| // FIXME: add helper? | ||
| let dst_libdir = sysroot.join(builder.sysroot_libdir_relative(Compiler::new(1, target))); | ||
| let dst_runtime_libdir = dst_libdir.parent().unwrap().join(libdir(target)); |
There was a problem hiding this comment.
Isn't this wrong when the libdir has been configured to be say lib64 on a linux system? The libdir helper doesn't take that into account, while sysroot_libdir_relative does. Maybe use builder.libdir_relative() instead? sysroot_libdir_relative is meant for where the standard library is stored while libdir_relative is for where the dylibs rustc itself links against are stored.
There was a problem hiding this comment.
This is not a final solution, just a proof of concept that this can work on Windows.
|
@mati865 I'd prefer to land this first without the Enzyme changes, so I can later have one or in which I enable it for all 3 OS, and potentially just have to revert that one if it ends up breaking something. I would give the Zulip discussion a day or two, but I don't think people will have strong opinions on this choice. |
|
@ZuseZ4 sure, I'll look soon. Once my flu is gone and my brain can comprehend more than just a single expression at a time. |
Unlike other systems, Windows requires runtime libraries to be present in `PATH` or right next to the binary. So, we copy the library next to the binary as the easier solution.
a074227 to
794640e
Compare
|
@bors try jobs=dist-x86_64-llvm-mingw,dist-aarch64-llvm-mingw |
This comment has been minimized.
This comment has been minimized.
[Proof of concept] Build shared LLVM lib for gnullvm try-job: dist-x86_64-llvm-mingw try-job: dist-aarch64-llvm-mingw
|
@bors cancel |
|
❗ There is currently no auto build in progress on this PR. Hint: There is a pending try build on this PR. Maybe you meant to cancel it? You can do that using |
|
Try build cancelled. Cancelled workflows: |
This comment has been minimized.
This comment has been minimized.
[Proof of concept] Build shared LLVM lib for gnullvm try-job: dist-x86_64-llvm-mingw try-job: dist-aarch64-llvm-mingw
|
💔 Test for 2c8caf7 failed: CI. Failed job:
|
|
@bors try jobs=dist-x86_64-llvm-mingw AArch64 runner is flaky, but we don't need it either way. |
This comment has been minimized.
This comment has been minimized.
[Proof of concept] Build shared LLVM lib for gnullvm try-job: dist-x86_64-llvm-mingw
|
On disk sizes of the installed toolchains: This is despite shipping two identical LLVM DLLs, so quite impressive. Given the lack of replies in #t-compiler > Changing static linking of rustc to LLVM to dynamic |
Install LLVM DLL in the right place on Windows Continuation of rust-lang#151795 towards rust-lang#151774. Unlike other systems, Windows requires runtime libraries to be present in `PATH` or right next to the binary. So, we copy the library next to the binary as the easier solution. Tested building `rust-openssl` in debug and release modes, but the difference is within noise margin.
Install LLVM DLL in the right place on Windows Continuation of rust-lang#151795 towards rust-lang#151774. Unlike other systems, Windows requires runtime libraries to be present in `PATH` or right next to the binary. So, we copy the library next to the binary as the easier solution. Tested building `rust-openssl` in debug and release modes, but the difference is within noise margin.
No description provided.