telegram-bot-api icon indicating copy to clipboard operation
telegram-bot-api copied to clipboard

Added Multiple Core build support option

Open erfanmola opened this issue 2 years ago • 3 comments

Added an option to chose multi core build by using clang's -j parameter

erfanmola avatar Dec 30 '22 13:12 erfanmola

This ability is intentionally omitted, because building in multiple threads will fail for most users, which don't have enough RAM. It also requires a new enough CMake, which supports the -j option.

levlam avatar Dec 30 '22 14:12 levlam

This ability is intentionally omitted, because building in multiple threads will fail for most users, which don't have enough RAM. It also requires a new enough CMake, which supports the -j option.

Fair enough, but since the option is optional like "Enable Link Time Optimization", might be worth a notice that it has an specific cmake version requirement and if not sufficent RAM or in general may lead to compile errors, but otherwise it would multiply compilation speed

If this would be acceptable, I could update and PR

erfanmola avatar Dec 30 '22 22:12 erfanmola

The purpose of the build instructions generator is to provide build instructions, which will definitely work. In the very common case there is not enough RAM even for building TDLib in 1 thread, so the ability to specify any bigger value will be harmful. Adding options, which can lead to a failed build, will help noone. People will be tired by searching for a working option combination. Even presence of LTO as an option for macOS and Ubuntu distros is harmful, because LTO doesn't work too often.

Moreover, TDLib needs to be rebuild very rarely, usually once a month. There are no reasons to speed up this for most use cases, and C++ developers don't need the build instructions generator to build a CMake project in parallel.

levlam avatar Dec 30 '22 23:12 levlam