Skip to content
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

Absolutely massive+duplicate binaries in each clang build #117029

Open
pps83 opened this issue Nov 20, 2024 · 3 comments
Open

Absolutely massive+duplicate binaries in each clang build #117029

pps83 opened this issue Nov 20, 2024 · 3 comments
Labels
clang Clang issues not falling into any other category question A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!

Comments

@pps83
Copy link

pps83 commented Nov 20, 2024

Hello Llvm,

why are all the clang/llvm builds ship these absolutely massive binaries that are almost binary exact copies of each other? Like intel's icx 2025 has clang.exe, clang++.exe, clang-cl.exe, clang-cpp.exe. These four binaries are each 110MB in size, by the diff between these is just like a few kilobytes. Similar story goes with 76MB sized ld.lld.exe, lld.exe, lld-link.exe. In the same manner, clang that ships with MS visual studio has these binaries at 119MB and 88MB and other smaller almost identical binaries.

Shouldn't all these be small binaries that simply link to a shared .dll/.so to avoid all that duplication?

@github-actions github-actions bot added the clang Clang issues not falling into any other category label Nov 20, 2024
@nikic
Copy link
Contributor

nikic commented Nov 20, 2024

These are all symlinks on Linux, which become copies on Windows...

There is ongoing work to allow linking against a common DLL on Windows, which is currently not possible due to platform limitations. See #109483.

@EugeneZelenko EugeneZelenko added the question A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead! label Nov 20, 2024
@Andarwinux
Copy link
Contributor

Windows symlinks are not enabled by default, otherwise LLVM_TOOL_LLVM_DRIVER_BUILD is a perfect choice.

@pps83
Copy link
Author

pps83 commented Nov 21, 2024

These are all symlinks on Linux, which become copies on Windows...

There is ongoing work to allow linking against a common DLL on Windows, which is currently not possible due to platform limitations. See #109483.

That's probably something else, as the binaries are clearly not identical. I read the meta post and I understand what it is, simply takes time to take care of proper visibilty tags for public vs private symbols.
One other alternative workaround is to create a single dll/so that simply exports main_clang_cl(...), main_clang_cpp and then tiny executables that could simple forward their main(...) args to the dll/so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang Clang issues not falling into any other category question A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!
Projects
None yet
Development

No branches or pull requests

4 participants