Comments (17)
Yup, it's https://github.com/V0ldek/rsonpath.
The exact command I'm running is cargo asm -p rsonpath --bin rq
in the project root.
from cargo-show-asm.
I guess the best way to deal with LTO is to implement #174 after all. I'll look into that once I'm done messing with bpaf
.
from cargo-show-asm.
Related ticket is this #146
As far as I remember lto means generating multiple .s
files and rustc
is not exposing enough information for cargo-show-asm to tell what exactly was generating this time. I guess it's time to revisit the file detection one more time :)
from cargo-show-asm.
The state of the other issues was unclear to me. Wasn't sure if this was accepted behavior or needed a reproduction so I made this one. If you don't want to support LTO then I would like the Readme to mention that.
Thanks for working on this project btw.
from cargo-show-asm.
I don't mind supporting LTO, just the way it works now it asks rustc
to generate asm/lto/whatever, before LTO runs and that previous ticket was mostly about making sure it still compiles and it was compiling for me with all the lto options I tried. Will try to fix, not sure how long it will take.
from cargo-show-asm.
@e00E try version 0.2.14, seems to work better for me.
from cargo-show-asm.
Removing LTO hack seems to fix the problem and both lto=thin
and lto=fat
, it just works on 1.71.0... 🤔 And still does not work on 1.67.1... So probably 1.67.1 was just a temporary regression of some sort.
It probably makes sense to drop the hack and proclaim that 1.67.1 + LTO of any sort is not supported...
Decisions, decisions... 🤔
from cargo-show-asm.
@e00E I pushed a branch called lto
, you can install it using something like cargo install --git https://github.com/pacak/cargo-show-asm --branch lto
. Can you check if it fixes your problem?
from cargo-show-asm.
That fixes it.
from cargo-show-asm.
upgrade from 0.2.14 all good here too.
from cargo-show-asm.
I'm still getting an issue on 0.2.21 that seems related. With thin LTO when trying to disassemble a --bin
target I get this:
~/rsonpath> cargo asm -p rsonpath --bin rq
warning: ignoring emit path because multiple .s files were produced
warning: `rsonpath` (bin "rq") generated 1 warning
Finished release [optimized + debuginfo] target(s) in 0.03s
Error: Cannot locate the path to the asm file
With LTO disabled it works.
As far as I remember lto means generating multiple .s files and rustc is not exposing enough information for cargo-show-asm to tell what exactly was generating this time.
I'm thinking it's this issue, judging by "warning: ignoring emit path because multiple .s files were produced`?
from cargo-show-asm.
I'm still getting an issue on 0.2.21 that seems related. With thin LTO when trying to disassemble a --bin target I get this:
What version of the compiler are you using?
from cargo-show-asm.
What version of the compiler are you using?
Latest 1.73.0: rustc 1.73.0 (cc66ad468 2023-10-03)
Fails on current nightly as well: rustc 1.75.0-nightly (bf9a1c8a1 2023-10-08)
from cargo-show-asm.
Hmm... Is the repo publicly available?
from cargo-show-asm.
Interestingly enough cargo asm -p rsonpath --bin rq --profile distribution
works...
from cargo-show-asm.
May it be because codegen-units = 1
?
from cargo-show-asm.
Most likely, but I'm passing codegen-units = 1
regardless so it probably means rustc
ignores this with lto = thin
🤔
from cargo-show-asm.
Related Issues (20)
- Implement objdump output format
- Compare / Diff between two version of Compilation HOT 4
- Fails with lines-tables-only HOT 4
- Fails with -Z asm-comments HOT 11
- How to dump disassembly of PGO optimized builds? HOT 3
- thread 'main' panicked at 'No cdylib?' HOT 9
- Support multiple codegen units?
- Missing license files HOT 5
- Fails to find rust sources on windows HOT 23
- Support inlining info in asm files
- `--print KIND=PATH` is stable
- Remove extraneous blank lines HOT 5
- `sample` test case is broken with 1.75 HOT 12
- Add use a separate library to implement syntax highlight for llvm/mir/asm
- Wrong path used for rustc sources HOT 10
- Automate release process
- --rust flag shows code from libstd HOT 4
- Function selection via index broken on v0.2.24 to v0.2.28 HOT 6
- Option to include called functions (to some depth) HOT 6
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 cargo-show-asm.