I want to make builds as fast as possible on my ThinkPad X230.

3 min

language: ja bn en es hi pt ru zh-cn zh-tw

Hello, I'm incompetent.

I always use my ThinkPad X230, and there are no problems with the basic operations I perform, but it gets a bit tough when it comes to builds, so I want to do something about it.


So, I'll take a look at the righteous Arch Wiki.

https://wiki.archlinux.jp/index.php/Makepkg

>The make build system uses the MAKEFLAGS environment variable to specify additional options for make. The variable can also be set in the makepkg.conf file.

>Users with multi-core/multi-processor systems can specify the number of jobs to run simultaneously. This can be achieved by using nproc to determine the number of available processors. MAKEFLAGS="-j $(nproc)" Some PKGBUILDs specifically override this with -j1 due to race conditions in certain versions, or simply because it's not supported from the start. Packages that fail to build for this reason should be reported to the bug tracker (or the package maintainer in the case of AUR packages) after confirming that the error is indeed caused by MAKEFLAGS.

I see.

So, I'll try changing it. In my case, it's an i5-3320M, so it's 4 cores.

Open with sudo vi /etc/makepkg.conf and search for MAKEFLAGS...

MAKEFLAGS=“-j4”

I set it to this.

And then, I'll try installing ccache.

>ccache
>By using ccache, you can cache compilation results and shorten build times.

Installation.

sudo pacman -S ccache

Similarly, I'll edit makepkg.conf. Then, I searched for the string BUILDENV and found the following:

BUILDENV=(!distcc color !ccache check !sign)

It's off by default, so I'll remove the '!' and save.

BUILDENV=(!distcc color ccache check !sign)

That's it.


I haven't run a build yet, so I don't know the actual processing speed, but I just wanted to say I tried it.

That's all for now.

See you next time.

Related Posts