Updated Kiwix build architecture (markdown)

Matthieu Gautier 2021-07-07 10:52:41 +02:00
parent 6399e6bf18
commit 818245e57b

@ -12,10 +12,10 @@ On top of that there is a common part in charge of setup everything, define what
## The informal matrix
For simplicity, kiwix-build tends to merge the concepts of target platform and build platform.
While this is definitvly the same things. On the kiwix-build point-of-view, they have to be setup in the same time.
While this is definitively not the same things, on the kiwix-build point-of-view, they have to be setup in the same time.
- We are building on unix platform so the command can be launch the same way (trough a shell).
- We are not supporting several compiler. (Ie, be able to compile for the same target with gcc or clang). We may have to compile for a target with a specific compiler. But they are tied together, so we handle them together.
- We are building on unix platform so the command can be launch the same way (through a shell).
- We are not supporting several compilers. (Ie, be able to compile for the same target with gcc or clang). We may have to compile for a target with a specific compiler. But they are tied together, so we handle them together.
So, with some exceptions, the command to run is defined by the informal two dimensional matrix `target_platform`x`dependency`.
@ -23,7 +23,7 @@ So, with some exceptions, the command to run is defined by the informal two dime
The environment (kiwixbuild/buildenv.py) is mainly in charge to provide an correct environment to launch command and provide some information to other part of kiwix-build.
There is two kind of environment. One "neutral" in charge for command that don't depends of the target platform (like git, svn, patch, ...). And another on in charge for other command (make, meson, configure, qmake, ...). As the exact environment variables to set depend of the target platform, it takes the values from the `platformInfo` object.
There is two kinds of environment. One "neutral" in charge for command that don't depends of the target platform (like git, svn, patch, ...). And another one in charge for other commands (make, meson, configure, qmake, ...). As the exact environment variables to set depend of the target platform, it takes the values from the `platformInfo` object.
## The platformInfo.
@ -31,7 +31,7 @@ The platformInfo is in charge to provide as most as possible the values, options
Platform are defined in the (kiwixbuild/platforms) directory.
You can see that sometime, platform depends of toolchains. Those toolchains are defined as
dependencies (after all, a toolchain is a things we have to download and setup/install as every dependencies)
dependencies (after all, a toolchain is a things we have to download and setup/install as every other dependencies)
## The dependencies.
@ -40,9 +40,8 @@ While each dependency has specificity. We mostly always do the same things :
- Build the source. (configure with configure, qmake, meson, ... and build with make, ninja, ...)
So each dependency is composed of two part, a `Source` and a `Builder`.
The Source is in charge to download and setup the source correctly (and it is independent of the
platformInfo).
The Builder is in charge to configure and build the source. To do so it relies on default options
The Source is in charge to download and setup the source correctly (and it is independent of the platformInfo).
The Builder is in charge to configure and build the source. To do so it relies on default options (specific to the build system)
that can be overridden by specific dependency's builder and options coming from the platformInfo.
The base Source and Builder are defined in (kiwixbuild/dependencies/base.py) and specific dependencies are defined in files in kiwixbuild/dependencies.