commit | b69b2066cd0ece5fdc743760bcbcd86244ec7ba4 | [log] [tgz] |
---|---|---|
author | Patrick Williams <patrick@stwcx.xyz> | Mon Jul 25 09:40:49 2022 -0500 |
committer | Patrick Williams <patrick@stwcx.xyz> | Mon Aug 01 14:49:48 2022 +0000 |
tree | 61db15915d3854304ad54b87a9cb4e1c4c02fd50 | |
parent | 37b9f414f5c45af0aaf70480116b9e62c0fa69c1 [diff] |
meson: refactor generators Using 'run_command' is not the appropriate way to generate code since it only runs when meson itself runs and doesn't expose to meson the correct dependency information. 'custom_target' is the more appropriate way to generate code, so switch to using it. This was noticed because when trying to build as a subproject, the depending repository failed with: ``` subprojects/phosphor-host-ipmid/meson.build:229:0: ERROR: Sandbox violation: Tried to grab file sensor-gen.cpp outside current (sub)project. ``` Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I555c6e1a7bfaabae63d757042ddc1c5a548295aa
meson builddir ninja -C builddir
meson builddir -Dbuildtype=minsize -Db_lto=true -Dtests=disabled ninja -C builddir
If any of the dependencies are not found on the host system during configuration, meson automatically gets them via its wrap dependencies mentioned in ipmid/subprojects
.
meson builddir -Dwrap_mode=nofallback ninja -C builddir
meson builddir -Dbuildtype=debug ninja -C builddir
meson builddir -Db_coverage=true -Dtests=enabled ninja -C builddir test ninja -C builddir coverage