-
Notifications
You must be signed in to change notification settings - Fork 400
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
🐛 delta fails to build with enabled lto
#1651
Comments
I've also had this issue. I believe the issue is the that the library built (onig, using onig-sys, using rust-bindgen) doesn't emit lto-valid code. It needs to be built with LLVM LTO format (since that's the rustc LTO output) by setting the C compiler to clang and manually specifying some linker configuration. It builds properly on my system when I do that. So use Here's a source for the rustflags combo: rust-lang/rust-bindgen#2405 |
I completely missed your answer.
But I don't know why it would fail in my case, if it works for yours? On the other hand, taken from non-AUR There are quite some differences between the two build files and I don't find build docs around, so in case you would know if/why is https://gitlab.archlinux.org/archlinux/packaging/packages/git-delta/-/blob/main/PKGBUILD?ref_type=heads#L40 needed and the recommendations between cargo locked and frozen (see https://gitlab.archlinux.org/archlinux/packaging/packages/git-delta/-/blob/main/PKGBUILD?ref_type=heads#L43). |
I used to update
git-delta
to latest commit for quite some time, through ArchLinux's AUR, from https://aur.archlinux.org/packages/git-delta-gitRecently, Arch changed building defaults to enable
lto
by default for everything.It caused some of these packages to fail to build under
lto
option, anddelta
is one of them.I didn't see any report of the failing build with
lto
so it felt like it's always worth a report, even if it's to explain that it's intended.The build/link errors are the following ones:
I'm not much knowledgeable of the matter, but I'm guessing issue would come from
onig
crate, coming from there:The text was updated successfully, but these errors were encountered: