Changes between Version 3 and Version 4 of WebKitFlatpakSDK/SpeedUpBuild

Aug 5, 2020 9:21:45 AM (2 years ago)
Philippe Normand



  • WebKitFlatpakSDK/SpeedUpBuild

    v3 v4  
    6666=== IceCC
    68 TODO
     69[ Icecream] was created by SUSE based on distcc. Like distcc, Icecream takes compile jobs from a build and distributes it among remote machines allowing a parallel build. But unlike distcc, Icecream uses a single central server called scheduler that dynamically assigns the compile jobs to multiple distributed daemons, choosing the fastest free one. This advantage pays off mostly for shared computers, if you're the only user on x machines, you have full control over them.
     70 * You should have only one scheduler in your network.
     71 * The scheduler and one of the daemons can be in the same host.
     73==== Installing
     75 * Execute:
     78$ sudo apt-get install icecc
     81 * You can install icecc monitor too:
     84$ sudo apt-get install icecc-monitor
     88==== icecc scheduler
     90 * Configure scheduler to start by default (see `/usr/share/doc/icecc/README.Debian`):
     93$ sudo update-rc.d icecc-scheduler enable
     96 * After configuring the scheduler to start, it will do so on next reboot, but not sooner. You can start it manually:
     97   * Ubuntu
     100$ sudo service icecc restart
     102   * Debian
     105$ sudo service icecc-scheduler start
     108==== icecc daemon(s)
     110 * iceccd (daemon) has to be able to find the scheduler in the network. By default, it makes so by sending a broadcast message. This may not work depending on your network topology (routers, firewalls, etc.). You can specify the actual address of the icecc-scheduler by stating it in the icecc config file:
     113$ cat /etc/icecc/icecc.config
     116# If the daemon can't find the scheduler by broadcast (e.g. because
     117# of a firewall) you can specify it.
     120ICECC_SCHEDULER_HOST="<icecc-scheduler IP or host name>"
     124 * Also, you may not want your local icecc daemon to run works from other hosts. For example, I want my laptop to be helped by my tower but I don't want my laptop to take works from my tower:
     127$ cat /etc/icecc/icecc.config
     130# Specifies whether jobs submitted by other nodes are allowed to run on
     131# this one.
     133# ICECC_ALLOW_REMOTE="yes"
     138 * Make sure you integrate it seamlessly with ccache by allowing enough jobs your local icecc daemon:
     139(CCache run preprocessor with calling icecc, which connects to your local icecc daemon, which run preprocessing locally.
     140Don't set ICECC_MAX_JOBS="0" to forbid accepting remote jobs, because in this case CCache can preprocess only on one thread.
     141The ideal setting for ICECC_MAX_JOBS is the number of your processors.)
     144$ cat /etc/icecc/icecc.config
     147# You can overwrite here the number of jobs to run in parallel. Per
     148# default this depends on the number of (virtual) CPUs installed.
     150# Note: a value of "0" is actually interpreted as "1", however it
     151# also sets ICECC_ALLOW_REMOTE="no".
     153# ICECC_MAX_JOBS=""
     159 * You may want to restart the service after setting all the configuration appropriately:
     160   * Ubuntu
     163$ sudo service icecc restart
     165   * Debian
     168$ sudo service iceccd restart
     171 * Then compile WebKit normally:
     174$ Tools/Scripts/build-webkit --gtk
     178==== Enable IcecCC in build-webkit
     180To use icecc, export the CCACHE_PREFIX variable:
     183$ export CCACHE_PREFIX=icecc
     186As ccache is enabled by default in the SDK, it will now prefix compile commands with icecc. This is all you need to do, toolchains archives automatically generated during the SDK installation will be sent to the scheduler over the network. This is all pre-configured by default when build-webkit detected the CCACHE_PREFIX env var is set to `icecc`.
     188==== icecc troubleshooting
     190* If jobs are not being distributed, then check WebKitBuild/Release/ is using /usr/lib/ccache/g++.
     192rule CXX_COMPILER
     193  depfile = $DEP_FILE
     194  command = /usr/lib/ccache/g++   $DEFINES $FLAGS -MMD -MT $out -MF "$DEP_FILE" -o $out -c $in
     195  description = Building CXX object $out
     197* If you get strange errors when building try to clear the ccache cache (ccache -C) and start with a clean build
     200$ Tools/Scripts/webkit-flatpak -c ccache -C
     201$ rm -fr WebKitBuild/GTK/Release