* [PATCH] bitbake.conf: Use immediate expansion for os.uname()
@ 2015-05-26 10:42 Richard Purdie
0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2015-05-26 10:42 UTC (permalink / raw)
To: openembedded-core
Use immediate expansion for BUILD_ARCH and BUILD_OS since there is no
point in repeatedly calling os.uname() throughout parsing. This is
worth around 2% of parsing time, small but measurable.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 8653a7f..eb0208d 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -81,8 +81,10 @@ ROOT_HOME ??= "/home/root"
# Architecture-dependent build variables.
##################################################################
-BUILD_ARCH = "${@os.uname()[4]}"
-BUILD_OS = "${@os.uname()[0].lower()}"
+# Immediate expansion since there is no point in reapeatedly calling
+# os.uname() throughout parsing
+BUILD_ARCH := "${@os.uname()[4]}"
+BUILD_OS := "${@os.uname()[0].lower()}"
BUILD_VENDOR = ""
BUILD_SYS = "${BUILD_ARCH}${BUILD_VENDOR}-${BUILD_OS}"
BUILD_PREFIX = ""
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-05-26 10:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-26 10:42 [PATCH] bitbake.conf: Use immediate expansion for os.uname() Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox