diff options
author | Kyle Russell <bkylerussell@gmail.com> | 2016-08-24 09:28:40 -0400 |
---|---|---|
committer | Maxin B. John <maxin.john@intel.com> | 2016-08-30 16:49:09 +0300 |
commit | 8c663efa4f8efccf50d094dbc61c7b78031b3b7d (patch) | |
tree | d002a12d3fc2167d960fdf85dcb196847ed1c370 /recipes-core/icedtea/icedtea7-native.inc | |
parent | b2827bf00734331fa6776909e2bfee8f94790fda (diff) | |
download | meta-java-8c663efa4f8efccf50d094dbc61c7b78031b3b7d.tar.gz |
Reimplement helper method for parallelizing JDK builds
Simplifies duplicated implementation across multiple recipes that all
inherited from java.bbclass.
Previously implementation was not flexible in supporting other make
job-limiting flags (like -l for load) that are typically passed in
through PARALLEL_MAKE. (OpenJDK doesn't know about these other flags
that might have gotten tagged on after the value for -j.)
Signed-off-by: Kyle Russell <bkylerussell@gmail.com>
Signed-off-by: Maxin B. John <maxin.john@intel.com>
Diffstat (limited to 'recipes-core/icedtea/icedtea7-native.inc')
-rw-r--r-- | recipes-core/icedtea/icedtea7-native.inc | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/recipes-core/icedtea/icedtea7-native.inc b/recipes-core/icedtea/icedtea7-native.inc index 3344acb..d4c5c29 100644 --- a/recipes-core/icedtea/icedtea7-native.inc +++ b/recipes-core/icedtea/icedtea7-native.inc | |||
@@ -54,27 +54,8 @@ export ALT_FREETYPE_LIB_PATH = "${STAGING_LIBDIR}" | |||
54 | # which is already stripped. | 54 | # which is already stripped. |
55 | INSANE_SKIP_${PN} = "already-stripped" | 55 | INSANE_SKIP_${PN} = "already-stripped" |
56 | 56 | ||
57 | # OpenJDK supports parallel compilation but uses a plain number for this. | ||
58 | # In OE we have PARALLEL_MAKE which is the actual option passed to make, | ||
59 | # e.g. "-j 4". | ||
60 | ICEDTEA_PARALLEL_MAKE := "${PARALLEL_MAKE}" | ||
61 | PARALLEL_MAKE = "" | ||
62 | def get_jdk7_native_jobs(d): | ||
63 | import bb | ||
64 | |||
65 | pm = bb.data.getVar('ICEDTEA_PARALLEL_MAKE', d, 1); | ||
66 | if not pm: | ||
67 | return "1" | ||
68 | |||
69 | pm = pm.split("j"); | ||
70 | if (len(pm) == 2): | ||
71 | return pm[1].strip() | ||
72 | |||
73 | # Whatever found in PARALLEL_MAKE was not suitable. | ||
74 | return "1" | ||
75 | |||
76 | EXTRA_OECONF = "\ | 57 | EXTRA_OECONF = "\ |
77 | --with-parallel-jobs=${@get_jdk7_native_jobs(d)} \ | 58 | --with-parallel-jobs=${@java_get_parallel_make(d)} \ |
78 | \ | 59 | \ |
79 | --disable-tests \ | 60 | --disable-tests \ |
80 | --disable-hotspot-tests \ | 61 | --disable-hotspot-tests \ |
@@ -273,5 +254,3 @@ do_install() { | |||
273 | # Fix missing write permissions on the files. | 254 | # Fix missing write permissions on the files. |
274 | chmod ug+w -R ${JDK_INSTALL_DIR} | 255 | chmod ug+w -R ${JDK_INSTALL_DIR} |
275 | } | 256 | } |
276 | |||
277 | get_jdk7_native_jobs[vardepsexclude] += "ICEDTEA_PARALLEL_MAKE" | ||