aboutsummaryrefslogtreecommitdiff
path: root/scripts/build-many-glibcs.py
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2024-12-25 05:05:31 +0800
committerH.J. Lu <hjl.tools@gmail.com>2024-12-25 08:00:06 +0800
commit757ac24f8f2344e5f8afd2465c808d0f6adcc948 (patch)
tree72c2d349590d7ed07992c6e06059f843ece4658f /scripts/build-many-glibcs.py
parenta3db3fe42bdf449af33fbc400f66890d2d41c3f4 (diff)
downloadglibc-757ac24f8f2344e5f8afd2465c808d0f6adcc948.zip
glibc-757ac24f8f2344e5f8afd2465c808d0f6adcc948.tar.gz
glibc-757ac24f8f2344e5f8afd2465c808d0f6adcc948.tar.bz2
build-many-glibcs.py: Add --exclude option
m68k-linux-gnu-coldfire-soft GCC and glibc often won't build due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103370 which results in build-many-glibcs.py failure. Add an option, --exclude, to exclude some targets. Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'scripts/build-many-glibcs.py')
-rwxr-xr-xscripts/build-many-glibcs.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py
index c53aa89..62fb51f 100755
--- a/scripts/build-many-glibcs.py
+++ b/scripts/build-many-glibcs.py
@@ -107,7 +107,7 @@ class Context(object):
"""The global state associated with builds in a given directory."""
def __init__(self, topdir, parallelism, keep, replace_sources, strip,
- full_gcc, action, shallow=False):
+ full_gcc, action, exclude, shallow=False):
"""Initialize the context."""
self.topdir = topdir
self.parallelism = parallelism
@@ -115,6 +115,7 @@ class Context(object):
self.replace_sources = replace_sources
self.strip = strip
self.full_gcc = full_gcc
+ self.exclude = exclude
self.shallow = shallow
self.srcdir = os.path.join(topdir, 'src')
self.versions_json = os.path.join(self.srcdir, 'versions.json')
@@ -502,6 +503,8 @@ class Context(object):
def add_config(self, **args):
"""Add an individual build configuration."""
cfg = Config(self, **args)
+ if self.exclude and cfg.name in self.exclude:
+ return
if cfg.name in self.configs:
print('error: duplicate config %s' % cfg.name)
exit(1)
@@ -1884,6 +1887,8 @@ def get_parser():
help='Build GCC with all languages and libsanitizer')
parser.add_argument('--shallow', action='store_true',
help='Do not download Git history during checkout')
+ parser.add_argument('--exclude', dest='exclude',
+ help='Targets to be excluded', nargs='*')
parser.add_argument('topdir',
help='Toplevel working directory')
parser.add_argument('action',
@@ -1978,7 +1983,7 @@ def main(argv):
opts = parser.parse_args(argv)
topdir = os.path.abspath(opts.topdir)
ctx = Context(topdir, opts.parallelism, opts.keep, opts.replace_sources,
- opts.strip, opts.full_gcc, opts.action,
+ opts.strip, opts.full_gcc, opts.action, opts.exclude,
shallow=opts.shallow)
ctx.run_builds(opts.action, opts.configs)