diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-02-17 11:43:36 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-02-21 23:37:27 +0000 |
commit | 3be8a7a6b13a57905bcb57d42a08e71db27531da (patch) | |
tree | 8a6f3bdff1acecb7ff242716452a7f446483f49d | |
parent | 71ef3191938da772b07274165dd3a85c2ed011f1 (diff) | |
download | poky-3be8a7a6b13a57905bcb57d42a08e71db27531da.tar.gz |
icecc: Improve variables/terminology
The SYSTEM and USER seperation between variables seems odd and not necessary,
drop it. Avoid the use of whitelist/blacklist and also change "packages" to
"recipes" since that misuse causes confusion.
(From OE-Core rev: 0df0eb6401a02139b9110bc95e21d97a67125ec5)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/icecc.bbclass | 49 | ||||
-rw-r--r-- | meta/conf/bitbake.conf | 5 | ||||
-rw-r--r-- | meta/conf/documentation.conf | 6 | ||||
-rwxr-xr-x | scripts/contrib/convert-variable-renames.py | 5 |
4 files changed, 35 insertions, 30 deletions
diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass index 7a6be68aba..90ea3d8df6 100644 --- a/meta/classes/icecc.bbclass +++ b/meta/classes/icecc.bbclass | |||
@@ -19,22 +19,21 @@ | |||
19 | # or the default one provided by icecc-create-env.bb will be used | 19 | # or the default one provided by icecc-create-env.bb will be used |
20 | # (NOTE that this is a modified version of the script need it and *not the one that comes with icecc* | 20 | # (NOTE that this is a modified version of the script need it and *not the one that comes with icecc* |
21 | # | 21 | # |
22 | # User can specify if specific packages or packages belonging to class should not use icecc to distribute | 22 | # User can specify if specific recipes or recipes belonging to class should not use icecc to distribute |
23 | # compile jobs to remote machines, but handled locally, by defining ICECC_USER_CLASS_BL and ICECC_USER_PACKAGE_BL | 23 | # compile jobs to remote machines, but handled locally, by defining ICECC_CLASS_DISABLE and ICECC_RECIPE_DISABLE |
24 | # with the appropriate values in local.conf. In addition the user can force to enable icecc for packages | 24 | # with the appropriate values in local.conf. In addition the user can force to enable icecc for recipes |
25 | # which set an empty PARALLEL_MAKE variable by defining ICECC_USER_PACKAGE_WL. | 25 | # which set an empty PARALLEL_MAKE variable by defining ICECC_RECIPE_ENABLE. |
26 | # | 26 | # |
27 | ######################################################################################### | 27 | ######################################################################################### |
28 | #Error checking is kept to minimum so double check any parameters you pass to the class | 28 | #Error checking is kept to minimum so double check any parameters you pass to the class |
29 | ########################################################################################### | 29 | ########################################################################################### |
30 | 30 | ||
31 | BB_BASEHASH_IGNORE_VARS += "ICECC_PARALLEL_MAKE ICECC_DISABLED ICECC_USER_PACKAGE_BL \ | 31 | BB_BASEHASH_IGNORE_VARS += "ICECC_PARALLEL_MAKE ICECC_DISABLED ICECC_RECIPE_DISABLE \ |
32 | ICECC_USER_CLASS_BL ICECC_USER_PACKAGE_WL ICECC_PATH ICECC_ENV_EXEC \ | 32 | ICECC_CLASS_DISABLE ICECC_RECIPE_ENABLE ICECC_PATH ICECC_ENV_EXEC \ |
33 | ICECC_CARET_WORKAROUND ICECC_CFLAGS ICECC_ENV_VERSION \ | 33 | ICECC_CARET_WORKAROUND ICECC_CFLAGS ICECC_ENV_VERSION \ |
34 | ICECC_DEBUG ICECC_LOGFILE ICECC_REPEAT_RATE ICECC_PREFERRED_HOST \ | 34 | ICECC_DEBUG ICECC_LOGFILE ICECC_REPEAT_RATE ICECC_PREFERRED_HOST \ |
35 | ICECC_CLANG_REMOTE_CPP ICECC_IGNORE_UNVERIFIED ICECC_TEST_SOCKET \ | 35 | ICECC_CLANG_REMOTE_CPP ICECC_IGNORE_UNVERIFIED ICECC_TEST_SOCKET \ |
36 | ICECC_ENV_DEBUG ICECC_SYSTEM_PACKAGE_BL ICECC_SYSTEM_CLASS_BL \ | 36 | ICECC_ENV_DEBUG ICECC_REMOTE_CPP \ |
37 | ICECC_REMOTE_CPP \ | ||
38 | " | 37 | " |
39 | 38 | ||
40 | ICECC_ENV_EXEC ?= "${STAGING_BINDIR_NATIVE}/icecc-create-env" | 39 | ICECC_ENV_EXEC ?= "${STAGING_BINDIR_NATIVE}/icecc-create-env" |
@@ -66,7 +65,7 @@ CXXFLAGS += "${ICECC_CFLAGS}" | |||
66 | # Debug flags when generating environments | 65 | # Debug flags when generating environments |
67 | ICECC_ENV_DEBUG ??= "" | 66 | ICECC_ENV_DEBUG ??= "" |
68 | 67 | ||
69 | # "system" recipe blacklist contains a list of packages that can not distribute | 68 | # Disable recipe list contains a list of recipes that can not distribute |
70 | # compile tasks for one reason or the other. When adding new entry, please | 69 | # compile tasks for one reason or the other. When adding new entry, please |
71 | # document why (how it failed) so that we can re-evaluate it later e.g. when | 70 | # document why (how it failed) so that we can re-evaluate it later e.g. when |
72 | # there is new version | 71 | # there is new version |
@@ -79,21 +78,21 @@ ICECC_ENV_DEBUG ??= "" | |||
79 | # inline assembly | 78 | # inline assembly |
80 | # target-sdk-provides-dummy - ${HOST_PREFIX} is empty which triggers the "NULL | 79 | # target-sdk-provides-dummy - ${HOST_PREFIX} is empty which triggers the "NULL |
81 | # prefix" error. | 80 | # prefix" error. |
82 | ICECC_SYSTEM_PACKAGE_BL += "\ | 81 | ICECC_RECIPE_DISABLE += "\ |
83 | libgcc-initial \ | 82 | libgcc-initial \ |
84 | pixman \ | 83 | pixman \ |
85 | systemtap \ | 84 | systemtap \ |
86 | target-sdk-provides-dummy \ | 85 | target-sdk-provides-dummy \ |
87 | " | 86 | " |
88 | 87 | ||
89 | # "system" classes that should be blacklisted. When adding new entry, please | 88 | # Classes that should not use icecc. When adding new entry, please |
90 | # document why (how it failed) so that we can re-evaluate it later | 89 | # document why (how it failed) so that we can re-evaluate it later |
91 | # | 90 | # |
92 | # image - Image aren't compiling, but the testing framework for images captures | 91 | # image - Image aren't compiling, but the testing framework for images captures |
93 | # PARALLEL_MAKE as part of the test environment. Many tests won't use | 92 | # PARALLEL_MAKE as part of the test environment. Many tests won't use |
94 | # icecream, but leaving the high level of parallelism can cause them to | 93 | # icecream, but leaving the high level of parallelism can cause them to |
95 | # consume an unnecessary amount of resources. | 94 | # consume an unnecessary amount of resources. |
96 | ICECC_SYSTEM_CLASS_BL += "\ | 95 | ICECC_CLASS_DISABLE += "\ |
97 | image \ | 96 | image \ |
98 | " | 97 | " |
99 | 98 | ||
@@ -141,32 +140,28 @@ def use_icecc(bb,d): | |||
141 | pn = d.getVar('PN') | 140 | pn = d.getVar('PN') |
142 | bpn = d.getVar('BPN') | 141 | bpn = d.getVar('BPN') |
143 | 142 | ||
144 | # Blacklist/whitelist checks are made against BPN, because there is a good | 143 | # Enable/disable checks are made against BPN, because there is a good |
145 | # chance that if icecc should be skipped for a recipe, it should be skipped | 144 | # chance that if icecc should be skipped for a recipe, it should be skipped |
146 | # for all the variants of that recipe. PN is still checked in case a user | 145 | # for all the variants of that recipe. PN is still checked in case a user |
147 | # specified a more specific recipe. | 146 | # specified a more specific recipe. |
148 | check_pn = set([pn, bpn]) | 147 | check_pn = set([pn, bpn]) |
149 | 148 | ||
150 | system_class_blacklist = (d.getVar('ICECC_SYSTEM_CLASS_BL') or "").split() | 149 | class_disable = (d.getVar('ICECC_CLASS_DISABLE') or "").split() |
151 | user_class_blacklist = (d.getVar('ICECC_USER_CLASS_BL') or "none").split() | ||
152 | package_class_blacklist = system_class_blacklist + user_class_blacklist | ||
153 | 150 | ||
154 | for black in package_class_blacklist: | 151 | for class in class_disable: |
155 | if bb.data.inherits_class(black, d): | 152 | if bb.data.inherits_class(class, d): |
156 | bb.debug(1, "%s: class %s found in blacklist, disable icecc" % (pn, black)) | 153 | bb.debug(1, "%s: class %s found in disable, disable icecc" % (pn, class)) |
157 | return "no" | 154 | return "no" |
158 | 155 | ||
159 | system_package_blacklist = (d.getVar('ICECC_SYSTEM_PACKAGE_BL') or "").split() | 156 | disabled_recipes = (d.getVar('ICECC_RECIPE_DISABLE') or "").split() |
160 | user_package_blacklist = (d.getVar('ICECC_USER_PACKAGE_BL') or "").split() | 157 | enabled_recipes = (d.getVar('ICECC_RECIPE_ENABLE') or "").split() |
161 | user_package_whitelist = (d.getVar('ICECC_USER_PACKAGE_WL') or "").split() | ||
162 | package_blacklist = system_package_blacklist + user_package_blacklist | ||
163 | 158 | ||
164 | if check_pn & set(package_blacklist): | 159 | if check_pn & set(disabled_recipes): |
165 | bb.debug(1, "%s: found in blacklist, disable icecc" % pn) | 160 | bb.debug(1, "%s: found in disable list, disable icecc" % pn) |
166 | return "no" | 161 | return "no" |
167 | 162 | ||
168 | if check_pn & set(user_package_whitelist): | 163 | if check_pn & set(enabled_recipes): |
169 | bb.debug(1, "%s: found in whitelist, enable icecc" % pn) | 164 | bb.debug(1, "%s: found in enabled recipes list, enable icecc" % pn) |
170 | return "yes" | 165 | return "yes" |
171 | 166 | ||
172 | if d.getVar('PARALLEL_MAKE') == "": | 167 | if d.getVar('PARALLEL_MAKE') == "": |
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index 3fcdaf1a14..9b379de962 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf | |||
@@ -101,6 +101,11 @@ BB_RENAMED_VARIABLES[SDK_INHERIT_BLACKLIST] = "ESDK_CLASS_INHERIT_DISABLE" | |||
101 | BB_RENAMED_VARIABLES[SSTATE_DUPWHITELIST] = "SSTATE_ALLOW_OVERLAP_FILES" | 101 | BB_RENAMED_VARIABLES[SSTATE_DUPWHITELIST] = "SSTATE_ALLOW_OVERLAP_FILES" |
102 | BB_RENAMED_VARIABLES[SYSROOT_DIRS_BLACKLIST] = "SYSROOT_DIRS_IGNORE" | 102 | BB_RENAMED_VARIABLES[SYSROOT_DIRS_BLACKLIST] = "SYSROOT_DIRS_IGNORE" |
103 | BB_RENAMED_VARIABLES[UNKNOWN_CONFIGURE_WHITELIST] = "UNKNOWN_CONFIGURE_OPT_IGNORE" | 103 | BB_RENAMED_VARIABLES[UNKNOWN_CONFIGURE_WHITELIST] = "UNKNOWN_CONFIGURE_OPT_IGNORE" |
104 | BB_RENAMED_VARIABLES[ICECC_USER_CLASS_BL] = "ICECC_CLASS_DISABLE" | ||
105 | BB_RENAMED_VARIABLES[ICECC_SYSTEM_CLASS_BL] = "ICECC_CLASS_DISABLE" | ||
106 | BB_RENAMED_VARIABLES[ICECC_USER_PACKAGE_WL] = "ICECC_RECIPE_ENABLE" | ||
107 | BB_RENAMED_VARIABLES[ICECC_USER_PACKAGE_BL] = "ICECC_RECIPE_DISABLE" | ||
108 | BB_RENAMED_VARIABLES[ICECC_SYSTEM_PACKAGE_BL] = "ICECC_RECIPE_DISABLE" | ||
104 | 109 | ||
105 | ################################################################## | 110 | ################################################################## |
106 | # Architecture-dependent build variables. | 111 | # Architecture-dependent build variables. |
diff --git a/meta/conf/documentation.conf b/meta/conf/documentation.conf index 9614448a1f..1789da0bb8 100644 --- a/meta/conf/documentation.conf +++ b/meta/conf/documentation.conf | |||
@@ -205,9 +205,9 @@ HOST_VENDOR[doc] = "The name of the vendor. Normally same as the TARGET_VENDOR." | |||
205 | 205 | ||
206 | ICECC_ENV_EXEC[doc] = "Points to the icecc-create-env script that you provide." | 206 | ICECC_ENV_EXEC[doc] = "Points to the icecc-create-env script that you provide." |
207 | ICECC_PATH[doc] = "The location of the icecc binary." | 207 | ICECC_PATH[doc] = "The location of the icecc binary." |
208 | ICECC_USER_CLASS_BL[doc] = "Identifies user classes that you do not want the Icecream distributed compile support to consider." | 208 | ICECC_CLASS_DISABLE[doc] = "Identifies user classes that you do not want the Icecream distributed compile support to consider." |
209 | ICECC_USER_PACKAGE_BL[doc] = "Identifies user recipes that you do not want the Icecream distributed compile support to consider." | 209 | ICECC_RECIPE_DISABLE[doc] = "Identifies user recipes that you do not want the Icecream distributed compile support to consider." |
210 | ICECC_USER_PACKAGE_WL[doc] = "Identifies user recipes that use an empty PARALLEL_MAKE variable that you want to force remote distributed compilation on using the Icecream distributed compile support." | 210 | ICECC_RECIPE_ENABLE[doc] = "Identifies user recipes that use an empty PARALLEL_MAKE variable that you want to force remote distributed compilation on using the Icecream distributed compile support." |
211 | IMAGE_BASENAME[doc] = "The base name of image output files." | 211 | IMAGE_BASENAME[doc] = "The base name of image output files." |
212 | IMAGE_BOOT_FILES[doc] = "Whitespace separated list of files from ${DEPLOY_DIR_IMAGE} to place in boot partition. Entries will be installed under a same name as the source file. To change the destination file name, pass a desired name after a semicolon (eg. u-boot.img;uboot)." | 212 | IMAGE_BOOT_FILES[doc] = "Whitespace separated list of files from ${DEPLOY_DIR_IMAGE} to place in boot partition. Entries will be installed under a same name as the source file. To change the destination file name, pass a desired name after a semicolon (eg. u-boot.img;uboot)." |
213 | IMAGE_CLASSES[doc] = "A list of classes that all images should inherit." | 213 | IMAGE_CLASSES[doc] = "A list of classes that all images should inherit." |
diff --git a/scripts/contrib/convert-variable-renames.py b/scripts/contrib/convert-variable-renames.py index 2e2a74f87b..bc3e01887c 100755 --- a/scripts/contrib/convert-variable-renames.py +++ b/scripts/contrib/convert-variable-renames.py | |||
@@ -37,6 +37,11 @@ renames = { | |||
37 | "SSTATE_DUPWHITELIST" : "SSTATE_ALLOW_OVERLAP_FILES", | 37 | "SSTATE_DUPWHITELIST" : "SSTATE_ALLOW_OVERLAP_FILES", |
38 | "SYSROOT_DIRS_BLACKLIST" : "SYSROOT_DIRS_IGNORE", | 38 | "SYSROOT_DIRS_BLACKLIST" : "SYSROOT_DIRS_IGNORE", |
39 | "UNKNOWN_CONFIGURE_WHITELIST" : "UNKNOWN_CONFIGURE_OPT_IGNORE", | 39 | "UNKNOWN_CONFIGURE_WHITELIST" : "UNKNOWN_CONFIGURE_OPT_IGNORE", |
40 | "ICECC_USER_CLASS_BL" : "ICECC_CLASS_DISABLE", | ||
41 | "ICECC_SYSTEM_CLASS_BL" : "ICECC_CLASS_DISABLE", | ||
42 | "ICECC_USER_PACKAGE_WL" : "ICECC_RECIPE_ENABLE", | ||
43 | "ICECC_USER_PACKAGE_BL" : "ICECC_RECIPE_DISABLE", | ||
44 | "ICECC_SYSTEM_PACKAGE_BL" : "ICECC_RECIPE_DISABLE", | ||
40 | } | 45 | } |
41 | 46 | ||
42 | removed_list = [ | 47 | removed_list = [ |