diff options
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/go.bbclass | 19 | ||||
-rw-r--r-- | meta/classes/waf.bbclass | 24 |
2 files changed, 2 insertions, 41 deletions
diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass index 09b01a84c3..7ecd8c9254 100644 --- a/meta/classes/go.bbclass +++ b/meta/classes/go.bbclass | |||
@@ -1,23 +1,6 @@ | |||
1 | inherit goarch ptest | 1 | inherit goarch ptest |
2 | 2 | ||
3 | def get_go_parallel_make(d): | 3 | GO_PARALLEL_BUILD ?= "${@oe.utils.parallel_make_argument(d, '-p %d')}" |
4 | pm = (d.getVar('PARALLEL_MAKE') or '').split() | ||
5 | # look for '-j' and throw other options (e.g. '-l') away | ||
6 | # because they might have a different meaning in golang | ||
7 | while pm: | ||
8 | opt = pm.pop(0) | ||
9 | if opt == '-j': | ||
10 | v = pm.pop(0) | ||
11 | elif opt.startswith('-j'): | ||
12 | v = opt[2:].strip() | ||
13 | else: | ||
14 | continue | ||
15 | |||
16 | return '-p %d' % int(v) | ||
17 | |||
18 | return "" | ||
19 | |||
20 | GO_PARALLEL_BUILD ?= "${@get_go_parallel_make(d)}" | ||
21 | 4 | ||
22 | GOROOT_class-native = "${STAGING_LIBDIR_NATIVE}/go" | 5 | GOROOT_class-native = "${STAGING_LIBDIR_NATIVE}/go" |
23 | GOROOT_class-nativesdk = "${STAGING_DIR_TARGET}${libdir}/go" | 6 | GOROOT_class-nativesdk = "${STAGING_DIR_TARGET}${libdir}/go" |
diff --git a/meta/classes/waf.bbclass b/meta/classes/waf.bbclass index bdbdc56767..f9a851d075 100644 --- a/meta/classes/waf.bbclass +++ b/meta/classes/waf.bbclass | |||
@@ -3,28 +3,6 @@ DISABLE_STATIC = "" | |||
3 | 3 | ||
4 | EXTRA_OECONF_append = " ${PACKAGECONFIG_CONFARGS}" | 4 | EXTRA_OECONF_append = " ${PACKAGECONFIG_CONFARGS}" |
5 | 5 | ||
6 | def get_waf_parallel_make(d): | ||
7 | pm = d.getVar('PARALLEL_MAKE') | ||
8 | if pm: | ||
9 | # look for '-j' and throw other options (e.g. '-l') away | ||
10 | # because they might have different meaning in bjam | ||
11 | pm = pm.split() | ||
12 | while pm: | ||
13 | v = None | ||
14 | opt = pm.pop(0) | ||
15 | if opt == '-j': | ||
16 | v = pm.pop(0) | ||
17 | elif opt.startswith('-j'): | ||
18 | v = opt[2:].strip() | ||
19 | else: | ||
20 | v = None | ||
21 | |||
22 | if v: | ||
23 | v = min(64, int(v)) | ||
24 | return '-j' + str(v) | ||
25 | |||
26 | return "" | ||
27 | |||
28 | python waf_preconfigure() { | 6 | python waf_preconfigure() { |
29 | import subprocess | 7 | import subprocess |
30 | from distutils.version import StrictVersion | 8 | from distutils.version import StrictVersion |
@@ -47,7 +25,7 @@ waf_do_configure() { | |||
47 | 25 | ||
48 | do_compile[progress] = "outof:^\[\s*(\d+)/\s*(\d+)\]\s+" | 26 | do_compile[progress] = "outof:^\[\s*(\d+)/\s*(\d+)\]\s+" |
49 | waf_do_compile() { | 27 | waf_do_compile() { |
50 | ${S}/waf build ${@get_waf_parallel_make(d)} | 28 | ${S}/waf build ${@oe.utils.parallel_make_argument(d, '-j%d', limit=64)} |
51 | } | 29 | } |
52 | 30 | ||
53 | waf_do_install() { | 31 | waf_do_install() { |