Separate packagedir for GL components of EMGD BSPs

When multiple BSPs of the same arch are built in a build directory,
the differences in GL providers such as emgd-driver and mesa causes
rebuild of large set of recipes, as they collide on each other's space
for multiple BSPs. Although this does not impact correctness, it
impacts build performance negatively.

 Richard had an idea of providing separate PACKAGE_DIR to the
colliding recipes to avoid the build area collision. And this approach
significantly reduces the negative impact on the build performance.

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2013-09-16 14:56:20 +00:00 committed by Tom Zanussi
parent 66def4d09c
commit 49f495e388
2 changed files with 14 additions and 0 deletions

11
classes/emgd-gl.bbclass Normal file
View File

@ -0,0 +1,11 @@
# give a different PACKAGE_ARCH to the recipes involved with opengl
python __anonymous () {
provides = set((d.getVar("PROVIDES", True) or "").split())
depends = set((d.getVar("DEPENDS", True) or "").split())
glp = set([ "virtual/libgles1", "virtual/libgles2", "virtual/egl", "virtual/mesa" , "virtual/libgl"])
if list(glp & (provides | depends)): # set union & intersection operations
# matched
d.appendVar("PACKAGE_ARCH", "${GLSUFFIX}")
return
}

View File

@ -0,0 +1,3 @@
INHERIT += "emgd-gl"
GLSUFFIX = "-emgd"
PACKAGE_EXTRA_ARCHS_append = " ${TUNE_PKGARCH}${GLSUFFIX}"