summaryrefslogtreecommitdiff
path: root/meta-phosphor/recipes-support
diff options
context:
space:
mode:
authorEd Tanous <ed@tanous.net>2020-08-18 01:16:39 +0300
committerAndrew Geissler <geissonator@yahoo.com>2020-08-20 02:12:36 +0300
commit9eeb80ffe1dcf95b1000ea15ed50f4c14b5dcbcb (patch)
treea26f5fc79ba69036785419fad2608bb9c8ea7200 /meta-phosphor/recipes-support
parent65efedf485b9ee003b9714ea610d1234983f44dd (diff)
downloadopenbmc-9eeb80ffe1dcf95b1000ea15ed50f4c14b5dcbcb.tar.xz
Enforce the coding standard usages of boost
3 years ago, we pushed a patch to allow the usage of boost libraries, and deleted the phrase "If you give a mouse a cookie". Seemingly, we've done a decent job of not asking for glass of milk, despite the cookie being given. https://github.com/openbmc/docs/commit/56d79455f15ef07be326e59fde4b47ca5866a30c This commit adds some enforcement of this by removing the libraries that are disallowed by the coding standard, and ensuring that only the boost headers are passed through the build. This means that it reduces a large bottleneck in the build, and saves a significant amount of build time (about 5 minutes the last time I measured it). After a discussion a long time ago, it was deemed that coroutine and context would be allowed in, given that they solved a significant problem, and didn't add a large binary size to the image. This patchset preserves those two libraries. I've had this patch locally for a long time to improve my build times; I only remembered it because boost-url broke it given that by default it builds in c++11 mode, which requires boost. As such, I have modified our build of it to build in standalone mode, which relies on c++17 semantics, and does not require boost libraries. This is added as a bbappend, given that it will likely be deleted from meta-phosphor shortly, once we merge in the latest yocto tree, which has accepted it. Tested: Built with the patchset below. obmc-phosphor-image builds in significantly less time, which no sstate cache. (From meta-phosphor rev: 69e46c2f6f94563762c57382f7dfcc6ac84229b5) Signed-off-by: Ed Tanous <ed@tanous.net> Change-Id: I44b849ad395092254a0df84e219e6e78b47625f1 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Diffstat (limited to 'meta-phosphor/recipes-support')
-rw-r--r--meta-phosphor/recipes-support/boost-url/boost-url_%.bbappend1
-rw-r--r--meta-phosphor/recipes-support/boost/boost_%.bbappend12
2 files changed, 13 insertions, 0 deletions
diff --git a/meta-phosphor/recipes-support/boost-url/boost-url_%.bbappend b/meta-phosphor/recipes-support/boost-url/boost-url_%.bbappend
new file mode 100644
index 0000000000..5ef4f9fe9b
--- /dev/null
+++ b/meta-phosphor/recipes-support/boost-url/boost-url_%.bbappend
@@ -0,0 +1 @@
+EXTRA_OECMAKE_append_openbmc-phosphor = "-DBOOST_URL_STANDALONE=ON"
diff --git a/meta-phosphor/recipes-support/boost/boost_%.bbappend b/meta-phosphor/recipes-support/boost/boost_%.bbappend
new file mode 100644
index 0000000000..aa93d7305d
--- /dev/null
+++ b/meta-phosphor/recipes-support/boost/boost_%.bbappend
@@ -0,0 +1,12 @@
+#This is largely to improve our build times by not building or installing
+#modules that OpenBMC does not use by our coding standard. Another thing to
+#note is that for most targets, coroutine and context libraries are also added
+#with a BOOST_LIBS_append_<platform> for most targets. Chrono/Thread should not
+#be relied directly, but are required dependencies of context and coroutine.
+#See the relevant portion of the openbmc coding standard with regards to boost
+#libraries
+#
+#https://github.com/openbmc/docs/blob/master/cpp-style-and-conventions.md#boost
+#
+BOOST_LIBS_openbmc-phosphor = "chrono thread"
+