Git Product home page Git Product logo

Comments (17)

V0ldek avatar V0ldek commented on July 30, 2024 1

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.

pacak avatar pacak commented on July 30, 2024 1

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.

pacak avatar pacak commented on July 30, 2024

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.

e00E avatar e00E commented on July 30, 2024

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.

pacak avatar pacak commented on July 30, 2024

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.

zeroflaw avatar zeroflaw commented on July 30, 2024

@e00E try version 0.2.14, seems to work better for me.

from cargo-show-asm.

pacak avatar pacak commented on July 30, 2024

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.

pacak avatar pacak commented on July 30, 2024

@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.

e00E avatar e00E commented on July 30, 2024

That fixes it.

from cargo-show-asm.

zeroflaw avatar zeroflaw commented on July 30, 2024

upgrade from 0.2.14 all good here too.

from cargo-show-asm.

V0ldek avatar V0ldek commented on July 30, 2024

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.

pacak avatar pacak commented on July 30, 2024

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.

V0ldek avatar V0ldek commented on July 30, 2024

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.

pacak avatar pacak commented on July 30, 2024

Hmm... Is the repo publicly available?

from cargo-show-asm.

pacak avatar pacak commented on July 30, 2024

Interestingly enough cargo asm -p rsonpath --bin rq --profile distribution works...

from cargo-show-asm.

V0ldek avatar V0ldek commented on July 30, 2024

May it be because codegen-units = 1?

from cargo-show-asm.

pacak avatar pacak commented on July 30, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.