diff options
Diffstat (limited to 'yocto-poky/meta/classes/waf.bbclass')
-rw-r--r-- | yocto-poky/meta/classes/waf.bbclass | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/yocto-poky/meta/classes/waf.bbclass b/yocto-poky/meta/classes/waf.bbclass index 3a221e708..5e55833ca 100644 --- a/yocto-poky/meta/classes/waf.bbclass +++ b/yocto-poky/meta/classes/waf.bbclass @@ -1,9 +1,34 @@ +# avoids build breaks when using no-static-libs.inc +DISABLE_STATIC = "" + +def get_waf_parallel_make(d): + pm = d.getVar('PARALLEL_MAKE', True) + if pm: + # look for '-j' and throw other options (e.g. '-l') away + # because they might have different meaning in bjam + pm = pm.split() + while pm: + v = None + opt = pm.pop(0) + if opt == '-j': + v = pm.pop(0) + elif opt.startswith('-j'): + v = opt[2:].strip() + else: + v = None + + if v: + v = min(64, int(v)) + return '-j' + str(v) + + return "" + waf_do_configure() { ${S}/waf configure --prefix=${prefix} ${EXTRA_OECONF} } waf_do_compile() { - ${S}/waf build ${PARALLEL_MAKE} + ${S}/waf build ${@get_waf_parallel_make(d)} } waf_do_install() { |