-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
Clear intermediate files after successful packaging #248
Comments
Seems like running this type of command at the end after vcpkg_copy_pdbs.cmake or similiar finalizing would do the trick. |
For the general user none of the buildtree files would be needed. And for port debugging, you'd want to have access to the files generated by Ninja (in the intermediate directories) too. Suggestion
This leaves the packages and download caches. All the rest can be regenerated when needed without external requirements. Removing the triplet directories could be done in vcpkg_copy_pdbs.cmake. Ideally such operations should not depend on the port-file implementation. The focus there is to get the library working. Clean-up should happen by default at closing. |
Agreed, we need something like this. |
Agreed as well, feel pain when moving whole vcpkg directory ... so many files! |
Agreed, vcpkg is too large after install some package. |
What are the consequences of manually erasing the contents of |
Installing LLVM in just one config (x64-windows) has a 60GB+ buildtrees folder. I had to clear so many things to make the installer finish. |
@SergioRAgostinho in my experience there are no issues with removing (most of) the content from the When updating already installed ports and adding new ports nothing changes. It might be worth it for anyone to at least clean these folders up. |
Just as a sidenote, due to having so many duplicate copies during the build process, while adding features to the LLVM package, adding just AMDGPU and NVPTX (2 extra targets I need) I cannot finish the install, because 100 GBs is not enough. This is crazy. I'll have to relocate my Vcpkg install to my HDD, because a 256 GB SSD is not enough for Windows and dev tools only (no media, no games). |
I thought I'd share a workaround for the excessive storage usage. In case you have 2 drives in your system (I have an SSD where my work, including source code resides and an HDD where media resides) you could create symlinks for the intermediate directories. In my case it slowed down builds (HDD vs. SSD) but at least I could build LLVM. For example in PowerShell Remove-Item -Recurse C:\Users\mnagy\Source\Repos\vcpkg\downloads
New-Item -Type Directory D:\vcpkg-tmp\downloads
New-Item -Type SymbolicLink -Path C:\Users\mnagy\Source\Repos\vcpkg -Name downloads -Value D:\vcpkg-tmp\downloads\ And you should do the same for the |
Any update on this? |
We currently have a |
I think '--clean-after-build' has already implemented the origianl plan. |
* Fix for detecting ZeroMQ on windows Naming convention is a bit different for ZeroMQ, specifically on Windows with vcpkg. While ZMQ and ZeroMQ are valid on linux, the ZMQ naming convention only works on linux. * Compilation on windows not working with /WX * Macro collision on Windows On windows, the macros defined in the abstract logger collides with other in windows.h. Made them lowercase to avoid collision
After building every (currently 90, wow!) port for static and dynamic, the combined size of installed, packages, and buildtrees is over 30GB. 23GB of this is because of the buildtrees, which are mostly intermediate files (but also sources).
We should keep sources around for optimal debugging, but we can easily shave off >70% by removing the intermediate directories (typically
<triplet>-rel
and<triplet>-dbg
).The text was updated successfully, but these errors were encountered: