Skip to content

Q: are executable after task dist:Linux_64bit in Release mode? #1541

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

Open
4ntoine opened this issue Nov 6, 2021 · 3 comments
Open

Q: are executable after task dist:Linux_64bit in Release mode? #1541

4ntoine opened this issue Nov 6, 2021 · 3 comments
Assignees
Labels
topic: infrastructure Related to project infrastructure type: enhancement Proposed improvement

Comments

@4ntoine
Copy link
Contributor

4ntoine commented Nov 6, 2021

I've build the arduino-cli executable (with task dist:Linux_64bit), but it provides low performance at some environment.
I wonder whether executables are compiled in Release or Debug mode. I can see the executable is not stripped, which makes me think it's in Debug mode:

file arduino-cli
arduino-cli: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, Go BuildID=Zz60NJg_l4m1AvQOVjSx/dM1hmpgIM7armTx0thNs/_6NAp6OcmjPhXjfQc9rK/r7wrkhfpwfikCFp3Qvwc, not stripped

I can definitely strip it, but is there anything to make it compiled with optimizations (in Release mode)?
Can/how can i compile it statically?

PS. i've looked into release binaries and x86-64 has similar size and is also not stripped which makes me think the once compiled by me might be also built in Release mode but just both are not stripped

@silvanocerza
Copy link
Contributor

Nice idea, I didn't think about it. I guess performance won't change but the binary size seems to be cut quite a bit, at least on Linux where I tested.

My only concern would be if we lose detailed stacktraces in case of crashes. 🤔

@per1234 per1234 added the topic: infrastructure Related to project infrastructure label Nov 8, 2021
@4ntoine
Copy link
Contributor Author

4ntoine commented Nov 11, 2021

@silvanocerza i'm not sure about the binary tools, but on mobile when the apps are processed the sourcemap (or renamings) is stored separately during the release (even on CI server). Later when crash happens the addresses are processed with the tool that accepts that stored sourcemap and provides a full human-readable stacktrace.

You could smth similar, so the binaries will be faster/smaller, but you will still have the information when smth goes wrong.

@per1234 per1234 added the type: enhancement Proposed improvement label Mar 31, 2022
@per1234 per1234 assigned umbynos and unassigned silvanocerza Mar 31, 2022
@umbynos
Copy link
Contributor

umbynos commented Feb 2, 2023

This is actually a legit request, I think we can take this in consideration. Apparently the stacktrace seems the same between a stripped and a not stripped binary, but the size of the binaries is different

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: infrastructure Related to project infrastructure type: enhancement Proposed improvement
Projects
None yet
Development

No branches or pull requests

4 participants