Giter Club home page Giter Club logo

Comments (5)

readroberts avatar readroberts commented on July 3, 2024

Why? Habit, and a lack of knowledge about Linux development.When I run the build scripts, I usually want a release version from which I can make a working distribution. If you can add this to the scripts, with an option to make the debug versions instead, feel free to do so.

from afdko.

HinTak avatar HinTak commented on July 3, 2024

Putting a -g then strip, is not the same as doing without -g - bugs in compiler and and strip aside. There are bugs in compilers from time to time where only the result with -g or without it works, and there are the occasional bugs with strip also, where applying strip actually cripples your binary. Those are side issues.

Anyway, the difference, in principle, is that if you do -g, you think there is a possibility the outcome might be broken and you intend to look into it. -g disables some optimizations which might make debugging impossible, as a general rule. Major inlin'ing, code re-arrangements, etc. So as a general rule, the resulting binary from -g then strip will still be slower than without -g. (assuming your compiler is working correctly in both cases).

That's why, depends on circumstances, you want to do both, or either.

from afdko.

HinTak avatar HinTak commented on July 3, 2024

Alternatively, in windows' land, it is routine to ship only "release" binaries, for exact this reason: to make running and poking into the binary with a debugger difficult or impossible. On the typical linux box, debug info are stripped, but stored externally, so obviously it is still possible.

from afdko.

HinTak avatar HinTak commented on July 3, 2024

In fact -g then strip is perhaps worse than either plain -g or without -g: you don't get a fully optimized binary, and you cannot debug with it either.

I'd say, if you have to choose one, make up your mind which is more important - fully speed or debugg'ability.

from afdko.

miguelsousa avatar miguelsousa commented on July 3, 2024

Fixed via #414

from afdko.

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.