# See if we can find source directories.
for src in options.src:
- for component in ["llvm", "llvm-gcc", "gcc", "dragonegg"]:
+ for component in components:
+ component = component.rstrip("2")
compsrc = src + "/" + component
if (not os.path.isdir(compsrc)):
parser.error("'" + compsrc + "' does not exist")
configure_flags = dict(
llvm=dict(debug=["--prefix=" + self.install_prefix,
"--with-extra-options=-Werror",
+ "--enable-assertions",
+ "--disable-optimized",
"--with-cxx-include-root=" + cxxroot,
"--with-cxx-include-arch=" + cxxarch],
release=["--prefix=" + self.install_prefix,
"--with-cxx-include-arch=" + cxxarch],
paranoid=["--prefix=" + self.install_prefix,
"--with-extra-options=-Werror",
+ "--enable-assertions",
"--enable-expensive-checks",
+ "--disable-optimized",
"--with-cxx-include-root=" + cxxroot,
"--with-cxx-include-arch=" + cxxarch]),
llvm_gcc=dict(debug=["--prefix=" + self.install_prefix,
"--enable-languages=c,c++"]),
llvm2=dict(debug=["--prefix=" + self.install_prefix,
"--with-extra-options=-Werror",
+ "--enable-assertions",
+ "--disable-optimized",
"--with-llvmgccdir=" + self.install_prefix + "/bin",
"--with-cxx-include-root=" + cxxroot,
"--with-cxx-include-arch=" + cxxarch],
"--with-cxx-include-arch=" + cxxarch],
paranoid=["--prefix=" + self.install_prefix,
"--with-extra-options=-Werror",
+ "--enable-assertions",
"--enable-expensive-checks",
+ "--disable-optimized",
"--with-llvmgccdir=" + self.install_prefix + "/bin",
"--with-cxx-include-root=" + cxxroot,
"--with-cxx-include-arch=" + cxxarch]),
release=dict(),
paranoid=dict()))
- for component in ["llvm", "llvm-gcc", "llvm2", "gcc", "dragonegg"]:
+ for component in components:
comp = component[:]
srcdir = source + "/" + comp.rstrip("2")
config_args = configure_flags[comp_key][build][:]
config_args.extend(getattr(self.options,
- "extra_" + comp_key
+ "extra_" + comp_key.rstrip("2")
+ "_config_flags").split())
self.logger.info("Configuring " + component + " in " + builddir)
def configure(self, component, srcdir, builddir, flags, env):
- self.logger.debug("Configure " + str(flags))
+ self.logger.debug("Configure " + str(flags) + " " + str(srcdir) + " -> "
+ + str(builddir))
configure_files = dict(
llvm=[(srcdir + "/configure", builddir + "/Makefile")],
# Global constants
build_abbrev = dict(debug="dbg", release="opt", paranoid="par")
+#components = ["llvm", "llvm-gcc", "llvm2", "gcc", "dragonegg"]
+components = ["llvm", "llvm2", "gcc", "dragonegg"]
# Parse options
parser = optparse.OptionParser(version="%prog 1.0")
format='%(name)-13s: %(message)s')
source_abbrev = get_path_abbrevs(set(options.src))
-branch_abbrev = get_path_abbrevs(set(options.branch))
+
+branch_abbrev = None
+if options.branch is not None:
+ branch_abbrev = get_path_abbrevs(set(options.branch))
work_queue = queue.Queue()
-for t in range(options.threads):
- jobs = options.jobs // options.threads
+jobs = options.jobs // options.threads
+if jobs == 0:
+ jobs = 1
+
+numthreads = options.threads
+if jobs < numthreads:
+ numthreads = jobs
+ jobs = 1
+
+for t in range(numthreads):
builder = Builder(work_queue, jobs,
build_abbrev, source_abbrev, branch_abbrev,
options)