-
Notifications
You must be signed in to change notification settings - Fork 111
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
Build full-static LLVM tools binaries #216
Conversation
Previously, the binaries built when ENABLE_TOOL=LLVM are all dynamically linked, there are many .so dependencies that prevent the tool binaries from be deployed to other systems. The change is also required when building release binaries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to describe somewhere that the binary built will be statically linked?
nit: It's not a fully static link and still depends on some basic shared libraries. Update the description to e.g. "Minimize shared libs ..." and so on? Also for the future we could introduce a check in the CI which dumps the list of shared libs and expects that to be <= 7 (based on the commit description). What do you think? |
Done changing the PR title.
Sounds good, we can add the check in the CI action. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Sounds good, we can add the check in the CI action.
Ok with me to add in a follow up if you want.
Why can't we build fully static binary? too many changes? |
… the linking command.
Yes we can. Experimented, and found that I can force a full static build adding "-static" to the linking command. Updated. PTAL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Previously, the binaries built when ENABLE_TOOL=LLVM are all dynamically linked, there are many .so dependencies that prevent the tool binaries from be deployed to other systems.
The change is also required when building release binaries.
After this change, the create_llvm_prof and other tools binaries will be fully static linked.