enable thinlto for packages will increase the first time compile time
Closed this issue · 8 comments
Enable thinlto for packages will increase the x86_64(not x86_64-v3) compile time.
The comparison is very obvious, especially when compiling ffmpeg and mpv.
enable thinlto for all packages, took about 44min(https://github.com/eko5624/mpv-winbuild/actions/runs/7676626171)
disable thinlto for all packages, took about 24min(https://github.com/eko5624/mpv-winbuild/actions/runs/7677718754)
Yes, it's normal.
Then the CI should switch to default CLANG_PACKAGES_LTO="OFF" for x86_64 compilation.
Thanks. I will try to add ThinLTO cache to see if the problem can be resolved.
I try to add ThinLTO and ccache,but I get this errors. https://github.com/eko5624/mpv-winbuild/actions
My x86_64-w64-mingw32-clang:
https://github.com/eko5624/toolchain/blob/11b33325636538e92e24899d2f8b7edb112a57e1/llvm-wrapper-x86_64_v3/x86_64-w64-mingw32-clang#L12
My x86_64-w64-mingw32-ld :
https://github.com/eko5624/toolchain/blob/11b33325636538e92e24899d2f8b7edb112a57e1/llvm-wrapper-x86_64_v3/x86_64-w64-mingw32-ld#L7
And my makepkg_cross.conf:
https://github.com/eko5624/mpv-winbuild/blob/52dd2212e1a59eda859ac036bdba6789df3f5a66/pacman-config/makepkg_cross.conf#L47
And ccache.conf:
https://github.com/eko5624/mpv-winbuild/blob/52dd2212e1a59eda859ac036bdba6789df3f5a66/ccache.conf#L1
Any suggestions?
So I consider to drop ccache, just only packages thinlto.
Fortunately, only shaderc and ffmpeg link dll/exe, so you can consider merge shaderc/libplacebo/ffmpeg into the same runner.
what confuse me is where is the thinlto directory when shaderc compiled done. Do you mean only ffmpeg has thinlto things? If so, I only need to cache thinlto dir when ffmpeg compiled done.
So I should set --thinlto-cache-dir
to where?
By the way, in archlinux docker, when input cd ~
, the output is /github/home
Thanks for your tip, I will try it.
It works now since https://github.com/eko5624/mpv-winbuild/tree/e3ff1d33014ac0379ad17b792a243d576ce1bd9c
But It seems the compilation speed is no difference between enable thinlto and disable thinlto. And I find when enable thinlto, the size of mpv.exe is slightly larger than disable thinlto.