Comments (10)
This is likely related to Don't force rustc to do codegen for LTO builds, which makes cargo more lto-aware to speed up builds. But I am not sure where the problem lies exactly.
from hermit-rs.
This was merged only 3 days ago, so it probably isn't that specific PR (I'm assuming rust nightlies are built from master). However there seem to be a lot of related PRs concerning LTO and changing how it works in the past weeks.
Edit: I think rust-lang/rust#71528 might have something to with this, which was also merged on the 29th of April. According to the description
Finally, note that an important consequence of this commit, which is also
one of its primary purposes, is to enable rustc's -Clto bitcode
loading to load rlibs produced with -Clinker-plugin-lto. The goal here
is that when you're building with LTO Cargo will tell rustc to skip
codegen of all intermediate crates and only generate LLVM IR. Today
rustc will generate both object code and LLVM IR, but the object code is
later simply thrown away, wastefully.
The PR indicates that no object files should be generated, while the error indicates otherwise. This might be related to libhermit-rs being built by a build script instead of directly via cargo. But I don't really know enough about rusts build system and cargo to dig deeper.
from hermit-rs.
The problem is solved. At least it works on my test system.
from hermit-rs.
It's still broken for me.
Tested on windows with rustc 1.45.0-nightly (ad4bc3323 2020-06-01)
and commit c68ef8e and also on ad0e4d2.
Both rusty_demo and netbench fail to compile in release mode with lto enabled with the error: error: failed to get bitcode from object file for LTO (Bitcode section not found in object file)
from hermit-rs.
I fixed it, but we have still an issue by building application with LTO support. The linker encodes the wrong OS ABI. See also rust-lang/rust#73606
from hermit-rs.
Looking at the PR, this only works for thin LTO, right? Commit 66325e6 suggests that using full lto lto = true
would still broken, correct?
from hermit-rs.
Yes, but this is also a bug in the Linker Plugin. I am able to link and to run with lto = true
, but the optimization is too aggressive. I was able to see, that the linker assumes that global data is partly constant, which isn't the case. I have to look in the details...
from hermit-rs.
The -C linker-plugin-lto
(or somethin simmilar) has to be set. e.g. int the .cargo/config
from hermit-rs.
Hm, can you set -C linker-plugin-lto
only for x86_64-unknown-hermit
and release
version?
from hermit-rs.
I close this issue. The readme describes, how LTO can be activated.
from hermit-rs.
Related Issues (20)
- Request for info: running hermit-based applications on top of Xen HOT 3
- Move cmath to hermit-builtins HOT 1
- rusty-demo fails to build on windows HOT 7
- failed to run rusty-hermit on QEMU qemu-system-aarch64 HOT 1
- Where do we mention that RustyHermit supports `aarch64`?
- Hermit doesn't work on aarch64: rusty-loader can't find DTB for aarch64 HOT 1
- Include `tcp` in the default features of `hermit-sys`
- hermit-abi 0.3.2 git tag and yanking explanation HOT 4
- Add platform support document to Rust docs HOT 1
- Enable generate-link-to-definition
- Support automatic rebuilds for path dependencies of kernel HOT 1
- Can't build with khronos-egl as dependency HOT 3
- Become a Tier 2 Rust target
- Newer kernel submodule required for RISC-V support HOT 4
- Compilation with Hermit dependency as part of a workspace fails HOT 1
- Networking config file HOT 4
- Benchmarking HOT 8
- Hermit randomness API
- Unable to read directory entries HOT 1
- perf: rework laplace demo with ndarray
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hermit-rs.